44 std::string Driver::evolutionOperatorLookupIds[6] = {
45 LibUtilities::SessionReader::RegisterEnumValue(
"EvolutionOperator",
47 LibUtilities::SessionReader::RegisterEnumValue(
"EvolutionOperator",
49 LibUtilities::SessionReader::RegisterEnumValue(
"EvolutionOperator",
51 LibUtilities::SessionReader::RegisterEnumValue(
53 LibUtilities::SessionReader::RegisterEnumValue(
55 LibUtilities::SessionReader::RegisterEnumValue(
57 std::string Driver::evolutionOperatorDef =
58 LibUtilities::SessionReader::RegisterDefaultSolverInfo(
"EvolutionOperator",
60 std::string Driver::driverDefault =
61 LibUtilities::SessionReader::RegisterDefaultSolverInfo(
"Driver",
75 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(pGraph)
93 "EqType SolverInfo tag must be defined.");
94 std::string vEquation =
m_session->GetSolverInfo(
"EqType");
95 if (
m_session->DefinesSolverInfo(
"SolverType"))
97 vEquation =
m_session->GetSolverInfo(
"SolverType");
103 "EquationSystem '" + vEquation +
104 "' is not defined.\n"
105 "Ensure equation name is correct and module is compiled.\n");
111 "EvolutionOperator");
124 m_session->SetTag(
"AdvectiveType",
"Convective");
129 m_session->SetTag(
"AdvectiveType",
"Linearised");
134 m_session->SetTag(
"AdvectiveType",
"Adjoint");
140 m_session->SetTag(
"AdvectiveType",
"Linearised");
145 m_session->SetTag(
"AdvectiveType",
"Adjoint");
150 m_session->SetTag(
"AdvectiveType",
"SkewSymmetric");
159 string LinNSCondFile;
160 vector<string> LinNSFilename;
166 for (
int i = 0; i <
m_session->GetFilenames().size() - 1; ++i)
168 LinNSFilename.push_back(
m_session->GetFilenames()[i]);
171 LinNSCondFile =
m_session->GetSessionName();
172 LinNSCondFile +=
"_LinNS.xml";
173 LinNSFilename.push_back(LinNSCondFile);
175 char *argv[] = {
const_cast<char *
>(
"IncNavierStokesSolver"),
178 1, argv, LinNSFilename,
m_session->GetComm());
189 m_session->SetTag(
"AdvectiveType",
"Convective");
195 ASSERTL0(
false,
"Unrecognised evolution operator.");
200 ASSERTL0(e == -1,
"No such class class defined.");
201 out <<
"An error occurred during driver initialisation." << endl;
207 ASSERTL0(
false,
"This routine is not valid in this class");
213 ASSERTL0(
false,
"This routine is not valid in this class");
#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 SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
LibUtilities::SessionReaderSharedPtr session_LinNS
I the 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)
SpatialDomains::MeshGraphSharedPtr m_graph
MeshGraph object.
enum EvolutionOperatorType m_EvolutionOperator
Evolution Operator.
Array< OneD, EquationSystemSharedPtr > m_equ
Equation system to solve.
int m_nequ
number of equations
virtual SOLVER_UTILS_EXPORT Array< OneD, NekDouble > v_GetRealEvl(void)
virtual SOLVER_UTILS_EXPORT Array< OneD, NekDouble > v_GetImagEvl(void)
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true)
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.
static Array< OneD, NekDouble > NullNekDouble1DArray