DOLFIN
DOLFIN C++ interface
MeshRenumbering.h
1 // Copyright (C) 2010 Anders Logg
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 Garth N. Wells, 2011.
19 //
20 // First added: 2010-11-27
21 // Last changed: 2011-01-16
22 
23 #ifndef __MESH_RENUMBERING_H
24 #define __MESH_RENUMBERING_H
25 
26 #include <vector>
27 
28 namespace dolfin
29 {
30 
31  class Mesh;
32 
34 
36  {
37  public:
38 
51  static Mesh renumber_by_color(const Mesh& mesh,
52  std::vector<std::size_t> coloring);
53 
54  private:
55 
56  static void compute_renumbering(const Mesh& mesh,
57  const std::vector<std::size_t>& coloring,
58  std::vector<double>& coordinates,
59  std::vector<std::size_t>& connectivity);
60 
61 
62  };
63 
64 }
65 
66 #endif
Definition: adapt.h:29
This class implements renumbering algorithms for meshes.
Definition: MeshRenumbering.h:35
static Mesh renumber_by_color(const Mesh &mesh, std::vector< std::size_t > coloring)
Definition: MeshRenumbering.cpp:39
Definition: Mesh.h:82