Nektar++
|
Converter for Gmsh files. More...
#include <OutputGmsh.h>
Public Member Functions | |
OutputGmsh (MeshSharedPtr m) | |
virtual | ~OutputGmsh () |
virtual void | Process () |
Write mesh to output file. | |
Public Member Functions inherited from Nektar::Utilities::OutputModule | |
OutputModule (FieldSharedPtr p_f) | |
void | OpenStream () |
Open a file for output. | |
OutputModule (MeshSharedPtr p_m) | |
void | OpenStream () |
Public Member Functions inherited from Nektar::Utilities::Module | |
Module (FieldSharedPtr p_f) | |
virtual void | Process (po::variables_map &vm)=0 |
void | RegisterConfig (string key, string value) |
Register a configuration option with a module. | |
void | PrintConfig () |
Print out all configuration options for a module. | |
void | SetDefaults () |
Sets default configuration options for those which have not been set. | |
bool | GetRequireEquiSpaced (void) |
void | SetRequireEquiSpaced (bool pVal) |
Module (MeshSharedPtr p_m) | |
void | RegisterConfig (string key, string value) |
void | PrintConfig () |
void | SetDefaults () |
MeshSharedPtr | GetMesh () |
virtual void | ProcessVertices () |
Extract element vertices. |
Static Public Member Functions | |
static boost::shared_ptr< Module > | create (MeshSharedPtr m) |
Creates an instance of this class. |
Static Public Attributes | |
static ModuleKey | className |
Private Attributes | |
boost::unordered_map < ElmtConfig, unsigned int, ElmtConfigHash > | elmMap |
Additional Inherited Members | |
Protected Member Functions inherited from Nektar::Utilities::Module | |
virtual void | ProcessEdges (bool ReprocessEdges=true) |
Extract element edges. | |
virtual void | ProcessFaces (bool ReprocessFaces=true) |
Extract element faces. | |
virtual void | ProcessElements () |
Generate element IDs. | |
virtual void | ProcessComposites () |
Generate composites. | |
void | ReorderPrisms (PerMap &perFaces) |
Reorder node IDs so that prisms and tetrahedra are aligned correctly. | |
void | PrismLines (int prism, PerMap &perFaces, set< int > &prismsDone, vector< ElementSharedPtr > &line) |
Protected Attributes inherited from Nektar::Utilities::OutputModule | |
ofstream | m_fldFile |
Output stream. | |
std::ofstream | m_mshFile |
Output stream. |
Converter for Gmsh files.
Definition at line 69 of file OutputGmsh.h.
Nektar::Utilities::OutputGmsh::OutputGmsh | ( | MeshSharedPtr | m | ) |
Definition at line 54 of file OutputGmsh.cpp.
References Nektar::Utilities::InputGmsh::elmMap, elmMap, and Nektar::iterator.
|
virtual |
Definition at line 66 of file OutputGmsh.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 73 of file OutputGmsh.h.
|
virtual |
Write mesh to output file.
Process a mesh to output to Gmsh MSH format.
Gmsh output is fairly straightforward. The file first contains a list of nodes, followed by a list of elements. Since Mesh::vertexSet only contains vertices of the linear elements, we first loop over the elements so that any high-order vertices can be enumerated and then added to the node list. We then print out the list of nodes and finally print the element list.
Implements Nektar::Utilities::Module.
Definition at line 81 of file OutputGmsh.cpp.
References elmMap, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eTetrahedron, Nektar::iterator, Nektar::Utilities::Module::m_mesh, Nektar::Utilities::OutputModule::m_mshFile, and Nektar::Utilities::OutputModule::OpenStream().
|
static |
Definition at line 76 of file OutputGmsh.h.
|
private |
Definition at line 85 of file OutputGmsh.h.
Referenced by OutputGmsh(), and Process().