~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to dolfin/mesh/MeshColoring.h

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#include <string>
27
27
#include <vector>
28
 
#include <dolfin/common/types.h>
29
28
#include "Cell.h"
30
29
 
31
30
namespace dolfin
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
45
44
    /// mesh topology
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);
48
47
 
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);
54
53
 
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);
59
59
 
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);
63
63
 
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);
67
67
 
68
68
 
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);
71
71
 
72
72
  };
73
73