68 int nq = pFields[0]->GetTotPoints();
70 const TiXmlElement* funcNameElmt = pForce->FirstChildElement(
"BODYFORCE");
73 funcNameElmt = pForce->FirstChildElement(
"FIELDFORCE");
75 ASSERTL0(funcNameElmt,
"Requires BODYFORCE or FIELDFORCE tag "
76 "specifying function name which prescribes body force.");
79 string funcName = funcNameElmt->GetText();
81 "Function '" + funcName +
"' not defined.");
84 funcNameElmt = pForce->FirstChildElement(
"BODYFORCETIMEFCN");
87 funcNameElmt = pForce->FirstChildElement(
"FIELDFORCETIMEFCN");
93 std::string funcNameTime = funcNameElmt->GetText();
96 "Expression must be given in BODYFORCETIMEFCN or "
97 "FIELDFORCETIMEFCN.");
99 m_session->SubstituteExpressions(funcNameTime);
108 std::string s_FieldStr;
112 m_Forcing[i] = Array<OneD, NekDouble> (nq, 0.0);
115 "Variable '" + s_FieldStr +
"' not defined.");
120 bool singleMode, halfMode;
121 m_session->MatchSolverInfo(
"ModeType",
"SingleMode",singleMode,
false);
122 m_session->MatchSolverInfo(
"ModeType",
"HalfMode", halfMode,
false);
128 if (singleMode || halfMode || homogeneous)
Array< OneD, Array< OneD, NekDouble > > m_Forcing
Evaluated forcing function.
#define ASSERTL0(condition, msg)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
SOLVER_UTILS_EXPORT void EvaluateFunction(Array< OneD, MultiRegions::ExpListSharedPtr > pFields, LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
int m_NumVariable
Number of variables.
LibUtilities::EquationSharedPtr m_timeFcnEqn