Nektar++
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::SpatialDomains Namespace Reference

Classes

struct  BoundaryConditionBase
 
struct  DirichletBoundaryCondition
 
struct  NeumannBoundaryCondition
 
struct  RobinBoundaryCondition
 
struct  PeriodicBoundaryCondition
 
struct  NotDefinedBoundaryCondition
 
class  BoundaryConditions
 
struct  Curve
 
struct  BoundaryEntry
 
class  Domain
 
class  Geometry
 Base class for shape geometry information. More...
 
struct  GeometryHash
 Unary function that constructs a hash of a Geometry object, based on the vertex IDs. More...
 
class  Geometry0D
 1D geometry information More...
 
class  Geometry1D
 1D geometry information More...
 
class  Geometry2D
 2D geometry information More...
 
class  Geometry3D
 3D geometry information More...
 
class  GeomFactors
 Calculation and storage of geometric factors associated with the mapping from StdRegions reference elements to a given LocalRegions physical element in the mesh. More...
 
struct  GeomFactorsHash
 A hash functor for geometric factors. Utilises GeomFactors::GetHash. More...
 
class  HexGeom
 
class  InterfaceComponent
 
class  CompToElmt
 Structure holding graphvertexobject id and local element facet id. More...
 
class  WireframeEdgeComponent
 
struct  MeshVertex
 
struct  MeshEdge
 
struct  MeshTri
 
struct  MeshQuad
 
struct  MeshTet
 
struct  MeshPyr
 
struct  MeshPrism
 
struct  MeshHex
 
struct  MeshCurvedInfo
 
struct  MeshCurvedPts
 
struct  MeshEntity
 
struct  Composite
 
struct  ExpansionInfo
 
class  MeshGraph
 Base class for a spectral/hp element mesh. More...
 
class  MeshGraphHDF5
 
class  MeshGraphXml
 
class  MeshGraphXmlCompressed
 
class  MeshPartition
 
class  MeshPartitionMetis
 
class  MeshPartitionPtScotch
 
class  MeshPartitionScotch
 
class  PointGeom
 
class  PrismGeom
 
class  PyrGeom
 
class  QuadGeom
 
class  SegGeom
 
class  TetGeom
 
class  TriGeom
 

Typedefs

typedef std::map< int, CompositeSharedPtrBoundaryRegion
 
typedef std::shared_ptr< BoundaryRegionBoundaryRegionShPtr
 
typedef std::shared_ptr< const BoundaryRegionConstBoundaryRegionShPtr
 
typedef std::map< int, BoundaryRegionShPtrBoundaryRegionCollection
 
typedef std::shared_ptr< BoundaryConditionBaseBoundaryConditionShPtr
 
typedef std::shared_ptr< DirichletBoundaryConditionDirichletBCShPtr
 
typedef std::shared_ptr< NeumannBoundaryConditionNeumannBCShPtr
 
typedef std::shared_ptr< RobinBoundaryConditionRobinBCShPtr
 
typedef std::map< std::string, BoundaryConditionShPtrBoundaryConditionMap
 
typedef std::shared_ptr< BoundaryConditionMapBoundaryConditionMapShPtr
 
typedef std::map< int, BoundaryConditionMapShPtrBoundaryConditionCollection
 
typedef std::shared_ptr< BoundaryConditionsBoundaryConditionsSharedPtr
 
typedef std::shared_ptr< CurveCurveSharedPtr
 
typedef std::unordered_map< int, CurveSharedPtrCurveMap
 
typedef std::shared_ptr< BoundaryEntryBoundarySharedPtr
 
typedef std::vector< BoundarySharedPtrBoundaryVector
 
typedef std::vector< CompositeCompositeVector
 
typedef std::shared_ptr< GeometryGeometrySharedPtr
 
typedef std::vector< GeometrySharedPtrGeometryVector
 
typedef std::unordered_set< GeometrySharedPtrGeometrySet
 
typedef std::shared_ptr< GeometryVectorGeometryVectorSharedPtr
 
typedef std::shared_ptr< PointGeomPointGeomSharedPtr
 
typedef std::shared_ptr< Geometry1DGeometry1DSharedPtr
 
typedef std::shared_ptr< Geometry2DGeometry2DSharedPtr
 
typedef std::shared_ptr< Geometry0DGeometry0DSharedPtr
 
typedef std::vector< Geometry0DSharedPtrGeometry0DVector
 
typedef std::vector< Geometry0DSharedPtr >::iterator Geometry0DVectorIter
 
