78 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(pGraph)
99 "EqType SolverInfo tag must be defined.");
100 std::string vEquation =
m_session->GetSolverInfo(
"EqType");
101 if (
m_session->DefinesSolverInfo(
"SolverType"))
103 vEquation =
m_session->GetSolverInfo(
"SolverType");
109 "EquationSystem '" + vEquation +
110 "' is not defined.\n"
111 "Ensure equation name is correct and module is compiled.\n");
117 "EvolutionOperator");
130 m_session->SetTag(
"AdvectiveType",
"Convective");
135 m_session->SetTag(
"AdvectiveType",
"Linearised");
140 m_session->SetTag(
"AdvectiveType",
"Adjoint");
146 m_session->SetTag(
"AdvectiveType",
"Linearised");
151 m_session->SetTag(
"AdvectiveType",
"Adjoint");
156 m_session->SetTag(
"AdvectiveType",
"SkewSymmetric");
165 string LinNSCondFile;
166 vector<string> LinNSFilename;
172 for (
int i = 0; i <
m_session->GetFilenames().size() - 1; ++i)
174 LinNSFilename.push_back(
m_session->GetFilenames()[i]);
177 LinNSCondFile =
m_session->GetSessionName();
178 LinNSCondFile +=
"_LinNS.xml";
179 LinNSFilename.push_back(LinNSCondFile);
181 char *argv[] = {
const_cast<char *
>(
"IncNavierStokesSolver"),
184 1, argv, LinNSFilename,
m_comm);
195 m_session->SetTag(
"AdvectiveType",
"Convective");
201 ASSERTL0(
false,
"Unrecognised evolution operator.");
206 ASSERTL0(e == -1,
"No such class class defined.");
207 out <<
"An error occurred during driver initialisation." << endl;
#define ASSERTL0(condition, msg)
Provides a generic Factory class.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
LibUtilities::SessionReaderSharedPtr session_LinNS
Coupling between SFD and arnoldi.
virtual ~Driver()
Destructor.
LibUtilities::SessionReaderSharedPtr m_session
Session reader object.
virtual SOLVER_UTILS_EXPORT void v_InitObject(std::ostream &out=std::cout)
Virtual function for initialisation implementation.
static std::string evolutionOperatorLookupIds[]
Driver(const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph)
Initialises EquationSystem class members.
LibUtilities::CommSharedPtr m_comm
Communication object.
SpatialDomains::MeshGraphSharedPtr m_graph
MeshGraph object.
enum EvolutionOperatorType m_EvolutionOperator
Evolution Operator.
Array< OneD, EquationSystemSharedPtr > m_equ
Equation system to solve.
static std::string driverDefault
int m_nequ
number of equations
static std::string evolutionOperatorDef
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true, SpatialDomains::MeshGraphSharedPtr partitionedGraph=nullptr)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
DriverFactory & GetDriverFactory()
EquationSystemFactory & GetEquationSystemFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
The above copyright notice and this permission notice shall be included.