35 #ifndef NEKTAR_SPATIALDOMAINS_MESHGRAPH_H
36 #define NEKTAR_SPATIALDOMAINS_MESHGRAPH_H
38 #include <unordered_map>
59 namespace SpatialDomains
61 typedef std::map<int, std::pair<LibUtilities::ShapeType, std::vector<int>>>
158 typedef std::shared_ptr<std::vector<std::pair<GeometrySharedPtr, int>>>
176 bool fillGraph =
true);
179 std::string &outfilename,
180 bool defaultExp =
false,
235 "Composite not found.");
240 int whichComposite,
int whichItem);
243 const std::string &compositeStr,
256 std::vector<std::map<int, CompositeSharedPtr>> &
GetDomain()
261 std::map<int, CompositeSharedPtr> &
GetDomain(
int domain)
264 "Request for domain which does not exist");
269 const std::string variable =
"DefaultVar");
276 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef);
280 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
281 std::vector<std::vector<LibUtilities::PointsType>> &pointstype);
304 std::string var =
"DefaultVar");
306 inline bool SameExpansions(
const std::string var1,
const std::string var2);
310 inline const std::string
GetGeomInfo(std::string parameter);
319 ExpansionType type_z,
const int nummodes_x,
const int nummodes_y,
320 const int nummodes_z);
406 const std::string variable =
"DefaultVar");
488 (std::string(
"Expansion field is already set for variable ") +
510 const std::string var2)
515 if (expVec1.get() == expVec2.get())
537 "Parameter " + parameter +
" does not exist.");
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define SPATIAL_DOMAINS_EXPORT
Describes the specification for a Basis.
Provides a generic Factory class.
Base class for a spectral/hp element mesh.
std::map< int, PointGeomSharedPtr > & GetAllPointGeoms()
std::map< int, std::string > & GetCompositesLabels()
void SetDomainRange(NekDouble xmin, NekDouble xmax, NekDouble ymin=NekConstants::kNekUnsetDouble, NekDouble ymax=NekConstants::kNekUnsetDouble, NekDouble zmin=NekConstants::kNekUnsetDouble, NekDouble zmax=NekConstants::kNekUnsetDouble)
PrismGeomMap & GetAllPrismGeoms()
bool CheckRange(Geometry2D &geom)
Check if goemetry is in range definition if activated.
void FillBoundingBoxTree()
ExpansionMapShPtrMap m_expansionMapShPtrMap
int GetMeshDimension()
Dimension of the mesh (can be a 1D curve in 3D space).
PrismGeomMap m_prismGeoms
QuadGeomMap & GetAllQuadGeoms()
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, DomainRangeShPtr rng=NullDomainRangeShPtr, bool fillGraph=true)
const std::string GetGeomInfo(std::string parameter)
void PopulateFaceToElMap(Geometry3DSharedPtr element, int kNfaces)
Given a 3D geometry object #element, populate the face to element map m_faceToElMap which maps faces ...
BndRegionOrdering & GetBndRegionOrdering()
HexGeomMap & GetAllHexGeoms()
Geometry2DSharedPtr GetGeometry2D(int gID)
LibUtilities::SessionReaderSharedPtr m_session
std::vector< CompositeMap > m_domain
bool SameExpansions(const std::string var1, const std::string var2)
CurveMap & GetCurvedEdges()
std::unique_ptr< GeomRTree > m_boundingBoxTree
TetGeomMap & GetAllTetGeoms()
CurveMap & GetCurvedFaces()
PyrGeomMap & GetAllPyrGeoms()
CompositeOrdering m_compOrder
void GetCompositeList(const std::string &compositeStr, CompositeMap &compositeVector) const
CompositeMap m_meshComposites
void Empty(int dim, int space)
virtual void PartitionMesh(LibUtilities::SessionReaderSharedPtr session)=0
std::map< int, SegGeomSharedPtr > & GetAllSegGeoms()
const ExpansionMap & GetExpansions(const std::string variable="DefaultVar")
GeometryLinkSharedPtr GetElementsFromEdge(Geometry1DSharedPtr edge)
GeometrySharedPtr GetCompositeItem(int whichComposite, int whichItem)
int GetSpaceDimension()
Dimension of the space (can be a 1D curve in 3D space).
std::string GetCompositeString(CompositeSharedPtr comp)
Returns a string representation of a composite.
ExpansionMapShPtr SetUpExpansionMap()
void SetExpansionsToPolyOrder(int nmodes)
Reset expansion to have specified polynomial order nmodes.
std::map< int, CompositeSharedPtr > & GetComposites()
std::unordered_map< int, GeometryLinkSharedPtr > m_faceToElMap
void SetExpansionsToEvenlySpacedPoints(int npoints=0)
Sets expansions to have equispaced points.
CompositeSharedPtr GetComposite(int whichComposite)
void SetExpansions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
Sets expansions given field definitions.
void SetExpansionsToPointOrder(int npts)
Reset expansion to have specified point order npts.
TriGeomMap & GetAllTriGeoms()
CompositeOrdering & GetCompositeOrdering()
LibUtilities::BasisKey GetEdgeBasisKey(SegGeomSharedPtr edge, const std::string variable="DefaultVar")
DomainRangeShPtr m_domainRange
std::map< int, MeshEntity > CreateMeshEntities()
Create mesh entities for this graph.
LibUtilities::BasisKeyVector DefineBasisKeyFromExpansionTypeHomo(GeometrySharedPtr in, ExpansionType type_x, ExpansionType type_y, ExpansionType type_z, const int nummodes_x, const int nummodes_y, const int nummodes_z)
bool CheckForGeomInfo(std::string parameter)
LibUtilities::BasisKey GetFaceBasisKey(Geometry2DSharedPtr face, const int facedir, const std::string variable="DefaultVar")
3D functions
SegGeomSharedPtr GetSegGeom(int id)
CompositeDescriptor CreateCompositeDescriptor()
virtual void ReadGeometry(DomainRangeShPtr rng, bool fillGraph)=0
GeometryLinkSharedPtr GetElementsFromFace(Geometry2DSharedPtr face)
std::map< int, CompositeSharedPtr > & GetDomain(int domain)
ExpansionShPtr GetExpansion(GeometrySharedPtr geom, const std::string variable="DefaultVar")
void SetBasisKey(LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys, std::string var="DefaultVar")
Sets the basis key for all expansions of the given shape.
std::map< int, std::string > m_compositesLabels
std::vector< int > GetElementsContainingPoint(PointGeomSharedPtr p)
PointGeomSharedPtr GetVertex(int id)
virtual void WriteGeometry(std::string &outfilename, bool defaultExp=false, const LibUtilities::FieldMetaDataMap &metadata=LibUtilities::NullFieldMetaDataMap)=0
static LibUtilities::BasisKeyVector DefineBasisKeyFromExpansionType(GeometrySharedPtr in, ExpansionType type, const int order)
void SetSession(LibUtilities::SessionReaderSharedPtr pSession)
std::vector< std::map< int, CompositeSharedPtr > > & GetDomain()
BndRegionOrdering m_bndRegOrder
std::map< std::string, std::string > FieldMetaDataMap
std::shared_ptr< SessionReader > SessionReaderSharedPtr
static FieldMetaDataMap NullFieldMetaDataMap
std::vector< BasisKey > BasisKeyVector
Name for a vector of BasisKeys.
static const NekDouble kNekUnsetDouble
std::map< int, TriGeomSharedPtr > TriGeomMap
std::map< int, ExpansionShPtr > ExpansionMap
std::map< std::string, std::string > GeomInfoMap
std::map< int, std::vector< unsigned int > > CompositeOrdering
std::map< int, PyrGeomSharedPtr > PyrGeomMap
std::map< std::string, ExpansionMapShPtr > ExpansionMapShPtrMap
std::map< int, QuadGeomSharedPtr > QuadGeomMap
std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > CompositeDescriptor
std::shared_ptr< std::vector< std::pair< GeometrySharedPtr, int > > > GeometryLinkSharedPtr
std::map< int, std::vector< unsigned int > > BndRegionOrdering
std::shared_ptr< DomainRange > DomainRangeShPtr
std::map< int, SegGeomSharedPtr > SegGeomMap
std::unordered_map< int, CurveSharedPtr > CurveMap
std::map< int, CompositeSharedPtr > CompositeMap
LibUtilities::NekFactory< std::string, MeshGraph > MeshGraphFactory
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< ExpansionMap > ExpansionMapShPtr
std::map< int, TetGeomSharedPtr > TetGeomMap
const std::string kExpansionTypeStr[]
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
static DomainRangeShPtr NullDomainRangeShPtr
std::map< std::string, std::string > MeshMetaDataMap
std::map< int, PrismGeomSharedPtr > PrismGeomMap
std::shared_ptr< Expansion > ExpansionShPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< Geometry > GeometrySharedPtr
MeshGraphFactory & GetMeshGraphFactory()
std::shared_ptr< Composite > CompositeSharedPtr
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
std::map< int, HexGeomSharedPtr > HexGeomMap
std::map< int, PointGeomSharedPtr > PointGeomMap
std::shared_ptr< Geometry3D > Geometry3DSharedPtr
std::vector< std::shared_ptr< Geometry > > m_geomVec
LibUtilities::ShapeType m_shapeType
Expansion(GeometrySharedPtr geomShPtr, const LibUtilities::BasisKeyVector basiskeyvec)
LibUtilities::BasisKeyVector m_basisKeyVector
GeometrySharedPtr m_geomShPtr