64 ASSERTL0( pFields[0]->GetGraph()->GetSpaceDimension() == 1,
65 "ForcingQuasi1D requires a 1D problem.");
67 const TiXmlElement* funcNameElmt = pForce->FirstChildElement(
"AREAFCN");
70 ASSERTL0(funcNameElmt,
"Requires AREAFCN tag " 71 "specifying function name which prescribes nozzle area.");
74 string funcName = funcNameElmt->GetText();
76 "Function '" + funcName +
"' not defined.");
79 m_geomFactor = Array<OneD, NekDouble> (pFields[0]->GetTotPoints(), 0.0);
80 Array<OneD, NekDouble> tmp (pFields[0]->GetTotPoints(), 0.0);
82 std::string sFieldStr =
m_session->GetVariable(0);
84 "Variable '" + sFieldStr +
"' not defined.");
86 ->Evaluate(sFieldStr, m_geomFactor, 0.0);
89 const TiXmlElement* dAFuncNameElmt = pForce->FirstChildElement(
"DADXFCN");
92 funcName = dAFuncNameElmt->GetText();
94 "Function '" + funcName +
"' not defined.");
96 "Variable '" + sFieldStr +
"' not defined.");
98 ->Evaluate(sFieldStr, tmp, 0.0);
110 Vmath::Neg(pFields[0]->GetTotPoints(), m_geomFactor, 1);
113 Array<OneD, NekDouble> tmpCoeff (pFields[0]->GetNcoeffs(), 0.0);
114 pFields[0]->FwdTrans_IterPerExp(m_geomFactor, tmpCoeff);
115 pFields[0]->BwdTrans(tmpCoeff, m_geomFactor);
120 m_Forcing[i] = Array<OneD, NekDouble> (pFields[0]->GetTotPoints(), 0.0);
Array< OneD, Array< OneD, NekDouble > > m_Forcing
Evaluated forcing function.
#define ASSERTL0(condition, msg)
VariableConverterSharedPtr m_varConv
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const LibUtilities::SessionReaderSharedPtr &pSession, std::string pName, bool pCache=false)
Get a SessionFunction by name.
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Array< OneD, NekDouble > m_geomFactor
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void Neg(int n, T *x, const int incx)
Negate x = -x.
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
MultiRegions::Direction const DirCartesianMap[]
int m_NumVariable
Number of variables.