Nektar++
|
Base class for a spectral/hp element mesh. More...
#include <MeshGraph.h>
Classes | |
struct | GeomRTree |
Static Public Member Functions | |
static MeshGraphSharedPtr | Read (const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true) |
static LibUtilities::BasisKeyVector | DefineBasisKeyFromExpansionType (GeometrySharedPtr in, ExpansionType type, const int order) |
Protected Member Functions | |
void | PopulateFaceToElMap (Geometry3DSharedPtr element, int kNfaces) |
Given a 3D geometry object #element, populate the face to element map m_faceToElMap which maps faces to their corresponding element(s). More... | |
ExpansionInfoMapShPtr | SetUpExpansionInfoMap () |
std::string | GetCompositeString (CompositeSharedPtr comp) |
Returns a string representation of a composite. More... | |
Protected Attributes | |
LibUtilities::SessionReaderSharedPtr | m_session |
PointGeomMap | m_vertSet |
CurveMap | m_curvedEdges |
CurveMap | m_curvedFaces |
SegGeomMap | m_segGeoms |
TriGeomMap | m_triGeoms |
QuadGeomMap | m_quadGeoms |
TetGeomMap | m_tetGeoms |
PyrGeomMap | m_pyrGeoms |
PrismGeomMap | m_prismGeoms |
HexGeomMap | m_hexGeoms |
int | m_meshDimension |
int | m_spaceDimension |
int | m_partition |
bool | m_meshPartitioned |
CompositeMap | m_meshComposites |
std::map< int, std::string > | m_compositesLabels |
std::map< int, CompositeMap > | m_domain |
LibUtilities::DomainRangeShPtr | m_domainRange |
ExpansionInfoMapShPtrMap | m_expansionMapShPtrMap |
GeomInfoMap | m_geomInfo |
std::unordered_map< int, GeometryLinkSharedPtr > | m_faceToElMap |
TiXmlElement * | m_xmlGeom |
CompositeOrdering | m_compOrder |
BndRegionOrdering | m_bndRegOrder |
std::unique_ptr< GeomRTree > | m_boundingBoxTree |
Base class for a spectral/hp element mesh.
Definition at line 176 of file MeshGraph.h.
Nektar::SpatialDomains::MeshGraph::MeshGraph | ( | ) |
Definition at line 97 of file MeshGraph.cpp.
|
virtual |
Definition at line 106 of file MeshGraph.cpp.
|
inline |
bool Nektar::SpatialDomains::MeshGraph::CheckRange | ( | Geometry2D & | geom | ) |
Check if goemetry is in range definition if activated.
Definition at line 310 of file MeshGraph.cpp.
References Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::SpatialDomains::Geometry::GetNumVerts(), Nektar::SpatialDomains::Geometry::GetVertex(), and Nektar::LibUtilities::NullDomainRangeShPtr.
bool Nektar::SpatialDomains::MeshGraph::CheckRange | ( | Geometry3D & | geom | ) |
Check if goemetry is in range definition if activated.
Definition at line 412 of file MeshGraph.cpp.
References Nektar::SpatialDomains::Geometry::GetNumVerts(), Nektar::SpatialDomains::Geometry::GetShapeType(), Nektar::SpatialDomains::Geometry::GetVertex(), and Nektar::LibUtilities::NullDomainRangeShPtr.
CompositeDescriptor Nektar::SpatialDomains::MeshGraph::CreateCompositeDescriptor | ( | ) |
Definition at line 3964 of file MeshGraph.cpp.
std::map< int, MeshEntity > Nektar::SpatialDomains::MeshGraph::CreateMeshEntities | ( | ) |
Create mesh entities for this graph.
This function will create a map of all mesh entities of the current graph, which can then be used within the mesh partitioner to construct an appropriate partitioning.
Definition at line 3864 of file MeshGraph.cpp.
References Nektar::SpatialDomains::MeshEntity::ghost, Nektar::SpatialDomains::MeshEntity::id, Nektar::SpatialDomains::MeshEntity::list, and Nektar::SpatialDomains::MeshEntity::origId.
|
static |
Definition at line 1591 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eChebyshev, Nektar::SpatialDomains::eChebyshevFourier, Nektar::LibUtilities::eFourier, Nektar::SpatialDomains::eFourierChebyshev, Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eFourierHalfModeIm, Nektar::LibUtilities::eFourierHalfModeRe, Nektar::SpatialDomains::eFourierModified, Nektar::LibUtilities::eFourierSingleMode, Nektar::LibUtilities::eFourierSingleModeSpaced, Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGaussGaussChebyshev, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGLL_Lagrange, Nektar::SpatialDomains::eGLL_Lagrange_SEM, Nektar::LibUtilities::eHexahedron, Nektar::SpatialDomains::eModified, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eModified_C, Nektar::SpatialDomains::eModifiedGLLRadau10, Nektar::LibUtilities::eModifiedPyr_C, Nektar::SpatialDomains::eModifiedQuadPlus1, Nektar::SpatialDomains::eModifiedQuadPlus2, Nektar::LibUtilities::eOrtho_A, Nektar::LibUtilities::eOrtho_B, Nektar::LibUtilities::eOrtho_C, Nektar::SpatialDomains::eOrthogonal, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.
LibUtilities::BasisKeyVector Nektar::SpatialDomains::MeshGraph::DefineBasisKeyFromExpansionTypeHomo | ( | GeometrySharedPtr | in, |
ExpansionType | type_x, | ||
ExpansionType | type_y, | ||
ExpansionType | type_z, | ||
const int | nummodes_x, | ||
const int | nummodes_y, | ||
const int | nummodes_z | ||
) |
Definition at line 2306 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eChebyshev, Nektar::LibUtilities::eFourier, Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eFourierHalfModeIm, Nektar::LibUtilities::eFourierHalfModeRe, Nektar::LibUtilities::eFourierSingleMode, Nektar::LibUtilities::eFourierSingleModeSpaced, Nektar::LibUtilities::eGaussGaussChebyshev, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.
|
inline |
|
inline |
Definition at line 528 of file MeshGraph.h.
References m_expansionMapShPtrMap.
void Nektar::SpatialDomains::MeshGraph::FillBoundingBoxTree | ( | ) |
void Nektar::SpatialDomains::MeshGraph::FillGraph | ( | ) |
Definition at line 162 of file MeshGraph.cpp.
|
inline |
Definition at line 387 of file MeshGraph.h.
References m_hexGeoms.
Referenced by export_MeshGraph().
|
inline |
|
inline |
Definition at line 383 of file MeshGraph.h.
References m_prismGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 379 of file MeshGraph.h.
References m_pyrGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 371 of file MeshGraph.h.
References m_quadGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 363 of file MeshGraph.h.
References m_segGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 375 of file MeshGraph.h.
References m_tetGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 367 of file MeshGraph.h.
References m_triGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 425 of file MeshGraph.h.
References m_bndRegOrder.
|
inline |
Definition at line 237 of file MeshGraph.h.
References ASSERTL0, and m_meshComposites.
Referenced by Nektar::SpatialDomains::Domain::Read().
GeometrySharedPtr Nektar::SpatialDomains::MeshGraph::GetCompositeItem | ( | int | whichComposite, |
int | whichItem | ||
) |
Definition at line 518 of file MeshGraph.cpp.
References NEKERROR.
void Nektar::SpatialDomains::MeshGraph::GetCompositeList | ( | const std::string & | compositeStr, |
CompositeMap & | compositeVector | ||
) | const |
Definition at line 557 of file MeshGraph.cpp.
References ASSERTL0, Nektar::StdRegions::find(), and NEKERROR.
|
inline |
Definition at line 420 of file MeshGraph.h.
References m_compOrder.
|
inline |
Definition at line 251 of file MeshGraph.h.
References m_meshComposites.
|
inline |
Definition at line 256 of file MeshGraph.h.
References m_compositesLabels.
|
protected |
Returns a string representation of a composite.
Definition at line 2589 of file MeshGraph.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.
|
inline |
Definition at line 350 of file MeshGraph.h.
References m_curvedEdges.
Referenced by export_MeshGraph().
|
inline |
Definition at line 354 of file MeshGraph.h.
References m_curvedFaces.
Referenced by export_MeshGraph().
|
inline |
Definition at line 261 of file MeshGraph.h.
References m_domain.
|
inline |
Definition at line 266 of file MeshGraph.h.
LibUtilities::BasisKey Nektar::SpatialDomains::MeshGraph::GetEdgeBasisKey | ( | SegGeomSharedPtr | edge, |
const std::string | variable = "DefaultVar" |
||
) |
Definition at line 3581 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMLegendre, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eOrtho_B, Nektar::LibUtilities::eTriangle, and Nektar::LibUtilities::NullBasisKey().
std::vector< int > Nektar::SpatialDomains::MeshGraph::GetElementsContainingPoint | ( | PointGeomSharedPtr | p | ) |
Definition at line 256 of file MeshGraph.cpp.
References CellMLToNektar.cellml_metadata::p.
GeometryLinkSharedPtr Nektar::SpatialDomains::MeshGraph::GetElementsFromEdge | ( | Geometry1DSharedPtr | edge | ) |
Definition at line 3525 of file MeshGraph.cpp.
GeometryLinkSharedPtr Nektar::SpatialDomains::MeshGraph::GetElementsFromFace | ( | Geometry2DSharedPtr | face | ) |
Definition at line 3815 of file MeshGraph.cpp.
References ASSERTL0.
const ExpansionInfoMap & Nektar::SpatialDomains::MeshGraph::GetExpansionInfo | ( | const std::string | variable = "DefaultVar" | ) |
Definition at line 612 of file MeshGraph.cpp.
References NEKERROR.
ExpansionInfoShPtr Nektar::SpatialDomains::MeshGraph::GetExpansionInfo | ( | GeometrySharedPtr | geom, |
const std::string | variable = "DefaultVar" |
||
) |
LibUtilities::BasisKey Nektar::SpatialDomains::MeshGraph::GetFaceBasisKey | ( | Geometry2DSharedPtr | face, |
const int | facedir, | ||
const std::string | variable = "DefaultVar" |
||
) |
3D functions
Definition at line 3757 of file MeshGraph.cpp.
References ASSERTL0, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::StdRegions::EvaluateQuadFaceBasisKey(), Nektar::StdRegions::EvaluateTriFaceBasisKey(), and Nektar::LibUtilities::NullBasisKey().
|
inline |
Definition at line 394 of file MeshGraph.h.
References m_quadGeoms, and m_triGeoms.
|
inline |
|
inline |
Dimension of the mesh (can be a 1D curve in 3D space).
Definition at line 211 of file MeshGraph.h.
References m_meshDimension.
Referenced by export_MeshGraph().
int Nektar::SpatialDomains::MeshGraph::GetNumElements | ( | ) |
|
inline |
Definition at line 335 of file MeshGraph.h.
References m_vertSet.
|
inline |
Definition at line 345 of file MeshGraph.h.
References m_segGeoms.
|
inline |
Dimension of the space (can be a 1D curve in 3D space).
Definition at line 217 of file MeshGraph.h.
References m_spaceDimension.
|
inline |
Definition at line 340 of file MeshGraph.h.
References m_vertSet.
|
pure virtual |
Implemented in Nektar::SpatialDomains::MeshGraphXml, and Nektar::SpatialDomains::MeshGraphHDF5.
|
protected |
Given a 3D geometry object #element, populate the face to element map m_faceToElMap which maps faces to their corresponding element(s).
element | Element to process. |
kNfaces | Number of faces of #element. Should be removed and put into Geometry3D as a virtual member function. |
Definition at line 3833 of file MeshGraph.cpp.
|
static |
Definition at line 110 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), and Nektar::SpatialDomains::GetMeshGraphFactory().
Referenced by main(), MeshGraph_Read(), Nektar::FieldUtils::InputXml::Process(), Nektar::FieldUtils::ProcessDisplacement::Process(), Nektar::FieldUtils::ProcessInterpField::Process(), Nektar::FieldUtils::ProcessInterpPoints::Process(), Nektar::SolverUtils::CouplingCwipi::SetupReceive(), Nektar::SolverUtils::Driver::v_InitObject(), Nektar::SolverUtils::FilterModalEnergy::v_Update(), and Nektar::VortexWaveInteraction::VortexWaveInteraction().
void Nektar::SpatialDomains::MeshGraph::ReadExpansionInfo | ( | ) |
Expansiontypes will contain composite, nummodes, and expansiontype (eModified, or eOrthogonal) Or a full list of data of basistype, nummodes, pointstype, numpoints;
Expansiontypes may also contain a list of fields that this expansion relates to. If this does not exist the variable is set to "DefaultVar". "DefaultVar" is used as the default for any variables not explicitly listed in FIELDS.
Mandatory components...optional are to follow later.
Mandatory components...optional are to follow later.
Definition at line 2625 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::BasisTypeMap, Nektar::SpatialDomains::eExpansionTypeSize, Nektar::SpatialDomains::eNoExpansionType, Nektar::LibUtilities::Equation::Evaluate(), Nektar::StdRegions::find(), Nektar::SpatialDomains::kExpansionTypeStr, Nektar::LibUtilities::kPointsTypeStr, NEKERROR, Nektar::LibUtilities::SIZE_BasisType, and Nektar::LibUtilities::SIZE_PointsType.
|
pure virtual |
Implemented in Nektar::SpatialDomains::MeshGraphXml, and Nektar::SpatialDomains::MeshGraphHDF5.
void Nektar::SpatialDomains::MeshGraph::ResetExpansionInfoToBasisKey | ( | ExpansionInfoMapShPtr & | expansionMap, |
LibUtilities::ShapeType | shape, | ||
LibUtilities::BasisKeyVector & | keys | ||
) |
Definition at line 1574 of file MeshGraph.cpp.
|
inline |
void Nektar::SpatialDomains::MeshGraph::SetBasisKey | ( | LibUtilities::ShapeType | shape, |
LibUtilities::BasisKeyVector & | keys, | ||
std::string | var = "DefaultVar" |
||
) |
Sets the basis key for all expansions of the given shape.
For each element of shape given by shape in field var, replace the current BasisKeyVector describing the expansion in each dimension, with the one provided by keys.
@TODO: Allow selection of elements through a CompositeVector, as well as by type.
shape | The shape of elements to be changed. |
keys | The new basis vector to apply to those elements. |
Definition at line 1566 of file MeshGraph.cpp.
void Nektar::SpatialDomains::MeshGraph::SetDomainRange | ( | NekDouble | xmin, |
NekDouble | xmax, | ||
NekDouble | ymin = NekConstants::kNekUnsetDouble , |
||
NekDouble | ymax = NekConstants::kNekUnsetDouble , |
||
NekDouble | zmin = NekConstants::kNekUnsetDouble , |
||
NekDouble | zmax = NekConstants::kNekUnsetDouble |
||
) |
Definition at line 3985 of file MeshGraph.cpp.
References Nektar::NekConstants::kNekUnsetDouble, and Nektar::LibUtilities::NullDomainRangeShPtr.
|
inline |
This function sets the expansion #exp in map with entry #variable.
Definition at line 491 of file MeshGraph.h.
References ASSERTL0, and m_expansionMapShPtrMap.
void Nektar::SpatialDomains::MeshGraph::SetExpansionInfo | ( | std::vector< LibUtilities::FieldDefinitionsSharedPtr > & | fielddef | ) |
Sets expansions given field definitions.
Definition at line 665 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.
void Nektar::SpatialDomains::MeshGraph::SetExpansionInfo | ( | std::vector< LibUtilities::FieldDefinitionsSharedPtr > & | fielddef, |
std::vector< std::vector< LibUtilities::PointsType >> & | pointstype | ||
) |
Sets expansions given field definition, quadrature points.
Definition at line 1231 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.
void Nektar::SpatialDomains::MeshGraph::SetExpansionInfoToEvenlySpacedPoints | ( | int | npoints = 0 | ) |
Sets expansions to have equispaced points.
Reset all points keys to have equispaced points with optional arguemt of npoints which redefines how many points are to be used.
Definition at line 1454 of file MeshGraph.cpp.
References Nektar::LibUtilities::ePolyEvenlySpaced, Nektar::LibUtilities::BasisKey::GetBasisType(), and Nektar::LibUtilities::BasisKey::GetNumModes().
Referenced by export_MeshGraph().
void Nektar::SpatialDomains::MeshGraph::SetExpansionInfoToNumModes | ( | int | nmodes | ) |
Reset expansion to have specified polynomial order nmodes.
Reset all points keys to have expansion order of nmodes. we keep the point distribution the same and make the number of points the same difference from the number of modes as the original expansion definition.
Definition at line 1496 of file MeshGraph.cpp.
References Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), Nektar::LibUtilities::BasisKey::GetNumPoints(), and Nektar::LibUtilities::BasisKey::GetPointsType().
Referenced by export_MeshGraph().
void Nektar::SpatialDomains::MeshGraph::SetExpansionInfoToPointOrder | ( | int | npts | ) |
Reset expansion to have specified point order npts.
Reset all points keys to have expansion order of nmodes. we keep the point distribution the same and make the number of points the same difference from the number of modes as the original expansion definition.
Definition at line 1529 of file MeshGraph.cpp.
References Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), and Nektar::LibUtilities::BasisKey::GetPointsType().
Referenced by export_MeshGraph().
|
inline |
|
protected |
Generate a single vector of ExpansionInfo structs mapping global element ID to a corresponding Geometry shared pointer and basis key.
ExpansionInfo map ensures elements which appear in multiple composites within the domain are only listed once.
Definition at line 2540 of file MeshGraph.cpp.
References Nektar::SpatialDomains::eDeformed.
|
pure virtual |
Implemented in Nektar::SpatialDomains::MeshGraphXml, and Nektar::SpatialDomains::MeshGraphHDF5.
|
protected |
Definition at line 478 of file MeshGraph.h.
Referenced by GetBndRegionOrdering().
|
protected |
Definition at line 481 of file MeshGraph.h.
|
protected |
Definition at line 477 of file MeshGraph.h.
Referenced by GetCompositeOrdering().
|
protected |
Definition at line 465 of file MeshGraph.h.
Referenced by GetCompositesLabels().
|
protected |
Definition at line 447 of file MeshGraph.h.
Referenced by GetCurvedEdges().
|
protected |
Definition at line 448 of file MeshGraph.h.
Referenced by GetCurvedFaces().
|
protected |
Definition at line 466 of file MeshGraph.h.
Referenced by GetDomain().
|
protected |
Definition at line 467 of file MeshGraph.h.
|
protected |
Definition at line 469 of file MeshGraph.h.
Referenced by ExpansionInfoDefined(), SameExpansionInfo(), and SetExpansionInfo().
|
protected |
Definition at line 473 of file MeshGraph.h.
|
protected |
Definition at line 471 of file MeshGraph.h.
Referenced by CheckForGeomInfo(), and GetGeomInfo().
|
protected |
Definition at line 457 of file MeshGraph.h.
Referenced by GetAllHexGeoms().
|
protected |
Definition at line 464 of file MeshGraph.h.
Referenced by GetComposite(), and GetComposites().
|
protected |
Definition at line 459 of file MeshGraph.h.
Referenced by Empty(), and GetMeshDimension().
|
protected |
Definition at line 462 of file MeshGraph.h.
|
protected |
Definition at line 461 of file MeshGraph.h.
|
protected |
Definition at line 456 of file MeshGraph.h.
Referenced by GetAllPrismGeoms().
|
protected |
Definition at line 455 of file MeshGraph.h.
Referenced by GetAllPyrGeoms().
|
protected |
Definition at line 453 of file MeshGraph.h.
Referenced by GetAllQuadGeoms(), and GetGeometry2D().
|
protected |
Definition at line 450 of file MeshGraph.h.
Referenced by GetAllSegGeoms(), and GetSegGeom().
|
protected |
Definition at line 444 of file MeshGraph.h.
|
protected |
Definition at line 460 of file MeshGraph.h.
Referenced by Empty(), and GetSpaceDimension().
|
protected |
Definition at line 454 of file MeshGraph.h.
Referenced by GetAllTetGeoms().
|
protected |
Definition at line 452 of file MeshGraph.h.
Referenced by GetAllTriGeoms(), and GetGeometry2D().
|
protected |
Definition at line 445 of file MeshGraph.h.
Referenced by GetAllPointGeoms(), GetNvertices(), and GetVertex().
|
protected |
Definition at line 475 of file MeshGraph.h.