Nektar++
Loading...
Searching...
No Matches
Functions
DummySolver.cpp File Reference
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <SolverUtils/Driver.h>
#include <SpatialDomains/MeshGraphIO.h>

Go to the source code of this file.

Functions

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

Function Documentation

◆ main()

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

Definition at line 44 of file DummySolver.cpp.

45{
48 string vDriverModule;
50
51 try
52 {
53 // Create session reader.
55
56 // Create MeshGraph.
57 graph = SpatialDomains::MeshGraphIO::Read(session);
58
59 // Create driver
60 session->LoadSolverInfo("Driver", vDriverModule, "Standard");
61 drv = GetDriverFactory().CreateInstance(vDriverModule, session, graph);
62 session->SetSolverInfo("EqType", "Dummy");
63
64 // Execute driver
65 drv->Execute();
66
67 // Finalise session
68 session->Finalise();
69 }
70 catch (const std::runtime_error &e)
71 {
72 return 1;
73 }
74 catch (const std::string &eStr)
75 {
76 cout << "Error: " << eStr << endl;
77 }
78
79 return 0;
80}
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true, SpatialDomains::MeshGraphSharedPtr partitionedGraph=nullptr)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Driver > DriverSharedPtr
A shared pointer to a Driver object.
Definition Driver.h:52
DriverFactory & GetDriverFactory()
Definition Driver.cpp:64
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition MeshGraph.h:217

References Nektar::LibUtilities::SessionReader::CreateInstance(), Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::SolverUtils::GetDriverFactory(), and Nektar::SpatialDomains::MeshGraphIO::Read().