Feel++  0.91.4
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE > Class Template Reference

Base class for Multi-dimensional basis Geometrical Entities. More...

#include <geond.hpp>

Inheritance diagram for Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >:
Feel::GeoEntity< GEOSHAPE > equality_comparable less_than_comparable less_than_comparable GEOSHAPE

List of all members.

Classes

struct  GetGm
struct  tt

Public Types

typedef T value_type
typedef GeoND< Dim, GEOSHAPE,
value_type, POINTTYPE > 
self_type
typedef self_type element_type
typedef GEOSHAPE GeoShape
typedef POINTTYPE PointType
typedef PointType point_type
typedef super::face_type face_type
typedef ublas::bounded_array
< point_type *, numPoints >
::iterator 
point_iterator
typedef ublas::bounded_array
< point_type *, numPoints >
::const_iterator 
point_const_iterator
typedef matrix_node
< value_type >::type 
matrix_node_type
typedef node< value_type >::type node_type
typedef GetGm< nOrder >::type gm_type
typedef GetGm< nOrder >::ptrtype gm_ptrtype
typedef GetGm< 1 >::type gm1_type
typedef GetGm< 1 >::ptrtype gm1_ptrtype
typedef
super::vertex_permutation_type 
vertex_permutation_type
typedef
super::edge_permutation_type 
edge_permutation_type
typedef
super::face_permutation_type 
face_permutation_type
typedef mpl::if_
< mpl::equal_to< mpl::int_
< nDim >, mpl::int_
< 1 > >, mpl::identity
< vertex_permutation_type >
, typename mpl::if_
< mpl::equal_to< mpl::int_
< nDim >, mpl::int_
< 2 > >, mpl::identity
< edge_permutation_type >
, mpl::identity
< face_permutation_type >
>::type >::type::type 
permutation_type
typedef face_type GeoBShape
typedef GEOSHAPE convex_type

Public Member Functions

 GeoND ()
 GeoND (size_type id)
 GeoND (GeoND const &e)
virtual ~GeoND ()
void setMeshAndGm (MeshBase const *m, gm_ptrtype const &gm, gm1_ptrtype const &gm1) const
void setMesh (MeshBase const *m) const
gm_ptrtype gm () const
 return the geometric mapping if a mesh was set
gm1_ptrtype gm1 () const
 return the geometric mapping if a mesh was set
MeshBase const * mesh () const
bool hasPoints () const
uint16_type nPoints () const
uint16_type nNeighbors () const
std::pair< size_type,
size_type > const & 
neighbor (uint16_type n) const
void setNeighbor (uint16_type n, size_type neigh_id, size_type proc_id)
bool isNeighbor (self_type const &G) const
node_type barycenter () const
node_type faceBarycenter (uint16_type f) const
matrix_node_type faceBarycenters () const
permutation_type permutation (uint16_type) const
PointType & point (uint16_type i)
PointType const & point (uint16_type i) const
PointType * pointPtr (uint16_type i)
PointType const * pointPtr (uint16_type i) const
PointType const & facePoint (uint16_type __f, uint16_type const __i) const
PointType & reversepoint (uint16_type const i)
PointType const & reversepoint (uint16_type const i) const
void setPoint (uint16_type const i, point_type const &p)
std::ostream & showMe (bool verbose=false, std::ostream &c=std::cout) const
void swapPoints (const uint16_type &pt1, const uint16_type &pt2)
void exchangePoints (const uint16_type otn[numPoints])
matrix_node_type const & G () const
matrix_node_type vertices () const
matrix_node_type & G ()
point_iterator beginPoint ()
point_const_iterator beginPoint () const
point_iterator endPoint ()
point_const_iterator endPoint () const
double h () const
double hFace (uint16_type f) const
double hEdge (uint16_type f) const
double measure () const
double faceMeasure (uint16_type f) const
std::vector< double > const & faceMeasures () const
matrix_node_type const & normals () const
ublas::matrix_column
< matrix_node_type const > 
normal (uint16_type f) const
uint16_type nOppositePointsPerFace () const
uint16_type faceToOppositePoint (uint16_type const _localFace, uint16_type const _point) const
bool isAnticlockwiseOriented () const
void applyDisplacement (int i, ublas::vector< double > const &u)
void applyDisplacementG (int i, ublas::vector< double > const &u)
void setTags (std::vector< int > const &tags)
Marker1 const & marker () const
Marker1 & marker ()
void setMarker (flag_type v)
Marker2 const & marker2 () const
Marker2 & marker2 ()
void setMarker2 (flag_type v)
Marker3 const & marker3 () const
Marker3 & marker3 ()
void setMarker3 (flag_type v)
size_type numberOfPointElementNeighbors () const
std::set< size_type > const & pointElementNeighborIds () const
void setMeasurePointElementNeighbors (value_type meas)
 set the measure of point element neighbors
