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

#include <MeshTopology.h>

Inheritance diagram for dolfin::MeshTopology:
Inheritance graph
[legend]
Collaboration diagram for dolfin::MeshTopology:
Collaboration graph
[legend]

Public Member Functions

 MeshTopology ()
 Create empty mesh topology.
 
 MeshTopology (const MeshTopology &topology)
 Copy constructor.
 
 ~MeshTopology ()
 Destructor.
 
MeshTopologyoperator= (const MeshTopology &topology)
 Assignment.
 
std::size_t dim () const
 Return topological dimension.
 
std::size_t size (std::size_t dim) const
 Return number of entities for given dimension.
 
std::size_t size_global (std::size_t dim) const
 Return global number of entities for given dimension.
 
std::size_t ghost_offset (std::size_t dim) const
 
void clear ()
 Clear all data.
 
void clear (std::size_t d0, std::size_t d1)
 Clear data for given pair of topological dimensions.
 
void init (std::size_t dim)
 Initialize topology of given maximum dimension.
 
void init (std::size_t dim, std::size_t local_size, std::size_t global_size)
 
void init_global_indices (std::size_t dim, std::size_t size)
 
void init_ghost (std::size_t dim, std::size_t index)
 Initialise the offset index of ghost entities for this dimension.
 
void set_global_index (std::size_t dim, std::size_t local_index, std::int64_t global_index)
 
const std::vector< std::int64_t > & global_indices (std::size_t d) const
 
bool have_global_indices (std::size_t dim) const
 
bool have_shared_entities (unsigned int dim) const
 
std::map< std::int32_t, std::set< unsigned int > > & shared_entities (unsigned int dim)
 
const std::map< std::int32_t, std::set< unsigned int > > & shared_entities (unsigned int dim) const
 
std::vector< unsigned int > & cell_owner ()
 
const std::vector< unsigned int > & cell_owner () const
 
dolfin::MeshConnectivityoperator() (std::size_t d0, std::size_t d1)
 Return connectivity for given pair of topological dimensions.
 
const dolfin::MeshConnectivityoperator() (std::size_t d0, std::size_t d1) const
 Return connectivity for given pair of topological dimensions.
 
size_t hash () const
 Return hash based on the hash of cell-vertex connectivity.
 
std::string str (bool verbose) const
 Return informal string representation (pretty-print)
 
- Public Member Functions inherited from dolfin::Variable
 Variable ()
 Create unnamed variable.
 
 Variable (const std::string name, const std::string label)
 Create variable with given name and label.
 
 Variable (const Variable &variable)
 Copy constructor.
 
virtual ~Variable ()
 Destructor.
 
const Variableoperator= (const Variable &variable)
 Assignment operator.
 
void rename (const std::string name, const std::string label)
 Rename variable.
 
std::string name () const
 Return name.
 
std::string label () const
 Return label (description)
 
std::size_t id () const
 

Public Attributes

std::map< std::vector< std::size_t >, std::pair< std::vector< std::size_t >, std::vector< std::vector< std::size_t > > > > coloring
 
- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

MeshTopology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relations for the mesh entities). Note that the mesh entities don't need to be stored, only the number of entities and the connectivity. Any numbering scheme for the mesh entities is stored separately in a MeshFunction over the entities.

A mesh entity e may be identified globally as a pair e = (dim, i), where dim is the topological dimension and i is the index of the entity within that topological dimension.

Member Function Documentation

◆ cell_owner() [1/2]

std::vector<unsigned int>& dolfin::MeshTopology::cell_owner ( )
inline

Return mapping from local ghost cell index to owning process Since ghost cells are at the end of the range, this is just a vector over those cells

◆ cell_owner() [2/2]

const std::vector<unsigned int>& dolfin::MeshTopology::cell_owner ( ) const
inline

Return mapping from local ghost cell index to owning process (const version) Since ghost cells are at the end of the range, this is just a vector over those cells

◆ ghost_offset()

std::size_t MeshTopology::ghost_offset ( std::size_t  dim) const

Return number of regular (non-ghost) entities or equivalently, the offset of where ghost entities begin

◆ global_indices()

const std::vector<std::int64_t>& dolfin::MeshTopology::global_indices ( std::size_t  d) const
inline

Get local-to-global index map for entities of topological dimension d

◆ have_global_indices()

bool dolfin::MeshTopology::have_global_indices ( std::size_t  dim) const
inline

Check if global indices are available for entities of dimension dim

◆ have_shared_entities()

bool dolfin::MeshTopology::have_shared_entities ( unsigned int  dim) const
inline

Check whether there are any shared entities calculated of dimension dim

◆ init()

void MeshTopology::init ( std::size_t  dim,
std::size_t  local_size,
std::size_t  global_size 
)

Set number of local entities (local_size) and global entities (global_size) for given topological dimension dim

◆ init_global_indices()

void MeshTopology::init_global_indices ( std::size_t  dim,
std::size_t  size 
)

Initialize storage for global entity numbering for entities of dimension dim

◆ set_global_index()

void dolfin::MeshTopology::set_global_index ( std::size_t  dim,
std::size_t  local_index,
std::int64_t  global_index 
)
inline

Set global index for entity of dimension dim and with local index

◆ shared_entities() [1/2]

std::map< std::int32_t, std::set< unsigned int > > & MeshTopology::shared_entities ( unsigned int  dim)

Return map from shared entities (local index) to processes that share the entity

◆ shared_entities() [2/2]

const std::map< std::int32_t, std::set< unsigned int > > & MeshTopology::shared_entities ( unsigned int  dim) const

Return map from shared entities (local index) to process that share the entity (const version)

Member Data Documentation

◆ coloring

std::map<std::vector<std::size_t>, std::pair<std::vector<std::size_t>, std::vector<std::vector<std::size_t> > > > dolfin::MeshTopology::coloring

Mesh entity colors, if computed. First vector is

(colored entity dim - dim1 - dim2 - ... - colored entity dim)

The first vector in the pair stores mesh entity colors and the vector<vector> is a list of all mesh entity indices of the same color, e.g. vector<vector>[col][i] is the index of the ith entity of color 'col'.


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