DOLFIN
DOLFIN C++ interface
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfin
mesh
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
31
namespace
dolfin
32
{
33
34
class
Mesh
;
35
38
39
class
MeshColoring
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
63
static
MeshFunction<std::size_t>
64
cell_colors
(std::shared_ptr<const Mesh> mesh,
65
std::string coloring_type);
66
68
static
MeshFunction<std::size_t>
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
dolfin::MeshColoring
Definition
MeshColoring.h:40
dolfin::MeshColoring::color_cells
static const std::vector< std::size_t > & color_cells(Mesh &mesh, std::string coloring_type)
Definition
MeshColoring.cpp:45
dolfin::MeshColoring::color
static const std::vector< std::size_t > & color(Mesh &mesh, const std::vector< std::size_t > &coloring_type)
Definition
MeshColoring.cpp:58
dolfin::MeshColoring::cell_colors
static MeshFunction< std::size_t > cell_colors(std::shared_ptr< const Mesh > mesh, std::string coloring_type)
Definition
MeshColoring.cpp:124
dolfin::MeshColoring::compute_colors
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
dolfin::MeshColoring::type_to_dim
static std::size_t type_to_dim(std::string coloring_type, const Mesh &mesh)
Convert coloring type to topological dimension.
Definition
MeshColoring.cpp:170
dolfin::MeshFunction
Definition
MeshFunction.h:59
dolfin::Mesh
Definition
Mesh.h:83
dolfin
Definition
adapt.h:30
Generated by
1.17.0