Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis > Class Template Reference

unifying mesh class More...

+ Inheritance diagram for Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >:
+ Collaboration diagram for Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >:

Public Member Functions

void checkLocalPermutation (mpl::bool_< false >) const
 private: More...
 
void checkLocalPermutation (mpl::bool_< true >) const
 
void decode ()
 decode the mesh data structure from a tighter data structure and to avoid pointers in order to serialize it for saving/loading and sending/receiving the mesh
 
void encode ()
 encode the mesh data structure into a tighter data structure and to avoid pointers in order to serialize it for saving/loading and sending/receiving the mesh
 
 FEELPP_DEFINE_VISITABLE ()
 
bool isPeriodic () const
 
template<typename ... Ts>
bool load (Ts &&... v)
 
void meshModified () override
 
template<typename TheShape >
requires (TheShape::nDim == 3)
void modifyEdgesOnBoundary (face_type &face)
 
template<typename TheShape >
requires (TheShape::nDim != 3)
bool modifyElementOnBoundaryFromEdge (element_type &elt)
 
void removeMarkerNameWithoutEntity ()
 remove marker names that are not used by the mesh (e.g after a create submesh)
 
template<typename ... Ts>
void save (Ts &&... v) const
 
void setPeriodicEntities (std::vector< PeriodicEntity > const &e)
 set the periodic entities
 
template<typename TheShape >
requires (TheShape::nDim == 0)
void updateCommonDataInEntities ()
 
void updateForUse () override
 update the mesh data structure before using it More...
 
void updateForUseAfterMovingNodes (bool upMeasures=true) override
 update the mesh when nodes have moved
 
void updateMeasures ()
 update hAverage, hMin, hMax, measure of the mesh and measure of the boundary mesh
 

Protected Member Functions

void check () const override
 check mesh connectivity
 
void updateAdjacencyElements ()
 update the adjacency graph elements (useful if coDimensionOne not updated)
 
void updateEntitiesCoDimensionOne () override
 Update connectivity of entities of codimension 1. More...
 
void updateEntitiesCoDimensionOne (mpl::bool_< false >)
 
void updateEntitiesCoDimensionOne (mpl::bool_< true >)
 
void updateEntitiesCoDimensionOneMinimal ()
 Update in ghost cells of entities of codimension 1. Done only for marked entities and ghost faces.
 
void updateParallelData ()
 Update parallel data.
 

Friends

class boost::serialization::access
 

Typedefs

typedef Mesh< GeoShape, T, Tag, IndexT > type
 
typedef std::shared_ptr< type > ptrtype
 
typedef T value_type
 
using index_type = typename super::index_type
 
using size_type = typename super::size_type
 
typedef GeoShape shape_type
 
typedef super::return_type return_type
 
typedef node< double >::type node_type
 
typedef super::super_elements super_elements
 
typedef super::elements_type elements_type
 
using element_ptrtype = typename super::element_ptrtype
 
typedef super::element_type element_type
 
typedef super::element_iterator element_iterator
 
typedef super::element_const_iterator element_const_iterator
 
typedef super::super_faces super_faces
 
typedef super::faces_type faces_type
 
typedef super::face_type face_type
 
typedef super::face_iterator face_iterator
 
typedef super::face_const_iterator face_const_iterator
 
typedef super::edge_type edge_type
 
typedef super::points_type points_type
 
typedef super::point_type point_type
 
typedef super::point_iterator point_iterator
 
typedef super::point_const_iterator point_const_iterator
 
typedef element_type::gm_type gm_type
 
typedef std::shared_ptr< gm_type > gm_ptrtype
 
typedef element_type::gm1_type gm1_type
 
typedef std::shared_ptr< gm1_type > gm1_ptrtype
 
typedef Mesh< shape_type, T, Tag, IndexT, EnableSharedFromThis > self_type
 
typedef self_type mesh_type
 
typedef std::shared_ptr< self_type > self_ptrtype
 
typedef self_ptrtype mesh_ptrtype
 
typedef element_type::template reference_convex< T >::type reference_convex_type
 
typedef super::face_processor_type face_processor_type
 typedef Partitioner<self_type> partitioner_type; typedef std::shared_ptr<partitioner_type> partitioner_ptrtype;
 
typedef super::face_processor_type element_edge_type
 
