77 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(pGraph)
90 "EqType SolverInfo tag must be defined.");
91 std::string vEquation =
m_session->GetSolverInfo(
"EqType");
92 if (
m_session->DefinesSolverInfo(
"SolverType"))
94 vEquation =
m_session->GetSolverInfo(
"SolverType");
100 "EquationSystem '" + vEquation +
101 "' is not defined.\n"
102 "Ensure equation name is correct and module is compiled.\n");
108 "EvolutionOperator");
121 m_session->SetTag(
"AdvectiveType",
"Convective");
126 m_session->SetTag(
"AdvectiveType",
"Linearised");
131 m_session->SetTag(
"AdvectiveType",
"Adjoint");
137 m_session->SetTag(
"AdvectiveType",
"Linearised");
142 m_session->SetTag(
"AdvectiveType",
"Adjoint");
147 m_session->SetTag(
"AdvectiveType",
"SkewSymmetric");
155 m_session->DefinesCmdLineArgument(
"use-opt-file");
156 std::string optfilename =
157 useOptFile ?
m_session->GetFilenames()[0] :
"";
159 char *argv[] = {
const_cast<char *
>(
"IncNavierStokesSolver"),
160 const_cast<char *
>(
"--use-opt-file"),
161 const_cast<char *
>(optfilename.c_str()),
164 size_t argc = useOptFile ? 3 : 1;
166 std::vector<std::string> LinNSFilename;
167 if (
m_comm->GetSize() == 1)
170 LinNSFilename.push_back(
m_session->GetSessionName() +
176 LinNSFilename.push_back(
m_session->GetSessionName() +
179 LinNSFilename.push_back(
m_session->GetSessionName() +
183 argc, 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.
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