Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::MeshBase Class Referenceabstract

#include <meshbase.hpp>

Detailed Description

base mesh class

Author
Christophe Prud'homme
See Also
+ Inheritance diagram for Feel::MeshBase:

Public Types

Typedefs
typedef boost::tuple
< size_type, size_type
face_processor_type
 
typedef SubMeshData smd_type
 
typedef boost::shared_ptr
< smd_type
smd_ptrtype
 

Public Member Functions

Constructors, destructor
 MeshBase (WorldComm const &worldComm=Environment::worldComm())
 
 MeshBase (MeshBase const &)
 
virtual ~MeshBase ()
 
Operator overloads
MeshBaseoperator= (MeshBase const &m)
 
Accessors
bool isUpdatedForUse () const
 
virtual size_type numElements () const =0
 
virtual size_type numFaces () const =0
 
virtual size_type numPoints () const =0
 
size_type numVertices () const
 
uint16_type numberOfPartitions () const
 
bool isPartitioned () const
 
Context const & components () const
 
Contextcomponents ()
 
virtual double measure () const =0
 
bool isParametric () const
 
Mutators
void setNumberOfPartitions (uint16_type n)
 
void setNumVertices (size_type n)
 
void setComponents (size_type components=MESH_ALL_COMPONENTS)
 
void setParametric (bool x)
 
Methods
virtual void clear ()
 
virtual void updateForUse ()=0
 
virtual void updateForUse (size_type components)
 
virtual void partition (const uint16_type n_parts)=0
 
WorldComm const & worldComm () const
 
virtual void setWorldComm (WorldComm const &_worldComm)=0
 
void setWorldCommMeshBase (WorldComm const &_worldComm)
 
mpi::communicator const & comm () const
 
virtual void meshModified ()=0
 
void setSubMeshData (smd_ptrtype smd)
 set sub mesh data
 
bool hasSubMeshData () const
 
smd_type::mesh_ptrtype subMesh () const
 
bool isSubMeshFrom (MeshBase const *m) const
 
bool isSubMeshFrom (boost::shared_ptr< MeshBase > m) const
 
bool isParentMeshOf (boost::shared_ptr< MeshBase > m) const
 
template<typename M >
bool isSameMesh (M const *m) const
 
template<typename M >
bool isSameMesh (boost::shared_ptr< M > m) const
 
template<typename M >
bool isRelatedTo (boost::shared_ptr< M > m) const
 
size_type subMeshToMesh (size_type id) const
 
size_type meshToSubMesh (size_type id) const
 
size_type subMeshToMesh (boost::shared_ptr< MeshBase > m, size_type id) const
 
size_type meshToSubMesh (boost::shared_ptr< MeshBase > m, size_type id) const
 

Protected Member Functions

virtual void check () const =0
 
virtual void checkAndFixPermutation ()=0
 
virtual void renumber ()=0
 
void setUpdatedForUse (bool u)
 
virtual void updateEntitiesCoDimensionOne ()=0
 
virtual void updateEntitiesCoDimensionTwo ()=0
 

Friends

class boost::serialization::access
 

Member Typedef Documentation

Tuple that contains

  1. the index of the face
  2. the processor id the face belongs to

Constructor & Destructor Documentation

Feel::MeshBase::MeshBase ( WorldComm const &  worldComm = Environment::worldComm())

Default constructor

Feel::MeshBase::MeshBase ( MeshBase const &  m)

copy constructor

Feel::MeshBase::~MeshBase ( )
virtual

destructor. make it virtual for derived classes

Member Function Documentation

virtual void Feel::MeshBase::check ( ) const
protectedpure virtual

check mesh connectivity

virtual void Feel::MeshBase::checkAndFixPermutation ( )
protectedpure virtual

check elements orientation and fix it if needed

void Feel::MeshBase::clear ( )
virtual

Empty all containers of the mesh. Must be redefined by derived classes.

Reimplemented in Feel::Mesh3D< Shape >, Feel::Mesh2D< Shape >, Feel::Mesh1D< Shape >, and Feel::Mesh0D< Shape >.

Context const& Feel::MeshBase::components ( ) const
inline
Returns
an integer(stored in a Context) that encodes the components to be updated by the mesh data structure.
See Also
Context, MeshComponents
Context& Feel::MeshBase::components ( )
inline
Returns
an integer(stored in a Context) that encodes the components to be updated by the mesh data structure.
See Also
Context, MeshComponents
bool Feel::MeshBase::hasSubMeshData ( ) const
inline
Returns
true if mesh holds sub mesh data
bool Feel::MeshBase::isParametric ( ) const
inline
Returns
true if the mesh has parametric nodes
bool Feel::MeshBase::isParentMeshOf ( boost::shared_ptr< MeshBase m) const
inline
Returns
true if the mesh is related to the mesh m
bool Feel::MeshBase::isPartitioned ( ) const
Returns
true if mesh is partitioned, false otherwise
bool Feel::MeshBase::isSubMeshFrom ( MeshBase const *  m) const
inline
Returns
true if the mesh is related to the mesh m
bool Feel::MeshBase::isSubMeshFrom ( boost::shared_ptr< MeshBase m) const
inline
Returns
true if the mesh is related to the mesh m