value_type measurePointElementNeighbors () const
void update ()
void updateWithPc (typename gm_type::precompute_ptrtype const &pc, typename gm_type::faces_precompute_type &pcf)
- Public Member Functions inherited from Feel::GeoEntity< GEOSHAPE >
 GeoEntity ()
 GeoEntity (size_type i, size_type geometry=Geometry, size_type shape=Shape, size_type context=MESH_ENTITY_INTERNAL)
 GeoEntity (GeoEntity const &__me)
GeoEntityoperator= (GeoEntity const &__me)
virtual ~GeoEntity ()
bool operator== (GeoEntity const &e) const
bool operator< (GeoEntity const &e) const
bool operator< (size_type __i) const
size_type id () const
uint16_type refDim () const
uint16_type nVertices () const
uint16_type nEdges () const
uint16_type nFaces () const
uint16_type nGeometricFaces () const
uint16_type nNormals () const
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
bool isGhostCell () const
uint16_type processId () const
void setProcessId (uint16_type pid)
void setProcessIdInPartition (uint16_type pid)
uint16_type partitionId () const
uint16_type numberOfPartitions () const
size_type numberOfNeighborPartitions () const
bool isLinkedToOtherPartitions () const
std::vector< int > const & neighborPartitionIds () const
void setIdInPartition (uint16_type pid, size_type id)
size_type idInPartition (uint16_type pid) const
bool active () const
void setId (size_type id)
void setOnBoundary (bool b)
void setNumberOfPartitions (uint16_type np)
void setNumberOfNeighborPartitions (uint16_type nep)
void setNeighborPartitionIds (std::vector< int > const &npids)
self_typeaddElement (size_type e)
size_type numberOfElements () const
std::set< size_type > const & elements () const

Static Public Member Functions

static uint16_type fToP (uint16_type const _localFace, uint16_type const _point)
static uint16_type eToP (uint16_type const __localEdge, uint16_type const __point)
static uint16_type fToE (uint16_type const __localFace, uint16_type const __edge)

Static Public Attributes

static const size_type Shape = super::Shape
static const uint16_type numPoints = super::numPoints
static const uint16_type numVertices = super::numVertices
static const uint16_type numLocalPoints = super::numPoints
static const uint16_type numLocalEdges = super::numEdges
static const uint16_type numLocalVertices = super::numVertices
static const int numFaces = super::numFaces
static const int numEdges = super::numEdges
static const int numTopologicalFaces = super::numTopologicalFaces
static const uint16_type numNeighbors = super::numTopologicalFaces
static const uint16_type nDim = super::nDim
static const uint16_type nOrder = super::nOrder
static const uint16_type nRealDim = super::nRealDim
static const size_type Geometry
static const uint16_type numGeometricFaces
static const uint16_type numNormals
static const uint16_type nbPtsPerVertex
static const uint16_type nbPtsPerEdge
static const uint16_type nbPtsPerFace
static const uint16_type nbPtsPerVolume
static const bool is_simplex
static const bool is_hypercube

Detailed Description

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
class Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >

Base class for Multi-dimensional basis Geometrical Entities.


Constructor & Destructor Documentation

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::GeoND ( )
inline

default constructor

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::GeoND ( size_type  id)
inlineexplicit

