MeshColoring

class dolfin.cpp.mesh.MeshColoring

Bases: object

This class computes colorings for a local mesh. It supports vertex, edge, and facet-based colorings.

static cell_colors()

Return a MeshFunction with the cell colors (used for visualisation)

Parameters:
  • const Mesh > mesh (std::shared_ptr<) –
  • std::size_t > coloring_type (std::vector<) –
Return type:

MeshFunction< std::size_t >

static color()

Color the cells of a mesh for given coloring type specified by topological dimension, which can be one of 0, 1 or D -

  1. Coloring is saved in the mesh topology
Parameters:
  • & mesh (Mesh) –
  • std::vector< std::size_t > & coloring_type (const) –
Return type:

const std::vector< std::size_t > &

static color_cells()

Color the cells of a mesh for given coloring type, which can be one of “vertex”, “edge” or “facet”. Coloring is saved in the mesh topology

Parameters:
  • & mesh (Mesh) –
  • coloring_type (std::string) –
Return type:

const std::vector< std::size_t > &

static compute_colors()

Compute cell colors for given coloring type specified by topological dimension, which can be one of 0, 1 or D - 1.

Parameters:
  • Mesh & mesh (const) –
  • std::size_t > & colors (std::vector<) –
  • std::vector< std::size_t > & coloring_type (const) –
Return type:

std::size_t

thisown

The membership flag

static type_to_dim()

Convert coloring type to topological dimension.

Parameters:
  • coloring_type (std::string) –
  • Mesh & mesh (const) –
Return type:

std::size_t