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, DomainRangeShPtr rng=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... | |
ExpansionMapShPtr | SetUpExpansionMap () |
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 |
DomainRangeShPtr | m_domainRange |
ExpansionMapShPtrMap | 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 167 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 352 of file MeshGraph.cpp.
References Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::SpatialDomains::Geometry::GetNumVerts(), Nektar::SpatialDomains::Geometry::GetVertex(), and Nektar::SpatialDomains::NullDomainRangeShPtr.
bool Nektar::SpatialDomains::MeshGraph::CheckRange | ( | Geometry3D & | geom | ) |
Check if goemetry is in range definition if activated.
Definition at line 454 of file MeshGraph.cpp.
References Nektar::SpatialDomains::Geometry::GetNumVerts(), Nektar::SpatialDomains::Geometry::GetShapeType(), Nektar::SpatialDomains::Geometry::GetVertex(), and Nektar::SpatialDomains::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 1629 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 2344 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 375 of file MeshGraph.h.
References m_hexGeoms.
Referenced by export_MeshGraph().
|
inline |
|
inline |
Definition at line 371 of file MeshGraph.h.
References m_prismGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 367 of file MeshGraph.h.
References m_pyrGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 359 of file MeshGraph.h.
References m_quadGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 351 of file MeshGraph.h.
References m_segGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 363 of file MeshGraph.h.
References m_tetGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 355 of file MeshGraph.h.
References m_triGeoms.
Referenced by export_MeshGraph().
|
inline |
Definition at line 413 of file MeshGraph.h.
References m_bndRegOrder.
|
inline |
Definition at line 231 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 560 of file MeshGraph.cpp.
References NEKERROR.
void Nektar::SpatialDomains::MeshGraph::GetCompositeList | ( | const std::string & | compositeStr, |
CompositeMap & | compositeVector | ||
) | const |
Definition at line 599 of file MeshGraph.cpp.
References ASSERTL0, Nektar::StdRegions::find(), and NEKERROR.
|
inline |
Definition at line 408 of file MeshGraph.h.
References m_compOrder.
|
inline |
Definition at line 246 of file MeshGraph.h.
References m_meshComposites.
|
inline |
Definition at line 251 of file MeshGraph.h.
References m_compositesLabels.
|
protected |
Returns a string representation of a composite.
Definition at line 2606 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 338 of file MeshGraph.h.
References m_curvedEdges.
Referenced by export_MeshGraph().
|
inline |
Definition at line 342 of file MeshGraph.h.
References m_curvedFaces.
Referenced by export_MeshGraph().
|
inline |
Definition at line 256 of file MeshGraph.h.
References m_domain.
|
inline |
Definition at line 261 of file MeshGraph.h.
LibUtilities::BasisKey Nektar::SpatialDomains::MeshGraph::GetEdgeBasisKey | ( | SegGeomSharedPtr | edge, |
const std::string | variable = "DefaultVar" |
||
) |
Definition at line 3551 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 3495 of file MeshGraph.cpp.
GeometryLinkSharedPtr Nektar::SpatialDomains::MeshGraph::GetElementsFromFace | ( | Geometry2DSharedPtr | face | ) |
Definition at line 3776 of file MeshGraph.cpp.
References ASSERTL0.
ExpansionShPtr Nektar::SpatialDomains::MeshGraph::GetExpansion | ( | GeometrySharedPtr | geom, |
const std::string | variable = "DefaultVar" |
||
) |
Definition at line 691 of file MeshGraph.cpp.
References ASSERTL1.
const ExpansionMap & Nektar::SpatialDomains::MeshGraph::GetExpansions | ( | 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 3729 of file MeshGraph.cpp.
References ASSERTL0, Nektar::StdRegions::EvaluateQuadFaceBasisKey(), Nektar::StdRegions::EvaluateTriFaceBasisKey(), and Nektar::LibUtilities::NullBasisKey().
|
inline |
Definition at line 382 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 205 of file MeshGraph.h.
References m_meshDimension.
Referenced by export_MeshGraph().
int Nektar::SpatialDomains::MeshGraph::GetNumElements | ( | ) |
|
inline |
Definition at line 323 of file MeshGraph.h.
References m_vertSet.
|
inline |
Definition at line 333 of file MeshGraph.h.
References m_segGeoms.
|
inline |
Dimension of the space (can be a 1D curve in 3D space).
Definition at line 211 of file MeshGraph.h.
References m_spaceDimension.
|
inline |
Definition at line 328 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::Utilities::InputNekpp::Process(), Nektar::Utilities::OutputNekpp::Process(), 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::ReadExpansions | ( | ) |
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 2643 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.
|
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 1611 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 291 of file MeshGraph.cpp.
References Nektar::NekConstants::kNekUnsetDouble, and Nektar::SpatialDomains::NullDomainRangeShPtr.
|
inline |
This function sets the expansion #exp in map with entry #variable.
Definition at line 482 of file MeshGraph.h.
References ASSERTL0, and m_expansionMapShPtrMap.
void Nektar::SpatialDomains::MeshGraph::SetExpansions | ( | std::vector< LibUtilities::FieldDefinitionsSharedPtr > & | fielddef | ) |
Sets expansions given field definitions.
Definition at line 708 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::SetExpansions | ( | std::vector< LibUtilities::FieldDefinitionsSharedPtr > & | fielddef, |
std::vector< std::vector< LibUtilities::PointsType >> & | pointstype | ||
) |
Sets expansions given field definition, quadrature points.
Definition at line 1275 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::SetExpansionsToEvenlySpacedPoints | ( | 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 1499 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::SetExpansionsToPointOrder | ( | 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 1574 of file MeshGraph.cpp.
References Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), and Nektar::LibUtilities::BasisKey::GetPointsType().
Referenced by export_MeshGraph().
void Nektar::SpatialDomains::MeshGraph::SetExpansionsToPolyOrder | ( | 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 1541 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().
|
inline |
Definition at line 501 of file MeshGraph.h.
References m_session.
|
protected |
Generate a single vector of Expansion structs mapping global element ID to a corresponding Geometry shared pointer and basis key.
Expansion map ensures elements which appear in multiple composites within the domain are only listed once.
Definition at line 2578 of file MeshGraph.cpp.
|
pure virtual |
Implemented in Nektar::SpatialDomains::MeshGraphXml, and Nektar::SpatialDomains::MeshGraphHDF5.
|
protected |
Definition at line 469 of file MeshGraph.h.
Referenced by GetBndRegionOrdering().
|
protected |
Definition at line 472 of file MeshGraph.h.
|
protected |
Definition at line 468 of file MeshGraph.h.
Referenced by GetCompositeOrdering().
|
protected |
Definition at line 456 of file MeshGraph.h.
Referenced by GetCompositesLabels().
|
protected |
Definition at line 438 of file MeshGraph.h.
Referenced by GetCurvedEdges().
|
protected |
Definition at line 439 of file MeshGraph.h.
Referenced by GetCurvedFaces().
|
protected |
Definition at line 457 of file MeshGraph.h.
Referenced by GetDomain().
|
protected |
Definition at line 458 of file MeshGraph.h.
|
protected |
Definition at line 460 of file MeshGraph.h.
Referenced by SameExpansions(), and SetExpansions().
|
protected |
Definition at line 464 of file MeshGraph.h.
|
protected |
Definition at line 462 of file MeshGraph.h.
Referenced by CheckForGeomInfo(), and GetGeomInfo().
|
protected |
Definition at line 448 of file MeshGraph.h.
Referenced by GetAllHexGeoms().
|
protected |
Definition at line 455 of file MeshGraph.h.
Referenced by GetComposite(), and GetComposites().
|
protected |
Definition at line 450 of file MeshGraph.h.
Referenced by Empty(), and GetMeshDimension().
|
protected |
Definition at line 453 of file MeshGraph.h.
|
protected |
Definition at line 452 of file MeshGraph.h.
|
protected |
Definition at line 447 of file MeshGraph.h.
Referenced by GetAllPrismGeoms().
|
protected |
Definition at line 446 of file MeshGraph.h.
Referenced by GetAllPyrGeoms().
|
protected |
Definition at line 444 of file MeshGraph.h.
Referenced by GetAllQuadGeoms(), and GetGeometry2D().
|
protected |
Definition at line 441 of file MeshGraph.h.
Referenced by GetAllSegGeoms(), and GetSegGeom().
|
protected |
Definition at line 435 of file MeshGraph.h.
Referenced by SetSession().
|
protected |
Definition at line 451 of file MeshGraph.h.
Referenced by Empty(), and GetSpaceDimension().
|
protected |
Definition at line 445 of file MeshGraph.h.
Referenced by GetAllTetGeoms().
|
protected |
Definition at line 443 of file MeshGraph.h.
Referenced by GetAllTriGeoms(), and GetGeometry2D().
|
protected |
Definition at line 436 of file MeshGraph.h.
Referenced by GetAllPointGeoms(), GetNvertices(), and GetVertex().
|
protected |
Definition at line 466 of file MeshGraph.h.