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

0D mesh class More...

+ Inheritance diagram for Feel::Mesh0D< Shape, T, IndexT >:
+ Collaboration diagram for Feel::Mesh0D< Shape, T, IndexT >:

Typedefs

typedef VisitableBase ::return_type return_type
 
typedef VisitableBase super_visitable
 
typedef MeshBase< IndexT > super
 
using index_type = typename super::index_type
 
using size_type = typename super::size_type
 
typedef Elements< Shape, T > super_elements
 
typedef super_elements::elements_type elements_type
 
typedef super_elements::element_type element_type
 
typedef super_elements::element_iterator element_iterator
 
typedef super_elements::element_const_iterator element_const_iterator
 
typedef super_elements::update_element_neighbor_type update_element_neighbor_type
 
using interprocess_element_iterator = element_iterator
 
using interprocess_element_const_iterator = element_const_iterator
 
using location_element_iterator = typename super_elements::location_element_iterator
 
using location_element_const_iterator = typename super_elements::location_element_const_iterator
 
using marker_element_iterator = typename super_elements::marker_element_iterator
 
using marker_element_const_iterator = typename super_elements::marker_element_const_iterator
 
using marker2_element_iterator = typename super_elements::marker2_element_iterator
 
using marker2_element_const_iterator = typename super_elements::marker2_element_const_iterator
 
using marker3_element_iterator = typename super_elements::marker3_element_iterator
 
using marker3_element_const_iterator = typename super_elements::marker3_element_const_iterator
 
typedef super_elements super_faces
 
typedef elements_type faces_type
 
typedef Points< nRealDim, T > super_points
 
typedef super_points::points_type points_type
 
typedef super_points::point_type point_type
 
typedef Mesh0D< Shape, T > self_type
 
typedef std::shared_ptr< self_type > self_ptrtype
 
using face_type = point_type
 
using face_iterator = element_iterator
 
using face_const_iterator = element_const_iterator
 
using edge_type = point_type
 
using edge_iterator = element_iterator
 
using edge_const_iterator = element_const_iterator
 
using pid_face_iterator = face_iterator
 
using pid_face_const_iterator = face_const_iterator
 
using location_face_iterator = location_element_iterator
 
using location_face_const_iterator = location_element_const_iterator
 
using interprocess_face_iterator = location_element_iterator
 
using interprocess_face_const_iterator = location_element_const_iterator
 
using marker_face_iterator = marker_element_iterator
 
using marker_face_const_iterator = marker_element_const_iterator
 
using marker2_face_iterator = marker2_element_iterator
 
using marker2_face_const_iterator = marker2_element_const_iterator
 
using marker3_face_iterator = marker3_element_iterator
 
using marker3_face_const_iterator = marker3_element_const_iterator
 
using pid_edge_iterator = face_iterator
 
using pid_edge_const_iterator = face_const_iterator
 
using location_edge_iterator = location_element_iterator
 
using location_edge_const_iterator = location_element_const_iterator
 
using interprocess_edge_iterator = location_element_iterator
 
using interprocess_edge_const_iterator = location_element_const_iterator
 
using marker_edge_iterator = marker_element_iterator
 
using marker_edge_const_iterator = marker_element_const_iterator
 
using marker2_edge_iterator = marker2_element_iterator
 
using marker2_edge_const_iterator = marker2_element_const_iterator
 
using marker3_edge_iterator = marker3_element_iterator
 
using marker3_edge_const_iterator = marker3_element_const_iterator
 
static const uint16_type nDim = Shape::nRealDim
 
static const uint16_type nRealDim = Shape::nRealDim
 

Methods

class boost::serialization::access
 
virtual void clear ()
 clear out all data from the mesh, isEmpty() should return true after a clear() More...
 
 FEELPP_DEFINE_VISITABLE ()
 
void renumber ()
 dummy implementation More...
 
void updateEntitiesCoDimensionOnePermutation ()
 update permutation of entities of co-dimension 1
 
void updateEntitiesCoDimensionTwo ()
 update the entities of co-dimension 2 More...
 

Constructors, destructor

 Mesh0D (std::string const &name="", worldcomm_ptr_t const &worldComm=Environment::worldCommPtr())
 default constructor
 
 Mesh0D (Mesh0D const &m)=default
 
 Mesh0D (Mesh0D &&m)=default
 
 ~Mesh0D () override
 

Operator overloads

Mesh0D & operator= (Mesh0D const &m)=default
 
Mesh0D & operator= (Mesh0D &&m)=default
 

