Project-specific namespace. More...
Namespaces | |
DriverProgram | |
Encapsulate GridConversion-specific code constructs. | |
ExampleProgram | |
Encapsulate example program-specific code constructs. | |
TestFixture | |
Namespace for storing simple test utility fixtures. | |
Classes | |
class | TestingObject |
Project-specific testing object. More... | |
class | TestComLine |
ComLineObject for GridConversion testing command-line interface. More... | |
Typedefs | |
typedef IRAD::Util::TestResults | TestResults |
Project-specific test results type. More... | |
typedef IRAD::Comm::CommunicatorObject | CommType |
Convenience typedef for CommunicatorObject. More... | |
Functions | |
std::string | ExampleFunction (const std::string &instring) |
Example function for GridConversion (this is a brief description). More... | |
double | TrapezoidQuadrature (double(*f)(double), double x0, double xn, int n) |
Integrates f with composite trapezoid rule. More... | |
double | MidPointQuadrature (double(*f)(double), double x0, double xn, int n) |
Integrates f with composite midpoint rule. More... | |
bool | Excluded (const std::string &filename) |
Exclude certain template files from conversion in project creation. More... | |
int | MakeProject (int argc, char *argv[]) |
Creates a new project from an GridConversion base. More... | |
int | ParallelTest (int argc, char *argv[]) |
Drives the GridConversion::TestObject. More... | |
int | Test (int argc, char *argv[]) |
Drives the GridConversion::TestObject. More... | |
Project-specific namespace.
Every project needs its own namespace. This helps make it much easier to deal with in integrated/composite software packages.
typedef IRAD::Comm::CommunicatorObject CommType |
Convenience typedef for CommunicatorObject.
Definition at line 20 of file ParallelTestGridConversion.C.
typedef IRAD::Util::TestResults TestResults |
Project-specific test results type.
Test results types can be custom implemented by the project developer. The requirement is that they produce the proper test results output when used with outstreams.
Definition at line 41 of file GridConversionTest.H.
std::string ExampleFunction | ( | const std::string & | instring | ) |
Example function for GridConversion (this is a brief description).
instring | Input string to copy |
The detailed description for ExampleFunction actually starts above with the constructs describing the input/output, and any notes, warnings, todo, bugs, author, or other information the author would like to put in.
At IR, we like for all code constructs to have a "brief" description -first sentence in this comment block, and then a "detailed" description as needed, but it should at least list the input params and output description. The actual example detailed documentation for this function now follows:
This function returns a copy of the input string. If there were more to say about this, then it can be said here.
Definition at line 31 of file ExampleSourceFile.C.
Referenced by TestingObject< ResultsType >::Test__ExampleFunction().
bool GridConversion::Excluded | ( | const std::string & | filename | ) |
Exclude certain template files from conversion in project creation.
Definition at line 25 of file MakeProject.C.
References x.
Referenced by MakeProject().
int GridConversion::MakeProject | ( | int | argc, |
char * | argv[] | ||
) |
Creates a new project from an GridConversion base.
This program is designed to make a new IllinoisRocstar software project starting from an intallation of the GridConversion project template.
Usage of this program should go like the following:
svn co $IRREPO/GridConversion/trunk GridConversion
mkdir gridconversion_build
cd gridconversion_build
cmake ../GridConversion
make
cd ../
gridconversion_build/bin/make_project GridConversion <NewProject>
The usage for the make_project command is:
make_project usage:
make_project <template name> <new project> [verb level]
This program will read the project template from the <template name>
directory and create a new "blank" IllinoisRocstar project
named <new name>, in a directory named <new name>.
An optional verblevel of 1 or 2 can be given to make the process
more verbose.
Definition at line 77 of file MakeProject.C.
References CreateDirectory(), Excluded(), FILEEXISTS(), n, v, and x.
Referenced by main().
double MidPointQuadrature | ( | double(*)(double) | f, |
double | x0, | ||
double | xn, | ||
int | n | ||
) |
Integrates f with composite midpoint rule.
f | Function to integrate takes a double argument, x, and returns a double value |
x0 | The lower integration domain limit. |
xn | The upper integration domain limit. |
n | The number of intervals into which to break the domain. |
With , and , the integral is calculated as:
The error of this method is .
Definition at line 51 of file ExampleSourceFile.C.
Referenced by TestingObject< ResultsType >::Test__MidPointQuadrature().
int GridConversion::ParallelTest | ( | int | argc, |
char * | argv[] | ||
) |
Drives the GridConversion::TestObject.
argc | number of string command line tokens |
argv | string command line tokens |
Drives the GridConversion::TestObject, which should encapsulate all the tests for the GridConversion namespace (and thus the project).
Command line documentation:
gridconversion_test [-h] [-v [level] -o <filename> -l <filename> -n <TestName> ] -h,--help Print out long version of help and exit. -v,--verblevel [level] Set the verbosity level. (default = 0) -o,--output <filename> Set the output file to <filename>. (default = stdout) -l,--list <filename> Set the list file name to <filename>. (no default). The list file should be a text file with one test name per line. -n,--name <TestName> Run test by name. (no default)
Definition at line 50 of file ParallelTestGridConversion.C.
References TestComLine::Initialize(), rank, and test().
Referenced by main().
int GridConversion::Test | ( | int | argc, |
char * | argv[] | ||
) |
Drives the GridConversion::TestObject.
argc | number of string command line tokens |
argv | string command line tokens |
Drives the GridConversion::TestObject, which should encapsulate all the tests for the GridConversion namespace (and thus the project).
Command line documentation:
gridconversion_test [-h] [-v [level] -o <filename> -l <filename> -n <TestName> ] -h,--help Print out long version of help and exit. -v,--verblevel [level] Set the verbosity level. (default = 0) -o,--output <filename> Set the output file to <filename>. (default = stdout) -l,--list <filename> Set the list file name to <filename>. (no default). The list file should be a text file with one test name per line. -n,--name <TestName> Run test by name. (no default)
Definition at line 45 of file TestGridConversion.C.
References TestComLine::Initialize(), TestingObject< ResultsType >::Process(), TestingObject< ResultsType >::RunTest(), and test().
Referenced by main().
double TrapezoidQuadrature | ( | double(*)(double) | f, |
double | x0, | ||
double | xn, | ||
int | n | ||
) |
Integrates f with composite trapezoid rule.
f | Function to integrate takes a double argument, x, and returns a double value |
x0 | The lower integration domain limit. |
xn | The upper integration domain limit. |
n | The number of intervals into which to break the domain. |
With , and , the integral is calculated as:
The error of this method is .
Definition at line 39 of file ExampleSourceFile.C.
Referenced by TestingObject< ResultsType >::Test__TrapezoidQuadrature().