using P1_mesh_type = boost::mp11::mp_if_c< is_simplex_v< GeoShape >, Mesh< Simplex< GeoShape::nDim, 1, GeoShape::nRealDim >, value_type, Tag, IndexT, _EnableSharedFromThis >, Mesh< Hypercube< GeoShape::nDim, 1, GeoShape::nRealDim >, value_type, Tag, IndexT, _EnableSharedFromThis > >
 
typedef std::shared_ptr< P1_mesh_type > P1_mesh_ptrtype
 
template<int TheTag = 0>
using parent_mesh_type = parent_mesh_t< mesh_type, TheTag >
 
template<int TheTag = 0>
using parent_mesh_ptrtype = parent_mesh_ptr_t< mesh_type, TheTag >
 
template<int TheTag = 0>
using trace_mesh_type = trace_mesh_t< mesh_type, TheTag >
 
template<int TheTag = 0>
using trace_mesh_ptrtype = trace_mesh_ptr_t< mesh_type, TheTag >
 
template<int TheTag = 0>
using trace_trace_mesh_type = trace_trace_mesh_t< mesh_type, TheTag >
 
template<int TheTag = 0>
using trace_trace_mesh_ptrtype = trace_trace_mesh_ptr_t< mesh_type, TheTag >
 
 Mesh (std::string const &name, worldcomm_ptr_t const &worldComm=Environment::worldCommPtr(), std::string const &props="00001")
 Default mesh constructor.
 
 Mesh (worldcomm_ptr_t const &worldComm=Environment::worldCommPtr(), std::string const &props="00001")
 
 ~Mesh () override
 
void clear () override
 
std::shared_ptr< MeshBase< IndexT > > shared_from_this_meshbase () override
 return current shared_ptr of type MeshBase
 
std::shared_ptr< const MeshBase< IndexT > > shared_from_this_meshbase () const override
 return current shared_ptr of type MeshBase
 
self_type & operator+= (self_type const &m)
 
static mesh_ptrtype New (worldcomm_ptr_t const &worldComm=Environment::worldCommPtr())
 allocate a new Mesh More...
 

Constants

static const uint16_type nDim = GeoShape::nDim
 
static const uint16_type nRealDim = GeoShape::nRealDim
 
static const uint16_type Shape = GeoShape::Shape
 
static const uint16_type nOrder = GeoShape::nOrder
 
static const uint16_type tag = Tag
 

Signals

boost::signals2::signal< void(MESH_CHANGES)> meshChanged
 mesh changed its connectivity
 
template<typename meshObserver >
void addObserver (meshObserver &obs)
 
void removeFacesFromBoundary (std::initializer_list< uint16_type > markers)
 
std::set< rank_type >::const_iterator beginNeighborSubdomains () const
 
std::set< rank_type >::const_iterator endNeighborSubdomains () const
 
std::set< rank_type > const & neighborSubdomains () const
 
void addNeighborSubdomain (rank_type p)
 

Accessors

size_type statNumElementsActive (rank_type p=invalid_rank_type_value) const
 get the number of active elements,faces,edges,points for each partition More...
 
size_type statNumElementsAll (rank_type p=invalid_rank_type_value) const
 
size_type statNumFacesActive (rank_type p=invalid_rank_type_value) const
 
size_type statNumFacesMarkedAll (rank_type p=invalid_rank_type_value) const
 
size_type statNumEdgesActive (rank_type p=invalid_rank_type_value) const
 
size_type statNumEdgesMarkedAll (rank_type p=invalid_rank_type_value) const
 
size_type statNumPointsActive (rank_type p=invalid_rank_type_value) const
 
size_type statNumPointsAll (rank_type p=invalid_rank_type_value) const
 
size_type statNumPointsMarkedAll (rank_type p=invalid_rank_type_value) const
 
size_type statNumVerticesAll (rank_type p=invalid_rank_type_value) const
 
size_type numGlobalElements () const override
 get the global number of elements More...
 
size_type maxNumElements () const
 
size_type numGlobalFaces () const override
 get the global number of faces More...
 
size_type maxNumFaces () const
 
size_type numGlobalEdges () const override
 get the global number of edges More...
 
size_type maxNumEdges () const
 
size_type numGlobalPoints () const override
 get the global number of points More...
 
size_type maxNumPoints () const
 
size_type numGlobalVertices () const override
 get the global number of vertices More...
 
size_type maxNumVertices () const
 
void setNumGlobalElements (std::vector< size_type > I)
 set the global number of points, edges, faces and elements in the mesh
 
