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::vector< 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 178 of file MeshGraph.h.
Nektar::SpatialDomains::MeshGraph::MeshGraph | ( | ) |
Definition at line 100 of file MeshGraph.cpp.
|
virtual |
Definition at line 109 of file MeshGraph.cpp.
|
inline |
bool Nektar::SpatialDomains::MeshGraph::CheckRange | ( | Geometry2D & | geom | ) |
Check if goemetry is in range definition if activated.
Definition at line 316 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 418 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 3925 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 3825 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 1599 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::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eGaussRadauMAlpha2Beta0, 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 2314 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 |
void Nektar::SpatialDomains::MeshGraph::FillBoundingBoxTree | ( | ) |
void Nektar::SpatialDomains::MeshGraph::FillGraph | ( | ) |
Definition at line 166 of file MeshGraph.cpp.
|
inline |
Definition at line 390 of file MeshGraph.h.
References m_hexGeoms.
Referenced by export_MeshGraph().
|
inline |
|
inline |
Definition at line 386 of file MeshGraph.h.
References m_prismGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 382 of file MeshGraph.h.
References m_pyrGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 374 of file MeshGraph.h.
References m_quadGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 366 of file MeshGraph.h.
References m_segGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 378 of file MeshGraph.h.
References m_tetGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 370 of file MeshGraph.h.
References m_triGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 428 of file MeshGraph.h.
References m_bndRegOrder.
|
inline |
Definition at line 240 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 524 of file MeshGraph.cpp.
References NEKERROR.
void Nektar::SpatialDomains::MeshGraph::GetCompositeList | ( | const std::string & | compositeStr, |
CompositeMap & | compositeVector | ||
) | const |
Definition at line 563 of file MeshGraph.cpp.
References ASSERTL0, Nektar::StdRegions::find(), and NEKERROR.
|
inline |
Definition at line 423 of file MeshGraph.h.
References m_compOrder.
|
inline |
Definition at line 255 of file MeshGraph.h.
References m_meshComposites.
|
inline |
Definition at line 260 of file MeshGraph.h.
References m_compositesLabels.
|
protected |
Returns a string representation of a composite.
Definition at line 2595 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 353 of file MeshGraph.h.
References m_curvedEdges.
Referenced by export_MeshGraph().
|
inline |
Definition at line 357 of file MeshGraph.h.
References m_curvedFaces.
Referenced by export_MeshGraph().
|
inline |
Definition at line 265 of file MeshGraph.h.
References m_domain.
|
inline |
Definition at line 270 of file MeshGraph.h.
LibUtilities::BasisKey Nektar::SpatialDomains::MeshGraph::GetEdgeBasisKey | ( | SegGeomSharedPtr | edge, |
const std::string | variable = "DefaultVar" |
||
) |
Definition at line 3540 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, 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 260 of file MeshGraph.cpp.
References CellMLToNektar.cellml_metadata::p.
GeometryLinkSharedPtr Nektar::SpatialDomains::MeshGraph::GetElementsFromEdge | ( | Geometry1DSharedPtr | edge | ) |
Definition at line 3484 of file MeshGraph.cpp.
GeometryLinkSharedPtr Nektar::SpatialDomains::MeshGraph::GetElementsFromFace | ( | Geometry2DSharedPtr | face | ) |
Definition at line 3776 of file MeshGraph.cpp.
References ASSERTL0.
const ExpansionInfoMap & Nektar::SpatialDomains::MeshGraph::GetExpansionInfo | ( | const std::string | variable = "DefaultVar" | ) |
Definition at line 619 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 3718 of file MeshGraph.cpp.
References ASSERTL0, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::StdRegions::EvaluateQuadFaceBasisKey(), Nektar::StdRegions::EvaluateTriFaceBasisKey(), and Nektar::LibUtilities::NullBasisKey().
|
inline |
Definition at line 397 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 214 of file MeshGraph.h.
References m_meshDimension.
Referenced by export_MeshGraph().
int Nektar::SpatialDomains::MeshGraph::GetNumElements | ( | ) |
|
inline |
Definition at line 338 of file MeshGraph.h.
References m_vertSet.
|
inline |
Definition at line 348 of file MeshGraph.h.
References m_segGeoms.
|
inline |
Dimension of the space (can be a 1D curve in 3D space).
Definition at line 220 of file MeshGraph.h.
References m_spaceDimension.
|
inline |
Definition at line 343 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 3794 of file MeshGraph.cpp.
|
static |
Definition at line 113 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 2632 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 1582 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 1575 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 3947 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 497 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 672 of file MeshGraph.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eGaussRadauMAlpha2Beta0, 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 1239 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 1463 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 1505 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 1538 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 2548 of file MeshGraph.cpp.
References Nektar::SpatialDomains::eDeformed.
|
pure virtual |
Implemented in Nektar::SpatialDomains::MeshGraphXml, and Nektar::SpatialDomains::MeshGraphHDF5.
|
protected |
Definition at line 484 of file MeshGraph.h.
Referenced by GetBndRegionOrdering().
|
protected |
Definition at line 487 of file MeshGraph.h.
|
protected |
Definition at line 483 of file MeshGraph.h.
Referenced by GetCompositeOrdering().
|
protected |
Definition at line 471 of file MeshGraph.h.
Referenced by GetCompositesLabels().
|
protected |
Definition at line 453 of file MeshGraph.h.
Referenced by GetCurvedEdges().
|
protected |
Definition at line 454 of file MeshGraph.h.
Referenced by GetCurvedFaces().
|
protected |
Definition at line 472 of file MeshGraph.h.
Referenced by GetDomain().
|
protected |
Definition at line 473 of file MeshGraph.h.
|
protected |
Definition at line 475 of file MeshGraph.h.
Referenced by SameExpansionInfo(), and SetExpansionInfo().
|
protected |
Definition at line 479 of file MeshGraph.h.
|
protected |
Definition at line 477 of file MeshGraph.h.
Referenced by CheckForGeomInfo(), and GetGeomInfo().
|
protected |
Definition at line 463 of file MeshGraph.h.
Referenced by GetAllHexGeoms().
|
protected |
Definition at line 470 of file MeshGraph.h.
Referenced by GetComposite(), and GetComposites().
|
protected |
Definition at line 465 of file MeshGraph.h.
Referenced by Empty(), and GetMeshDimension().
|
protected |
Definition at line 468 of file MeshGraph.h.
|
protected |
Definition at line 467 of file MeshGraph.h.
|
protected |
Definition at line 462 of file MeshGraph.h.
Referenced by GetAllPrismGeoms().
|
protected |
Definition at line 461 of file MeshGraph.h.
Referenced by GetAllPyrGeoms().
|
protected |
Definition at line 459 of file MeshGraph.h.
Referenced by GetAllQuadGeoms(), and GetGeometry2D().
|
protected |
Definition at line 456 of file MeshGraph.h.
Referenced by GetAllSegGeoms(), and GetSegGeom().
|
protected |
Definition at line 450 of file MeshGraph.h.
|
protected |
Definition at line 466 of file MeshGraph.h.
Referenced by Empty(), and GetSpaceDimension().
|
protected |
Definition at line 460 of file MeshGraph.h.
Referenced by GetAllTetGeoms().
|
protected |
Definition at line 458 of file MeshGraph.h.
Referenced by GetAllTriGeoms(), and GetGeometry2D().
|
protected |
Definition at line 451 of file MeshGraph.h.
Referenced by GetAllPointGeoms(), GetNvertices(), and GetVertex().
|
protected |
Definition at line 481 of file MeshGraph.h.