63 string filename =
m_config[
"outfile"].as<
string>();
67 if (
m_f->m_comm->TreatAsRankZero())
69 cout <<
"OutputPts: Writing file..." << endl;
75 if (fs::exists(writefile) && (vm.count(
"forceoutput") == 0))
78 int rank = comm->GetRank();
84 cout <<
"Did you wish to overwrite " << filename <<
" (y/n)? ";
86 if (answer.compare(
"y") == 0)
92 cout <<
"Not writing file " << filename
93 <<
" because it already exists" << endl;
107 m_f->m_exp[0]->GetCoordim(0) +
108 m_f->m_fielddef[0]->m_fields.size());
110 switch (
m_f->m_exp[0]->GetCoordim(0))
114 m_f->m_exp[0]->GetCoords(tmp[0]);
120 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1]);
127 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1], tmp[2]);
131 for (
int i = 0; i <
m_f->m_fielddef[0]->m_fields.size(); ++i)
133 tmp[i +
m_f->m_exp[0]->GetCoordim(0)] =
134 m_f->m_exp[i]->GetPhys();
138 m_f->m_exp[0]->GetCoordim(0),
139 m_f->m_fielddef[0]->m_fields,
142 ptsIO.
Write(filename, fPts);
map< string, ConfigOption > m_config
List of configuration values.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
pair< ModuleType, string > ModuleKey
boost::shared_ptr< PtsField > PtsFieldSharedPtr
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
boost::shared_ptr< Field > FieldSharedPtr
virtual void Process(po::variables_map &vm)
Write fld to output file.
static PtsFieldSharedPtr NullPtsField
void Write(const string &outFile, const PtsFieldSharedPtr &ptsField, const bool backup=false)
Save a pts field to a file.
Abstract base class for output modules.
ModuleFactory & GetModuleFactory()
FieldSharedPtr m_f
Field object.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.