44 RegisterCreatorFunction(
"Sponge",
51 m_hasRefFlowTime(false)
56 const Array<OneD, MultiRegions::ExpListSharedPtr>& pFields,
57 const unsigned int& pNumForcingFields,
58 const TiXmlElement* pForce)
61 int npts = pFields[0]->GetTotPoints();
63 const TiXmlElement* funcNameElmt;
64 funcNameElmt = pForce->FirstChildElement(
"SPONGECOEFF");
65 ASSERTL0(funcNameElmt,
"Requires SPONGECOEFF tag, specifying function "
66 "name which prescribes sponge coefficient.");
68 string funcName = funcNameElmt->GetText();
70 "Function '" + funcName +
"' not defined.");
72 std::string s_FieldStr;
79 "Variable '" + s_FieldStr +
"' not defined.");
81 m_Forcing[i] = Array<OneD, NekDouble> (
npts, 0.0);
83 m_Sponge[i], funcName);
86 funcNameElmt = pForce->FirstChildElement(
"REFFLOW");
89 string funcName = funcNameElmt->GetText();
91 "Function '" + funcName +
"' not defined.");
98 "Variable '" + s_FieldStr +
"' not defined.");
99 m_Refflow[i] = Array<OneD, NekDouble> (
npts, 0.0);
101 m_Refflow[i], funcName);
106 funcNameElmt = pForce->FirstChildElement(
"REFFLOWTIME");
111 "Function '" + funcName +
"' not defined.");
118 const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
119 const Array<
OneD, Array<OneD, NekDouble> > &inarray,
120 Array<
OneD, Array<OneD, NekDouble> > &outarray,
125 std::string s_FieldStr;
126 Array<OneD, NekDouble> TimeScale(1);
127 Array<OneD, Array<OneD, NekDouble> > RefflowScaled(
m_NumVariable);
133 RefflowScaled[i] = Array<OneD, NekDouble> (nq);
151 outarray[i], 1, outarray[i], 1);
161 outarray[i], 1, outarray[i], 1);