43 static std::string
npts = LibUtilities::SessionReader::RegisterCmdLineArgument(
44 "NumberOfPoints",
"n",
"Define number of points to dump output");
84 cout <<
"Processing input fld file" << endl;
90 if(
m_f->m_inputfiles.count(
"fld") != 0)
94 else if(
m_f->m_inputfiles.count(
"chk") != 0)
98 else if (
m_f->m_inputfiles.count(
"rst") != 0)
104 ASSERTL0(
false,
"no input file found");
133 if(!expansions.size())
138 m_f->m_exp.resize(1);
140 Array<OneD,int> ElementGIDs(expansions.size());
141 SpatialDomains::ExpansionMap::const_iterator expIt;
144 for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
146 ElementGIDs[i++] = expIt->second->m_geomShPtr->GetGlobalID();
149 m_f->m_fielddef.clear();
152 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
m_f->m_fielddef,
m_f->m_data,
158 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
m_f->m_fielddef,
m_f->m_data);
163 if(
m_f->m_exp.size())
166 if(vm.count(
"useSessionVariables"))
168 nfields =
m_f->m_session->GetVariables().size();
172 nfields =
m_f->m_fielddef[0]->m_fields.size();
174 m_f->m_exp.resize(nfields);
176 vector<string> vars =
m_f->m_session->GetVariables();
179 for (
int i = 1; i < nfields; ++i)
183 m_f->m_exp[i] =
m_f->AppendExpList(
m_f->m_fielddef[0]->m_numHomogeneousDir,
190 m_f->m_exp[i] =
m_f->AppendExpList(
m_f->m_fielddef[0]->m_numHomogeneousDir,vars[0]);
194 m_f->m_exp[i] =
m_f->AppendExpList(
m_f->m_fielddef[0]->m_numHomogeneousDir);
199 for (
int j = 0; j < nfields; ++j)
201 for (
int i = 0; i <
m_f->m_data.size(); ++i)
203 m_f->m_exp[j]->ExtractDataToCoeffs(
m_f->m_fielddef[i],
205 m_f->m_fielddef[i]->m_fields[j],
206 m_f->m_exp[j]->UpdateCoeffs());
208 m_f->m_exp[j]->BwdTrans(
m_f->m_exp[j]->GetCoeffs(),
209 m_f->m_exp[j]->UpdatePhys());
214 if(vm.count(
"range"))
216 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
217 =
m_f->m_exp[0]->GetFieldDefinitions();
218 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
220 for (
int j = 0; j < nfields; ++j)
222 for (i = 0; i < FieldDef.size(); ++i)
224 FieldDef[i]->m_fields.push_back(
m_f->m_fielddef[0]->m_fields[j]);
225 m_f->m_exp[j]->AppendFieldData(FieldDef[i], FieldData[i]);
228 m_f->m_fielddef = FieldDef;
229 m_f->m_data = FieldData;