Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 42 of file ShallowWaterSolver.cpp.
References ASSERTL0, Nektar::LibUtilities::SessionReader::CreateInstance(), Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), and Nektar::SolverUtils::GetEquationSystemFactory().
46 session = LibUtilities::SessionReader::CreateInstance(argc, argv);
48 time_t starttime, endtime;
59 session->GetSolverInfo(
"EQTYPE"), session);
63 ASSERTL0(e == -1,
"No such solver class defined.");
68 equ->PrintSummary(cout);
76 CPUtime = (1.0/60.0/60.0)*difftime(endtime,starttime);
84 cout <<
"-------------------------------------------" << endl;
85 cout <<
"Total Computation Time = " << CPUtime <<
" hr." << endl;
88 for(
int i = 0; i < equ->GetNvariables(); ++i)
90 cout <<
"L 2 error (variable " << equ->GetVariable(i) <<
"): " << equ->L2Error(i,
true) << endl;
91 cout <<
"L inf error (variable " << equ->GetVariable(i) <<
"): " << equ->LinfError(i) << endl;
#define ASSERTL0(condition, msg)
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
EquationSystemFactory & GetEquationSystemFactory()