Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::GeoEntity< Entity, T, IndexT > Class Template Reference

base class for all geometric entities More...

+ Inheritance diagram for Feel::GeoEntity< Entity, T, IndexT >:
+ Collaboration diagram for Feel::GeoEntity< Entity, T, IndexT >:

Classes

struct  reference_convex
 helper class to construct the associated reference convex. More...
 

Typedefs

typedef Entity super
 
typedef GeoEntity< Entity, T, IndexT > GeoShape
 
typedef GeoEntity< Entity, T, IndexT > self_type
 
typedef T value_type
 
using index_type = IndexT
 
using size_type = index_type
 
typedef super::topological_face_type face_type
 
typedef face_type GeoBShape
 
typedef Entity::edge_permutation_type edge_permutation_type
 
typedef Entity::face_permutation_type face_permutation_type
 
typedef Entity convex_type
 
template<typename TT = double>
using reference_convex_type = Reference< Entity, nDim, nOrder, nRealDim, TT >
 
using marker_type = Marker< flag_type >
 
static const size_type Shape = super::Shape
 
static const size_type Geometry = super::Geometry
 
static const uint16_type nDim = super::nDim
 
static const uint16_type nOrder = super::nOrder
 
static const uint16_type nRealDim = super::nRealDim
 
static const uint16_type numVertices = super::numVertices
 
static const uint16_type numFaces = super::numFaces
 
static const uint16_type numGeometricFaces = super::numGeometricFaces
 
static const uint16_type numTopologicalFaces = super::numTopologicalFaces
 
static const uint16_type numEdges = super::numEdges
 
static const uint16_type numNormals = super::numNormals
 
static const uint16_type numPoints = super::numPoints
 
static const uint16_type nbPtsPerVertex = super::nbPtsPerVertex
 
static const uint16_type nbPtsPerEdge = super::nbPtsPerEdge
 
static const uint16_type nbPtsPerFace = super::nbPtsPerFace
 
static const uint16_type nbPtsPerVolume = super::nbPtsPerVolume
 
static const bool is_simplex = super::is_simplex
 
static const bool is_hypercube = super::is_hypercube
 

Methods

class boost::serialization::access
 
self_type & addElement (size_type e, int id_in_element=0)
 add a new element to which the point belongs
 
size_type numberOfElements () const
 
std::set< std::pair< size_type, uint16_type > > const & elements () const
 
std::set< std::pair< size_type, uint16_type > > & elements ()
 
virtual void setTags (std::vector< int > const &tags)
 set the tags associated to the points More...
 
std::map< uint16_type, marker_type > const & markers () const
 return all markers
 
void setMarkers (std::map< uint16_type, marker_type > const &markers)
 set all markers
 
bool hasMarkerType (uint16_type k) const
 return true if has marker type id k
 
bool hasMarker (uint16_type k) const
 return true if has marker type id k
 
marker_type const & marker (uint16_type k) const
 return marker with type id k
 
void setMarker (uint16_type k, flag_type v)
 set marker type id k with flag v
 
void addMarker (uint16_type k, flag_type v)
 add flag v to the marker type id k
 
template<typename TT , std::enable_if_t< is_iterable_of_v< TT, flag_type >, bool > = true>
void setMarker (uint16_type k, TT const &vs)
 set marker type id k with flag v
 
template<typename TT , std::enable_if_t< is_iterable_of_v< TT, flag_type >, bool > = true>
void addMarker (uint16_type k, TT const &vs)
 add flags vs to the marker type id k
 
bool hasMarker () const
 
marker_type const & marker () const
 
void setMarker (flag_type v)
 
void addMarker (flag_type v)
 
template<typename TT , std::enable_if_t< is_iterable_of_v< TT, flag_type >, bool > = true>
void setMarker (TT const &vs)
 
template<typename TT , std::enable_if_t< is_iterable_of_v< TT, flag_type >, bool > = true>
void addMarker (TT const &vs)
 
bool hasMarker2 () const
 
marker_type const & marker2 () const
 
void setMarker2 (flag_type v)
 
bool hasMarker3 () const
 