typedef std::vector< Geometry1DSharedPtrGeometry1DVector
 
typedef std::shared_ptr< SegGeomSegGeomSharedPtr
 
typedef std::vector< Geometry2DSharedPtrGeometry2DVector
 
typedef std::vector< PointGeomSharedPtrPointGeomVector
 
typedef std::vector< SegGeomSharedPtrSegGeomVector
 
typedef std::shared_ptr< Geometry3DGeometry3DSharedPtr
 
typedef std::vector< Geometry3DSharedPtrGeometry3DVector
 
typedef std::shared_ptr< GeomFactorsGeomFactorsSharedPtr
 Pointer to a GeomFactors object. More...
 
typedef std::vector< GeomFactorsSharedPtrGeomFactorsVector
 A vector of GeomFactor pointers. More...
 
typedef std::unordered_set< GeomFactorsSharedPtrGeomFactorsSet
 An unordered set of GeomFactor pointers. More...
 
typedef Array< OneD, Array< OneD, Array< OneD, NekDouble > > > DerivStorage
 Storage type for derivative of mapping. More...
 
typedef std::shared_ptr< QuadGeomQuadGeomSharedPtr
 
typedef std::shared_ptr< HexGeomHexGeomSharedPtr
 
typedef std::map< int, HexGeomSharedPtrHexGeomMap
 
typedef std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > CompositeDescriptor
 
typedef std::map< int, std::vector< unsigned int > > CompositeOrdering
 
typedef std::map< int, std::vector< unsigned int > > BndRegionOrdering
 
typedef std::shared_ptr< CompositeCompositeSharedPtr
 
typedef std::map< int, CompositeSharedPtrCompositeMap
 
typedef std::shared_ptr< ExpansionInfoExpansionInfoShPtr
 
typedef std::map< int, ExpansionInfoShPtrExpansionInfoMap
 
typedef std::shared_ptr< ExpansionInfoMapExpansionInfoMapShPtr
 
typedef std::map< std::string, ExpansionInfoMapShPtrExpansionInfoMapShPtrMap
 
typedef std::map< std::string, std::string > GeomInfoMap
 
typedef std::shared_ptr< std::vector< std::pair< GeometrySharedPtr, int > > > GeometryLinkSharedPtr
 
typedef std::map< std::string, std::string > MeshMetaDataMap
 
typedef std::shared_ptr< MeshGraphMeshGraphSharedPtr
 
typedef LibUtilities::NekFactory< std::string, MeshGraphMeshGraphFactory
 
typedef LibUtilities::NekFactory< std::string, MeshPartition, const LibUtilities::SessionReaderSharedPtr, LibUtilities::CommSharedPtr, int, std::map< int, MeshEntity >, CompositeDescriptorMeshPartitionFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class. More...
 
typedef std::shared_ptr< MeshPartitionMeshPartitionSharedPtr
 
typedef std::map< int, PointGeomSharedPtrPointGeomMap
 
typedef std::shared_ptr< PrismGeomPrismGeomSharedPtr
 
typedef std::map< int, PrismGeomSharedPtrPrismGeomMap
 
typedef std::shared_ptr< PyrGeomPyrGeomSharedPtr
 
typedef std::map< int, PyrGeomSharedPtrPyrGeomMap
 
typedef std::map< int, QuadGeomSharedPtrQuadGeomMap
 
typedef std::map< int, SegGeomSharedPtrSegGeomMap
 
typedef std::shared_ptr< TetGeomTetGeomSharedPtr
 
typedef std::vector< TetGeomSharedPtrTetGeomVector
 
typedef std::map< int, TetGeomSharedPtrTetGeomMap
 
typedef std::shared_ptr< TriGeomTriGeomSharedPtr
 
typedef std::map< int, TriGeomSharedPtrTriGeomMap
 

Enumerations

enum  BoundaryConditionType {
  eDirichlet , eNeumann , eRobin , ePeriodic ,
  eNotDefined
}
 
enum  BoundaryType {
  eUnknown =0 , eDirichlet , eNeumann , eRobin ,
  eCauchy , eDummy , eBoundaryTypeLastElement = eDummy-1
}
 
enum  ExpansionType {
  eNoExpansionType , eModified , eModifiedQuadPlus1 , eModifiedQuadPlus2 ,
  eModifiedGLLRadau10 , eOrthogonal , eGLL_Lagrange , eGLL_Lagrange_SEM ,
  eGauss_Lagrange , eGauss_Lagrange_SEM , eFourier , eFourierSingleMode ,
  eFourierHalfModeRe , eFourierHalfModeIm , eChebyshev , eFourierChebyshev ,
  eChebyshevFourier , eFourierModified , eExpansionTypeSize
}
 
