42 AddHelp(
"metis",
"Metis testing stub.");
43 AddHelp(
"sparse",
"Write out the sparse matrix for visualization.");
44 AddHelp(
"clone",
"Generate <number> of partitions identical to the input mesh.");
45 AddHelp(
"generate",
"Generate a uniform mesh with N nodes and quit.");
46 AddHelp(
"checking",
"Paranoid and insanely verbose dumping of all important arrays to Log.");
47 AddHelp(
"partition",
"Performs Metis partitioning of input mesh into <number> partitions.");
48 AddHelp(
"assembly",
"Performs assembly test.");
49 AddHelp(
"mesh",
"Performs mesh tests.");
50 AddHelp(
"help",
"Prints this long version of help.");
51 AddHelp(
"verb",
"Makes the test more verbose. Default level is 1.");
52 AddHelp(
"config",
"Specifies the name of the configuration file.");
53 AddHelp(
"out",
"Specifies the name of the output file.");
54 AddHelp(
"renumber",
"Uses ParMETIS to do optimal graph reordering.");
55 AddArgHelp(
"input",
"Mode dependent arguments");
56 std::ostringstream Ostr;
60 Ostr <<
"Test tool for exercising the mesh library.";
70 std::string
sverb, spart, sclone;
71 bool do_part,do_meshtest,do_assem,do_orient,debug;
72 bool do_check, do_gen, do_clone, do_dump,
do_renum;
84 sverb = _command_line.GetOption(
"verb");
85 spart = _command_line.GetOption(
"partition");
86 sclone = _command_line.GetOption(
"clone");
87 do_part = !_command_line.GetOption(
"partition").empty();
88 do_meshtest = !_command_line.GetOption(
"mesh").empty();
89 do_assem = !_command_line.GetOption(
"assembly").empty();
90 do_orient = !_command_line.GetOption(
"reorient").empty();
91 debug = !_command_line.GetOption(
"debug").empty();
92 do_check = !_command_line.GetOption(
"checking").empty();
93 do_gen = !_command_line.GetOption(
"generate").empty();
94 do_clone = !_command_line.GetOption(
"clone").empty();
95 do_renum = !_command_line.GetOption(
"renumber").empty();
96 do_dump = !_command_line.GetOption(
"sparse").empty();
97 if(!_command_line.GetOption(
"help").empty()){
99 *_OutStream << _command_line.LongUsage() << std::endl;
100 globalCommunicator.SetExit(1);
102 if(globalCommunicator.Check())
106 *_ErrStream << _command_line.ErrorReport() << std::endl
107 << std::endl << _command_line.ShortUsage() << std::endl;
108 globalCommunicator.SetExit(1);
110 if(globalCommunicator.Check())
122 MyProgram.
OutStream() <<
"Calling RUN." << std::endl;
123 MyProgram.
StdOut(
"Testing\n");
126 std::cout <<
"Calling Finalize." << std::endl;
131 std::cout << params << std::endl;
134 std::cout <<
"All done." << std::endl;
140 int main(
int argc,
char *argv[])
int MyTestProgram(int argc, char *argv[])
Defines MPI-specific parallel global and program classes.
std::ostream & OutStream()
Gets the stdout stream object.
TestComLine(const char *args[])
void Initialize()
virtual function for program specific Initialization.
Performance Profiling interface definition.
std::string _description
application description.
virtual int StdOut(const std::string &outstr, unsigned char inlev=1)
void AddOption(char s, const std::string &l, int=0)
User interface to describe simple option.
Base global object header.
ComLineObject for testing app.
int main(int argc, char *argv[])
TestProgram(int nargs, char **args)
void AddArgument(const std::string &a, int reqd=0)
User interface to describe an application argument.
ComLineObject()
Default constructor.
void AddHelp(char s, const std::string &help)
Specify usage for an option.
void AddArgHelp(const std::string &a, const std::string &help)
Specify the usage info for application argument.
global::ParallelGlobalObj< comm::CommunicatorObject, std::string, int, profiler::ProfilerObj > TestGlobal