Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
LinearElasticSolver.cpp File Reference
#include <SolverUtils/Driver.h>
#include <LibUtilities/BasicUtils/SessionReader.h>
Include dependency graph for LinearElasticSolver.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 43 of file LinearElasticSolver.cpp.

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

44 {
46  string vDriverModule;
47  DriverSharedPtr drv;
48 
49  try
50  {
51  // Create session reader.
52  session = LibUtilities::SessionReader::CreateInstance(argc, argv);
53 
54  // Create driver
55  session->LoadSolverInfo("Driver", vDriverModule, "Standard");
56  drv = GetDriverFactory().CreateInstance(vDriverModule, session);
57 
58  // Execute driver
59  drv->Execute();
60 
61  // Finalise session
62  session->Finalise();
63  }
64  catch (const std::runtime_error& e)
65  {
66  return 1;
67  }
68  catch (const std::string& eStr)
69  {
70  cout << "Error: " << eStr << endl;
71  }
72 
73  return 0;
74 }
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