Feel++  0.91.4
Protected Member Functions | List of all members
Feel::MeshBase Class Referenceabstract

base mesh class More...

#include <meshbase.hpp>

Inheritance diagram for Feel::MeshBase:
Feel::Mesh0D< Shape > Feel::Mesh1D< Shape > Feel::Mesh2D< Shape > Feel::Mesh3D< Shape >

Public Types

Typedefs
typedef boost::tuple
< size_type, size_type
face_processor_type
 

Public Member Functions

Constructors, destructor
 MeshBase ()
 
 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
 

Protected Member Functions

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

Detailed Description

base mesh class

Author
Christophe Prud'homme
See Also

Member Typedef Documentation

Tuple that contains

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

Constructor & Destructor Documentation

Feel::MeshBase::MeshBase ( )

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

Referenced by setComponents().

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::isParametric ( ) const
inline
Returns
true if the mesh has parametric nodes
bool Feel::MeshBase::isPartitioned ( ) const
Returns
true if mesh is partitioned, false otherwise
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
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::Mesh1D< Shape >, Feel::Mesh3D< Shape >, Feel::Mesh2D< 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::Mesh3D< Shape >, Feel::Mesh2D< 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().

Referenced by updateForUse().

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

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.

Referenced by updateForUse().

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