Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::MeshStructured< GeoShape, T, IndexT > Class Template Reference
+ Inheritance diagram for Feel::MeshStructured< GeoShape, T, IndexT >:
+ Collaboration diagram for Feel::MeshStructured< GeoShape, T, IndexT >:

Public Types

using element_type = typename super::element_type
 
using face_type = typename super::face_type
 
using index_type = typename super::index_type
 
using node_type = typename super::node_type
 
using point_type = typename super::point_type
 
using setup_type = MeshStructuredSetup< nDim, nRealDim, T, index_type >
 
using size_type = typename super::size_type
 
using super = Mesh< GeoShape, T, 0, IndexT >
 
- Public Types inherited from Feel::Mesh< GeoShape, T, 0, IndexT, EnableSharedFromThis >
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
 
using parent_mesh_type = parent_mesh_t< mesh_type, TheTag >
 
using parent_mesh_ptrtype = parent_mesh_ptr_t< mesh_type, TheTag >
 
using trace_mesh_type = trace_mesh_t< mesh_type, TheTag >
 
using trace_mesh_ptrtype = trace_mesh_ptr_t< mesh_type, TheTag >
 
using trace_trace_mesh_type = trace_trace_mesh_t< mesh_type, TheTag >
 
using trace_trace_mesh_ptrtype = trace_trace_mesh_ptr_t< mesh_type, TheTag >
 

Public Member Functions

 MeshStructured (holo3_image< float > const &cx, holo3_image< float > const &cy, worldcomm_ptr_t const &wc=Environment::worldCommPtr())
 
 MeshStructured (MeshStructured &&)=delete
 
 MeshStructured (MeshStructured const &)=delete
 
 MeshStructured (nl::json const &jDesc, worldcomm_ptr_t const &wc=Environment::worldCommPtr())
 
 MeshStructured (std::array< index_type, nDim > const &indexes, worldcomm_ptr_t const &wc=Environment::worldCommPtr())
 
 MeshStructured (std::shared_ptr< setup_type > const &setup, worldcomm_ptr_t const &=Environment::worldCommPtr())
 
 MeshStructured (worldcomm_ptr_t const &wc=Environment::worldCommPtr())
 
MeshStructured & operator= (MeshStructured &&)=delete
 
MeshStructured & operator= (MeshStructured const &)=delete
 
std::shared_ptr< const MeshBase< IndexT > > shared_from_this_meshbase () const override
 return current shared_ptr of type MeshBase
 
std::shared_ptr< MeshBase< IndexT > > shared_from_this_meshbase () override
 return current shared_ptr of type MeshBase
 
- Public Member Functions inherited from Feel::Mesh< GeoShape, T, 0, IndexT, EnableSharedFromThis >
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
 
bool load (Ts &&... v)
 
void meshModified () override
 
void modifyEdgesOnBoundary (face_type &face)
 
bool modifyElementOnBoundaryFromEdge (element_type &elt)
 
void removeMarkerNameWithoutEntity ()
 remove marker names that are not used by the mesh (e.g after a create submesh)
 
void save (Ts &&... v) const
 
void setPeriodicEntities (std::vector< PeriodicEntity > const &e)
 set the periodic entities
 
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
 
 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)
 
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)
 
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
 
void updateNumGlobalElements (typename std::enable_if< is_3d< MT >::value >::type *=nullptr)
 compute the global number of elements,faces,points and vertices More...
 
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
 
gm_ptrtype & gm ()
 
gm1_ptrtype const & gm1 () const
 
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
 
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)
 
void setSubStructuring (bool s)
 
void setPartitioner (std::string partitioner)
 set the partitioner to partitioner
 
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
 
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...
 
trace_mesh_ptr_t< mesh_type, TheTag > trace (RangeT &&range, mpl::int_< TheTag >) const
 compute the trace mesh More...
 
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...
 
trace_mesh_ptr_t< mesh_type, Tag > trace (RangeT &&range) const
 
trace_trace_mesh_ptr_t< mesh_type, TheTag > wireBasket () const
 
trace_trace_mesh_ptr_t< mesh_type, TheTag > wireBasket (RangeT &&range, mpl::int_< TheTag >) const
 
trace_trace_mesh_ptr_t< mesh_type, Tag > wireBasket (RangeT &&range) const
 
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.
 
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
 
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
 
void updateMarker2WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_ELEMENTS >)
 sub method of updateMarker2WithRange : MESH_ELEMENTS
 
void updateMarker2WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_FACES >)
 sub method of updateMarker2WithRange : MESH_FACES
 
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
 
void updateMarker3WithRange (IteratorRange const &range, flag_type flag, mpl::int_< MESH_ELEMENTS >)
 sub method of updateMarker3WithRange : MESH_ELEMENTS
 
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)
 

Static Public Attributes

static constexpr uint16_type nDim = super::nDim
 
static constexpr uint16_type nRealDim = super::nRealDim
 
- Static Public Attributes inherited from Feel::Mesh< GeoShape, T, 0, IndexT, EnableSharedFromThis >
static const uint16_type nDim
 
static const uint16_type nRealDim
 
static const uint16_type Shape
 
static const uint16_type nOrder
 
static const uint16_type tag
 

Additional Inherited Members

- Static Public Member Functions inherited from Feel::Mesh< GeoShape, T, 0, IndexT, EnableSharedFromThis >
static mesh_ptrtype New (worldcomm_ptr_t const &worldComm=Environment::worldCommPtr())
 allocate a new Mesh More...
 
- Public Attributes inherited from Feel::Mesh< GeoShape, T, 0, IndexT, EnableSharedFromThis >
boost::signals2::signal< void(MESH_CHANGES)> meshChanged
 mesh changed its connectivity
 
- Protected Member Functions inherited from Feel::Mesh< GeoShape, T, 0, IndexT, EnableSharedFromThis >
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.
 
void setStructureProperty (std::string const &prop)