Accessors

bool isEmpty () const
 
size_type numElements () const
 
size_type numLocalFaces () const
 
size_type numLocalVertices () const
 
size_type numFaces () const
 
size_type numPoints () const
 

Mutators

void setWorldComm (worldcomm_ptr_t const &_worldComm) override
 

Additional Inherited Members

- Public Types inherited from Feel::VisitableBase< R, CatchAll >
typedef R return_type
 
- Public Types inherited from Feel::MeshBase< uint32_type >
using super = CommObject
 
using index_type = uint32_type
 type of indices : default to uint32_type
 
using index_t = index_type
 
using size_type = index_type
 
typedef boost::tuple< index_type, index_type > face_processor_type
 Tuple that contains. More...
 
typedef SubMeshData< index_type > smd_type
 
typedef std::shared_ptr< smd_type > smd_ptrtype
 
- Public Types inherited from Feel::JournalWatcher
using function_update_information_type = std::function< void(nl::json &)>
 
using notify_type = nl::json
 
- Public Member Functions inherited from Feel::VisitableBase< R, CatchAll >
virtual return_type accept (VisitorBase &)=0
 accept visitor: use S_DEFINE_VISITABLE() to redefine it
 
virtual return_type accept (VisitorBase *)=0
 accept visitor: use S_DEFINE_VISITABLE() to redefine it
 
- Public Member Functions inherited from Feel::MeshBase< uint32_type >
virtual void updateForUse ()=0
 update all info for this mesh.
 
virtual void updateForUse (size_type components)
 update all info for this mesh according the components More...
 
virtual void updateForUseAfterMovingNodes (bool upMeasures=true)=0
 update the mesh when nodes have moved
 
virtual void partition (const rank_type n_parts)=0
 Call the default partitioner (currently metis_partition()).
 
virtual void meshModified ()=0
 
void setSubMeshData (smd_ptrtype smd)
 set sub mesh data
 
smd_ptrtype subMeshData () const
 return sub mesh data
 
bool hasSubMeshData () const
 
smd_type::mesh_ptrtype subMesh () const
 
smd_type::mesh_ptrtype parentMesh () const
 
bool isSubMesh () const
 true if is a sub mesh
 
bool isSubMeshFrom (MeshBase const *m) const
 
bool isSubMeshFrom (std::shared_ptr< MeshBase > m) const
 
bool isParentMeshOf (MeshBase const *m) const
 
bool isParentMeshOf (std::shared_ptr< MeshBase > m) const
 
bool isSiblingOf (MeshBase const *m) const
 
bool isSiblingOf (std::shared_ptr< MeshBase > m) const
 
bool isSameMesh (M const *m) const
 
bool isSameMesh (std::shared_ptr< M > m) const
 
bool isRelatedTo (M const *m) const
 
bool isRelatedTo (std::shared_ptr< M > m) const
 
size_type subMeshToMesh (size_type id) const
 
size_type subMeshToMesh (std::shared_ptr< MeshBase > m, size_type id) const
 
size_type meshToSubMesh (size_type id) const
 
std::pair< std::vector< size_type >, bool > meshToSubMesh (std::vector< size_type > const &p, bool add_invalid_indices=false) const
 
size_type meshToSubMesh (std::shared_ptr< MeshBase > m, size_type id) const
 
void addMeshWithNodesShared (std::shared_ptr< MeshType > m)
 store a mesh which has nodes shared with the current mesh
 
void addMeshWithNodesShared (std::shared_ptr< const MeshType > m)
 store a mesh which has nodes shared with the current mesh
 
std::vector< std::shared_ptr< MeshBase< uint32_type > > > meshesWithNodesShared () const
 get all meshes which share the nodes with the current mesh (current mesh is also include)
 
void attachMeshSupport (MeshSupportBase *ms) const
 attach a mesh support
 
void detachMeshSupport (MeshSupportBase *ms) const
 detach a mesh support
 
std::vector< MeshSupportBase * > const & meshSupportsAttached () const
 return all mesh supports attached
 
bool hasAllMarkers (std::initializer_list< std::string > l)
 
bool hasAnyMarker (std::initializer_list< std::string > l)
 
bool hasMarker (std::string const &marker) const
 
bool hasElementMarker (std::string const &marker) const
 
bool hasFaceMarker (std::string const &marker) const
 
bool hasEdgeMarker (std::string const &marker) const
 
bool hasPointMarker (std::string const &marker) const
 
bool hasMarkers (std::initializer_list< std::string > l) const
 
