36 #ifndef UTILITIES_PREPROCESSING_MESHCONVERT_MODULE
37 #define UTILITIES_PREPROCESSING_MESHCONVERT_MODULE
67 typedef map<int, pair<FaceSharedPtr, vector<int> > >
PerMap;
82 isBool(isBool),
beenSet(false),
value(), defValue(defValue),
96 return boost::lexical_cast<T>(
value);
98 catch(
const std::exception &e)
100 std::cerr << e.what() << std::endl;
112 bool returnval =
true;
115 boost::lexical_cast<T>(
value);
117 catch(
const std::exception &e)
181 set<int> &prismsDone,
182 vector<ElementSharedPtr> &line);
227 class OutputModule :
public Module
238 typedef std::pair<ModuleType,std::string>
ModuleKey;
239 std::ostream&
operator<<(std::ostream& os,
const ModuleKey& rhs);
Module(MeshSharedPtr p_m)
LibUtilities::NekFactory< ModuleKey, Module, FieldSharedPtr > ModuleFactory
std::ostream & operator<<(std::ostream &os, const ModuleKey &rhs)
bool isType()
Interpret the value stored in value as some type using boost::lexical_cast and return true of false d...
pair< ModuleType, string > ModuleKey
bool isBool
True if the configuration option is a boolean (thus does not need additional arguments).
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...
map< string, ConfigOption > m_config
List of configuration values.
MeshSharedPtr m_mesh
Mesh object.
void RegisterConfig(string key, string value)
Register a configuration option with a module.
T as()
Re-interpret the value stored in value as some type using boost::lexical_cast.
virtual void ProcessEdges(bool ReprocessEdges=true)
Extract element edges.
string defValue
Default value of the configuration option.
virtual void ProcessVertices()
Extract element vertices.
virtual void ProcessElements()
Generate element IDs.
OutputModule(FieldSharedPtr p_f)
map< int, pair< FaceSharedPtr, vector< int > > > PerMap
boost::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
void PrismLines(int prism, PerMap &perFaces, set< int > &prismsDone, vector< ElementSharedPtr > &line)
virtual void ProcessComposites()
Generate composites.
boost::shared_ptr< Module > ModuleSharedPtr
ProcessModule(MeshSharedPtr p_m)
void PrintConfig()
Print out all configuration options for a module.
Represents a command-line configuration option.
ConfigOption(bool isBool, string defValue, string desc)
Construct a new configuration option.
string value
The value of the configuration option.
virtual void ProcessFaces(bool ReprocessFaces=true)
Extract element faces.
void ReorderPrisms(PerMap &perFaces)
Reorder node IDs so that prisms and tetrahedra are aligned correctly.
std::ofstream m_mshFile
Output stream.
void OpenStream()
Open a file for output.
void SetDefaults()
Sets default configuration options for those which have not been set.
ModuleFactory & GetModuleFactory()
const char *const ModuleTypeMap[]
Abstract base class for processing modules.
Provides a generic Factory class.