Nektar++
|
#include <Module.h>
Public Member Functions | |
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. | |
void | PrintConfig () |
Print out all configuration options for a module. | |
void | SetDefaults () |
Sets default configuration options for those which have not been set. | |
bool | GetRequireEquiSpaced (void) |
void | SetRequireEquiSpaced (bool pVal) |
Module (MeshSharedPtr p_m) | |
virtual void | Process ()=0 |
void | RegisterConfig (string key, string value) |
void | PrintConfig () |
void | SetDefaults () |
MeshSharedPtr | GetMesh () |
virtual void | ProcessVertices () |
Extract element vertices. |
Protected Member Functions | |
virtual void | ProcessEdges (bool ReprocessEdges=true) |
Extract element edges. | |
virtual void | ProcessFaces (bool ReprocessFaces=true) |
Extract element faces. | |
virtual void | ProcessElements () |
Generate element IDs. | |
virtual void | ProcessComposites () |
Generate composites. | |
void | ReorderPrisms (PerMap &perFaces) |
Reorder node IDs so that prisms and tetrahedra are aligned correctly. | |
void | PrismLines (int prism, PerMap &perFaces, set< int > &prismsDone, vector< ElementSharedPtr > &line) |
Protected Attributes | |
FieldSharedPtr | m_f |
Field object. | |
map< string, ConfigOption > | m_config |
List of configuration values. | |
bool | m_requireEquiSpaced |
MeshSharedPtr | m_mesh |
Mesh object. |
Abstract base class for mesh converter modules. Each subclass implements the Process() function, which in some way alters the mesh #m.
Definition at line 133 of file PostProcessing/FieldConvert/Module.h.
|
inline |
Definition at line 136 of file PostProcessing/FieldConvert/Module.h.
|
inline |
Definition at line 148 of file PreProcessing/MeshConvert/Module.h.
|
inline |
Definition at line 154 of file PreProcessing/MeshConvert/Module.h.
References m_mesh.
|
inline |
Definition at line 143 of file PostProcessing/FieldConvert/Module.h.
void Nektar::Utilities::Module::PrintConfig | ( | ) |
Print out all configuration options for a module.
Definition at line 127 of file PostProcessing/FieldConvert/Module.cpp.
References Nektar::iterator, and m_config.
void Nektar::Utilities::Module::PrintConfig | ( | ) |
|
protected |
Definition at line 644 of file PreProcessing/MeshConvert/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by ReorderPrisms().
|
pure virtual |
Implemented in Nektar::Utilities::ProcessAddFld, Nektar::Utilities::ProcessC0Projection, Nektar::Utilities::ProcessScaleInFld, Nektar::Utilities::ProcessInterpField, Nektar::Utilities::ProcessInterpPointDataToFld, Nektar::Utilities::ProcessQCriterion, Nektar::Utilities::ProcessVorticity, Nektar::Utilities::ProcessInterpPoints, Nektar::Utilities::OutputFld, Nektar::Utilities::OutputInfo, Nektar::Utilities::OutputVtk, Nektar::Utilities::ProcessBoundaryExtract, Nektar::Utilities::ProcessConcatenateFld, Nektar::Utilities::OutputTecplot, Nektar::Utilities::InputPts, Nektar::Utilities::InputFld, and Nektar::Utilities::InputXml.
|
pure virtual |
Implemented in Nektar::Utilities::InputNek, Nektar::Utilities::OutputGmsh, Nektar::Utilities::ProcessBL, Nektar::Utilities::ProcessDetectSurf, Nektar::Utilities::ProcessExtractSurf, Nektar::Utilities::ProcessJac, Nektar::Utilities::ProcessTetSplit, Nektar::Utilities::ProcessSpherigon, Nektar::Utilities::InputTec, Nektar::Utilities::OutputNekpp, Nektar::Utilities::OutputVtk, Nektar::Utilities::InputPly, Nektar::Utilities::InputSwan, Nektar::Utilities::InputVtk, Nektar::Utilities::ProcessCyl, Nektar::Utilities::ProcessPerAlign, Nektar::Utilities::InputGmsh, Nektar::Utilities::InputNekpp, and Nektar::Utilities::InputSem.
|
protectedvirtual |
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 330 of file PreProcessing/MeshConvert/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessJac::Process(), and Nektar::Utilities::InputNek::Process().
|
protectedvirtual |
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 150 of file PreProcessing/MeshConvert/Module.cpp.
References ASSERTL0, Nektar::iterator, and m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::InputNek::Process(), and ReorderPrisms().
|
protectedvirtual |
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 312 of file PreProcessing/MeshConvert/Module.cpp.
References m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::InputNek::Process(), and ReorderPrisms().
|
protectedvirtual |
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 243 of file PreProcessing/MeshConvert/Module.cpp.
References ASSERTL0, Nektar::iterator, and m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::InputNek::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 110 of file PreProcessing/MeshConvert/Module.cpp.
References m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessTetSplit::Process(), and Nektar::Utilities::InputTec::ReadZone().
void Nektar::Utilities::Module::RegisterConfig | ( | string | key, |
string | value | ||
) |
Register a configuration option with a module.
Definition at line 103 of file PostProcessing/FieldConvert/Module.cpp.
References Nektar::iterator, and m_config.
void Nektar::Utilities::Module::RegisterConfig | ( | string | key, |
string | value | ||
) |
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 high-order information yet!
Definition at line 397 of file PreProcessing/MeshConvert/Module.cpp.
References ASSERTL0, ASSERTL1, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eTetrahedron, Nektar::Utilities::GetElementFactory(), Nektar::iterator, m_mesh, PrismLines(), ProcessEdges(), ProcessElements(), and ProcessFaces().
Referenced by Nektar::Utilities::ProcessPerAlign::Process().
void Nektar::Utilities::Module::SetDefaults | ( | ) |
Sets default configuration options for those which have not been set.
Definition at line 148 of file PostProcessing/FieldConvert/Module.cpp.
References Nektar::iterator, and m_config.
void Nektar::Utilities::Module::SetDefaults | ( | ) |
|
inline |
Definition at line 148 of file PostProcessing/FieldConvert/Module.h.
|
protected |
List of configuration values.
Definition at line 157 of file PostProcessing/FieldConvert/Module.h.
Referenced by Nektar::Utilities::ProcessCyl::GenerateEdgeNodes(), Nektar::Utilities::InputModule::InputModule(), Nektar::Utilities::InputModule::OpenStream(), Nektar::Utilities::OutputModule::OpenStream(), Nektar::Utilities::OutputModule::OutputModule(), Nektar::Utilities::OutputNekpp::OutputNekpp(), PrintConfig(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::ProcessPerAlign::Process(), Nektar::Utilities::ProcessCyl::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::OutputTecplot::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::OutputFld::Process(), Nektar::Utilities::ProcessBoundaryExtract::Process(), Nektar::Utilities::OutputInfo::Process(), Nektar::Utilities::OutputNekpp::Process(), Nektar::Utilities::ProcessInterpPoints::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::ProcessInterpField::Process(), Nektar::Utilities::ProcessInterpPointDataToFld::Process(), Nektar::Utilities::ProcessScaleInFld::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessDetectSurf::Process(), Nektar::Utilities::ProcessExtractSurf::Process(), Nektar::Utilities::ProcessAddFld::ProcessAddFld(), Nektar::Utilities::ProcessBL::ProcessBL(), Nektar::Utilities::ProcessBoundaryExtract::ProcessBoundaryExtract(), Nektar::Utilities::ProcessC0Projection::ProcessC0Projection(), Nektar::Utilities::ProcessCyl::ProcessCyl(), Nektar::Utilities::ProcessDetectSurf::ProcessDetectSurf(), Nektar::Utilities::ProcessExtractSurf::ProcessExtractSurf(), Nektar::Utilities::ProcessInterpField::ProcessInterpField(), Nektar::Utilities::ProcessInterpPointDataToFld::ProcessInterpPointDataToFld(), Nektar::Utilities::ProcessInterpPoints::ProcessInterpPoints(), Nektar::Utilities::ProcessJac::ProcessJac(), Nektar::Utilities::ProcessPerAlign::ProcessPerAlign(), Nektar::Utilities::ProcessScaleInFld::ProcessScaleInFld(), Nektar::Utilities::ProcessSpherigon::ProcessSpherigon(), Nektar::Utilities::ProcessTetSplit::ProcessTetSplit(), RegisterConfig(), and SetDefaults().
|
protected |
Field object.
Definition at line 155 of file PostProcessing/FieldConvert/Module.h.
Referenced by Nektar::Utilities::InputModule::AddFile(), Nektar::Utilities::OutputTecplot::GetNumTecplotBlocks(), Nektar::Utilities::ProcessInterpPoints::InterpolateFieldToPts(), Nektar::Utilities::InputModule::PrintSummary(), Nektar::Utilities::InputFld::Process(), Nektar::Utilities::InputXml::Process(), Nektar::Utilities::InputPts::Process(), Nektar::Utilities::OutputTecplot::Process(), Nektar::Utilities::ProcessBoundaryExtract::Process(), Nektar::Utilities::ProcessConcatenateFld::Process(), Nektar::Utilities::OutputFld::Process(), Nektar::Utilities::OutputInfo::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::ProcessInterpPoints::Process(), Nektar::Utilities::ProcessInterpField::Process(), Nektar::Utilities::ProcessInterpPointDataToFld::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessVorticity::Process(), Nektar::Utilities::ProcessScaleInFld::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::OutputTecplot::WriteTecplotConnectivity(), Nektar::Utilities::OutputTecplot::WriteTecplotField(), Nektar::Utilities::OutputTecplot::WriteTecplotHeader(), and Nektar::Utilities::OutputTecplot::WriteTecplotZone().
|
protected |
Mesh object.
Definition at line 164 of file PreProcessing/MeshConvert/Module.h.
Referenced by Nektar::Utilities::InputTec::GenElement2D(), Nektar::Utilities::InputTec::GenElement3D(), GetMesh(), Nektar::Utilities::InputSem::insertEdge(), Nektar::Utilities::InputNek::LoadHOSurfaces(), PrismLines(), Nektar::Utilities::InputNekpp::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::ProcessCyl::Process(), Nektar::Utilities::ProcessPerAlign::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::OutputNekpp::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::ProcessExtractSurf::Process(), Nektar::Utilities::ProcessDetectSurf::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::OutputGmsh::Process(), Nektar::Utilities::InputNek::Process(), ProcessComposites(), ProcessEdges(), ProcessElements(), ProcessFaces(), ProcessVertices(), Nektar::Utilities::InputPly::ReadPly(), Nektar::Utilities::InputTec::ReadZone(), ReorderPrisms(), 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().
|
protected |
Definition at line 158 of file PostProcessing/FieldConvert/Module.h.
Referenced by Nektar::Utilities::OutputTecplot::OutputTecplot(), Nektar::Utilities::OutputVtk::OutputVtk(), and Nektar::Utilities::InputXml::Process().