43 int main(
int argc,
char *argv[])
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)
int main(int argc, char *argv[])
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
The above copyright notice and this permission notice shall be included.