enum  GeomType { eNoGeomType , eRegular , eDeformed , eMovingRegular }
 Indicates the type of element geometry. More...
 
enum  GeomState { eNotFilled , ePtsFilled }
 Indicates if the geometric information for an element has been populated. More...
 
enum  GeomMMF {
  eTangentX , eTangentY , eTangentXY , eTangentZ ,
  eTangentCircular , eTangentIrregular , eTangentNonconvex , eLOCAL
}
 Principle direction for MMF. More...
 

Functions

Array< OneD, int > ToArray (const std::set< int > &set)
 
std::set< int > ShareAllBoundaryIDs (const BoundaryRegionCollection &boundaryRegions, LibUtilities::CommSharedPtr comm)
 
bool SortByGlobalId (const std::shared_ptr< Geometry > &lhs, const std::shared_ptr< Geometry > &rhs)
 Less than operator to sort Geometry objects by global id when sorting STL containers. More...
 
bool GlobalIdEquality (const std::shared_ptr< Geometry > &lhs, const std::shared_ptr< Geometry > &rhs)
 
bool operator== (const GeomFactors &lhs, const GeomFactors &rhs)
 Equivalence test for GeomFactors objects. More...
 
MeshGraphFactoryGetMeshGraphFactory ()
 
std::pair< size_t, size_t > SplitWork (size_t vecsize, int rank, int nprocs)
 Utility function to split a vector equally amongst a number of processors. More...
 
template<class T , typename std::enable_if< T::kDim==0, int >::type = 0>
int GetGeomDataDim (std::map< int, std::shared_ptr< T >> &geomMap)
 
template<class ... T>
void UniqueValues (std::unordered_set< int > &unique)
 
template<class ... T>
void UniqueValues (std::unordered_set< int > &unique, const std::vector< int > &input, T &... args)
 
template<class T , typename std::enable_if< T::kDim==0, int >::type = 0>
NekDouble GetGeomData (std::shared_ptr< T > &geom, int i)
 
template<class T , typename std::enable_if< T::kDim==1, int >::type = 0>
int GetGeomData (std::shared_ptr< T > &geom, int i)
 
MeshPartitionFactoryGetMeshPartitionFactory ()
 
bool operator== (const PointGeom &x, const PointGeom &y)
 Determine equivalence by the ids. No matter what the position, if the ids are the same, then they are equivalent, and vice versa. More...
 
bool operator== (const PointGeom &x, const PointGeom *y)
 
bool operator== (const PointGeom *x, const PointGeom &y)
 
bool operator!= (const PointGeom &x, const PointGeom &y)
 
bool operator!= (const PointGeom &x, const PointGeom *y)
 
bool operator!= (const PointGeom *x, const PointGeom &y)
 

Variables

static const Array< OneD, BoundaryConditionShPtrNullBoundaryConditionShPtrArray
 
const char BoundaryTypeNameMap []
 
static CurveMap NullCurveMap
 
const std::string kExpansionTypeStr []
 
const char *const GeomMMFMap []
 Session file names associated with tangent principle directions. More...
 

Typedef Documentation

◆ BndRegionOrdering

typedef std::map<int, std::vector<unsigned int> > Nektar::SpatialDomains::BndRegionOrdering

Definition at line 110 of file MeshGraph.h.

◆ BoundaryConditionCollection

Definition at line 226 of file Conditions.h.

◆ BoundaryConditionMap

Definition at line 224 of file Conditions.h.

◆ BoundaryConditionMapShPtr

Definition at line 225 of file Conditions.h.

◆ BoundaryConditionShPtr

Definition at line 219 of file Conditions.h.

◆ BoundaryConditionsSharedPtr

Definition at line 289 of file Conditions.h.

◆ BoundaryRegion

Definition at line 214 of file Conditions.h.

◆ BoundaryRegionCollection

Definition at line 217 of file Conditions.h.

◆ BoundaryRegionShPtr

Definition at line 215 of file Conditions.h.

◆ BoundarySharedPtr

Definition at line 75 of file Domain.h.

◆ BoundaryVector

Definition at line 76 of file Domain.h.

◆ CompositeDescriptor

typedef std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > Nektar::SpatialDomains::CompositeDescriptor

Definition at line 63 of file MeshGraph.h.

◆ CompositeMap

Definition at line 138 of file MeshGraph.h.

◆ CompositeOrdering

