Commit 4e94574c authored by Spencer Sherwin's avatar Spencer Sherwin

Put in a check for when m_variables has a larger set of variables than pField...

Put in a check for when m_variables has a larger set of variables than pField in the restart routine
parent ded15b6c
......@@ -192,12 +192,28 @@ void FilterFieldConvert::v_Initialise(
fld->Import(m_restartFile, fieldDef, fieldData, fieldMetaData);
// Extract fields to output
int nfield,k;
for (int j = 0; j < m_variables.size(); ++j)
{
ASSERTL1(j < pFields.num_elements(), "Number of variables is larger than the size of pFields");
// see if m_variables is part of pFields definition and if
// so use that field for extract
for(k = 0; k < pFields.num_elements(); ++j)
{
if(pFields[k]->GetSession()->GetVariable(k)
== m_variables[j])
{
nfield = k;
break;
}
}
if(k == pFields.num_elements())
{
nfield = 0;
}
for (int i = 0; i < fieldData.size(); ++i)
{
pFields[j]->ExtractDataToCoeffs(
pFields[nfield]->ExtractDataToCoeffs(
fieldDef[i],
fieldData[i],
m_variables[j],
......
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