Nektar++
|
#include <InputGmsh.h>
Public Member Functions | |
InputGmsh (MeshSharedPtr m) | |
Set up InputGmsh object. More... | |
virtual | ~InputGmsh () |
virtual void | Process () |
Public Member Functions inherited from Nektar::Utilities::InputModule | |
InputModule (FieldSharedPtr p_m) | |
void | AddFile (string fileType, string fileName) |
InputModule (MeshSharedPtr p_m) | |
void | OpenStream () |
Open a file for input. More... | |
Public Member Functions inherited from Nektar::Utilities::Module | |
Module (FieldSharedPtr p_f) | |
virtual void | Process (po::variables_map &vm)=0 |
virtual std::string | GetModuleName ()=0 |
void | RegisterConfig (string key, string value) |
Register a configuration option with a module. More... | |
void | PrintConfig () |
Print out all configuration options for a module. More... | |
void | SetDefaults () |
Sets default configuration options for those which have not been set. More... | |
bool | GetRequireEquiSpaced (void) |
void | SetRequireEquiSpaced (bool pVal) |
void | EvaluateTriFieldAtEquiSpacedPts (LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield) |
Module (MeshSharedPtr p_m) | |
void | RegisterConfig (std::string key, std::string value) |
void | PrintConfig () |
void | SetDefaults () |
MeshSharedPtr | GetMesh () |
virtual void | ProcessVertices () |
Extract element vertices. More... | |
virtual void | ProcessEdges (bool ReprocessEdges=true) |
Extract element edges. More... | |
virtual void | ProcessFaces (bool ReprocessFaces=true) |
Extract element faces. More... | |
virtual void | ProcessElements () |
Generate element IDs. More... | |
virtual void | ProcessComposites () |
Generate composites. More... | |
virtual void | ClearElementLinks () |
Static Public Member Functions | |
static ModuleSharedPtr | create (MeshSharedPtr m) |
Creates an instance of this class. More... | |
static std::map< unsigned int, ElmtConfig > | GenElmMap () |
Static Public Attributes | |
static ModuleKey | className |
ModuleKey for class. More... | |
static std::map< unsigned int, ElmtConfig > | elmMap = InputGmsh::GenElmMap() |
Private Member Functions | |
int | GetNnodes (unsigned int InputGmshEntity) |
std::vector< int > | CreateReordering (unsigned int InputGmshEntity) |
Create a reordering map for a given element. More... | |
std::vector< int > | TriReordering (ElmtConfig conf) |
Create a reordering for triangles. More... | |
std::vector< int > | QuadReordering (ElmtConfig conf) |
Create a reordering for quadrilaterals. More... | |
std::vector< int > | HexReordering (ElmtConfig conf) |
Create a reordering for hexahedra. More... | |
std::vector< int > | PrismReordering (ElmtConfig conf) |
Create a reordering for prisms. More... | |
std::vector< int > | TetReordering (ElmtConfig conf) |
Create a reordering for tetrahedra. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Nektar::Utilities::InputModule | |
void | PrintSummary () |
Print summary of elements. More... | |
void | PrintSummary () |
Print summary of elements. More... | |
Protected Member Functions inherited from Nektar::Utilities::Module | |
Module () | |
void | ReorderPrisms (PerMap &perFaces) |
Reorder node IDs so that prisms and tetrahedra are aligned correctly. More... | |
void | PrismLines (int prism, PerMap &perFaces, std::set< int > &prismsDone, std::vector< ElementSharedPtr > &line) |
Protected Attributes inherited from Nektar::Utilities::InputModule | |
set< string > | m_allowedFiles |
std::ifstream | m_mshFile |
Input stream. More... | |
Protected Attributes inherited from Nektar::Utilities::Module | |
FieldSharedPtr | m_f |
Field object. More... | |
map< string, ConfigOption > | m_config |
List of configuration values. More... | |
bool | m_requireEquiSpaced |
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 | ( | MeshSharedPtr | m | ) |
Set up InputGmsh object.
Definition at line 171 of file InputGmsh.cpp.
|
virtual |
Definition at line 175 of file InputGmsh.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 57 of file InputGmsh.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
private |
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 482 of file InputGmsh.cpp.
References Nektar::LibUtilities::eHexahedron, elmMap, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, HexReordering(), Nektar::iterator, PrismReordering(), QuadReordering(), TetReordering(), and TriReordering().
Referenced by Process().
|
static |
Definition at line 964 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 425 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::Line::GetNumNodes(), Nektar::NekMeshUtils::Pyramid::GetNumNodes(), Nektar::NekMeshUtils::Hexahedron::GetNumNodes(), Nektar::NekMeshUtils::Quadrilateral::GetNumNodes(), Nektar::NekMeshUtils::Tetrahedron::GetNumNodes(), Nektar::NekMeshUtils::Prism::GetNumNodes(), Nektar::NekMeshUtils::Triangle::GetNumNodes(), and Nektar::iterator.
Referenced by Process().
|
private |
Create a reordering for hexahedra.
Definition at line 817 of file InputGmsh.cpp.
References Nektar::StdRegions::eDir1BwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes, and Nektar::Utilities::quadTensorNodeOrdering().
Referenced by CreateReordering().
|
private |
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 742 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, and Nektar::NekMeshUtils::ElmtConfig::m_order.
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::Utilities::Module.
Definition at line 189 of file InputGmsh.cpp.
References Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), CreateReordering(), elmMap, Nektar::NekMeshUtils::GetElementFactory(), GetNnodes(), Nektar::iterator, Nektar::Utilities::Module::m_mesh, Nektar::Utilities::InputModule::m_mshFile, Nektar::Utilities::InputModule::OpenStream(), Nektar::Utilities::Module::ProcessComposites(), Nektar::Utilities::Module::ProcessEdges(), Nektar::Utilities::Module::ProcessElements(), Nektar::Utilities::Module::ProcessFaces(), Nektar::Utilities::Module::ProcessVertices(), and Nektar::LibUtilities::ShapeTypeMap.
|
private |
Create a reordering for quadrilaterals.
Definition at line 574 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, and Nektar::Utilities::quadTensorNodeOrdering().
Referenced by CreateReordering().
|
private |
Create a reordering for tetrahedra.
Definition at line 622 of file InputGmsh.cpp.
References Nektar::NekMeshUtils::HOTriangle< T >::Align(), Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, Nektar::NekMeshUtils::HOTriangle< T >::surfVerts, and Nektar::Utilities::triTensorNodeOrdering().
Referenced by CreateReordering().
|
private |
Create a reordering for triangles.
Definition at line 525 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().