50 ModuleKey ProcessConcatenateFld::className =
53 ProcessConcatenateFld::create,
54 "Concatenate field file into single file");
60 if ((f->m_inputfiles.count(
"xml") == 0) &&
61 (f->m_inputfiles.count(
"xml.gz") == 0))
63 cout <<
"An xml or xml.gz input file must be specified for the "
69 if ((f->m_inputfiles.count(
"fld") == 0) &&
70 (f->m_inputfiles.count(
"chk") == 0) &&
71 (f->m_inputfiles.count(
"rst") == 0))
73 cout <<
"A fld or chk or rst input file must be specified for the "
89 if (
m_f->m_comm->TreatAsRankZero())
91 cout <<
"ProcessConcatenateFld: Concatenating field file..."
96 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef =
97 m_f->m_exp[0]->GetFieldDefinitions();
98 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
101 for (
int j = 0; j <
m_f->m_exp.size(); ++j)
103 for (
int i = 0; i < FieldDef.size(); ++i)
106 FieldDef[i]->m_fields.push_back(
m_f->m_fielddef[0]->m_fields[j]);
107 m_f->m_exp[0]->AppendFieldData(FieldDef[i], FieldData[i],
108 m_f->m_exp[j]->UpdateCoeffs());
112 m_f->m_fielddef = FieldDef;
113 m_f->m_data = FieldData;
pair< ModuleType, string > ModuleKey
virtual ~ProcessConcatenateFld()
boost::shared_ptr< Field > FieldSharedPtr
virtual void Process(po::variables_map &vm)
Abstract base class for processing modules.
ModuleFactory & GetModuleFactory()
FieldSharedPtr m_f
Field object.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.