typedef std::map<int, std::vector<unsigned int> > Nektar::SpatialDomains::CompositeOrdering

Definition at line 109 of file MeshGraph.h.

◆ CompositeSharedPtr

Definition at line 137 of file MeshGraph.h.

◆ CompositeVector

Definition at line 77 of file Domain.h.

◆ ConstBoundaryRegionShPtr

Definition at line 216 of file Conditions.h.

◆ CurveMap

typedef std::unordered_map< int, CurveSharedPtr > Nektar::SpatialDomains::CurveMap

Definition at line 62 of file Curve.hpp.

◆ CurveSharedPtr

typedef std::shared_ptr< Curve > Nektar::SpatialDomains::CurveSharedPtr

Definition at line 61 of file Curve.hpp.

◆ DerivStorage

Storage type for derivative of mapping.

Definition at line 70 of file GeomFactors.h.

◆ DirichletBCShPtr

Definition at line 220 of file Conditions.h.

◆ ExpansionInfoMap

Definition at line 143 of file MeshGraph.h.

◆ ExpansionInfoMapShPtr

Definition at line 145 of file MeshGraph.h.

◆ ExpansionInfoMapShPtrMap

Definition at line 146 of file MeshGraph.h.

◆ ExpansionInfoShPtr

Definition at line 142 of file MeshGraph.h.

◆ Geometry0DSharedPtr

Definition at line 48 of file Geometry0D.h.

◆ Geometry0DVector

Definition at line 49 of file Geometry0D.h.

◆ Geometry0DVectorIter

Definition at line 50 of file Geometry0D.h.

◆ Geometry1DSharedPtr

Definition at line 64 of file Geometry.h.

◆ Geometry1DVector

Definition at line 51 of file Geometry1D.h.

◆ Geometry2DSharedPtr

Definition at line 65 of file Geometry.h.

◆ Geometry2DVector

Definition at line 63 of file Geometry2D.h.

◆ Geometry3DSharedPtr

Definition at line 53 of file Geometry3D.h.

◆ Geometry3DVector

Definition at line 55 of file Geometry3D.h.

◆ GeometryLinkSharedPtr

typedef std::shared_ptr<std::vector<std::pair<GeometrySharedPtr, int> > > Nektar::SpatialDomains::GeometryLinkSharedPtr

Definition at line 170 of file MeshGraph.h.

◆ GeometrySet

Definition at line 56 of file Geometry.h.

◆ GeometrySharedPtr

Definition at line 54 of file Geometry.h.

◆ GeometryVector

Definition at line 55 of file Geometry.h.

◆ GeometryVectorSharedPtr

Definition at line 57 of file Geometry.h.

◆ GeomFactorsSet

An unordered set of GeomFactor pointers.

Definition at line 67 of file GeomFactors.h.

◆ GeomFactorsSharedPtr

Pointer to a GeomFactors object.

Definition at line 62 of file GeomFactors.h.

◆ GeomFactorsVector

A vector of GeomFactor pointers.

Definition at line 64 of file GeomFactors.h.

◆ GeomInfoMap

typedef std::map<std::string, std::string> Nektar::SpatialDomains::GeomInfoMap

Definition at line 168 of file MeshGraph.h.

◆ HexGeomMap

Definition at line 85 of file HexGeom.h.

◆ HexGeomSharedPtr

Definition at line 84 of file HexGeom.h.

◆ MeshGraphFactory

Definition at line 490 of file MeshGraph.h.

◆ MeshGraphSharedPtr

Definition at line 175 of file MeshGraph.h.

◆ MeshMetaDataMap

typedef std::map<std::string, std::string> Nektar::SpatialDomains::MeshMetaDataMap

Definition at line 172 of file MeshGraph.h.

◆ MeshPartitionFactory

Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.

Definition at line 63 of file MeshPartition.h.

◆ MeshPartitionSharedPtr

Definition at line 181 of file MeshPartition.h.

◆ NeumannBCShPtr

Definition at line 221 of file Conditions.h.

◆ PointGeomMap

Definition at line 54 of file PointGeom.h.

◆ PointGeomSharedPtr

Definition at line 60 of file Geometry.h.

◆ PointGeomVector

Definition at line 64 of file Geometry2D.h.

◆ PrismGeomMap

Definition at line 83 of file PrismGeom.h.

◆ PrismGeomSharedPtr

Definition at line 82 of file PrismGeom.h.

◆ PyrGeomMap

Definition at line 75 of file PyrGeom.h.

◆ PyrGeomSharedPtr