template<typename MT >
void updateNumGlobalElements (typename std::enable_if< is_3d< MT >::value >::type *=nullptr)
 compute the global number of elements,faces,points and vertices More...
 
template<typename MT >
void updateNumGlobalElements (typename std::enable_if< mpl::not_< is_3d< MT > >::value >::type *=nullptr)
 
void updateMeshFragmentation ()
 
std::map< int, typename element_type::marker_type > const & meshFragmentationByMarker (ElementsType et=ElementsType::MESH_ELEMENTS) const
 Returns the fragment-to-marker mapping for one entity type. More...
 
std::map< ElementsType, std::map< int, typename element_type::marker_type > > const & meshFragmentationByMarkerByEntity () const
 Returns fragment-to-marker mappings for every mesh entity type. More...
 
constexpr uint16_type dimension () const noexcept
 ! ! More...
 
constexpr uint16_type realDimension () const noexcept
 ! ! More...
 
gm_ptrtype const & gm () const
 
gm1_ptrtype const & gm1 () const
 
gm_ptrtype & gm ()
 
gm1_ptrtype & gm1 ()
 
reference_convex_type referenceConvex () const
 
FEELPP_DEPRECATED face_processor_type const & localFaceId (element_type const &e, size_type const n) const
 
FEELPP_DEPRECATED face_processor_type const & localFaceId (size_type const e, size_type const n) const
 
bool subStructuring () const
 
bool isUnstructured () const
 return true if mesh is unstructured, false otherwise
 
bool isStructured () const
 return true if mesh is structured, false otherwise
 
bool isCartesian () const
 return true if mesh is cartesian, false otherwise
 

Mutators

void setSubStructuring (bool s)
 
void setPartitioner (std::string partitioner)
 set the partitioner to partitioner
 
FEELPP_DEPRECATED face_processor_type & localFaceId (element_type const &e, size_type const n)
 
FEELPP_DEPRECATED face_processor_type & localFaceId (size_type const e, size_type const n)
 
std::shared_ptr< Localization< self_type > > tool_localization ()
 
value_type hAverage () const
 get the average h More...
 
value_type hMin () const
 get the min h More...
 
value_type hMax () const
 get the max h More...
 
value_type measure (bool parallel=true) const
 
value_type measureBoundary () const
 
void setStructureProperty (std::string const &prop)
 

Methods

element_iterator eraseElement (element_iterator position, bool modify=true)
 erase element at position position More...
 
std::pair< element_iterator, bool > addElement (element_type &f, bool setid=true)
 add a new element in the mesh More...
 
std::pair< element_iterator, bool > addElement (element_type &&f)
 move an element into the mesh More...
 
template<typename RangeT , int TheTag = 0>
trace_mesh_ptr_t< mesh_type, TheTag > trace (RangeT &&range, mpl::int_< TheTag >) const
 compute the trace mesh More...
 
template<int TheTag = 0>
trace_mesh_ptr_t< mesh_type, TheTag > trace () const
 creates a mesh by iterating over the elements between begin_elt and end_elt and adding them to the mesh More...
 
template<typename RangeT >
trace_mesh_ptr_t< mesh_type, Tag > trace (RangeT &&range) const
 
template<int TheTag = 0>
trace_trace_mesh_ptr_t< mesh_type, TheTag > wireBasket () const
 
template<typename RangeT , int TheTag = 0>
trace_trace_mesh_ptr_t< mesh_type, TheTag > wireBasket (RangeT &&range, mpl::int_< TheTag >) const
 
template<typename RangeT >
trace_trace_mesh_ptr_t< mesh_type, Tag > wireBasket (RangeT &&range) const
 
template<typename Iterator >
void createSubmesh (self_type &mesh, Iterator const &begin_elt, Iterator const &end_elt, size_type extraction_policies=EXTRACTION_KEEP_ALL_IDS) const
 
FEELPP_DEPRECATED void createSubmeshByProcessId (self_type &mesh, uint16_type pid) const
 A special case of createSubmesh() : it creates a mesh by iterating over all elements having the process id pid. More...
 
P1_mesh_ptrtype createP1mesh (size_type ctxExtraction=EXTRACTION_KEEP_MESH_RELATION, size_type ctxMeshUpdate=MESH_UPDATE_EDGES|MESH_UPDATE_FACES) const
 Create a P1 mesh from the HO mesh.
 