constructor from an id

Parameters:
ididentifier for the element to store
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
virtual Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::~GeoND ( )
inlinevirtual

destructor, make it virtual for derived classes


Member Function Documentation

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
node_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::barycenter ( ) const
inline
Returns:
the barycenter of the element
template<uint16_type Dim, typename GEOSHAPE , typename T , typename POINTTYPE >
void Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::exchangePoints ( const uint16_type  otn[numPoints])

Exchange Points

Exchanges points according to a list of old2new local id numbering ! old2new[i] is the new local id of a point whose old local id was ! i+1 (remeber the numbering from 1 of the id's!. This is a member function to be used ONLY by routines for checking or amending meshes. You must give uint16_type (which start

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
node_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::faceBarycenter ( uint16_type  f) const
inline
Returns:
the barycenter at the faces of the element
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
matrix_node_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::faceBarycenters ( ) const
inline
Returns:
the barycenters at the faces of the element
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
double Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::faceMeasure ( uint16_type  f) const
inline
Returns:
the measure of the element face f
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
std::vector<double> const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::faceMeasures ( ) const
inline
Returns:
the measure of the element faces
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
uint16_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::faceToOppositePoint ( uint16_type const  _localFace,
uint16_type const  _point 
) const
inline

faceToOppositePoint(i,j) = localId of jth opposite point to ith local face

Returns:
the localId of _point-th opposite point to _localFace-th local face

Referenced by Feel::GeoND< Dim, GEOSHAPE, T, GeoElement0D< Dim, SubFaceOfNone, T > >::faceToOppositePoint().

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
static uint16_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::fToP ( uint16_type const  _localFace,
uint16_type const  _point 
)
inlinestatic

Get the local id of the point in the element

Parameters:
_localFacelocal id of a face in the element
_pointlocal id of a point in the face
Returns:
the local id of the point in the element

Reimplemented from Feel::GeoEntity< GEOSHAPE >.

Referenced by Feel::GeoND< Dim, GEOSHAPE, T, GeoElement0D< Dim, SubFaceOfNone, T > >::fToP().

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
matrix_node_type const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::G ( ) const
inline

matrix of geometric nodes retrieve the matrix of geometric nodes (Dim x NumPoints) the matrix is column oriented, the column i contains the coordinate of the i-th geometric node of the element

Returns:
the matrix of geometric nodes

Referenced by Feel::GeoND< Dim, GEOSHAPE, T, GeoElement0D< Dim, SubFaceOfNone, T > >::isAnticlockwiseOriented().

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
matrix_node_type& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::G ( )
inline

matrix of geometric nodes retrieve the matrix of geometric nodes (Dim x NumPoints) the matrix is column oriented, the column i contains the coordinate of the i-th geometric node of the element

Returns:
the matrix of geometric nodes
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
double Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::h ( ) const
inline

get the max length of the edges of the element

Returns:
the max length of the edges of the element
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
bool Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::hasPoints ( ) const
inline
Returns:
true if points have been inserted in elements, false otherwise
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
double Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::hFace ( uint16_type  f) const
inline

get the max length of the edge in the local face f

Parameters:
flocal id of the face
Returns:
the max length of the edges of the local face
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
bool Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::isAnticlockwiseOriented ( ) const
inline

Determines if the local numbering of a 2D element is oriented anticlockwise

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
double Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::measure ( ) const
inlinevirtual
Returns:
the measure of the element

Implements Feel::GeoEntity< GEOSHAPE >.

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
value_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::measurePointElementNeighbors ( ) const
inline
Returns:
the measure of point element neighbors
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
MeshBase const* Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::mesh ( ) const
inline
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
std::pair<size_type,size_type> const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::neighbor ( uint16_type  n) const
inline

Neighbors are stored as pointers and some of them can be null pointers if the corresponding face is on the boundary.

Returns:
the pair neighbor n index and process id it belongs to
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
uint16_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::nNeighbors ( ) const
inline

the number of neighbors is equal to the number of faces. Neighbors are stored as pointers and some of them can be null pointers if the corresponding face is on the boundary.

Returns:
the number of neighbors
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
uint16_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::nOppositePointsPerFace ( ) const
inline

get the number of opposite points per face

Returns:
the number of opposite points per face
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
ublas::matrix_column<matrix_node_type const> Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::normal ( uint16_type  f) const
inline
Returns:
the normal at the barycenter of the face f
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
matrix_node_type const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::normals ( ) const
inline
Returns:
the normals at the barycenter of the faces
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
uint16_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::nPoints ( ) const
inline
Returns:
the number of points in convex

Reimplemented from Feel::GeoEntity< GEOSHAPE >.

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
size_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::numberOfPointElementNeighbors ( ) const
inline
Returns:
the number of point element neighbors
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
permutation_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::permutation ( uint16_type  ) const
inline
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
PointType& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::point ( uint16_type  i)
inline

It returns the reference to an point object (possibly derived from Geo0D)

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
PointType const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::point ( uint16_type  i) const
inline

It returns the reference to an point object (possibly derived from Geo0D)

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
std::set<size_type> const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::pointElementNeighborIds ( ) const
inline
Returns:
the set of ids of point element neighbors
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
PointType* Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::pointPtr ( uint16_type  i)
inline

It returns the pointer to an point object (possibly derived from Geo0D)

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
PointType const* Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::pointPtr ( uint16_type  i) const
inline

It returns the pointer to an point object (possibly derived from Geo0D)

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
PointType& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::reversepoint ( uint16_type const  i)
inline

The ith point (starting from the end)

It returns the reference to an point object (possibly derived from Geo0D). It starts from the last point, yet it follows the rule: vertices first. It may be used to access the points of a Geometry Element in a reverse way (i.e. with the opposite GeoElement permutation)

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
PointType const& Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::reversepoint ( uint16_type const  i) const
inline

The ith point (starting from the end)

It returns the reference to an point object (possibly derived from Geo0D). It starts from the last point, yet it follows the rule: vertices first. It may be used to access the points of a Geometry Element in a reverse way (i.e. with the opposite GeoElement permutation)

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
void Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::setMeshAndGm ( MeshBase const *  m,
gm_ptrtype const &  gm,
gm1_ptrtype const &  gm1 
) const
inline

set the mesh to which this geometric entity belongs to

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
void Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::setNeighbor ( uint16_type  n,
size_type  neigh_id,
size_type  proc_id 
)
inline

set the n -th neighbor with neigh

template<uint16_type Dim, typename GEOSHAPE , typename T , typename POINTTYPE >
void Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::setPoint ( uint16_type const  i,
point_type const &  p 
)
inline

Inserts a point. Uses point references put point

template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
void Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::setTags ( std::vector< int > const &  tags)
inline

set the tags associated to the points

  • tags[0] physical region
  • tags[1] elementary region
  • tags[2] particular region
template<uint16_type Dim, typename GEOSHAPE , typename T , typename POINTTYPE >
std::ostream & Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::showMe ( bool  verbose = false,
std::ostream &  c = std::cout 
) const

show information about the geoND

Parameters:
verbosetrue if verbose mode, false otherwise
coutput stream
Returns:
the output stream
template<uint16_type Dim, typename GEOSHAPE , typename T , typename POINTTYPE >
void Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::swapPoints ( const uint16_type &  pt1,
const uint16_type &  pt2 
)

Swap Points

This is a member function to be used ONLY by routines for checking or amending meshes. You must give the local id

Parameters:
pt11st point to swap with 2nd point
pt22nd point to swap with 1st point
template<uint16_type Dim, typename GEOSHAPE, typename T = double, typename POINTTYPE = Geo0D<Dim, T>>
matrix_node_type Feel::GeoND< Dim, GEOSHAPE, T, POINTTYPE >::vertices ( ) const
inline

matrix of vertices geometric nodes retrieve the matrix of geometric nodes (Dim x NumPoints) the matrix is column oriented, the column i contains the coordinate of the i-th geometric node of the element

Returns:
the matrix of vertices geometric nodes