43 static std::string
npts = LibUtilities::SessionReader::RegisterCmdLineArgument(
44 "NumberOfPoints",
"n",
"Define number of points to dump output");
57 "Reads checkpoint file."),
60 "Reads restart file."),
63 "Reads stability base-flow file.")
97 if(
m_f->m_comm->GetRank() == 0)
99 cout <<
"Processing input fld file" << endl;
107 if(
m_f->m_inputfiles.count(
"fld") != 0)
111 else if(
m_f->m_inputfiles.count(
"chk") != 0)
115 else if (
m_f->m_inputfiles.count(
"rst") != 0)
119 else if (
m_f->m_inputfiles.count(
"bse") != 0)
125 ASSERTL0(
false,
"no input file found");
155 if(!expansions.size())
160 m_f->m_exp.resize(1);
163 SpatialDomains::ExpansionMap::const_iterator expIt;
166 for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
168 ElementGIDs[i++] = expIt->second->m_geomShPtr->GetGlobalID();
171 m_f->m_fielddef.clear();
174 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
177 m_f->m_fieldMetaDataMap,
182 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
185 m_f->m_fieldMetaDataMap);
190 if(
m_f->m_exp.size())
194 m_f->m_session->LoadParameter(
"Strip_Z",nstrips,1);
196 if(vm.count(
"useSessionVariables"))
198 nfields =
m_f->m_session->GetVariables().size();
202 nfields =
m_f->m_fielddef[0]->m_fields.size();
206 m_f->m_exp.resize(nfields*nstrips);
208 vector<string> vars =
m_f->m_session->GetVariables();
212 for (
int s = 0; s < nstrips; ++s)
214 for (i = 0; i < nfields; ++i)
219 if(!
m_f->m_exp[s*nfields+i])
221 m_f->m_exp[s*nfields+i] =
m_f->AppendExpList(
222 m_f->m_fielddef[0]->m_numHomogeneousDir,
230 m_f->m_exp[s*nfields+i] =
232 m_f->m_fielddef[0]->m_numHomogeneousDir,
237 m_f->m_exp[s*nfields+i] =
239 m_f->m_fielddef[0]->m_numHomogeneousDir);
246 for(
int s = 0; s < nstrips; ++s)
248 for (j = 0; j < nfields; ++j)
250 for (i = 0; i <
m_f->m_data.size()/nstrips; ++i)
252 m_f->m_exp[s*nfields+j]->
253 ExtractDataToCoeffs(
m_f->m_fielddef[i*nstrips+s],
254 m_f->m_data[i*nstrips+s],
255 m_f->m_fielddef[i*nstrips+s]
257 m_f->m_exp[s*nfields+j]->UpdateCoeffs());
259 m_f->m_exp[s*nfields+j]->BwdTrans(
m_f->m_exp[s*nfields+j]->GetCoeffs(),
260 m_f->m_exp[s*nfields+j]->UpdatePhys());
266 if(vm.count(
"range"))
268 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
269 =
m_f->m_exp[0]->GetFieldDefinitions();
270 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
272 for (j = 0; j < nfields; ++j)
274 for (i = 0; i < FieldDef.size(); ++i)
276 FieldDef[i]->m_fields.push_back(
m_f->m_fielddef[0]->m_fields[j]);
277 m_f->m_exp[j]->AppendFieldData(FieldDef[i], FieldData[i]);
280 m_f->m_fielddef = FieldDef;
281 m_f->m_data = FieldData;
287 if(
m_f->m_comm->GetRank() == 0)
293 ss << cpuTime <<
"s";
294 cout <<
"InputFld CPU Time: " << setw(8) << left
#define ASSERTL0(condition, msg)
pair< ModuleType, string > ModuleKey
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
CommFactory & GetCommFactory()
FieldSharedPtr m_f
Field object.
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
boost::shared_ptr< Field > FieldSharedPtr
NekDouble TimePerTest(unsigned int n)
Returns amount of seconds per iteration in a test with n iterations.
std::map< int, ExpansionShPtr > ExpansionMap
ModuleFactory & GetModuleFactory()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.