template<typename RangeType >
P1_mesh_ptrtype createP1mesh (RangeType const &range, size_type ctxExtraction=EXTRACTION_KEEP_MESH_RELATION|EXTRACTION_KEEP_MARKERNAMES_ONLY_PRESENT, size_type ctxMeshUpdate=MESH_UPDATE_EDGES|MESH_UPDATE_FACES) const
 
template<typename IteratorRange >
void updateMarker2WithRange (IteratorRange const &range, flag_type flag)
 update the Marker2 with a range of elements or faces if elements -> update marker2 for this elements if faces -> update marker2 for this faces
 
template<typename IteratorRange >
void updateMarker2WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_ELEMENTS >)
 sub method of updateMarker2WithRange : MESH_ELEMENTS
 
template<typename IteratorRange >
void updateMarker2WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_FACES >)
 sub method of updateMarker2WithRange : MESH_FACES
 
template<typename IteratorRange >
void updateMarker3WithRange (IteratorRange const &range, flag_type flag)
 update the Marker3 with a range of elements or faces if elements -> update marker3 for this elements if faces -> update marker3 for this faces
 
template<typename IteratorRange >
void updateMarker3WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_ELEMENTS >)
 sub method of updateMarker3WithRange : MESH_ELEMENTS
 
template<typename IteratorRange >
void updateMarker3WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_FACES >)
 sub method of updateMarker3WithRange : MESH_FACES
 
void partition (const uint16_type n_parts=1) override
 Call the default partitioner (currently metis_partition()).
 
void renumber () override
 After loading/defining a mesh, we want to have as much locality as possible (elements/faces/nodes to be contiguous). In order to do that the mesh elements/faces/nodes are renumbered. That will be then most helpful when generating the Dof table. This procedure should work also with comm().size() == 1.
 
void renumber (std::vector< size_type > const &node_map, mpl::int_< 1 >)
 
void renumber (std::vector< size_type > const &node_map, mpl::int_< 2 >)
 
void renumber (std::vector< size_type > const &node_map, mpl::int_< 3 >)
 
void localrenumber ()
 This function only take sense in the 3D modal case with a simplex mesh. In order to construct a global C^0 expansion, we need to assure that two contiguous elements share the same top vertex ! This can be achieve by a local renumbering of the vertex.
 
void send (int p, int tag)
 check elements permutation and fix it if needed More...
 
void recv (int p, int tag)
 receive the mesh data structure to processor p with tag
 
FEELPP_DEPRECATED void saveMD (std::ostream &out)
 

Detailed Description

template<typename GeoShape, typename T, int Tag, typename IndexT, bool _EnableSharedFromThis>
class Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >

unifying mesh class

This structure is an aggregation of elements, faces, edges(3D) and points data structures and provides a unified interface with respect to the dimension.

Template Parameters
GeoShapeGeometric entities type
Tnumerical type for coordinates
Tag= 0 to discriminate between meshes of the same type

Member Function Documentation

