40
40
TriangleCell() : CellType(triangle, interval) {}
42
42
/// Return topological dimension of cell
43
std::size_t dim() const;
45
45
/// Return number of entitites of given topological dimension
46
uint num_entities(uint dim) const;
46
std::size_t num_entities(std::size_t dim) const;
48
48
/// Return number of vertices for entity of given topological dimension
49
uint num_vertices(uint dim) const;
49
std::size_t num_vertices(std::size_t dim) const;
51
51
/// Return orientation of the cell
52
uint orientation(const Cell& cell) const;
52
std::size_t orientation(const Cell& cell) const;
54
54
/// Create entities e of given topological dimension from vertices v
55
void create_entities(std::vector<std::vector<uint> >& e, uint dim, const uint* v) const;
55
void create_entities(std::vector<std::vector<std::size_t> >& e, std::size_t dim,
56
const std::size_t* v) const;
57
58
/// Refine cell uniformly
58
void refine_cell(Cell& cell, MeshEditor& editor, uint& current_cell) const;
59
void refine_cell(Cell& cell, MeshEditor& editor, std::size_t& current_cell) const;
60
61
/// Compute (generalized) volume (area) of triangle
61
62
double volume(const MeshEntity& triangle) const;
64
65
double diameter(const MeshEntity& triangle) const;
66
67
/// Compute component i of normal of given facet with respect to the cell
67
double normal(const Cell& cell, uint facet, uint i) const;
68
double normal(const Cell& cell, std::size_t facet, std::size_t i) const;
69
70
/// Compute of given facet with respect to the cell
70
Point normal(const Cell& cell, uint facet) const;
71
Point normal(const Cell& cell, std::size_t facet) const;
72
73
/// Compute the area/length of given facet with respect to the cell
73
double facet_area(const Cell& cell, uint facet) const;
74
double facet_area(const Cell& cell, std::size_t facet) const;
75
76
/// Order entities locally
76
77
void order(Cell& cell,
77
const std::vector<uint>& local_to_global_vertex_indices) const;
78
const std::vector<std::size_t>& local_to_global_vertex_indices) const;
79
80
/// Return description of cell type
80
81
std::string description(bool plural) const;