43
42
/// Color the cells of a mesh for given coloring type, which can
44
43
/// be one of "vertex", "edge" or "facet". Coloring is saved in the
46
static const std::vector<uint>& color_cells(Mesh& mesh,
45
static const std::vector<std::size_t>& color_cells(Mesh& mesh,
47
46
std::string coloring_type);
49
48
/// Color the cells of a mesh for given coloring type specified by
50
49
/// topological dimension, which can be one of 0, 1 or D - 1. Coloring
51
50
/// is saved in the mesh topology
52
static const std::vector<uint>& color(Mesh& mesh,
53
const std::vector<uint>& coloring_type);
51
static const std::vector<std::size_t>& color(Mesh& mesh,
52
const std::vector<std::size_t>& coloring_type);
55
54
/// Compute cell colors for given coloring type specified by
56
55
/// topological dimension, which can be one of 0, 1 or D - 1.
57
static uint compute_colors(const Mesh& mesh, std::vector<uint>& colors,
58
const std::vector<uint>& coloring_type);
56
static std::size_t compute_colors(const Mesh& mesh,
57
std::vector<std::size_t>& colors,
58
const std::vector<std::size_t>& coloring_type);
60
60
/// Return a MeshFunction with the cell colors (used for visualisation)
61
static CellFunction<unsigned int> cell_colors(const Mesh& mesh,
61
static CellFunction<std::size_t> cell_colors(const Mesh& mesh,
62
62
std::string coloring_type);
64
64
/// Return a MeshFunction with the cell colors (used for visualisation)
65
static CellFunction<unsigned int> cell_colors(const Mesh& mesh,
66
const std::vector<unsigned int> coloring_type);
65
static CellFunction<std::size_t> cell_colors(const Mesh& mesh,
66
const std::vector<std::size_t> coloring_type);
69
69
/// Convert coloring type to topological dimension
70
static uint type_to_dim(std::string coloring_type, const Mesh& mesh);
70
static std::size_t type_to_dim(std::string coloring_type, const Mesh& mesh);