marker_type const & marker3 () const
 
void setMarker3 (flag_type v)
 
static uint16_type eToP (uint16_type const __localEdge, uint16_type const __point)
 eToP(i,j) = localId of jth point on ith local edge
 
static uint16_type fToP (uint16_type const __localFace, uint16_type const __point)
 fToP(i,j) = localId of jth point on ith local edge
 
static uint16_type fToE (uint16_type const __localFace, uint16_type const __edge)
 fToE(i,j) = localId of jth edge on ith local face
 

Constructors, destructor

 GeoEntity ()
 
 GeoEntity (size_type i, size_type geometry=Geometry, size_type shape=Shape, size_type context=MESH_ENTITY_INTERNAL)
 
 GeoEntity (GeoEntity const &__me)=default
 
 GeoEntity (GeoEntity &&__me)
 
GeoEntity & operator= (GeoEntity const &__me)=default
 
GeoEntity & operator= (GeoEntity &&__me)
 
 ~GeoEntity () override
 

Operator overloads

bool operator== (GeoEntity const &e) const
 
bool operator< (GeoEntity const &e) const
 
bool operator< (size_type __i) const
 

Accessors

size_type id () const noexcept
 
constexpr uint16_type refDim () const
 the dimension of the reference shape More...
 
constexpr uint16_type nPoints () const
 number of points on the reference shape More...
 
constexpr uint16_type nVertices () const
 number of vertices on the reference shape More...
 
constexpr uint16_type nEdges () const
 number of edges on the reference shape More...
 
constexpr uint16_type nFaces () const
 number of faces on the reference shape More...
 
constexpr uint16_type nTopologicalFaces () const
 number of topological faces on the reference shape More...
 
constexpr uint16_type nGeometricFaces () const
 number of faces on the reference shape More...
 
constexpr uint16_type nNormals () const
 number of normals on the reference shape More...
 
bool hasShape (size_type __shape) const
 
bool isAVolume () const
 
bool isASurface () const
 
bool isALine () const
 
bool isAPoint () const
 
bool isAPointShape () const
 
bool isALineShape () const
 
bool isATriangleShape () const
 
bool isAQuadrangleShape () const
 
bool isATetrahedraShape () const
 
bool isAHexahedraShape () const
 
bool isLinear () const
 
bool isBilinear () const
 
bool isQuadratic () const
 
bool isInternal () const
 
bool isOnBoundary () const noexcept
 Tells if item is on the boundary. More...
 
uint16_type boundaryEntityDimension () const noexcept
 maximum dimension of the entity of the element touching the boundary
 
bool isGhostCell () const noexcept
 
rank_type processId () const noexcept
 
void setProcessId (rank_type pid) noexcept
 set the processor id of the entity & More...
 
rank_type pidInPartition () const noexcept
 
void setProcessIdInPartition (rank_type pid) noexcept
 set the processor id of the entity & More...
 
rank_type partitionId () const noexcept
 
rank_type numberOfPartitions () const noexcept
 
rank_type numberOfNeighborPartitions () const
 
bool isLinkedToOtherPartitions () const
 
size_type idInOthersPartitions (rank_type pid) const
 
std::map< rank_type, size_type > const & idInOthersPartitions () const noexcept
 
std::map< rank_type, size_type > const & neighborProcessIds () const noexcept
 
void clearIdInOthersPartitions ()
 clear id in others partitions container
 
bool active () const
 
virtual value_type measure () const
 

Mutators

void setId (size_type id)
 
void setOnBoundary (bool b, uint16_type ent_d=invalid_uint16_type_value)
 set the boundary flag More...
 
void setIdInOtherPartitions (rank_type pid, size_type id)
 set id in a partition pid of the entity
 
void setIdInOtherPartitions (std::map< rank_type, size_type > const &iop)
 set (partition,id) in other partitions of the entity
 
void setIdInOtherPartitions (std::map< rank_type, size_type > &&iop)
 set (partition,id) in other partitions of the entity
 
template<typename Q >
void setNeighborProcessIds (Q &&pids)
 
void setNeighborPartitionIds (std::vector< rank_type > const &npids)
 
