Nektar++
|
#include <InputGmsh.h>
Static Public Member Functions | |
static NekMeshUtils::ModuleSharedPtr | create (NekMeshUtils::MeshSharedPtr m) |
Creates an instance of this class. More... | |
static std::map< unsigned int, NekMeshUtils::ElmtConfig > | GenElmMap () |
static std::vector< int > | CreateReordering (unsigned int InputGmshEntity) |
Create a reordering map for a given element. More... | |
Static Public Attributes | |
static NekMeshUtils::ModuleKey | className |
ModuleKey for class. More... | |
static std::map< unsigned int, NekMeshUtils::ElmtConfig > | elmMap = InputGmsh::GenElmMap() |
Private Member Functions | |
int | GetNnodes (unsigned int InputGmshEntity) |
Static Private Member Functions | |
static std::vector< int > | TriReordering (NekMeshUtils::ElmtConfig conf) |
Create a reordering for triangles. More... | |
static std::vector< int > | QuadReordering (NekMeshUtils::ElmtConfig conf) |
Create a reordering for quadrilaterals. More... | |
static std::vector< int > | HexReordering (NekMeshUtils::ElmtConfig conf) |
Create a reordering for hexahedra. More... | |
static std::vector< int > | PrismReordering (NekMeshUtils::ElmtConfig conf) |
Create a reordering for prisms. More... | |
static std::vector< int > | TetReordering (NekMeshUtils::ElmtConfig conf) |
Create a reordering for tetrahedra. More... | |
static std::vector< int > | LineReordering (NekMeshUtils::ElmtConfig conf) |
Additional Inherited Members | |
Protected Member Functions inherited from Nektar::NekMeshUtils::InputModule | |
NEKMESHUTILS_EXPORT void | PrintSummary () |
Print summary of elements. More... | |
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::InputModule | |
io::filtering_istream | m_mshFile |
Input stream. More... | |
std::ifstream | 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 49 of file InputGmsh.h.
Nektar::Utilities::InputGmsh::InputGmsh | ( | NekMeshUtils::MeshSharedPtr | m | ) |
Set up InputGmsh object.
Definition at line 701 of file InputGmsh.cpp.
|
virtual |
Definition at line 705 of file InputGmsh.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 57 of file InputGmsh.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
static |
Create a reordering map for a given element.
Since Gmsh and Nektar++ have different vertex, edge and face orientations, we need to reorder the nodes in a Gmsh MSH file so that they work with the Nektar++ orderings, since this is what is used in the elements defined in the converter.
Definition at line 1011 of file InputGmsh.cpp.
References Nektar::LibUtilities::eHexahedron, elmMap, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, HexReordering(), Nektar::iterator, LineReordering(), PrismReordering(), QuadReordering(), TetReordering(), and TriReordering().
Referenced by Process(), and Nektar::Utilities::OutputGmsh::Process().
|
static |
Definition at line 1685 of file InputGmsh.cpp.
References Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::ePoint, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.
Referenced by Nektar::Utilities::OutputGmsh::OutputGmsh().
|
private |
For a given msh ID, return the corresponding number of nodes.
Definition at line 954 of file InputGmsh.cpp.
References Nektar::LibUtilities::eHexahedron, elmMap, Nektar::LibUtilities::eNodalTriEvenlySpaced, Nektar::LibUtilities::ePoint, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, Nektar::NekMeshUtils::Point::GetNumNodes(), Nektar::NekMeshUtils::Pyramid::GetNumNodes(), Nektar::NekMeshUtils::Line::GetNumNodes(), Nektar::NekMeshUtils::Quadrilateral::GetNumNodes(), Nektar::NekMeshUtils::Prism::GetNumNodes(), Nektar::NekMeshUtils::Tetrahedron::GetNumNodes(), Nektar::NekMeshUtils::Triangle::GetNumNodes(), Nektar::NekMeshUtils::Hexahedron::GetNumNodes(), and Nektar::iterator.
Referenced by Process().
|
staticprivate |
Create a reordering for hexahedra.
Definition at line 1537 of file InputGmsh.cpp.
References Nektar::StdRegions::eDir1BwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::Utilities::hexTensorNodeOrdering(), Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes, and Nektar::Utilities::quadTensorNodeOrdering().
Referenced by CreateReordering().
|
staticprivate |
Definition at line 1053 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_order.
Referenced by CreateReordering().
|
staticprivate |
Create a reordering for prisms.
Note that whilst Gmsh MSH files have the capability to support high-order prisms, presently Gmsh does not seem to be capable of generating higher than second-order prismatic meshes, so most of the following is untested.
Definition at line 1318 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::HOTriangle< T >::Align(), Nektar::NekMeshUtils::HOQuadrilateral< T >::Align(), Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes, Nektar::Utilities::prismTensorNodeOrdering(), Nektar::Utilities::quadTensorNodeOrdering(), Nektar::NekMeshUtils::HOTriangle< T >::surfVerts, Nektar::NekMeshUtils::HOQuadrilateral< T >::surfVerts, and Nektar::Utilities::triTensorNodeOrdering().
Referenced by CreateReordering().
|
virtual |
Gmsh file contains a list of nodes and their coordinates, along with a list of elements and those nodes which define them. We read in and store the list of nodes in #m_node and store the list of elements in #m_element. Each new element is supplied with a list of entries from m_node which defines the element. Finally some mesh statistics are printed.
pFilename | Filename of Gmsh file to read. |
Implements Nektar::NekMeshUtils::Module.
Definition at line 718 of file InputGmsh.cpp.
References Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), CreateReordering(), elmMap, Nektar::NekMeshUtils::GetElementFactory(), GetNnodes(), Nektar::iterator, Nektar::NekMeshUtils::Module::m_mesh, Nektar::NekMeshUtils::InputModule::m_mshFile, class_topology::Node, Nektar::NekMeshUtils::InputModule::OpenStream(), Nektar::NekMeshUtils::Module::ProcessComposites(), Nektar::NekMeshUtils::Module::ProcessEdges(), Nektar::NekMeshUtils::Module::ProcessElements(), Nektar::NekMeshUtils::Module::ProcessFaces(), Nektar::NekMeshUtils::Module::ProcessVertices(), and Nektar::LibUtilities::ShapeTypeMap.
|
staticprivate |
Create a reordering for quadrilaterals.
Definition at line 1118 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, and Nektar::Utilities::quadTensorNodeOrdering().
Referenced by CreateReordering().
|
staticprivate |
Create a reordering for tetrahedra.
Definition at line 1166 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::HOTriangle< T >::Align(), Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes, Nektar::NekMeshUtils::HOTriangle< T >::surfVerts, Nektar::Utilities::tetTensorNodeOrdering(), and Nektar::Utilities::triTensorNodeOrdering().
Referenced by CreateReordering().
|
staticprivate |
Create a reordering for triangles.
Definition at line 1069 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, and Nektar::Utilities::triTensorNodeOrdering().
Referenced by CreateReordering().
|
static |
|
static |
Element map; takes a msh id to an ElmtConfig object.
Definition at line 68 of file InputGmsh.h.
Referenced by CreateReordering(), GetNnodes(), and Process().