Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 43 of file ShallowWaterSolver.cpp.
47 session = LibUtilities::SessionReader::CreateInstance(argc, argv);
50 graph = SpatialDomains::MeshGraph::Read(session);
63 session->GetSolverInfo(
"EQTYPE"), session, graph);
67 ASSERTL0(e == -1,
"No such solver class defined.");
72 equ->PrintSummary(cout);
80 CPUtime = (1.0 / 60.0 / 60.0) * timer.
Elapsed().count();
88 cout <<
"-------------------------------------------" << endl;
89 cout <<
"Total Computation Time = " << CPUtime <<
" hr." << endl;
91 for (
int i = 0; i < equ->GetNvariables(); ++i)
93 cout <<
"L 2 error (variable " << equ->GetVariable(i)
94 <<
"): " << equ->L2Error(i,
true) << endl;
95 cout <<
"L inf error (variable " << equ->GetVariable(i)
96 <<
"): " << equ->LinfError(i) << endl;
#define ASSERTL0(condition, msg)
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
EquationSystemFactory & GetEquationSystemFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::LibUtilities::Timer::Elapsed(), Nektar::SolverUtils::GetEquationSystemFactory(), Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().