Nektar++
|
Converter for Gmsh files. More...
#include <OutputGmsh.h>
Public Member Functions | |
OutputGmsh (NekMeshUtils::MeshSharedPtr m) | |
virtual | ~OutputGmsh () |
virtual void | Process () |
Write mesh to output file. More... | |
Public Member Functions inherited from Nektar::NekMeshUtils::OutputModule | |
NEKMESHUTILS_EXPORT | OutputModule (MeshSharedPtr p_m) |
NEKMESHUTILS_EXPORT void | OpenStream () |
Open a file for output. More... | |
Public Member Functions inherited from Nektar::NekMeshUtils::Module | |
NEKMESHUTILS_EXPORT | Module (MeshSharedPtr p_m) |
NEKMESHUTILS_EXPORT void | RegisterConfig (std::string key, std::string value) |
Register a configuration option with a module. More... | |
NEKMESHUTILS_EXPORT void | PrintConfig () |
Print out all configuration options for a module. More... | |
NEKMESHUTILS_EXPORT void | SetDefaults () |
Sets default configuration options for those which have not been set. More... | |
NEKMESHUTILS_EXPORT MeshSharedPtr | GetMesh () |
virtual NEKMESHUTILS_EXPORT void | ProcessVertices () |
Extract element vertices. More... | |
virtual NEKMESHUTILS_EXPORT void | ProcessEdges (bool ReprocessEdges=true) |
Extract element edges. More... | |
virtual NEKMESHUTILS_EXPORT void | ProcessFaces (bool ReprocessFaces=true) |
Extract element faces. More... | |
virtual NEKMESHUTILS_EXPORT void | ProcessElements () |
Generate element IDs. More... | |
virtual NEKMESHUTILS_EXPORT void | ProcessComposites () |
Generate composites. More... | |
virtual NEKMESHUTILS_EXPORT void | ClearElementLinks () |
Static Public Member Functions | |
static boost::shared_ptr< Module > | create (NekMeshUtils::MeshSharedPtr m) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static NekMeshUtils::ModuleKey | className |
Private Attributes | |
boost::unordered_map < NekMeshUtils::ElmtConfig, unsigned int, ElmtConfigHash > | elmMap |
Additional Inherited Members | |
Protected Member Functions inherited from Nektar::NekMeshUtils::Module | |
NEKMESHUTILS_EXPORT void | ReorderPrisms (PerMap &perFaces) |
Reorder node IDs so that prisms and tetrahedra are aligned correctly. More... | |
NEKMESHUTILS_EXPORT void | PrismLines (int prism, PerMap &perFaces, std::set< int > &prismsDone, std::vector< ElementSharedPtr > &line) |
Protected Attributes inherited from Nektar::NekMeshUtils::OutputModule | |
io::filtering_ostream | m_mshFile |
Output stream. More... | |
std::ofstream | m_mshFileStream |
Input stream. More... | |
Protected Attributes inherited from Nektar::NekMeshUtils::Module | |
MeshSharedPtr | m_mesh |
Mesh object. More... | |
std::map< std::string, ConfigOption > | m_config |
List of configuration values. More... | |
Converter for Gmsh files.
Definition at line 70 of file OutputGmsh.h.
Nektar::Utilities::OutputGmsh::OutputGmsh | ( | NekMeshUtils::MeshSharedPtr | m | ) |
Definition at line 56 of file OutputGmsh.cpp.
References elmMap, Nektar::Utilities::InputGmsh::GenElmMap(), Nektar::iterator, and Nektar::NekMeshUtils::Module::m_config.
|
virtual |
Definition at line 71 of file OutputGmsh.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 74 of file OutputGmsh.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
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::NekMeshUtils::Module.
Definition at line 85 of file OutputGmsh.cpp.
References Nektar::NekMeshUtils::HOTriangle< T >::Align(), Nektar::NekMeshUtils::HOQuadrilateral< T >::Align(), ASSERTL1, Nektar::Utilities::InputGmsh::CreateReordering(), Nektar::StdRegions::eForwards, elmMap, Nektar::LibUtilities::ePolyEvenlySpaced, Nektar::iterator, Nektar::NekMeshUtils::Module::m_config, Nektar::NekMeshUtils::Module::m_mesh, Nektar::NekMeshUtils::OutputModule::m_mshFile, Nektar::NekMeshUtils::OutputModule::OpenStream(), Nektar::NekMeshUtils::HOTriangle< T >::surfVerts, and Nektar::NekMeshUtils::HOQuadrilateral< T >::surfVerts.
|
static |
Definition at line 77 of file OutputGmsh.h.
|
private |
Definition at line 86 of file OutputGmsh.h.
Referenced by OutputGmsh(), and Process().