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.")
96 if(
m_f->m_comm->TreatAsRankZero())
98 cout <<
"Processing input fld file" << endl;
105 if(
m_f->m_inputfiles.count(
"fld") != 0)
109 else if(
m_f->m_inputfiles.count(
"chk") != 0)
113 else if (
m_f->m_inputfiles.count(
"rst") != 0)
117 else if (
m_f->m_inputfiles.count(
"bse") != 0)
123 ASSERTL0(
false,
"no input file found");
144 if (
m_f->m_data.size() == 0)
150 m_f->m_graph->GetExpansions();
156 if(!expansions.size())
161 m_f->m_exp.resize(1);
164 SpatialDomains::ExpansionMap::const_iterator expIt;
167 for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
169 ElementGIDs[i++] = expIt->second->m_geomShPtr->GetGlobalID();
172 m_f->m_fielddef.clear();
175 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
178 m_f->m_fieldMetaDataMap,
184 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
187 m_f->m_fieldMetaDataMap);
192 if(
m_f->m_exp.size())
196 m_f->m_session->LoadParameter(
"Strip_Z",nstrips,1);
198 if(vm.count(
"useSessionVariables"))
200 nfields =
m_f->m_session->GetVariables().size();
204 nfields =
m_f->m_fielddef[0]->m_fields.size();
208 m_f->m_exp.resize(nfields*nstrips);
210 vector<string> vars =
m_f->m_session->GetVariables();
214 for (
int s = 0; s < nstrips; ++s)
216 for (i = 0; i < nfields; ++i)
221 if(!
m_f->m_exp[s*nfields+i])
223 m_f->m_exp[s*nfields+i] =
m_f->AppendExpList(
224 m_f->m_fielddef[0]->m_numHomogeneousDir,
232 m_f->m_exp[s*nfields+i] =
234 m_f->m_fielddef[0]->m_numHomogeneousDir,
239 m_f->m_exp[s*nfields+i] =
241 m_f->m_fielddef[0]->m_numHomogeneousDir);
248 for(
int s = 0; s < nstrips; ++s)
250 for (j = 0; j < nfields; ++j)
252 for (i = 0; i <
m_f->m_data.size()/nstrips; ++i)
254 m_f->m_exp[s*nfields+j]->
255 ExtractDataToCoeffs(
m_f->m_fielddef[i*nstrips+s],
256 m_f->m_data[i*nstrips+s],
257 m_f->m_fielddef[i*nstrips+s]
259 m_f->m_exp[s*nfields+j]->UpdateCoeffs());
261 m_f->m_exp[s*nfields+j]->BwdTrans(
m_f->m_exp[s*nfields+j]->GetCoeffs(),
262 m_f->m_exp[s*nfields+j]->UpdatePhys());
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;
#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
std::map< int, ExpansionShPtr > ExpansionMap
ModuleFactory & GetModuleFactory()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.