Definition at line 74 of file PyrGeom.h.

◆ QuadGeomMap

Definition at line 54 of file QuadGeom.h.

◆ QuadGeomSharedPtr

Definition at line 47 of file HexGeom.h.

◆ RobinBCShPtr

Definition at line 222 of file Conditions.h.

◆ SegGeomMap

Definition at line 52 of file SegGeom.h.

◆ SegGeomSharedPtr

Definition at line 62 of file Geometry2D.h.

◆ SegGeomVector

Definition at line 65 of file Geometry2D.h.

◆ TetGeomMap

Definition at line 84 of file TetGeom.h.

◆ TetGeomSharedPtr

Definition at line 82 of file TetGeom.h.

◆ TetGeomVector

Definition at line 83 of file TetGeom.h.

◆ TriGeomMap

Definition at line 59 of file TriGeom.h.

◆ TriGeomSharedPtr

Definition at line 58 of file TriGeom.h.

Enumeration Type Documentation

◆ BoundaryConditionType

Enumerator
eDirichlet 
eNeumann 
eRobin 
ePeriodic 
eNotDefined 

Definition at line 51 of file Conditions.h.

◆ BoundaryType

Enumerator
eUnknown 
eDirichlet 
eNeumann 
eRobin 
eCauchy 
eDummy 
eBoundaryTypeLastElement 

Definition at line 46 of file Domain.h.

47  {
48  eUnknown=0,
49  eDirichlet,
50  eNeumann,
51  eRobin,
52  eCauchy,
53 
54  eDummy,
56  };

◆ ExpansionType

Enumerator
eNoExpansionType 
eModified 
eModifiedQuadPlus1 
eModifiedQuadPlus2 
eModifiedGLLRadau10 
eOrthogonal 
eGLL_Lagrange 
eGLL_Lagrange_SEM 
eGauss_Lagrange 
eGauss_Lagrange_SEM 
eFourier 
eFourierSingleMode 
eFourierHalfModeRe 
eFourierHalfModeIm 
eChebyshev 
eFourierChebyshev 
eChebyshevFourier 
eFourierModified 
eExpansionTypeSize 

Definition at line 65 of file MeshGraph.h.

66 {
68  eModified,
77  eFourier,
81  eChebyshev,
86 };

◆ GeomMMF

Principle direction for MMF.

Enumerator
eTangentX 

X coordinate direction.

eTangentY 

Y coordinate direction.

eTangentXY 

XY direction.

eTangentZ 

Z coordinate direction.

eTangentCircular 

Circular around the centre of domain.

eTangentIrregular 

Circular around the centre of domain.

eTangentNonconvex 

Circular around the centre of domain.

eLOCAL 

No Principal direction.

Definition at line 73 of file SpatialDomains.hpp.

74  {
75  eTangentX, ///< X coordinate direction.
76  eTangentY, ///< Y coordinate direction.
77  eTangentXY, ///< XY direction.
78  eTangentZ, ///< Z coordinate direction.
79  eTangentCircular, ///< Circular around the centre of domain.
80  eTangentIrregular, ///< Circular around the centre of domain.
81  eTangentNonconvex, ///< Circular around the centre of domain.
82  eLOCAL, ///< No Principal direction.
83  };
@ eLOCAL
No Principal direction.
@ eTangentIrregular
Circular around the centre of domain.
@ eTangentX
X coordinate direction.
@ eTangentCircular
Circular around the centre of domain.
@ eTangentNonconvex
Circular around the centre of domain.
@ eTangentXY
XY direction.
@ eTangentZ
Z coordinate direction.
@ eTangentY
Y coordinate direction.

◆ GeomState

Indicates if the geometric information for an element has been populated.

Enumerator
eNotFilled 

Geometric information has not been generated.

ePtsFilled 

Geometric information has been generated.

Definition at line 64 of file SpatialDomains.hpp.

65  {
66  eNotFilled, ///< Geometric information has not been generated.
67  ePtsFilled ///< Geometric information has been generated.
68  };
@ eNotFilled
Geometric information has not been generated.
@ ePtsFilled
Geometric information has been generated.

◆ GeomType

Indicates the type of element geometry.

This property of the element geometry is used to indicate the necessary storage for the element's geometric information and its corresponding computational complexity. In many cases significant savings in both cases can be made based on this information, in comparison to the most generic case.

Enumerator
eNoGeomType 

No type defined.

eRegular 

Geometry is straight-sided with constant geometric factors.

eDeformed 

Geometry is curved or has non-constant factors.

eMovingRegular 

Currently unused.

