DOLFIN
DOLFIN C++ interface
MeshColoring.h
1// Copyright (C) 2010-2011 Garth N. Wells
2//
3// This file is part of DOLFIN.
4//
5// DOLFIN is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// DOLFIN is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17//
18// Modified by Anders Logg, 2010.
19//
20// First added: 2010-11-15
21// Last changed: 2011-01-29
22
23#ifndef __MESH_COLORING_H
24#define __MESH_COLORING_H
25
26#include <memory>
27#include <string>
28#include <vector>
29#include "Cell.h"
30
31namespace dolfin
32{
33
34 class Mesh;
35
38
40 {
41 public:
42
46 static const std::vector<std::size_t>& color_cells(Mesh& mesh,
47 std::string coloring_type);
48
52 static const std::vector<std::size_t>&
53 color(Mesh& mesh, const std::vector<std::size_t>& coloring_type);
54
57 static std::size_t compute_colors(const Mesh& mesh,
58 std::vector<std::size_t>& colors,
59 const std::vector<std::size_t>& coloring_type);
60
64 cell_colors(std::shared_ptr<const Mesh> mesh,
65 std::string coloring_type);
66
69 cell_colors(std::shared_ptr<const Mesh> mesh,
70 std::vector<std::size_t> coloring_type);
71
72
74 static std::size_t type_to_dim(std::string coloring_type, const Mesh& mesh);
75
76 };
77
78}
79
80#endif
Definition: MeshColoring.h:40
static const std::vector< std::size_t > & color_cells(Mesh &mesh, std::string coloring_type)
Definition: MeshColoring.cpp:45
static const std::vector< std::size_t > & color(Mesh &mesh, const std::vector< std::size_t > &coloring_type)
Definition: MeshColoring.cpp:58
static MeshFunction< std::size_t > cell_colors(std::shared_ptr< const Mesh > mesh, std::string coloring_type)
Definition: MeshColoring.cpp:124
static std::size_t compute_colors(const Mesh &mesh, std::vector< std::size_t > &colors, const std::vector< std::size_t > &coloring_type)
Definition: MeshColoring.cpp:101
static std::size_t type_to_dim(std::string coloring_type, const Mesh &mesh)
Convert coloring type to topological dimension.
Definition: MeshColoring.cpp:170
Definition: Mesh.h:84
Definition: adapt.h:30