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.")
95 cout <<
"Processing input fld file" << endl;
101 if(
m_f->m_inputfiles.count(
"fld") != 0)
105 else if(
m_f->m_inputfiles.count(
"chk") != 0)
109 else if (
m_f->m_inputfiles.count(
"rst") != 0)
113 else if (
m_f->m_inputfiles.count(
"bse") != 0)
119 ASSERTL0(
false,
"no input file found");
148 if(!expansions.size())
153 m_f->m_exp.resize(1);
156 SpatialDomains::ExpansionMap::const_iterator expIt;
159 for (expIt = expansions.begin(); expIt != expansions.end(); ++expIt)
161 ElementGIDs[i++] = expIt->second->m_geomShPtr->GetGlobalID();
164 m_f->m_fielddef.clear();
167 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
170 m_f->m_fieldMetaDataMap,
175 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
178 m_f->m_fieldMetaDataMap);
183 if(
m_f->m_exp.size())
187 m_f->m_session->LoadParameter(
"Strip_Z",nstrips,1);
189 if(vm.count(
"useSessionVariables"))
191 nfields =
m_f->m_session->GetVariables().size();
195 nfields =
m_f->m_fielddef[0]->m_fields.size();
199 m_f->m_exp.resize(nfields*nstrips);
201 vector<string> vars =
m_f->m_session->GetVariables();
204 for (
int s = 0; s < nstrips; ++s)
206 for (i = 0; i < nfields; ++i)
210 m_f->m_exp[s*nfields+i] =
m_f->AppendExpList(
211 m_f->m_fielddef[0]->m_numHomogeneousDir,
218 m_f->m_exp[s*nfields+i] =
220 m_f->m_fielddef[0]->m_numHomogeneousDir,
225 m_f->m_exp[s*nfields+i] =
227 m_f->m_fielddef[0]->m_numHomogeneousDir);
233 for(
int s = 0; s < nstrips; ++s)
235 for (j = 0; j < nfields; ++j)
237 for (i = 0; i <
m_f->m_data.size()/nstrips; ++i)
239 m_f->m_exp[s*nfields+j]->
240 ExtractDataToCoeffs(
m_f->m_fielddef[i*nstrips+s],
241 m_f->m_data[i*nstrips+s],
242 m_f->m_fielddef[i*nstrips+s]
244 m_f->m_exp[s*nfields+j]->UpdateCoeffs());
246 m_f->m_exp[s*nfields+j]->BwdTrans(
m_f->m_exp[s*nfields+j]->GetCoeffs(),
247 m_f->m_exp[s*nfields+j]->UpdatePhys());
253 if(vm.count(
"range"))
255 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
256 =
m_f->m_exp[0]->GetFieldDefinitions();
257 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
259 for (j = 0; j < nfields; ++j)
261 for (i = 0; i < FieldDef.size(); ++i)
263 FieldDef[i]->m_fields.push_back(
m_f->m_fielddef[0]->m_fields[j]);
264 m_f->m_exp[j]->AppendFieldData(FieldDef[i], FieldData[i]);
267 m_f->m_fielddef = FieldDef;
268 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.