63 string filename =
m_config[
"outfile"].as<
string>();
67 if(
m_f->m_comm->TreatAsRankZero())
69 cout <<
"OutputPts: Writing file..." << endl;
73 fs::path writefile(filename);
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;
104 m_f->m_graph->GetMeshDimension() +
105 m_f->m_fielddef[0]->m_fields.size());
107 switch (
m_f->m_graph->GetMeshDimension())
111 m_f->m_exp[0]->GetCoords(tmp[0]);
117 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1]);
124 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1], tmp[2]);
128 for (
int i = 0; i <
m_f->m_fielddef[0]->m_fields.size(); ++i)
130 tmp[i +
m_f->m_graph->GetMeshDimension()] =
131 m_f->m_exp[i]->GetPhys();
135 m_f->m_graph->GetMeshDimension(),
136 m_f->m_fielddef[0]->m_fields,
138 ptsIO.Write(filename, tmpPts);
pair< ModuleType, string > ModuleKey
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
Abstract base class for output modules.
map< string, ConfigOption > m_config
List of configuration values.
FieldSharedPtr m_f
Field object.
boost::shared_ptr< PtsField > PtsFieldSharedPtr
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
boost::shared_ptr< Field > FieldSharedPtr
ModuleFactory & GetModuleFactory()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.