Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
CompressibleFlowSolver.cpp File Reference
#include <SolverUtils/Driver.h>
#include <SolverUtils/EquationSystem.h>
#include <LibUtilities/BasicUtils/SessionReader.h>
Include dependency graph for CompressibleFlowSolver.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 44 of file CompressibleFlowSolver.cpp.

References Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), and Nektar::SolverUtils::GetDriverFactory().

45 {
47  string vDriverModule;
48  DriverSharedPtr drv;
49 
50  try
51  {
52  // Create session reader.
53  session = LibUtilities::SessionReader::CreateInstance(argc, argv);
54 
55  // Create driver
56  session->LoadSolverInfo("Driver", vDriverModule, "Standard");
57  drv = GetDriverFactory().CreateInstance(vDriverModule, session);
58 
59  // Execute driver
60  drv->Execute();
61 
62  // Finalise communications
63  session->Finalise();
64  }
65  catch (const std::runtime_error&)
66  {
67  return 1;
68  }
69  catch (const std::string& eStr)
70  {
71  cout << "Error: " << eStr << endl;
72  }
73 
74  return 0;
75 
76 }
boost::shared_ptr< Driver > DriverSharedPtr
A shared pointer to a Driver object.
Definition: Driver.h:52
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.
Definition: NekFactory.hpp:162
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
DriverFactory & GetDriverFactory()
Definition: Driver.cpp:66