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->GetRank() == 0)
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");
153 if(!expansions.size())
158 m_f->m_exp.resize(1);
161 SpatialDomains::ExpansionMap::const_iterator expIt;
164 for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
166 ElementGIDs[i++] = expIt->second->m_geomShPtr->GetGlobalID();
169 m_f->m_fielddef.clear();
172 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
175 m_f->m_fieldMetaDataMap,
180 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
183 m_f->m_fieldMetaDataMap);
188 if(
m_f->m_exp.size())
192 m_f->m_session->LoadParameter(
"Strip_Z",nstrips,1);
194 if(vm.count(
"useSessionVariables"))
196 nfields =
m_f->m_session->GetVariables().size();
200 nfields =
m_f->m_fielddef[0]->m_fields.size();
204 m_f->m_exp.resize(nfields*nstrips);
206 vector<string> vars =
m_f->m_session->GetVariables();
210 for (
int s = 0; s < nstrips; ++s)
212 for (i = 0; i < nfields; ++i)
217 if(!
m_f->m_exp[s*nfields+i])
219 m_f->m_exp[s*nfields+i] =
m_f->AppendExpList(
220 m_f->m_fielddef[0]->m_numHomogeneousDir,
228 m_f->m_exp[s*nfields+i] =
230 m_f->m_fielddef[0]->m_numHomogeneousDir,
235 m_f->m_exp[s*nfields+i] =
237 m_f->m_fielddef[0]->m_numHomogeneousDir);
244 for(
int s = 0; s < nstrips; ++s)
246 for (j = 0; j < nfields; ++j)
248 for (i = 0; i <
m_f->m_data.size()/nstrips; ++i)
250 m_f->m_exp[s*nfields+j]->
251 ExtractDataToCoeffs(
m_f->m_fielddef[i*nstrips+s],
252 m_f->m_data[i*nstrips+s],
253 m_f->m_fielddef[i*nstrips+s]
255 m_f->m_exp[s*nfields+j]->UpdateCoeffs());
257 m_f->m_exp[s*nfields+j]->BwdTrans(
m_f->m_exp[s*nfields+j]->GetCoeffs(),
258 m_f->m_exp[s*nfields+j]->UpdatePhys());
264 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
265 =
m_f->m_exp[0]->GetFieldDefinitions();
266 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
268 for (j = 0; j < nfields; ++j)
270 for (i = 0; i < FieldDef.size(); ++i)
272 FieldDef[i]->m_fields.push_back(
m_f->m_fielddef[0]->m_fields[j]);
273 m_f->m_exp[j]->AppendFieldData(FieldDef[i], FieldData[i]);
276 m_f->m_fielddef = FieldDef;
277 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.