size_type markerName (std::string const &marker) const
 
std::string markerName (size_type marker) const
 
std::string markerName (size_type marker, size_type dim) const
 
size_type markerDim (std::string const &marker) const
 
std::map< std::string, std::vector< size_type > > markerNames () const
 
void setMarkerNames (std::map< std::string, std::vector< size_type > > const &m)
 set the marker names
 
void addMarkerName (std::pair< std::string, std::vector< size_type > > const &marker)
 add a new marker name
 
void addMarkerName (std::string __name, int __id, int __topoDim)
 add a new marker name
 
flag_type markerId (boost::any const &marker) const
 
std::set< flag_type > markersId (boost::any const &marker) const
 
 MeshBase ()
 
 MeshBase (worldcomm_ptr_t const &w)
 
 MeshBase (MeshBase const &)=default
 
 MeshBase (MeshBase &&)=default
 
 MeshBase (uint16_type topodim, uint16_type realdim, worldcomm_ptr_t const &worldComm=Environment::worldCommPtr())
 build from a topological dimension, a real dimension and a communicator
 
 MeshBase (std::string const &name, uint16_type topodim, uint16_type realdim, worldcomm_ptr_t const &worldComm=Environment::worldCommPtr())
 build from a name, a topological dimension, a real dimension and a communicator
 
 ~MeshBase () override
 
MeshBase & operator= (MeshBase const &m)=default
 
MeshBase & operator= (MeshBase &&m)=default
 
virtual std::shared_ptr< MeshBase< uint32_type > > shared_from_this_meshbase ()=0
 return current shared_ptr of type MeshBase
 
virtual std::shared_ptr< const MeshBase< uint32_type > > shared_from_this_meshbase () const=0
 return current shared_ptr of type MeshBase
 
bool isUpdatedForUse () const
 
uint64_type functionSpaceStructuralRevision () const noexcept
 Return the revision used to invalidate mesh-based function spaces. More...
 
uint64_type geometryRevision () const noexcept
 Return the coordinate-only geometry revision. More...
 
void setTopologicalDimension (int d)
 set the topological dimension
 
void setRealDimension (int d)
 set the real dimension
 
virtual size_type numGlobalElements () const=0
 
virtual size_type numGlobalFaces () const=0
 
virtual size_type numGlobalEdges () const=0
 
virtual size_type numGlobalPoints () const=0
 
virtual size_type numGlobalVertices () const=0
 
size_type numVertices () const
 
rank_type numberOfPartitions () const
 Returns the number of partitions.
 
bool isPartitioned () const
 
Context const & components () const
 
Context & components ()
 
bool isParametric () const
 
void setNumberOfPartitions (rank_type n)
 set the number of partitions
 
void setNumVertices (size_type n)
 set the number of vertices
 
void setComponents (size_type components=MESH_ALL_COMPONENTS)
 set the components to be updated by updateForUse() More...
 