Definition at line 51 of file SpatialDomains.hpp.

52  {
53  eNoGeomType, ///< No type defined.
54  eRegular, ///< Geometry is straight-sided with constant
55  /// geometric factors.
56  eDeformed, ///< Geometry is curved or has non-constant factors.
57  eMovingRegular, ///< Currently unused.
58  };
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eNoGeomType
No type defined.
@ eMovingRegular
Currently unused.
@ eDeformed
Geometry is curved or has non-constant factors.

Function Documentation

◆ GetGeomData() [1/2]

template<class T , typename std::enable_if< T::kDim==0, int >::type = 0>
NekDouble Nektar::SpatialDomains::GetGeomData ( std::shared_ptr< T > &  geom,
int  i 
)
inline

Definition at line 1326 of file MeshGraphHDF5.cpp.

1327 {
1328  return (*geom)(i);
1329 }

◆ GetGeomData() [2/2]

template<class T , typename std::enable_if< T::kDim==1, int >::type = 0>
int Nektar::SpatialDomains::GetGeomData ( std::shared_ptr< T > &  geom,
int  i 
)
inline

Definition at line 1332 of file MeshGraphHDF5.cpp.

1333 {
1334  return geom->GetVid(i);
1335 }

Referenced by Nektar::SpatialDomains::MeshGraphHDF5::WriteGeometryMap().

◆ GetGeomDataDim()

template<class T , typename std::enable_if< T::kDim==0, int >::type = 0>
int Nektar::SpatialDomains::GetGeomDataDim ( std::map< int, std::shared_ptr< T >> &  geomMap)
inline

◆ GetMeshGraphFactory()

MeshGraphFactory & Nektar::SpatialDomains::GetMeshGraphFactory ( )

Returns an instance of the MeshGraph factory, held as a singleton.

Definition at line 76 of file MeshGraph.cpp.

77 {
78  static MeshGraphFactory instance;
79  return instance;
80 }
LibUtilities::NekFactory< std::string, MeshGraph > MeshGraphFactory
Definition: MeshGraph.h:490

Referenced by Nektar::SpatialDomains::MeshGraph::Read().

◆ GetMeshPartitionFactory()

MeshPartitionFactory & Nektar::SpatialDomains::GetMeshPartitionFactory ( )

Definition at line 70 of file MeshPartition.cpp.

71 {
72  static MeshPartitionFactory instance;
73  return instance;
74 }
LibUtilities::NekFactory< std::string, MeshPartition, const LibUtilities::SessionReaderSharedPtr, LibUtilities::CommSharedPtr, int, std::map< int, MeshEntity >, CompositeDescriptor > MeshPartitionFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.
Definition: MeshPartition.h:63

Referenced by Nektar::SpatialDomains::MeshGraphHDF5::PartitionMesh(), and Nektar::SpatialDomains::MeshGraphXml::PartitionMesh().

◆ GlobalIdEquality()

bool Nektar::SpatialDomains::GlobalIdEquality ( const std::shared_ptr< Geometry > &  lhs,
const std::shared_ptr< Geometry > &  rhs 
)

Definition at line 128 of file Geometry.cpp.

130 {
131  return lhs->GetGlobalID() == rhs->GetGlobalID();
132 }

◆ operator!=() [1/3]

bool Nektar::SpatialDomains::operator!= ( const PointGeom x,
const PointGeom y 
)

Definition at line 210 of file PointGeom.cpp.

211 {
212  return (x.m_globalID != y.m_globalID);
213 }

◆ operator!=() [2/3]

bool Nektar::SpatialDomains::operator!= ( const PointGeom x,
const PointGeom y 
)

Definition at line 215 of file PointGeom.cpp.

216 {
217  return (x.m_globalID != y->m_globalID);
218 }

◆ operator!=() [3/3]

bool Nektar::SpatialDomains::operator!= ( const PointGeom x,
const PointGeom y 
)

Definition at line 220 of file PointGeom.cpp.

221 {
222  return (x->m_globalID != y.m_globalID);
223 }

◆ operator==() [1/4]

bool Nektar::SpatialDomains::operator== ( const GeomFactors lhs,
const GeomFactors rhs 
)

Equivalence test for GeomFactors objects.

Tests if two GeomFactors classes are equal.

Member data equivalence is tested in the following order: shape type, expansion dimension, coordinate dimension and coordinates.

Definition at line 131 of file GeomFactors.cpp.

