63 string filename =
m_config[
"outfile"].as<
string>();
67 cout <<
"OutputPts: Writing file..." << endl;
70 fs::path writefile(filename);
72 if (fs::exists(writefile) && (vm.count(
"forceoutput") == 0))
75 int rank = comm->GetRank();
81 cout <<
"Did you wish to overwrite " << filename <<
" (y/n)? ";
83 if (answer.compare(
"y") == 0)
89 cout <<
"Not writing file " << filename
90 <<
" because it already exists" << endl;
101 m_f->m_graph->GetMeshDimension() +
102 m_f->m_fielddef[0]->m_fields.size());
104 switch (
m_f->m_graph->GetMeshDimension())
108 m_f->m_exp[0]->GetCoords(tmp[0]);
114 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1]);
121 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1], tmp[2]);
125 for (
int i = 0; i <
m_f->m_fielddef[0]->m_fields.size(); ++i)
127 tmp[i +
m_f->m_graph->GetMeshDimension()] =
128 m_f->m_exp[i]->GetPhys();
132 m_f->m_graph->GetMeshDimension(),
133 m_f->m_fielddef[0]->m_fields,
135 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.