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>>>
143 : m_geomShPtr(geomShPtr), m_basisKeyVector(basiskeyvec)
158 typedef std::shared_ptr<std::vector<std::pair<GeometrySharedPtr, int>>>
175 DomainRangeShPtr rng = NullDomainRangeShPtr,
176 bool fillGraph =
true);
179 std::string &outfilename,
180 bool defaultExp =
false,
186 m_meshDimension = dim;
187 m_spaceDimension = space;
207 return m_meshDimension;
213 return m_spaceDimension;
233 ASSERTL0(m_meshComposites.find(whichComposite) !=
234 m_meshComposites.end(),
235 "Composite not found.");
236 return m_meshComposites.find(whichComposite)->second;
240 int whichComposite,
int whichItem);
243 const std::string &compositeStr,
244 CompositeMap &compositeVector)
const;
248 return m_meshComposites;
253 return m_compositesLabels;
256 std::vector<std::map<int, CompositeSharedPtr>> &
GetDomain()
261 std::map<int, CompositeSharedPtr> &
GetDomain(
int domain)
264 "Request for domain which does not exist");
265 return m_domain[domain];
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);
296 inline void SetExpansions(
const std::string variable,
297 ExpansionMapShPtr &exp);
304 std::string var =
"DefaultVar");
306 inline bool SameExpansions(
const std::string var1,
const std::string var2);
308 inline bool CheckForGeomInfo(std::string parameter);
310 inline const std::string GetGeomInfo(std::string parameter);
317 DefineBasisKeyFromExpansionTypeHomo(
319 ExpansionType type_z,
const int nummodes_x,
const int nummodes_y,
320 const int nummodes_z);
325 return m_vertSet.size();
330 return m_vertSet[id];
335 return m_segGeoms[id];
340 return m_curvedEdges;
344 return m_curvedFaces;
384 auto it1 = m_triGeoms.find(gID);
385 if (it1 != m_triGeoms.end())
388 auto it2 = m_quadGeoms.find(gID);
389 if (it2 != m_quadGeoms.end())
406 const std::string variable =
"DefaultVar");
415 return m_bndRegOrder;
420 DomainRangeShPtr rng,
426 CreateMeshEntities();
432 ExpansionMapShPtr SetUpExpansionMap();
433 std::string GetCompositeString(CompositeSharedPtr comp);
483 ExpansionMapShPtr &exp)
485 if (m_expansionMapShPtrMap.count(variable) != 0)
488 (std::string(
"Expansion field is already set for variable ") +
494 m_expansionMapShPtrMap[variable] = exp;
503 m_session = pSession;
510 const std::string var2)
512 ExpansionMapShPtr expVec1 = m_expansionMapShPtrMap.find(var1)->second;
513 ExpansionMapShPtr expVec2 = m_expansionMapShPtrMap.find(var2)->second;
515 if (expVec1.get() == expVec2.get())
528 return m_geomInfo.find(parameter) != m_geomInfo.end();
536 ASSERTL1(m_geomInfo.find(parameter) != m_geomInfo.end(),
537 "Parameter " + parameter +
" does not exist.");
538 return m_geomInfo[parameter];
int GetMeshDimension()
Dimension of the mesh (can be a 1D curve in 3D space).
std::map< std::string, std::string > GeomInfoMap
void SetExpansions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
Sets expansions given field definitions.
#define ASSERTL0(condition, msg)
LibUtilities::ShapeType m_shapeType
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
LibUtilities::SessionReaderSharedPtr m_session
BndRegionOrdering & GetBndRegionOrdering()
std::vector< std::map< int, CompositeSharedPtr > > & GetDomain()
CurveMap & GetCurvedFaces()
std::map< int, std::string > m_compositesLabels
std::shared_ptr< Geometry3D > Geometry3DSharedPtr
void SetSession(LibUtilities::SessionReaderSharedPtr pSession)
PyrGeomMap & GetAllPyrGeoms()
TetGeomMap & GetAllTetGeoms()
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
PrismGeomMap m_prismGeoms
std::shared_ptr< std::vector< std::pair< GeometrySharedPtr, int > > > GeometryLinkSharedPtr
std::unordered_map< int, CurveSharedPtr > CurveMap
Geometry2DSharedPtr GetGeometry2D(int gID)
CompositeMap m_meshComposites
void Empty(int dim, int space)
QuadGeomMap & GetAllQuadGeoms()
std::map< std::string, std::string > MeshMetaDataMap
PointGeomSharedPtr GetVertex(int id)
std::map< int, CompositeSharedPtr > CompositeMap
std::map< int, PrismGeomSharedPtr > PrismGeomMap
std::shared_ptr< Composite > CompositeSharedPtr
std::map< int, PointGeomSharedPtr > & GetAllPointGeoms()
LibUtilities::NekFactory< std::string, MeshGraph > MeshGraphFactory
bool SameExpansions(const std::string var1, const std::string var2)
std::map< int, PyrGeomSharedPtr > PyrGeomMap
TriGeomMap & GetAllTriGeoms()
Expansion(GeometrySharedPtr geomShPtr, const LibUtilities::BasisKeyVector basiskeyvec)
std::shared_ptr< DomainRange > DomainRangeShPtr
CompositeSharedPtr GetComposite(int whichComposite)
std::map< std::string, std::string > FieldMetaDataMap
std::map< int, std::string > & GetCompositesLabels()
std::map< int, TetGeomSharedPtr > TetGeomMap
bool CheckForGeomInfo(std::string parameter)
std::unique_ptr< GeomRTree > m_boundingBoxTree
std::map< int, TriGeomSharedPtr > TriGeomMap
SegGeomSharedPtr GetSegGeom(int id)
DomainRangeShPtr m_domainRange
CompositeOrdering & GetCompositeOrdering()
MeshGraphFactory & GetMeshGraphFactory()
std::map< int, std::vector< unsigned int > > CompositeOrdering
CurveMap & GetCurvedEdges()
std::map< int, SegGeomSharedPtr > SegGeomMap
std::shared_ptr< Geometry > GeometrySharedPtr
GeometrySharedPtr m_geomShPtr
std::vector< std::shared_ptr< Geometry > > m_geomVec
std::map< int, CompositeSharedPtr > & GetDomain(int domain)
std::vector< BasisKey > BasisKeyVector
Name for a vector of BasisKeys.
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::map< std::string, ExpansionMapShPtr > ExpansionMapShPtrMap
std::shared_ptr< Expansion > ExpansionShPtr
static const NekDouble kNekUnsetDouble
PrismGeomMap & GetAllPrismGeoms()
std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > CompositeDescriptor
std::map< int, CompositeSharedPtr > & GetComposites()
int GetSpaceDimension()
Dimension of the space (can be a 1D curve in 3D space).
const std::string GetGeomInfo(std::string parameter)
std::unordered_map< int, GeometryLinkSharedPtr > m_faceToElMap
BndRegionOrdering m_bndRegOrder
std::map< int, QuadGeomSharedPtr > QuadGeomMap
std::vector< CompositeMap > m_domain
static DomainRangeShPtr NullDomainRangeShPtr
ExpansionMapShPtrMap m_expansionMapShPtrMap
Base class for a spectral/hp element mesh.
CompositeOrdering m_compOrder
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
std::map< int, SegGeomSharedPtr > & GetAllSegGeoms()
HexGeomMap & GetAllHexGeoms()
std::map< int, PointGeomSharedPtr > PointGeomMap
std::shared_ptr< ExpansionMap > ExpansionMapShPtr
const std::string kExpansionTypeStr[]
std::map< int, std::vector< unsigned int > > BndRegionOrdering
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
std::shared_ptr< SegGeom > SegGeomSharedPtr
static FieldMetaDataMap NullFieldMetaDataMap
std::map< int, HexGeomSharedPtr > HexGeomMap
Describes the specification for a Basis.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
#define SPATIAL_DOMAINS_EXPORT
LibUtilities::BasisKeyVector m_basisKeyVector
std::map< int, ExpansionShPtr > ExpansionMap
Provides a generic Factory class.