Commit ab2af0af authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

Forcing: dont create new m_Forcing[i] arrays at eah timestep

parent 5569b5f4
...@@ -109,6 +109,11 @@ namespace SolverUtils ...@@ -109,6 +109,11 @@ namespace SolverUtils
} }
m_Forcing = Array<OneD, Array<OneD, NekDouble> > (m_NumVariable); m_Forcing = Array<OneD, Array<OneD, NekDouble> > (m_NumVariable);
for (int i = 0; i < m_NumVariable; ++i)
{
m_Forcing[i] = Array<OneD, NekDouble> (pFields[0]->GetTotPoints(), 0.0);
}
Update(pFields, 0.0); Update(pFields, 0.0);
} }
...@@ -120,7 +125,6 @@ namespace SolverUtils ...@@ -120,7 +125,6 @@ namespace SolverUtils
{ {
for (int i = 0; i < m_NumVariable; ++i) for (int i = 0; i < m_NumVariable; ++i)
{ {
m_Forcing[i] = Array<OneD, NekDouble> (nq, 0.0);
std::string s_FieldStr = m_session->GetVariable(i); std::string s_FieldStr = m_session->GetVariable(i);
ASSERTL0(m_session->DefinesFunction(m_funcName, s_FieldStr), ASSERTL0(m_session->DefinesFunction(m_funcName, s_FieldStr),
"Variable '" + s_FieldStr + "' not defined."); "Variable '" + s_FieldStr + "' not defined.");
......
Markdown is supported
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