void addNeighborPartitionId (rank_type p)
 

Detailed Description

template<typename Entity, typename T = double, typename IndexT = uint32_type>
class Feel::GeoEntity< Entity, T, IndexT >

base class for all geometric entities

Author
Christophe Prud'homme
See also

Member Function Documentation

◆ active()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::active ( ) const
Returns
true if active, false otherwise
Note
for now it is a dummy function that returns always true, will change when work on AMR starts

◆ elements()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
std::set< std::pair< size_type, uint16_type > > const & Feel::GeoEntity< Entity, T, IndexT >::elements ( ) const
Returns
the set of ids of elements whom the point belongs to

◆ hasShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::hasShape ( size_type  __shape) const
Returns
true if the entoty has the shape __shape, false otherwise

◆ idInOthersPartitions() [1/2]

template<typename Entity , typename T = double, typename IndexT = uint32_type>
std::map< rank_type, size_type > const & Feel::GeoEntity< Entity, T, IndexT >::idInOthersPartitions ( ) const
noexcept
Returns
idInOthersPartitions map

◆ idInOthersPartitions() [2/2]

template<typename Entity , typename T = double, typename IndexT = uint32_type>
size_type Feel::GeoEntity< Entity, T, IndexT >::idInOthersPartitions ( rank_type  pid) const
Returns
the id of the entity in a partition pid

◆ isAHexahedraShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isAHexahedraShape ( ) const
Returns
true of the entity is a hexahedra

◆ isALine()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isALine ( ) const
Returns
true of the entity is a line

References Feel::GEOMETRY_LINE.

◆ isALineShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isALineShape ( ) const
Returns
true of the entity is a shape line

◆ isAPoint()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isAPoint ( ) const
Returns
true of the entity is a point

References Feel::GEOMETRY_POINT.

◆ isAPointShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isAPointShape ( ) const
Returns
true of the entity is a shape point

◆ isAQuadrangleShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isAQuadrangleShape ( ) const
Returns
true of the entity is a quadrangle

◆ isASurface()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isASurface ( ) const
Returns
true of the entity is a surface

References Feel::GEOMETRY_SURFACE.

◆ isATetrahedraShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isATetrahedraShape ( ) const
Returns
true of the entity is a tetrahedra shape

◆ isATriangleShape()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isATriangleShape ( ) const
Returns
true of the entity is a triangle shape

◆ isAVolume()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isAVolume ( ) const
Returns
true of the entity is a volume

References Feel::GEOMETRY_VOLUME.

◆ isBilinear()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isBilinear ( ) const
Returns
true if the shape is bilinear, false otherwise

◆ isGhostCell()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isGhostCell ( ) const
noexcept
Returns
true if ghost cell, false otherwise

◆ isInternal()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isInternal ( ) const
Returns
true if the entity is internal, false otherwise

References Feel::MESH_ENTITY_INTERNAL.

◆ isLinear()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isLinear ( ) const
Returns
true if the shape is linear, false otherwise

◆ isLinkedToOtherPartitions()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isLinkedToOtherPartitions ( ) const
Returns
true if the element is linked to other partitions through one of more of its faces

◆ isOnBoundary()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isOnBoundary ( ) const
noexcept

Tells if item is on the boundary.

Returns
true if on boundary, false otherwise

References Feel::MESH_ENTITY_BOUNDARY.

◆ isQuadratic()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
bool Feel::GeoEntity< Entity, T, IndexT >::isQuadratic ( ) const
Returns
true if the shape is quadratic, false otherwise

◆ measure()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
virtual value_type Feel::GeoEntity< Entity, T, IndexT >::measure ( ) const
virtual
Returns
the measure of the entity

Reimplemented in Feel::Geo0D< Dim, T, IndexT >, Feel::Geo0D< Dim, double, uint32_type >, and Feel::Geo0D< 3 >.

◆ nEdges()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nEdges ( ) const
constexpr

number of edges on the reference shape

Returns
the number of edges on the reference shape

◆ nFaces()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nFaces ( ) const
constexpr

number of faces on the reference shape

