Commit e13d71ae authored by Chris Cantwell's avatar Chris Cantwell Committed by Spencer Sherwin
Browse files

Fix logic for reading time fn in body forcing.

parent f8aaa379
...@@ -70,7 +70,7 @@ namespace SolverUtils ...@@ -70,7 +70,7 @@ namespace SolverUtils
{ {
funcNameElmt = pForce->FirstChildElement("FIELDFORCE"); funcNameElmt = pForce->FirstChildElement("FIELDFORCE");
ASSERTL0(funcNameElmt, "Requires BODYFORCE of FIELDFORCE tag " ASSERTL0(funcNameElmt, "Requires BODYFORCE or FIELDFORCE tag "
"specifying function name which prescribes body force."); "specifying function name which prescribes body force.");
} }
...@@ -78,11 +78,14 @@ namespace SolverUtils ...@@ -78,11 +78,14 @@ namespace SolverUtils
ASSERTL0(m_session->DefinesFunction(funcName), ASSERTL0(m_session->DefinesFunction(funcName),
"Function '" + funcName + "' not defined."); "Function '" + funcName + "' not defined.");
// Time function is optional
funcNameElmt = pForce->FirstChildElement("BODYFORCETIMEFCN"); funcNameElmt = pForce->FirstChildElement("BODYFORCETIMEFCN");
if(!funcNameElmt) if(!funcNameElmt)
{ {
funcNameElmt = pForce->FirstChildElement("FIELDFORCETIMEFCN"); funcNameElmt = pForce->FirstChildElement("FIELDFORCETIMEFCN");
}
// Load time function if specified
if(funcNameElmt) if(funcNameElmt)
{ {
std::string funcNameTime = funcNameElmt->GetText(); std::string funcNameTime = funcNameElmt->GetText();
...@@ -97,7 +100,6 @@ namespace SolverUtils ...@@ -97,7 +100,6 @@ namespace SolverUtils
m_hasTimeFcnScaling = true; m_hasTimeFcnScaling = true;
} }
}
m_Forcing = Array<OneD, Array<OneD, NekDouble> > (m_NumVariable); m_Forcing = Array<OneD, Array<OneD, NekDouble> > (m_NumVariable);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment