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 |
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 (string key, string value) |
void | PrintConfig () |
void | SetDefaults () |
MeshSharedPtr | GetMesh () |
virtual void | ProcessVertices () |
Extract element vertices. More... | |
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 |
Private Member Functions | |
int | GetNnodes (unsigned int InputGmshEntity) |
vector< int > | CreateReordering (unsigned int InputGmshEntity) |
Create a reordering map for a given element. More... | |
vector< int > | TriReordering (ElmtConfig conf) |
Create a reordering for triangles. More... | |
vector< int > | QuadReordering (ElmtConfig conf) |
Create a reordering for quadrilaterals. More... | |
vector< int > | HexReordering (ElmtConfig conf) |
Create a reordering for hexahedra. More... | |
vector< int > | PrismReordering (ElmtConfig conf) |
Create a reordering for prisms. More... | |
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 () | |
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... | |
void | ReorderPrisms (PerMap &perFaces) |
Reorder node IDs so that prisms and tetrahedra are aligned correctly. More... | |
void | PrismLines (int prism, PerMap &perFaces, set< int > &prismsDone, 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... | |
Converter for Gmsh files.
Definition at line 48 of file InputGmsh.h.
Nektar::Utilities::InputGmsh::InputGmsh | ( | MeshSharedPtr | m | ) |
Set up InputGmsh object.
Definition at line 162 of file InputGmsh.cpp.
|
virtual |
Definition at line 167 of file InputGmsh.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 56 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 478 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 957 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.
|
private |
For a given msh ID, return the corresponding number of nodes.
Definition at line 420 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::Utilities::Point::GetNumNodes(), Nektar::Utilities::Line::GetNumNodes(), Nektar::Utilities::Triangle::GetNumNodes(), Nektar::Utilities::Quadrilateral::GetNumNodes(), Nektar::Utilities::Tetrahedron::GetNumNodes(), Nektar::Utilities::Pyramid::GetNumNodes(), Nektar::Utilities::Prism::GetNumNodes(), Nektar::Utilities::Hexahedron::GetNumNodes(), and Nektar::iterator.
Referenced by Process().
|
private |
Create a reordering for hexahedra.
Definition at line 807 of file InputGmsh.cpp.
References Nektar::StdRegions::eDir1BwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::Utilities::ElmtConfig::m_faceNodes, Nektar::Utilities::ElmtConfig::m_order, Nektar::Utilities::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 732 of file InputGmsh.cpp.
References Nektar::Utilities::ElmtConfig::m_faceNodes, and Nektar::Utilities::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 182 of file InputGmsh.cpp.
References CreateReordering(), elmMap, Nektar::Utilities::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 570 of file InputGmsh.cpp.
References Nektar::Utilities::ElmtConfig::m_faceNodes, Nektar::Utilities::ElmtConfig::m_order, and Nektar::Utilities::quadTensorNodeOrdering().
Referenced by CreateReordering().
|
private |
Create a reordering for tetrahedra.
Definition at line 618 of file InputGmsh.cpp.
References Nektar::Utilities::HOTriangle< T >::Align(), Nektar::Utilities::ElmtConfig::m_faceNodes, Nektar::Utilities::ElmtConfig::m_order, Nektar::Utilities::HOTriangle< T >::surfVerts, and Nektar::Utilities::triTensorNodeOrdering().
Referenced by CreateReordering().
|
private |
Create a reordering for triangles.
Definition at line 521 of file InputGmsh.cpp.
References Nektar::Utilities::ElmtConfig::m_faceNodes, Nektar::Utilities::ElmtConfig::m_order, and Nektar::Utilities::triTensorNodeOrdering().
Referenced by CreateReordering().
|
static |
ModuleKey for class.
Definition at line 60 of file InputGmsh.h.
|
static |
Element map; takes a msh id to an ElmtConfig object.
Definition at line 66 of file InputGmsh.h.
Referenced by CreateReordering(), GetNnodes(), Nektar::Utilities::OutputGmsh::OutputGmsh(), and Process().