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. 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) | |
virtual void | Process ()=0 |
void | RegisterConfig (string key, string value) |
void | PrintConfig () |
void | SetDefaults () |
MeshSharedPtr | GetMesh () |
virtual void | ProcessVertices () |
Extract element vertices. More... | |
Protected Member Functions | |
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 | |
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... | |
Abstract base class for mesh converter modules. Each subclass implements the Process() function, which in some way alters the mesh #m.
Definition at line 135 of file FieldConvert/Module.h.
|
inline |
Definition at line 138 of file FieldConvert/Module.h.
|
inlineprotected |
Definition at line 161 of file FieldConvert/Module.h.
|
inline |
Definition at line 149 of file MeshConvert/Module.h.
void Nektar::Utilities::Module::EvaluateTriFieldAtEquiSpacedPts | ( | LocalRegions::ExpansionSharedPtr & | exp, |
const Array< OneD, const NekDouble > & | infield, | ||
Array< OneD, NekDouble > & | outfield | ||
) |
|
inline |
Definition at line 155 of file MeshConvert/Module.h.
References m_mesh.
|
inline |
Definition at line 145 of file FieldConvert/Module.h.
void Nektar::Utilities::Module::PrintConfig | ( | ) |
Print out all configuration options for a module.
Definition at line 128 of file FieldConvert/Module.cpp.
References Nektar::iterator, and m_config.
void Nektar::Utilities::Module::PrintConfig | ( | ) |
|
protected |
Definition at line 698 of file MeshConvert/Module.cpp.
References Nektar::iterator, and m_mesh.
Referenced by ReorderPrisms().
|
pure virtual |
Implemented in Nektar::Utilities::ProcessIsoContour, Nektar::Utilities::OutputTecplot, Nektar::Utilities::ProcessAddFld, Nektar::Utilities::ProcessC0Projection, Nektar::Utilities::ProcessInterpPointDataToFld, Nektar::Utilities::ProcessScaleInFld, Nektar::Utilities::ProcessEquiSpacedOutput, Nektar::Utilities::ProcessGrad, Nektar::Utilities::ProcessMultiShear, Nektar::Utilities::ProcessPrintFldNorms, Nektar::Utilities::ProcessQCriterion, Nektar::Utilities::ProcessScalGrad, Nektar::Utilities::ProcessSurfDistance, Nektar::Utilities::ProcessWSS, Nektar::Utilities::ProcessInterpField, Nektar::Utilities::ProcessInterpPoints, Nektar::Utilities::ProcessVorticity, Nektar::Utilities::OutputFld, Nektar::Utilities::OutputVtk, Nektar::Utilities::ProcessBoundaryExtract, Nektar::Utilities::ProcessConcatenateFld, Nektar::Utilities::ProcessJacobianEnergy, Nektar::Utilities::OutputInfo, Nektar::Utilities::OutputXml, Nektar::Utilities::ProcessDeform, Nektar::Utilities::ProcessDisplacement, Nektar::Utilities::InputPts, Nektar::Utilities::InputFld, Nektar::Utilities::InputXml, and Nektar::Utilities::InputDat.
|
pure virtual |
Implemented in Nektar::Utilities::InputNek, Nektar::Utilities::OutputGmsh, Nektar::Utilities::ProcessExtractTetPrismInterface, Nektar::Utilities::ProcessBL, Nektar::Utilities::ProcessDetectSurf, Nektar::Utilities::ProcessExtractSurf, Nektar::Utilities::ProcessJac, Nektar::Utilities::ProcessScalar, Nektar::Utilities::ProcessTetSplit, Nektar::Utilities::InputStar, 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 333 of file 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::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::InputStar::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::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 151 of file 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::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::InputStar::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::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 315 of file MeshConvert/Module.cpp.
References m_mesh.
Referenced by Nektar::Utilities::InputGmsh::Process(), Nektar::Utilities::InputSem::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputSwan::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::InputStar::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::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 250 of file 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::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::InputPly::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::InputStar::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::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 111 of file 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(), Nektar::Utilities::ProcessExtractTetPrismInterface::Process(), Nektar::Utilities::InputTec::ReadZone(), and Nektar::Utilities::InputStar::SetupElements().
void Nektar::Utilities::Module::RegisterConfig | ( | string | key, |
string | value | ||
) |
Register a configuration option with a module.
Definition at line 104 of file 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 face-interior high-order information yet!
Definition at line 406 of file 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 149 of file FieldConvert/Module.cpp.
References Nektar::iterator, and m_config.
void Nektar::Utilities::Module::SetDefaults | ( | ) |
|
inline |
Definition at line 150 of file FieldConvert/Module.h.
|
protected |
List of configuration values.
Definition at line 166 of file FieldConvert/Module.h.
Referenced by Nektar::Utilities::ProcessCyl::GenerateEdgeNodes(), Nektar::Utilities::InputStar::InitCCM(), 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::ProcessDisplacement::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::ProcessPerAlign::Process(), Nektar::Utilities::ProcessCyl::Process(), Nektar::Utilities::OutputXml::Process(), Nektar::Utilities::OutputInfo::Process(), Nektar::Utilities::OutputNekpp::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::OutputFld::Process(), Nektar::Utilities::ProcessBoundaryExtract::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::ProcessInterpField::Process(), Nektar::Utilities::ProcessInterpPoints::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessScalGrad::Process(), Nektar::Utilities::ProcessSurfDistance::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessExtractSurf::Process(), Nektar::Utilities::ProcessInterpPointDataToFld::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::Utilities::ProcessScalar::Process(), Nektar::Utilities::ProcessScaleInFld::Process(), Nektar::Utilities::ProcessDetectSurf::Process(), Nektar::Utilities::OutputTecplot::Process(), Nektar::Utilities::ProcessIsoContour::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::ProcessDisplacement::ProcessDisplacement(), Nektar::Utilities::ProcessEquiSpacedOutput::ProcessEquiSpacedOutput(), Nektar::Utilities::ProcessExtractSurf::ProcessExtractSurf(), Nektar::Utilities::ProcessInterpField::ProcessInterpField(), Nektar::Utilities::ProcessInterpPointDataToFld::ProcessInterpPointDataToFld(), Nektar::Utilities::ProcessInterpPoints::ProcessInterpPoints(), Nektar::Utilities::ProcessIsoContour::ProcessIsoContour(), Nektar::Utilities::ProcessJac::ProcessJac(), Nektar::Utilities::ProcessJacobianEnergy::ProcessJacobianEnergy(), Nektar::Utilities::ProcessMultiShear::ProcessMultiShear(), Nektar::Utilities::ProcessPerAlign::ProcessPerAlign(), Nektar::Utilities::ProcessScalar::ProcessScalar(), Nektar::Utilities::ProcessScaleInFld::ProcessScaleInFld(), Nektar::Utilities::ProcessScalGrad::ProcessScalGrad(), Nektar::Utilities::ProcessSpherigon::ProcessSpherigon(), Nektar::Utilities::ProcessSurfDistance::ProcessSurfDistance(), Nektar::Utilities::ProcessTetSplit::ProcessTetSplit(), Nektar::Utilities::ProcessWSS::ProcessWSS(), RegisterConfig(), SetDefaults(), and Nektar::Utilities::ProcessEquiSpacedOutput::SetupEquiSpacedField().
|
protected |
Field object.
Definition at line 161 of file FieldConvert/Module.h.
Referenced by Nektar::Utilities::InputModule::AddFile(), Nektar::Utilities::ProcessIsoContour::ExtractContour(), Nektar::Utilities::ProcessEquiSpacedOutput::GenOrthoModes(), Nektar::Utilities::OutputTecplot::GetNumTecplotBlocks(), Nektar::Utilities::ProcessInterpPoints::InterpolateFieldToPts(), Nektar::Utilities::InputModule::PrintSummary(), Nektar::Utilities::InputDat::Process(), Nektar::Utilities::InputXml::Process(), Nektar::Utilities::InputFld::Process(), Nektar::Utilities::InputPts::Process(), Nektar::Utilities::ProcessDeform::Process(), Nektar::Utilities::ProcessDisplacement::Process(), Nektar::Utilities::OutputInfo::Process(), Nektar::Utilities::OutputXml::Process(), Nektar::Utilities::ProcessJacobianEnergy::Process(), Nektar::Utilities::ProcessBoundaryExtract::Process(), Nektar::Utilities::ProcessConcatenateFld::Process(), Nektar::Utilities::OutputFld::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::ProcessInterpField::Process(), Nektar::Utilities::ProcessInterpPoints::Process(), Nektar::Utilities::ProcessVorticity::Process(), Nektar::Utilities::ProcessMultiShear::Process(), Nektar::Utilities::ProcessPrintFldNorms::Process(), Nektar::Utilities::ProcessScalGrad::Process(), Nektar::Utilities::ProcessWSS::Process(), Nektar::Utilities::ProcessSurfDistance::Process(), Nektar::Utilities::ProcessGrad::Process(), Nektar::Utilities::ProcessQCriterion::Process(), Nektar::Utilities::ProcessAddFld::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::Utilities::ProcessScaleInFld::Process(), Nektar::Utilities::ProcessInterpPointDataToFld::Process(), Nektar::Utilities::OutputTecplot::Process(), Nektar::Utilities::ProcessIsoContour::Process(), Nektar::Utilities::ProcessMultiShear::ProcessMultiShear(), Nektar::Utilities::ProcessScalGrad::ProcessScalGrad(), Nektar::Utilities::ProcessSurfDistance::ProcessSurfDistance(), Nektar::Utilities::ProcessWSS::ProcessWSS(), Nektar::Utilities::ProcessIsoContour::ResetFieldPts(), Nektar::Utilities::ProcessEquiSpacedOutput::SetupEquiSpacedField(), Nektar::Utilities::OutputTecplot::WriteTecplotConnectivity(), Nektar::Utilities::OutputTecplot::WriteTecplotField(), Nektar::Utilities::OutputTecplot::WriteTecplotHeader(), and Nektar::Utilities::OutputTecplot::WriteTecplotZone().
|
protected |
Mesh object.
Definition at line 165 of file MeshConvert/Module.h.
Referenced by Nektar::Utilities::InputTec::GenElement2D(), Nektar::Utilities::InputStar::GenElement2D(), Nektar::Utilities::InputTec::GenElement3D(), Nektar::Utilities::InputStar::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::InputSwan::Process(), Nektar::Utilities::InputVtk::Process(), Nektar::Utilities::ProcessCyl::Process(), Nektar::Utilities::ProcessPerAlign::Process(), Nektar::Utilities::OutputVtk::Process(), Nektar::Utilities::InputTec::Process(), Nektar::Utilities::OutputNekpp::Process(), Nektar::Utilities::ProcessSpherigon::Process(), Nektar::Utilities::InputStar::Process(), Nektar::Utilities::ProcessDetectSurf::Process(), Nektar::Utilities::ProcessExtractSurf::Process(), Nektar::Utilities::ProcessJac::Process(), Nektar::Utilities::ProcessScalar::Process(), Nektar::Utilities::ProcessBL::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessExtractTetPrismInterface::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::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().
|
protected |
Definition at line 167 of file FieldConvert/Module.h.
Referenced by Nektar::Utilities::OutputTecplot::OutputTecplot(), Nektar::Utilities::OutputVtk::OutputVtk(), and Nektar::Utilities::InputXml::Process().