MeshTopology

class dolfin.cpp.mesh.MeshTopology(*args)

Bases: object

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.

Overloaded versions

  • MeshTopology()

    Create empty mesh topology

  • MeshTopology(topology)

    Copy constructor

clear()

Overloaded versions

  • clear()

    Clear all data

  • clear(d0, d1)

    Clear data for given pair of topological dimensions

coloring
dim()

Return topological dimension

global_indices()

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

hash()

Return hash based on the hash of cell-vertex connectivity

have_global_indices()

Check if global indices are available for entiries of dimension dim

init()

Overloaded versions

  • init(dim)

    Initialize topology of given maximum dimension

  • init(dim, local_size, global_size)

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

init_global_indices()

Initialize storage for global entity numbering for entities of dimension dim

set_global_index()

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

shared_entities()

Overloaded versions

  • shared_entities(dim)

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

  • shared_entities(dim)

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

size()

Return number of entities for given dimension

size_global()

Return global number of entities for given dimension

str()

Return informal string representation (pretty-print)

thisown

The membership flag