132  {
133  if(!(lhs.m_type == rhs.m_type))
134  {
135  return false;
136  }
137 
138  if(!(lhs.m_expDim == rhs.m_expDim))
139  {
140  return false;
141  }
142 
143  if(!(lhs.m_coordDim == rhs.m_coordDim))
144  {
145  return false;
146  }
147 
148  const Array<OneD, const NekDouble> jac_lhs =
149  lhs.ComputeJac(lhs.m_xmap->GetPointsKeys());
150  const Array<OneD, const NekDouble> jac_rhs =
151  rhs.ComputeJac(rhs.m_xmap->GetPointsKeys());
152  if(!(jac_lhs == jac_rhs))
153  {
154  return false;
155  }
156 
157  return true;
158  }

◆ operator==() [2/4]

bool Nektar::SpatialDomains::operator== ( const PointGeom x,
const PointGeom y 
)

Determine equivalence by the ids. No matter what the position, if the ids are the same, then they are equivalent, and vice versa.

Definition at line 195 of file PointGeom.cpp.

196 {
197  return (x.m_globalID == y.m_globalID);
198 }

◆ operator==() [3/4]

bool Nektar::SpatialDomains::operator== ( const PointGeom x,
const PointGeom y 
)

Definition at line 200 of file PointGeom.cpp.

201 {
202  return (x.m_globalID == y->m_globalID);
203 }

◆ operator==() [4/4]

bool Nektar::SpatialDomains::operator== ( const PointGeom x,
const PointGeom y 
)

Definition at line 205 of file PointGeom.cpp.

206 {
207  return (x->m_globalID == y.m_globalID);
208 }

◆ ShareAllBoundaryIDs()

std::set<int> Nektar::SpatialDomains::ShareAllBoundaryIDs ( const BoundaryRegionCollection boundaryRegions,
LibUtilities::CommSharedPtr  comm 
)

Definition at line 90 of file Conditions.cpp.

93 {
94  // Turn the keys of boundaryRegions into set.
95  std::set<int> ids;
96  auto it = boundaryRegions.begin(), end = boundaryRegions.end();
97  int i = 0;
98  for (; it != end; ++it, ++i)
99  ids.insert(it->first);
100 
101  int np = comm->GetSize();
102  int ip = comm->GetRank();
103 
104  int half_size = 1;
105  bool involved = true;
106  while (involved && half_size < np)
107  {
108  if (ip & half_size)
109  {
110  // I'm sender
111 
112  // The receiver rank
113  int receiver = ip - half_size;
114 
115  Array<OneD, int> idsArray = ToArray(ids);
116  // Send my size (to alloc the reciever array)
117  Array<OneD, int> sender_size(1);
118  sender_size[0] = idsArray.size();
119  comm->Send(receiver, sender_size);
120 
121  // Send my data
122  comm->Send(receiver, idsArray);
123 
124  // Once we've sent, we're no longer involved.
125  involved = false;
126  }
127  else
128  {
129  // I'm receiver
130 
131  // The sender rank
132  int sender = ip + half_size;
133 
134  if (sender < np)
135  {
136  // Receive the size
137  Array<OneD, int> sender_size(1);
138  comm->Recv(sender, sender_size);
139 
140  // Receive the data
141  Array<OneD, int> other_ids(sender_size[0]);
142  comm->Recv(sender, other_ids);
143 
144  // Merge
145  ids.insert(other_ids.begin(), other_ids.end());
146  }
147  }
148  half_size *= 2;
149  }
150 
151  // Bcast the size
152  int nIds;
153  if (ip == 0)
154  nIds = ids.size();
155 
156  comm->Bcast(nIds, 0);
157 
158  // Bcast the data
159  Array<OneD, int> idsArray;
160  if (ip == 0)
161  idsArray = ToArray(ids);
162  else
163  idsArray = Array<OneD, int>(nIds);
164 
165  comm->Bcast(idsArray, 0);
166 
167  return std::set<int>(idsArray.begin(), idsArray.end());
168 }
Array< OneD, int > ToArray(const std::set< int > &set)
Definition: Conditions.cpp:70

References ToArray().

Referenced by Nektar::SpatialDomains::BoundaryConditions::CreateBoundaryComms().

◆ SortByGlobalId()

bool Nektar::SpatialDomains::SortByGlobalId ( const std::shared_ptr< Geometry > &  lhs,
const std::shared_ptr< Geometry > &  rhs 
)

Less than operator to sort Geometry objects by global id when sorting STL containers.

Definition at line 122 of file Geometry.cpp.

124 {
125  return lhs->GetGlobalID() < rhs->GetGlobalID();
126 }

