40#include <boost/core/ignore_unused.hpp>
56 "Writes a pts file."),
59 "Writes a csv file."),
72 boost::ignore_unused(vm);
75 string filename =
m_config[
"outfile"].as<
string>();
77 if (boost::filesystem::path(filename).extension() ==
".csv")
80 csvIO.
Write(filename,
m_f->m_fieldPts);
85 ptsIO.
Write(filename,
m_f->m_fieldPts);
92 m_f->m_variables.size());
94 switch (
m_f->m_exp[0]->GetCoordim(0))
98 m_f->m_exp[0]->GetCoords(tmp[0]);
104 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1]);
111 m_f->m_exp[0]->GetCoords(tmp[0], tmp[1], tmp[2]);
115 for (
int i = 0; i <
m_f->m_variables.size(); ++i)
117 tmp[i +
m_f->m_exp[0]->GetCoordim(0)] =
m_f->m_exp[i]->GetPhys();
120 m_f->m_exp[0]->GetCoordim(0),
m_f->m_variables, tmp);
127 boost::ignore_unused(vm);
133 boost::ignore_unused(vm);
134 return fs::path(filename);
138 po::variables_map &vm)
140 boost::ignore_unused(vm);
141 return fs::path(filename);
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
FieldSharedPtr m_f
Field object.
std::map< std::string, ConfigOption > m_config
List of configuration values.
Converter from fld to vtk.
virtual fs::path v_GetPath(std::string &filename, po::variables_map &vm) override
static std::shared_ptr< Module > create(FieldSharedPtr f)
Creates an instance of this class.
virtual void v_OutputFromExp(po::variables_map &vm) override
Write from m_exp to output file.
OutputPts(FieldSharedPtr f)
virtual void v_OutputFromPts(po::variables_map &vm) override
Write from pts to output file.
virtual fs::path v_GetFullOutName(std::string &filename, po::variables_map &vm) override
virtual void v_OutputFromData(po::variables_map &vm) override
Write from data to output file.
static ModuleKey m_className[]
void Write(const std::string &outFile, const PtsFieldSharedPtr &ptsField, const bool backup=false)
Save a pts field to a file.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void Write(const std::string &outFile, const PtsFieldSharedPtr &ptsField, const bool backup=false)
Save a pts field to a file.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< Field > FieldSharedPtr
std::pair< ModuleType, std::string > ModuleKey
ModuleFactory & GetModuleFactory()
The above copyright notice and this permission notice shall be included.