Returns
the number of edges on the reference shape

◆ nGeometricFaces()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nGeometricFaces ( ) const
constexpr

number of faces on the reference shape

Returns
the number of edges on the reference shape

◆ nNormals()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nNormals ( ) const
constexpr

number of normals on the reference shape

Returns
the number of normals on the reference shape

◆ nPoints()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nPoints ( ) const
constexpr

number of points on the reference shape

Returns
the number of points on the reference shape

◆ nTopologicalFaces()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nTopologicalFaces ( ) const
constexpr

number of topological faces on the reference shape

Returns
the number of topological faces on the reference shape

◆ numberOfElements()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
size_type Feel::GeoEntity< Entity, T, IndexT >::numberOfElements ( ) const
Returns
the number of elements whom the point belongs to

◆ numberOfNeighborPartitions()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
rank_type Feel::GeoEntity< Entity, T, IndexT >::numberOfNeighborPartitions ( ) const
Returns
the number of partition the element is linked to

◆ numberOfPartitions()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
rank_type Feel::GeoEntity< Entity, T, IndexT >::numberOfPartitions ( ) const
noexcept
Returns
the number of partition the element is linked to including the partition to which it belongs

◆ nVertices()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::nVertices ( ) const
constexpr

number of vertices on the reference shape

Returns
the number of vertices on the reference shape

◆ partitionId()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
rank_type Feel::GeoEntity< Entity, T, IndexT >::partitionId ( ) const
noexcept
Returns
the partition id

◆ pidInPartition()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
rank_type Feel::GeoEntity< Entity, T, IndexT >::pidInPartition ( ) const
noexcept
Returns
the processor id of the entity

Referenced by Feel::GeoEntity< Entity, T, IndexT >::setNeighborPartitionIds().

◆ processId()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
rank_type Feel::GeoEntity< Entity, T, IndexT >::processId ( ) const
noexcept
Returns
the processor id of the entity

◆ refDim()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
constexpr uint16_type Feel::GeoEntity< Entity, T, IndexT >::refDim ( ) const
constexpr

the dimension of the reference shape

Returns
the dimension of the reference shape

◆ setNeighborPartitionIds()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
void Feel::GeoEntity< Entity, T, IndexT >::setNeighborPartitionIds ( std::vector< rank_type > const &  npids)
Returns
the number of partition the element is linked to

References Feel::GeoEntity< Entity, T, IndexT >::pidInPartition().

Referenced by Feel::GeoEntity< Entity, T, IndexT >::setTags().

◆ setOnBoundary()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
void Feel::GeoEntity< Entity, T, IndexT >::setOnBoundary ( bool  b,
uint16_type  ent_d = invalid_uint16_type_value 
)

set the boundary flag

Parameters
btrue if the item is on the boundary, false otherwise

References Feel::MESH_ENTITY_BOUNDARY, and Feel::MESH_ENTITY_INTERNAL.

◆ setProcessId()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
void Feel::GeoEntity< Entity, T, IndexT >::setProcessId ( rank_type  pid)
noexcept

set the processor id of the entity &

Parameters
pidprocessor id

Referenced by Feel::GeoEntity< Entity, T, IndexT >::setTags().

◆ setProcessIdInPartition()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
void Feel::GeoEntity< Entity, T, IndexT >::setProcessIdInPartition ( rank_type  pid)
noexcept

set the processor id of the entity &

Parameters
pidprocessor id

◆ setTags()

template<typename Entity , typename T = double, typename IndexT = uint32_type>
virtual void Feel::GeoEntity< Entity, T, IndexT >::setTags ( std::vector< int > const &  tags)
virtual

set the tags associated to the points

  • tags[0] physical region
  • tags[1] elementary region
  • tags[2] particular region

Reimplemented in Feel::Geo0D< Dim, T, IndexT >, Feel::Geo0D< Dim, double, uint32_type >, and Feel::Geo0D< 3 >.

References Feel::GeoEntity< Entity, T, IndexT >::setNeighborPartitionIds(), and Feel::GeoEntity< Entity, T, IndexT >::setProcessId().