◆ addElement() [1/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
std::pair< element_iterator, bool > Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::addElement ( element_type &&  f)

move an element into the mesh

Parameters
fa new point
Returns
the new point from the list

◆ addElement() [2/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
std::pair< element_iterator, bool > Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::addElement ( element_type &  f,
bool  setid = true 
)

add a new element in the mesh

Parameters
fa new point
Returns
the new point from the list

◆ checkLocalPermutation()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
void Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::checkLocalPermutation ( mpl::bool_< false >  ) const

private:

Finds all the processors that may contain elements that neighbor my elements. This list is guaranteed to include all processors that border any of my elements, but may include additional ones as well. This method computes bounding boxes for the elements on each processor and checks for overlaps.

void findNeighboringProcessors(); This function checks if the local numbering of the mesh elements is anticlockwise oriented. For the time being, this function only applies to tetrahedra meshes

◆ createSubmeshByProcessId()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
FEELPP_DEPRECATED void Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::createSubmeshByProcessId ( self_type &  mesh,
uint16_type  pid 
) const

A special case of createSubmesh() : it creates a mesh by iterating over all elements having the process id pid.

Parameters
meshnew mesh to construct
pidprocess id that will select the elements to add

◆ dimension()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
constexpr uint16_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::dimension ( ) const
constexprnoexcept

! !

Returns
the topological dimension !
! auto mesh = new Mesh<Simplex<2>>;
! CHECK( mesh->dimension() == 2 ); // true
! auto mesh2 = new Mesh<Simplex<2,1,3>>;
! CHECK( mesh2->dimension() == 2 ); // true
!
!

◆ eraseElement()

template<typename Shape , typename T , int Tag, typename IndexT , bool EnableSharedFromThis>
Mesh< Shape, T, Tag, IndexT, EnableSharedFromThis >::element_iterator Feel::Mesh< Shape, T, Tag, IndexT, EnableSharedFromThis >::eraseElement ( element_iterator  position,
bool  modify = true 
)

erase element at position position

Parameters
positionposition is a valid dereferenceable iterator of the index.
modifyif true, update mesh data structure and in particular faces
Returns
An iterator pointing to the element immediately following the one that was deleted, or end() if no such element exists.

◆ gm() [1/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
gm_ptrtype & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::gm ( )
Returns
the geometric mapping

◆ gm() [2/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
gm_ptrtype const & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::gm ( ) const
Returns
geometric mapping

◆ gm1() [1/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
gm1_ptrtype & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::gm1 ( )
Returns
the geometric mapping of order 1

◆ gm1() [2/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
gm1_ptrtype const & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::gm1 ( ) const
Returns
geometric mapping of order 1

◆ hAverage()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
value_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::hAverage ( ) const

get the average h

Returns
the average h

◆ hMax()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
value_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::hMax ( ) const

get the max h

Returns
the max h

◆ hMin()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
value_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::hMin ( ) const

get the min h

Returns
the min h

◆ isPeriodic()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
bool Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::isPeriodic ( ) const
Returns
true if the mesh has periodic entities

◆ localFaceId() [1/4]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
FEELPP_DEPRECATED face_processor_type & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::localFaceId ( element_type const &  e,
size_type const  n 
)
Returns
the face index of the face n in the element e

◆ localFaceId() [2/4]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
FEELPP_DEPRECATED face_processor_type const & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::localFaceId ( element_type const &  e,
size_type const  n 
) const
Returns
the face index of the face n in the element e

◆ localFaceId() [3/4]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
FEELPP_DEPRECATED face_processor_type & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::localFaceId ( size_type const  e,
size_type const  n 
)
Returns
the face index of the face n in the element e

◆ localFaceId() [4/4]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
FEELPP_DEPRECATED face_processor_type const & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::localFaceId ( size_type const  e,
size_type const  n 
) const
Returns
the face index of the face n in the element e

◆ maxNumEdges()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::maxNumEdges ( ) const
Returns
the maximum number of edges over all subdomains

References Feel::invalid_rank_type_value.

◆ maxNumElements()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::maxNumElements ( ) const
Returns
the maximum number of elements over all subdomains

◆ maxNumFaces()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::maxNumFaces ( ) const
Returns
the maximum number of faces over all subdomains

◆ maxNumPoints()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::maxNumPoints ( ) const
Returns
the maximum number of edges over all subdomains

References Feel::invalid_rank_type_value.

◆ maxNumVertices()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::maxNumVertices ( ) const
Returns
the maximum number of vertices over all subdomains

◆ measure()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
value_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::measure ( bool  parallel = true) const
Returns
the measure of the mesh (sum of the measure of the elements)

◆ measureBoundary()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
value_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::measureBoundary ( ) const
Returns
the measure of the mesh (sum of the measure of the elements)

◆ meshFragmentationByMarker()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
std::map< int, typename element_type::marker_type > const & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::meshFragmentationByMarker ( ElementsType  et = ElementsType::MESH_ELEMENTS) const

Returns the fragment-to-marker mapping for one entity type.

Parameters
etEntity type, defaulting to mesh elements.
Returns
A mapping from fragment identifiers to marker combinations.

◆ meshFragmentationByMarkerByEntity()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
std::map< ElementsType, std::map< int, typename element_type::marker_type > > const & Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::meshFragmentationByMarkerByEntity ( ) const

Returns fragment-to-marker mappings for every mesh entity type.

Returns
Mappings indexed by entity type then fragment identifier.

◆ New()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
static mesh_ptrtype Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::New ( worldcomm_ptr_t const &  worldComm = Environment::worldCommPtr())
static

allocate a new Mesh

Parameters
worldcommcommunicator defaulting to Environment::worldComm()
Returns
the Mesh shared pointer

◆ numGlobalEdges()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::numGlobalEdges ( ) const
override

get the global number of edges

it requires communication in parallel to retrieve and sum the number of edges in each subdomain.

Returns
the global number of edges

◆ numGlobalElements()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::numGlobalElements ( ) const
override

get the global number of elements

it requires communication in parallel to retrieve and sum the number of elements in each subdomain.

Returns
the global number of elements

◆ numGlobalFaces()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::numGlobalFaces ( ) const
override

get the global number of faces

it requires communication in parallel to retrieve and sum the number of faces in each subdomain.

Returns
the global number of faces

◆ numGlobalPoints()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::numGlobalPoints ( ) const
override

get the global number of points

it requires communication in parallel to retrieve and sum the number of points in each subdomain.

Returns
the global number of points

◆ numGlobalVertices()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::numGlobalVertices ( ) const
override

get the global number of vertices

it requires communication in parallel to retrieve and sum the number of vertices in each subdomain.

Returns
the global number of vertices

◆ realDimension()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
constexpr uint16_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::realDimension ( ) const
constexprnoexcept

! !

Returns
the real space dimension !
! auto mesh = new Mesh<Simplex<2>>;
! CHECK( mesh->realDimension() == 2 ); // true
! auto mesh2 = new Mesh<Simplex<2,1,3>>;
! CHECK( mesh2->realDimension() == 3 ); // true
!
!

◆ referenceConvex()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
reference_convex_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::referenceConvex ( ) const
Returns
the reference convex associated with the element of the mesh

◆ send()

template<typename Shape , typename T , int Tag, typename IndexT , bool EnableSharedFromThis>
void Feel::Mesh< Shape, T, Tag, IndexT, EnableSharedFromThis >::send ( int  p,
int  tag 
)

check elements permutation and fix it if needed

send the mesh data structure to processor p with tag

◆ statNumElementsActive()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
size_type Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::statNumElementsActive ( rank_type  p = invalid_rank_type_value) const

get the number of active elements,faces,edges,points for each partition

Returns
the number of active elements

◆ subStructuring()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
bool Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::subStructuring ( ) const
Returns
true if the mesh is substructured, false otherwise

◆ tool_localization()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
std::shared_ptr< Localization< self_type > > Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::tool_localization ( )

◆ trace() [1/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
template<int TheTag = 0>
trace_mesh_ptr_t< mesh_type, TheTag > Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::trace ( ) const

creates a mesh by iterating over the elements between begin_elt and end_elt and adding them to the mesh

Parameters
meshnew mesh to construct
begin_eltbegin iterator
begin_eltend iterator
extraction_policiesnot in use yet
Todo:
make use of extraction_policies

◆ trace() [2/2]

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
template<typename RangeT , int TheTag = 0>
trace_mesh_ptr_t< mesh_type, TheTag > Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::trace ( RangeT &&  range,
mpl::int_< TheTag >   
) const

compute the trace mesh

compute the trace mesh associated to the range range and tag TheTag. The range provides the iterators over the boundary faces of the mesh. @code auto trace_mesh1 = mesh->trace(boundaryfaces(mesh)); auto trace_mesh2 = mesh->trace(markedfaces(mesh,"marker"));

Parameters
rangeiterator range
Returns
the computed trace mesh

◆ updateEntitiesCoDimensionOne()

template<typename Shape , typename T , int Tag, typename IndexT , bool EnableSharedFromThis>
void Feel::Mesh< Shape, T, Tag, IndexT, EnableSharedFromThis >::updateEntitiesCoDimensionOne
overrideprotected

Update connectivity of entities of codimension 1.

void LocalRenumber

◆ updateForUse()

template<typename Shape , typename T , int Tag, typename IndexT , bool EnableSharedFromThis>
void Feel::Mesh< Shape, T, Tag, IndexT, EnableSharedFromThis >::updateForUse
override

update the mesh data structure before using it

by default if the number of processors if > 1, we partition the mesh. A different behaviour is controlled by setting properly setComponents(), components()

◆ updateNumGlobalElements()

template<typename GeoShape , typename T , int Tag, typename IndexT , bool _EnableSharedFromThis>
template<typename MT >
void Feel::Mesh< GeoShape, T, Tag, IndexT, _EnableSharedFromThis >::updateNumGlobalElements ( typename std::enable_if< is_3d< MT >::value >::type *  = nullptr)

compute the global number of elements,faces,points and vertices

it requires communications in parallel to retrieve and sum the contribution of each subdomain.