Nektar++
|
#include <Module.h>
Public Member Functions | |
NEKMESHUTILS_EXPORT | Module (MeshSharedPtr p_m) |
virtual NEKMESHUTILS_EXPORT void | Process ()=0 |
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 () |
Protected Member Functions | |
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 | |
MeshSharedPtr | m_mesh |
Mesh object. More... | |
std::map< std::string, ConfigOption > | m_config |
List of configuration values. More... | |
Abstract base class for mesh converter modules. Each subclass implements the Process() function, which in some way alters the mesh #m.
Definition at line 157 of file NekMeshUtils/Module/Module.h.
|
inline |
Definition at line 160 of file NekMeshUtils/Module/Module.h.
|
virtual |
clear all element link information from mesh entities to be able to reprocess new mesh
Definition at line 454 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::ProcessOptiExtract::Process(), and Nektar::Utilities::ProcessLinkCheck::Process().
|
inline |
Definition at line 166 of file NekMeshUtils/Module/Module.h.
References m_mesh.
void Nektar::NekMeshUtils::Module::PrintConfig | ( | ) |
Print out all configuration options for a module.
Definition at line 868 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_config.
|
protected |
Definition at line 789 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by ReorderPrisms().
|
pure virtual |
Implemented in Nektar::Utilities::ProcessVarOpti, Nektar::Utilities::OutputGmsh, Nektar::Utilities::ProcessBL, Nektar::NekMeshUtils::Generator2D, Nektar::Utilities::ProcessDetectSurf, Nektar::Utilities::ProcessExtractSurf, Nektar::Utilities::ProcessExtractTetPrismInterface, Nektar::Utilities::ProcessInsertSurface, Nektar::Utilities::ProcessJac, Nektar::Utilities::ProcessLinkCheck, Nektar::Utilities::ProcessScalar, Nektar::Utilities::ProcessTetSplit, Nektar::NekMeshUtils::SurfaceMesh, Nektar::Utilities::InputNek, Nektar::Utilities::OutputNekpp, Nektar::Utilities::ProcessLinear, Nektar::Utilities::InputStar, Nektar::Utilities::ProcessSpherigon, Nektar::Utilities::InputPly, Nektar::Utilities::InputSwan, Nektar::Utilities::InputVtk, Nektar::Utilities::OutputVtk, Nektar::Utilities::ProcessExtrude, Nektar::Utilities::InputTec, Nektar::Utilities::OutputSTL, Nektar::Utilities::ProcessOptiExtract, Nektar::Utilities::ProcessPerAlign, Nektar::NekMeshUtils::ProcessLoadCAD, Nektar::NekMeshUtils::ProcessLoadOctree, Nektar::NekMeshUtils::HOSurfaceMesh, Nektar::NekMeshUtils::VolumeMesh, Nektar::Utilities::InputNek5000, Nektar::Utilities::InputGmsh, Nektar::Utilities::InputNekpp, Nektar::Utilities::InputSem, Nektar::Utilities::ProcessCurvedEdges, and Nektar::Utilities::InputMCF.
|
virtual |
Generate composites.
Generate a list of composites (groups of elements) from tag IDs stored in mesh vertices/edges/faces/elements.
Each element is assigned to a composite ID by an input module. First we scan the element list and generate a list of composite IDs. We then generate the composite objects and populate them with a second scan through the element list.
Definition at line 404 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::ProcessOptiExtract::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::ProcessExtrude::Process(), Nektar::Utilities::InputStar::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::Utilities::InputNek::Process(), Nektar::Utilities::ProcessLinkCheck::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::NekMeshUtils::Generator2D::Process(), and Nektar::Utilities::ProcessBL::Process().
|
virtual |
Extract element edges.
Create a unique set of mesh edges from elements stored in Mesh::element.
All elements are first scanned and a list of unique, enumerated edges produced in #m_edgeSet. Since each element generated its edges independently, we must now ensure that each element only uses edge objects from the #m_edgeSet set This ensures there are no duplicate edge objects. Finally, we scan the list of elements for 1-D boundary elements which correspond to an edge in #m_edgeSet. For such elements, we set its edgeLink to reference the corresponding edge in #m_edgeSet.
This routine only proceeds if the expansion dimension is 2 or 3.
Definition at line 178 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::ProcessExtrude::Process(), Nektar::Utilities::InputStar::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::Utilities::InputNek::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessLinkCheck::Process(), Nektar::Utilities::ProcessBL::Process(), and ReorderPrisms().
|
virtual |
Generate element IDs.
Enumerate elements stored in Mesh::element.
For all elements of equal dimension to the mesh dimension, we enumerate sequentially. All other elements in the list should be of lower dimension and have ID set by a corresponding edgeLink or faceLink (as set in ProcessEdges or ProcessFaces).
Definition at line 386 of file NekMeshUtils/Module/Module.cpp.
References m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::ProcessExtrude::Process(), Nektar::Utilities::InputStar::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::Utilities::InputNek::Process(), Nektar::Utilities::ProcessLinkCheck::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessBL::Process(), and ReorderPrisms().
|
virtual |
Extract element faces.
Create a unique set of mesh faces from elements stored in Mesh::element.
All elements are scanned and a unique list of enumerated faces is produced in #m_faceSet. Since elements created their own faces independently, we examine each element only uses face objects from #m_faceSet. Duplicate faces of those in #m_face are replaced with the corresponding entry in #m_faceSet. Finally, we scan the list of elements for 2-D boundary faces which correspond to faces in #m_faceSet. For such elements, we set its faceLink to reference the corresponding face in #m_faceSet.
This routine only proceeds if the expansion dimension is 3.
Definition at line 290 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::ProcessOptiExtract::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::ProcessExtrude::Process(), Nektar::Utilities::InputStar::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::Utilities::InputNek::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessLinkCheck::Process(), Nektar::Utilities::ProcessBL::Process(), and ReorderPrisms().
|
virtual |
Extract element vertices.
Create a unique set of mesh vertices from elements stored in Mesh::element.
Each element is processed in turn and the vertices extracted and inserted into #m_vertexSet, which at the end of the routine contains all unique vertices in the mesh.
Definition at line 138 of file NekMeshUtils/Module/Module.cpp.
References m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::Utilities::ProcessLinkCheck::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::InputTec::ReadZone(), and Nektar::Utilities::InputStar::SetupElements().
void Nektar::NekMeshUtils::Module::RegisterConfig | ( | std::string | key, |
std::string | value | ||
) |
Register a configuration option with a module.
Definition at line 844 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_config.
Reorder node IDs so that prisms and tetrahedra are aligned correctly.
Orientation of prism lines (i.e. a large prism which has been split into subprisms) cannot be guaranteed when elements are created one-by-one, or when periodic boundary conditions are used. This routine uses the following strategy:
The last step is to eliminate duplicate edges/faces and reenumerate.
NOTE: This routine does not copy face-interior high-order information yet!
Definition at line 497 of file NekMeshUtils/Module/Module.cpp.
References ASSERTL0, ASSERTL1, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eTetrahedron, Nektar::NekMeshUtils::GetElementFactory(), Nektar::iterator, m_mesh, PrismLines(), ProcessEdges(), ProcessElements(), and ProcessFaces().
Referenced by Nektar::Utilities::ProcessPerAlign::Process().
void Nektar::NekMeshUtils::Module::SetDefaults | ( | ) |
Sets default configuration options for those which have not been set.
Definition at line 889 of file NekMeshUtils/Module/Module.cpp.
References Nektar::iterator, and m_config.
|
protected |
List of configuration values.
Definition at line 188 of file NekMeshUtils/Module/Module.h.
Referenced by Nektar::Utilities::ProcessBL::BoundaryLayer2D(), Nektar::Utilities::ProcessBL::BoundaryLayer3D(), Nektar::NekMeshUtils::Generator2D::Generator2D(), Nektar::NekMeshUtils::HOSurfaceMesh::HOSurfaceMesh(), Nektar::Utilities::InputStar::InitCCM(), Nektar::NekMeshUtils::InputModule::InputModule(), Nektar::Utilities::InputStar::InputStar(), Nektar::NekMeshUtils::InputModule::OpenStream(), Nektar::NekMeshUtils::OutputModule::OpenStream(), Nektar::Utilities::OutputGmsh::OutputGmsh(), Nektar::NekMeshUtils::OutputModule::OutputModule(), Nektar::Utilities::OutputNekpp::OutputNekpp(), PrintConfig(), Nektar::Utilities::InputMCF::Process(), Nektar::Utilities::ProcessCurvedEdges::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputSem::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::NekMeshUtils::HOSurfaceMesh::Process(), Nektar::NekMeshUtils::ProcessLoadCAD::Process(), Nektar::NekMeshUtils::ProcessLoadOctree::Process(), Nektar::Utilities::ProcessOptiExtract::Process(), Nektar::Utilities::ProcessPerAlign::Process(), Nektar::Utilities::ProcessExtrude::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::OutputNekpp::Process(), Nektar::Utilities::ProcessLinear::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessDetectSurf::Process(), Nektar::Utilities::ProcessExtractSurf::Process(), Nektar::Utilities::ProcessInsertSurface::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessScalar::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::OutputGmsh::Process(), Nektar::Utilities::ProcessVarOpti::Process(), Nektar::Utilities::ProcessBL::ProcessBL(), Nektar::Utilities::ProcessCurve::ProcessCurve(), Nektar::Utilities::ProcessCurvedEdges::ProcessCurvedEdges(), Nektar::Utilities::ProcessCyl::ProcessCyl(), Nektar::Utilities::ProcessDetectSurf::ProcessDetectSurf(), Nektar::Utilities::ProcessExtractSurf::ProcessExtractSurf(), Nektar::Utilities::ProcessExtrude::ProcessExtrude(), Nektar::Utilities::ProcessInsertSurface::ProcessInsertSurface(), Nektar::Utilities::ProcessJac::ProcessJac(), Nektar::Utilities::ProcessLinear::ProcessLinear(), Nektar::NekMeshUtils::ProcessLoadCAD::ProcessLoadCAD(), Nektar::NekMeshUtils::ProcessLoadOctree::ProcessLoadOctree(), Nektar::Utilities::ProcessOptiExtract::ProcessOptiExtract(), Nektar::Utilities::ProcessPerAlign::ProcessPerAlign(), Nektar::Utilities::ProcessScalar::ProcessScalar(), Nektar::Utilities::ProcessSpherigon::ProcessSpherigon(), Nektar::Utilities::ProcessTetSplit::ProcessTetSplit(), Nektar::Utilities::ProcessVarOpti::ProcessVarOpti(), RegisterConfig(), SetDefaults(), Nektar::Utilities::InputStar::SetupElements(), Nektar::Utilities::ProcessCyl::v_GenerateEdgeNodes(), Nektar::Utilities::ProcessCurve::v_GenerateEdgeNodes(), Nektar::NekMeshUtils::VolumeMesh::VolumeMesh(), Nektar::Utilities::OutputNekpp::WriteXmlCurves(), Nektar::Utilities::OutputNekpp::WriteXmlEdges(), Nektar::Utilities::OutputNekpp::WriteXmlElements(), Nektar::Utilities::OutputNekpp::WriteXmlFaces(), and Nektar::Utilities::OutputNekpp::WriteXmlNodes().
|
protected |
Mesh object.
Definition at line 186 of file NekMeshUtils/Module/Module.h.
Referenced by Nektar::Utilities::ProcessVarOpti::Analytics(), Nektar::Utilities::ProcessBL::BoundaryLayer2D(), Nektar::Utilities::ProcessBL::BoundaryLayer3D(), ClearElementLinks(), Nektar::Utilities::ProcessSpherigon::FindNormalFromPlyFile(), Nektar::Utilities::InputTec::GenElement2D(), Nektar::Utilities::InputStar::GenElement2D(), Nektar::Utilities::InputTec::GenElement3D(), Nektar::Utilities::InputStar::GenElement3D(), GetMesh(), Nektar::Utilities::InputSem::insertEdge(), Nektar::Utilities::ProcessLinear::Invalid(), Nektar::Utilities::InputNek::LoadHOSurfaces(), Nektar::NekMeshUtils::Generator2D::MakeBL(), Nektar::NekMeshUtils::Generator2D::MakeBLPrep(), Nektar::NekMeshUtils::InputModule::PrintSummary(), PrismLines(), Nektar::Utilities::InputMCF::Process(), Nektar::Utilities::ProcessCurvedEdges::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::NekMeshUtils::HOSurfaceMesh::Process(), Nektar::NekMeshUtils::VolumeMesh::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::NekMeshUtils::ProcessLoadCAD::Process(), Nektar::NekMeshUtils::ProcessLoadOctree::Process(), Nektar::Utilities::ProcessPerAlign::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::OutputSTL::Process(), Nektar::Utilities::ProcessOptiExtract::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::ProcessExtrude::Process(), Nektar::Utilities::InputStar::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::OutputNekpp::Process(), Nektar::Utilities::ProcessLinear::Process(), Nektar::Utilities::InputNek::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessScalar::Process(), Nektar::Utilities::ProcessLinkCheck::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessDetectSurf::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::Utilities::ProcessInsertSurface::Process(), Nektar::Utilities::ProcessExtractSurf::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::OutputGmsh::Process(), Nektar::Utilities::ProcessVarOpti::Process(), ProcessComposites(), ProcessEdges(), ProcessElements(), ProcessFaces(), ProcessVertices(), Nektar::Utilities::InputPly::ReadPly(), Nektar::Utilities::InputTec::ReadZone(), ReorderPrisms(), Nektar::NekMeshUtils::SurfaceMesh::Report(), Nektar::NekMeshUtils::Generator2D::Report(), Nektar::Utilities::InputStar::SetupElements(), Nektar::Utilities::OutputNekpp::WriteXmlComposites(), Nektar::Utilities::OutputNekpp::WriteXmlConditions(), Nektar::Utilities::OutputNekpp::WriteXmlCurves(), Nektar::Utilities::OutputNekpp::WriteXmlDomain(), Nektar::Utilities::OutputNekpp::WriteXmlEdges(), Nektar::Utilities::OutputNekpp::WriteXmlElements(), Nektar::Utilities::OutputNekpp::WriteXmlExpansions(), Nektar::Utilities::OutputNekpp::WriteXmlFaces(), and Nektar::Utilities::OutputNekpp::WriteXmlNodes().