◆ SplitWork()

std::pair<size_t, size_t> Nektar::SpatialDomains::SplitWork ( size_t  vecsize,
int  rank,
int  nprocs 
)

Utility function to split a vector equally amongst a number of processors.

Parameters
vecsizeSize of the total amount of work
rankRank of this process
nprocsNumber of processors in the group
Returns
A pair with the offset this process should occupy, along with the count for the amount of work.

Definition at line 100 of file MeshGraphHDF5.cpp.

101 {
102  size_t div = vecsize / nprocs;
103  size_t rem = vecsize % nprocs;
104  if (rank < rem)
105  {
106  return std::make_pair(rank * (div + 1), div + 1);
107  }
108  else
109  {
110  return std::make_pair((rank - rem) * div + rem * (div + 1), div);
111  }
112 }

Referenced by Nektar::SpatialDomains::MeshGraphHDF5::PartitionMesh().

◆ ToArray()

Array<OneD, int> Nektar::SpatialDomains::ToArray ( const std::set< int > &  set)

Helper that turns a set into an array.

Definition at line 70 of file Conditions.cpp.

71 {
72  Array<OneD, int> ans(set.size());
73  auto it = set.begin(), end = set.end();
74  for (int i = 0; it != end; ++it, ++i)
75  {
76  ans[i] = *it;
77  }
78  return ans;
79 }

Referenced by ShareAllBoundaryIDs().

◆ UniqueValues() [1/2]

template<class ... T>
void Nektar::SpatialDomains::UniqueValues ( std::unordered_set< int > &  unique)
inline

Definition at line 143 of file MeshGraphHDF5.cpp.

144 {
145  boost::ignore_unused(unique);
146 }

◆ UniqueValues() [2/2]

template<class ... T>
void Nektar::SpatialDomains::UniqueValues ( std::unordered_set< int > &  unique,
const std::vector< int > &  input,
T &...  args 
)
inline

Definition at line 149 of file MeshGraphHDF5.cpp.

152 {
153  for (auto i : input)
154  {
155  unique.insert(i);
156  }
157 
158  UniqueValues(unique, args...);
159 }
void UniqueValues(std::unordered_set< int > &unique, const std::vector< int > &input, T &... args)

Referenced by Nektar::SpatialDomains::MeshGraphHDF5::PartitionMesh().

Variable Documentation

◆ BoundaryTypeNameMap

const char Nektar::SpatialDomains::BoundaryTypeNameMap[]
Initial value:
=
{
'U',
'D',
'N',
'R',
'C'
}

Definition at line 60 of file Domain.h.

Referenced by Nektar::SpatialDomains::Domain::Read().

◆ GeomMMFMap

const char* const Nektar::SpatialDomains::GeomMMFMap[]
Initial value:
=
{
"TangentX",
"TangentY",
"TangentXY",
"TangentZ",
"TangentCircular",
"TangentIrregular",
"TangentNonconvex",
"LOCAL",
}

Session file names associated with tangent principle directions.

Definition at line 89 of file SpatialDomains.hpp.

Referenced by Nektar::SolverUtils::MMFSystem::CheckMovingFrames(), and Nektar::SolverUtils::MMFSystem::v_GenerateSummary().

◆ kExpansionTypeStr

const std::string Nektar::SpatialDomains::kExpansionTypeStr[]
Initial value:
= {"NOTYPE",
"MODIFIED",
"MODIFIEDQUADPLUS1",
"MODIFIEDQUADPLUS2",
"MODIFIEDGLLRADAU10",
"ORTHOGONAL",
"GLL_LAGRANGE",
"GLL_LAGRANGE_SEM",
"GAUSS_LAGRANGE",
"GAUSS_LAGRANGE_SEM",
"FOURIER",
"FOURIERSINGLEMODE",
"FOURIERHALFMODERE",
"FOURIERHALFMODEIM",
"CHEBYSHEV",
"FOURIER-CHEBYSHEV",
"CHEBYSHEV-FOURIER",
"FOURIER-MODIFIED"}

Definition at line 90 of file MeshGraph.h.

Referenced by Nektar::SpatialDomains::MeshGraph::ReadExpansionInfo().

◆ NullBoundaryConditionShPtrArray

const Array<OneD, BoundaryConditionShPtr> Nektar::SpatialDomains::NullBoundaryConditionShPtrArray
static

Definition at line 228 of file Conditions.h.

◆ NullCurveMap

CurveMap Nektar::SpatialDomains::NullCurveMap
static

Definition at line 70 of file Geometry.h.