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

#include <MeshDomains.h>

Public Member Functions

 MeshDomains ()
 Create empty mesh domains.
 
 ~MeshDomains ()
 Destructor.
 
std::size_t max_dim () const
 Return maximum topological dimension of stored markers.
 
std::size_t num_marked (std::size_t dim) const
 Return number of marked entities of given dimension.
 
bool is_empty () const
 Check whether domain data is empty.
 
std::map< std::size_t, std::size_t > & markers (std::size_t dim)
 
const std::map< std::size_t, std::size_t > & markers (std::size_t dim) const
 
bool set_marker (std::pair< std::size_t, std::size_t > marker, std::size_t dim)
 
std::size_t get_marker (std::size_t entity_index, std::size_t dim) const
 
const MeshDomainsoperator= (const MeshDomains &domains)
 Assignment operator.
 
void init (std::size_t dim)
 Initialize mesh domains for given topological dimension.
 
void clear ()
 Clear all data.
 

Detailed Description

The class MeshDomains stores the division of a Mesh into subdomains. For each topological dimension 0 <= d <= D, where D is the topological dimension of the Mesh, a set of integer markers are stored for a subset of the entities of dimension d, indicating for each entity in the subset the number of the subdomain. It should be noted that the subset does not need to contain all entities of any given dimension; entities not contained in the subset are "unmarked".

Member Function Documentation

◆ get_marker()

std::size_t MeshDomains::get_marker ( std::size_t  entity_index,
std::size_t  dim 
) const

Get marker (entity index, marker value) of a given dimension d. Throws an error if marker does not exist.

◆ markers() [1/2]

std::map< std::size_t, std::size_t > & MeshDomains::markers ( std::size_t  dim)

Get subdomain markers for given dimension (shared pointer version)

◆ markers() [2/2]

const std::map< std::size_t, std::size_t > & MeshDomains::markers ( std::size_t  dim) const

Get subdomain markers for given dimension (const shared pointer version)

◆ set_marker()

bool MeshDomains::set_marker ( std::pair< std::size_t, std::size_t >  marker,
std::size_t  dim 
)

Set marker (entity index, marker value) of a given dimension d. Returns true if a new key is inserted, false otherwise.


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