Loading...
Searching...
No Matches
dolfin::MeshConnectivity Class Reference

`#include <MeshConnectivity.h>`

## Public Member Functions

| MeshConnectivity (std::size_t d0, std::size_t d1)
| Create empty connectivity between given dimensions (d0 – d1).
| MeshConnectivity (const MeshConnectivity &connectivity)
| Copy constructor.
| ~MeshConnectivity ()
| Destructor.
const MeshConnectivity & | operator= (const MeshConnectivity &connectivity)
| Assignment.
bool | empty () const
| Return true if the total number of connections is equal to zero.
std::size_t | size () const
| Return total number of connections.
std::size_t | size (std::size_t entity) const
| Return number of connections for given entity.
std::size_t | size_global (std::size_t entity) const
| Return global number of connections for given entity.
const unsigned int * | operator() (std::size_t entity) const
| Return array of connections for given entity.
const std::vector< unsigned int > & | operator() () const
| Return contiguous array of connections for all entities.
void | clear ()
| Clear all data.
void | init (std::size_t num_entities, std::size_t num_connections)
void | init (std::vector< std::size_t > &num_connections)
void | set (std::size_t entity, std::size_t connection, std::size_t pos)
| Set given connection for given entity.
template<typename T>
void | set (std::size_t entity, const T &connections)
void | set (std::size_t entity, std::size_t *connections)
| Set all connections for given entity.
template<typename T>
void | set (const T &connections)
void | set_global_size (const std::vector< unsigned int > &num_global_connections)
| Set global number of connections for all local entities.
std::size_t | hash () const
| Hash of connections.
std::string | str (bool verbose) const
| Return informal string representation (pretty-print).

## Detailed Description

Mesh connectivity stores a sparse data structure of connections (incidence relations) between mesh entities for a fixed pair of topological dimensions.

The connectivity can be specified either by first giving the number of entities and the number of connections for each entity, which may either be equal for all entities or different, or by giving the entire (sparse) connectivity pattern.

## Member Function Documentation

## init() [1/2]

void MeshConnectivity::init | ( | std::size_t | num_entities,
|  | std::size_t | num_connections )

Initialize number of entities and number of connections (equal for all)

## init() [2/2]

void MeshConnectivity::init | ( | std::vector< std::size_t > & | num_connections | ) |

Initialize number of entities and number of connections (individually)

## set() [1/2]

template<typename T>

void dolfin::MeshConnectivity::set | ( | const T & | connections | ) |

inline

Set all connections for all entities (T is a '2D' container, e.g. a std::vector<<std::vector<std::size_t>>, std::vector<<std::set<std::size_t>>, etc)

## set() [2/2]

template<typename T>

void dolfin::MeshConnectivity::set | ( | std::size_t | entity,
|  | const T & | connections )

inline

Set all connections for given entity. T is a contains, e.g. std::vector<std::size_t>

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

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/MeshConnectivity.h
- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/MeshConnectivity.cpp