DOLFIN
DOLFIN C++ interface
Public Member Functions | List of all members
dolfin::MeshHierarchy Class Reference

Experimental implementation of a list of Meshes as a hierarchy. More...

#include <MeshHierarchy.h>

Public Member Functions

 MeshHierarchy ()
 Constructor.
 
 MeshHierarchy (std::shared_ptr< const Mesh > mesh)
 Constructor with initial mesh.
 
 ~MeshHierarchy ()
 Destructor.
 
unsigned int size () const
 Number of meshes.
 
std::shared_ptr< const Meshoperator[] (int i) const
 Get Mesh i, in range [0:size()] where 0 is the coarsest Mesh.
 
std::shared_ptr< const Meshfinest () const
 Get the finest mesh of the MeshHierarchy.
 
std::shared_ptr< const Meshcoarsest () const
 Get the coarsest mesh of the MeshHierarchy.
 
std::shared_ptr< const MeshHierarchyrefine (const MeshFunction< bool > &markers) const
 
std::shared_ptr< const MeshHierarchyunrefine () const
 
std::shared_ptr< const MeshHierarchycoarsen (const MeshFunction< bool > &markers) const
 Coarsen finest mesh by one level, based on markers (level n->n)
 
std::vector< std::size_t > weight () const
 
std::shared_ptr< Meshrebalance () const
 Rebalance across processes.
 

Detailed Description

Experimental implementation of a list of Meshes as a hierarchy.

Member Function Documentation

std::shared_ptr< const MeshHierarchy > MeshHierarchy::refine ( const MeshFunction< bool > &  markers) const

Refine finest mesh of existing hierarchy, creating a new hierarchy (level n -> n+1)

std::shared_ptr<const MeshHierarchy> dolfin::MeshHierarchy::unrefine ( ) const
inline

Unrefine by returning the previous MeshHierarchy (level n -> n-1) Returns NULL for a MeshHierarchy containing a single Mesh

std::vector< std::size_t > MeshHierarchy::weight ( ) const

Calculate the number of cells on the finest Mesh which are descendents of each cell on the coarsest Mesh, returning a vector over the cells of the coarsest Mesh.


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