36 #ifndef UTILITIES_NEKMESH_MODULE
37 #define UTILITIES_NEKMESH_MODULE
74 typedef map<int, pair<FaceSharedPtr, vector<int> > >
PerMap;
89 isBool(isBool), beenSet(false), value(), defValue(defValue),
92 isBool(false), beenSet(false), value(), defValue(), desc() {}
103 return boost::lexical_cast<T>(value);
105 catch(
const std::exception &e)
107 std::cerr << e.what() << std::endl;
119 bool returnval =
true;
122 boost::lexical_cast<T>(value);
124 catch(
const std::exception &e)
157 virtual void Process() = 0;
159 void RegisterConfig(
string key,
string value);
168 virtual void ProcessVertices();
170 virtual void ProcessEdges(
bool ReprocessEdges =
true);
172 virtual void ProcessFaces(
bool ReprocessFaces =
true);
174 virtual void ProcessElements();
176 virtual void ProcessComposites();
178 virtual void ClearElementLinks();
184 map<string, ConfigOption> m_config;
188 void ReorderPrisms(PerMap &perFaces);
189 void PrismLines (
int prism,
191 set<int> &prismsDone,
192 vector<ElementSharedPtr> &line);
237 class OutputModule :
public Module
249 typedef std::pair<ModuleType,std::string>
ModuleKey;
250 std::ostream&
operator<<(std::ostream& os,
const ModuleKey& rhs);
Module(MeshSharedPtr p_m)
LibUtilities::NekFactory< ModuleKey, Module, FieldSharedPtr > ModuleFactory
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...
MeshSharedPtr m_mesh
Mesh object.
T as()
Re-interpret the value stored in value as some type using boost::lexical_cast.
string defValue
Default value of the configuration option.
map< int, pair< FaceSharedPtr, vector< int > > > PerMap
boost::shared_ptr< Module > ModuleSharedPtr
ProcessModule(MeshSharedPtr p_m)
std::ostream & operator<<(std::ostream &os, const NodeSharedPtr &n)
Represents a command-line configuration option.
ConfigOption(bool isBool, string defValue, string desc)
Construct a new configuration option.
boost::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
string value
The value of the configuration option.
std::ofstream m_mshFile
Output stream.
ModuleFactory & GetModuleFactory()
const char *const ModuleTypeMap[]
Abstract base class for processing modules.
Provides a generic Factory class.