References isSubMeshFrom().

bool Feel::MeshBase::isUpdatedForUse ( ) const
inline
Returns
true if the mesh is ready for use, false otherwise
virtual double Feel::MeshBase::measure ( ) const
pure virtual
Returns
the measure of the mesh
size_type Feel::MeshBase::meshToSubMesh ( size_type  id) const
inline
Returns
id in sub mesh given the id in the parent mesh

References Feel::invalid_size_type_value.

size_type Feel::MeshBase::meshToSubMesh ( boost::shared_ptr< MeshBase m,
size_type  id 
) const
inline
Returns
id in sub mesh given the id in the parent mesh

References Feel::invalid_size_type_value.

uint16_type Feel::MeshBase::numberOfPartitions ( ) const
inline

Returns the number of partitions.

virtual size_type Feel::MeshBase::numElements ( ) const
pure virtual
Returns
the number of elements

Implemented in Feel::Mesh2D< Shape >, Feel::Mesh1D< Shape >, Feel::Mesh3D< Shape >, and Feel::Mesh0D< Shape >.

virtual size_type Feel::MeshBase::numFaces ( ) const
pure virtual
virtual size_type Feel::MeshBase::numPoints ( ) const
pure virtual
Returns
the number of Points

Implemented in Feel::Mesh2D< Shape >, Feel::Mesh3D< Shape >, Feel::Mesh1D< Shape >, and Feel::Mesh0D< Shape >.

size_type Feel::MeshBase::numVertices ( ) const
inline
Returns
the number of vertices
MeshBase & Feel::MeshBase::operator= ( MeshBase const &  m)

copy operator

virtual void Feel::MeshBase::partition ( const uint16_type  n_parts)
pure virtual

Call the default partitioner (currently metis_partition()).

virtual void Feel::MeshBase::renumber ( )
protectedpure virtual

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

Implemented in Feel::Mesh3D< Shape >, Feel::Mesh2D< Shape >, Feel::Mesh1D< Shape >, and Feel::Mesh0D< Shape >.

void Feel::MeshBase::setComponents ( size_type  components = MESH_ALL_COMPONENTS)
inline

set the components to be updated by updateForUse()

See Also
updateForUse

References components().

void Feel::MeshBase::setNumberOfPartitions ( uint16_type  n)
inline

set the number of partitions

void Feel::MeshBase::setNumVertices ( size_type  n)
inline

set the number of vertices

void Feel::MeshBase::setParametric ( bool  x)
inline

set if the mesh is parametric ( e.g. has parametric nodes )

void Feel::MeshBase::setUpdatedForUse ( bool  u)
inlineprotected

set to the flag whether the mesh is updated for proper use

smd_type::mesh_ptrtype Feel::MeshBase::subMesh ( ) const
inline
Returns
sub mesh
size_type Feel::MeshBase::subMeshToMesh ( size_type  id) const
inline
Returns
id in parent mesh given the id in the sub mesh
size_type Feel::MeshBase::subMeshToMesh ( boost::shared_ptr< MeshBase m,
size_type  id 
) const
inline
Returns
id in parent mesh given the id in the sub mesh

References Feel::invalid_size_type_value.

virtual void Feel::MeshBase::updateEntitiesCoDimensionOne ( )
protectedpure virtual

update the entities of co-dimension 1

virtual void Feel::MeshBase::updateEntitiesCoDimensionTwo ( )
protectedpure virtual

update the entities of co-dimension 2

Implemented in Feel::Mesh2D< Shape >, Feel::Mesh3D< Shape >, Feel::Mesh1D< Shape >, and Feel::Mesh0D< Shape >.

virtual void Feel::MeshBase::updateForUse ( )
pure virtual

update all info for this mesh.

void Feel::MeshBase::updateForUse ( size_type  components)
virtual

update all info for this mesh according the components

See Also
components(), setComponents()

References setComponents(), and updateForUse().

WorldComm const& Feel::MeshBase::worldComm ( ) const
inline
Returns
the world comm

The documentation for this class was generated from the following files:

Generated on Sun Oct 20 2013 08:25:08 for Feel++ by doxygen 1.8.4