35 #ifndef NEKMESHUTILS_MODULE 36 #define NEKMESHUTILS_MODULE 38 #include <boost/iostreams/device/file_descriptor.hpp> 39 #include <boost/iostreams/filtering_stream.hpp> 53 namespace io = boost::iostreams;
57 namespace NekMeshUtils
77 typedef std::map<int, std::pair<FaceSharedPtr, std::vector<int> > >
PerMap;
92 isBool(isBool),
beenSet(false),
value(), defValue(defValue),
106 return boost::lexical_cast<T>(
value);
108 catch(
const std::exception &e)
110 std::cerr << e.what() << std::endl;
122 bool returnval =
true;
125 boost::lexical_cast<T>(
value);
127 catch(
const std::exception &e)
163 std::string
value = std::string());
193 std::set<int> &prismsDone,
194 std::vector<ElementSharedPtr> &line);
bool isBool
True if the configuration option is a boolean (thus does not need additional arguments).
io::filtering_ostream m_mshFile
Output stream.
std::ostream & operator<<(std::ostream &os, const NodeSharedPtr &n)
Print description of node to given ostream.
std::shared_ptr< Module > ModuleSharedPtr
std::map< int, std::pair< FaceSharedPtr, std::vector< int > > > PerMap
Abstract base class for output modules.
LibUtilities::NekFactory< ModuleKey, Module, MeshSharedPtr > ModuleFactory
const char *const ModuleTypeMap[]
MeshSharedPtr m_mesh
Mesh object.
std::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
T as()
Re-interpret the value stored in value as some type using boost::lexical_cast.
std::ofstream m_mshFileStream
Input stream.
ModuleFactory & GetModuleFactory()
std::string value
The value of the configuration option.
Represents a command-line configuration option.
NEKMESHUTILS_EXPORT ProcessModule(MeshSharedPtr p_m)
std::map< std::string, ConfigOption > m_config
List of configuration values.
std::string defValue
Default value of the configuration option.
Abstract base class for processing modules.
NEKMESHUTILS_EXPORT Module(MeshSharedPtr p_m)
bool isType()
Interpret the value stored in value as some type using boost::lexical_cast and return true of false d...
#define NEKMESHUTILS_EXPORT
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs
std::pair< ModuleType, std::string > ModuleKey
NEKMESHUTILS_EXPORT MeshSharedPtr GetMesh()
std::string desc
Description of the configuration option.
bool beenSet
True if the configuration option has been set at command line. If false, the default value will be pu...
ConfigOption(bool isBool, std::string defValue, std::string desc)
Construct a new configuration option.
Provides a generic Factory class.