61 int nq = pFields[0]->GetTotPoints();
63 const TiXmlElement* funcNameElmt = pForce->FirstChildElement(
"BODYFORCE");
64 ASSERTL0(funcNameElmt,
"Requires BODYFORCE tag specifying function "
65 "name which prescribes body force.");
67 string funcName = funcNameElmt->GetText();
69 "Function '" + funcName +
"' not defined.");
71 bool singleMode, halfMode;
72 m_session->MatchSolverInfo(
"ModeType",
"SingleMode", singleMode,
false);
73 m_session->MatchSolverInfo(
"ModeType",
"HalfMode", halfMode,
false);
76 std::string s_FieldStr;
82 "Variable '" + s_FieldStr +
"' not defined.");
92 if (singleMode || halfMode || homogeneous)
97 bool w = pFields[0]->GetWaveSpace();
101 pFields[0]->SetWaveSpace(
false);
102 pFields[0]->FwdTrans_IterPerExp(
m_Forcing[i], forcingCoeff);
104 pFields[0]->SetWaveSpace(
true);
105 pFields[0]->BwdTrans(forcingCoeff,
m_Forcing[i]);
107 pFields[0]->SetWaveSpace(w);
Array< OneD, Array< OneD, NekDouble > > m_Forcing
Evaluated forcing function.
#define ASSERTL0(condition, msg)
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.