void setParametric (bool x)
 set if the mesh is parametric ( e.g. More...
 
- Public Member Functions inherited from Feel::CommObject
WorldComm const & comm () const
 
 CommObject (CommObject &&)=default
 
 CommObject (CommObject const &)=default
 
 CommObject (worldcomm_ptr_t &w)
 
 CommObject (worldcomm_ptr_t const &w)
 
bool hasWorldComm () const
 returns true if worldcomm is allocated, false othewise
 
CommObject & operator= (CommObject &&)=default
 
CommObject & operator= (CommObject const &)=default
 
virtual void setWorldComm (worldcomm_ptr_t const &w)
 
virtual void setWorldComm (worldcomm_t &w)
 
worldcomm_ptr_t & subWorldCommSeqPtr ()
 
worldcomm_ptr_t const & subWorldCommSeqPtr () const
 
WorldComm & worldComm ()
 
WorldComm const & worldComm () const
 
worldcomm_ptr_t & worldCommPtr ()
 
worldcomm_ptr_t const & worldCommPtr () const
 
- Public Member Functions inherited from Feel::JournalWatcher
 JournalWatcher (std::string const &category="", std::string const &name="", bool connect=JournalManager::journalAutoMode())
 Constructors. More...
 
 JournalWatcher (std::string const &category, bool useDefaultName, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (function_update_information_type const &func, std::string const &category="", std::string const &name="", bool useDefaultNameIfEmpty=true, bool connect=JournalManager::journalAutoMode())
 
 JournalWatcher (JournalWatcher const &jw)
 Copy constructor.
 
virtual ~JournalWatcher ()
 Default destructor. The (inherited) object is always disconnected from the journal during the destruction.
 
bool journalIsConnected () const
 GettersCheck if the object is connected to the journal. More...
 
std::string const & journalWatcherInstanceName () const
 Return the full instance name for this watched object. The name is composed with the base name and a suffix index corresponding to the nth call. More...
 
nl::json::json_pointer journalSection () const
 Return the section into the journal as json_pointer.
 
nl::json const & informationObject () const
 Return the information into property tree.
 
void journalConnect ()
 Setters. More...
 
void journalDisconnect ()
 Disconnect the derived object from the simulation info manager. The disconnection is safe.
 
virtual void updateInformationObject (nl::json &p) const
 update information object into p More...
 
void setInformationObject (nl::json const &informationObject)
 set information object
 
void putInformationObject (nl::json const &informationObject)
 put information object
 
void addInformationObject (nl::json const &informationObject)
 add information object
 
void journalFinalize ()
 finalize journal publication
 
- Protected Member Functions inherited from Feel::MeshBase< uint32_type >
void setUpdatedForUse (bool u)
 Set whether the mesh is finalized and ready for use. More...
 
void markGeometryChanged ()
 Advance the coordinate-only geometry revision.
 
virtual void updateEntitiesCoDimensionOne ()=0
 update the entities of co-dimension 1
 
virtual void check () const=0
 check mesh connectivity
 
- Protected Member Functions inherited from Feel::JournalWatcher
void applyUpdateInformationObject ()
 Protected Methods.
 
- Static Protected Member Functions inherited from Feel::VisitableBase< R, CatchAll >
template<class T >
static return_type acceptImpl (T *visited, VisitorBase *guest)
 give access only to the hierarchy More...
 
- Protected Attributes inherited from Feel::MeshBase< uint32_type >
std::map< std::string, std::vector< size_type > > M_markername
 marker name dictionary ( std::string -> <int,int> ) get<0>() provides the id get<1>() provides the topological dimension
 

Detailed Description

template<typename Shape, typename T = double, typename IndexT = uint32_type>
class Feel::Mesh0D< Shape, T, IndexT >

0D mesh class

// create a 0D mesh made of simplex of order 1
Mesh0d<Simplex<0,1> > mesh;
Author
Christophe Prud'homme
See also

Member Function Documentation

◆ clear()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
virtual void Feel::Mesh0D< Shape, T, IndexT >::clear ( )
virtual

clear out all data from the mesh, isEmpty() should return true after a clear()

Reimplemented from Feel::MeshBase< uint32_type >.

◆ isEmpty()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
bool Feel::Mesh0D< Shape, T, IndexT >::isEmpty ( ) const
Returns
true if all containers are empty, false otherwise

Referenced by Feel::Mesh0D< Shape, T, IndexT >::renumber().

◆ numElements()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
size_type Feel::Mesh0D< Shape, T, IndexT >::numElements ( ) const
virtual
Returns
the number of elements

Implements Feel::MeshBase< uint32_type >.

◆ numFaces()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
size_type Feel::Mesh0D< Shape, T, IndexT >::numFaces ( ) const
virtual
Returns
the number of faces

Implements Feel::MeshBase< uint32_type >.

◆ numLocalFaces()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
size_type Feel::Mesh0D< Shape, T, IndexT >::numLocalFaces ( ) const
Returns
the number of faces in an element

◆ numLocalVertices()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
size_type Feel::Mesh0D< Shape, T, IndexT >::numLocalVertices ( ) const
Returns
the number of vertices in an element

References Feel::elements().

◆ numPoints()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
size_type Feel::Mesh0D< Shape, T, IndexT >::numPoints ( ) const
virtual
Returns
the number of points

Implements Feel::MeshBase< uint32_type >.

◆ renumber()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
void Feel::Mesh0D< Shape, T, IndexT >::renumber ( )
protectedvirtual

◆ setWorldComm()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
void Feel::Mesh0D< Shape, T, IndexT >::setWorldComm ( worldcomm_ptr_t const &  _worldComm)
overridevirtual

Reimplemented from Feel::CommObject.

◆ updateEntitiesCoDimensionTwo()

template<typename Shape , typename T = double, typename IndexT = uint32_type>
void Feel::Mesh0D< Shape, T, IndexT >::updateEntitiesCoDimensionTwo ( )
protectedvirtual

update the entities of co-dimension 2

Implements Feel::MeshBase< uint32_type >.