1
// Copyright (C) 2003-2005 Johan Hoffman and Anders Logg.
2
// Licensed under the GNU GPL Version 2.
5
// Last changed: 2005-12-01
7
#ifndef __TRI_MESH_REFINEMENT_H
8
#define __TRI_MESH_REFINEMENT_H
10
#include <dolfin/MeshRefinement.h>
18
/// Algorithm for the refinement of a triangular mesh, a modified version
19
/// of the algorithm described in the paper "Tetrahedral Mesh Refinement"
20
/// by J�rgen Bey, in Computing 55, pp. 355-378 (1995).
22
class TriMeshRefinement : public MeshRefinement
26
/// Choose refinement rule
27
static bool checkRule(Cell& cell, int no_marked_edges);
29
/// Refine according to rule
30
static void refine(Cell& cell, Mesh& mesh);
33
friend class MeshRefinement;
37
static bool checkRuleRegular (Cell& cell, int no_marked_edges);
38
static bool checkRuleIrregular1(Cell& cell, int no_marked_edges);
39
static bool checkRuleIrregular2(Cell& cell, int no_marked_edges);
41
static void refineNoRefine (Cell& cell, Mesh& mesh);
42
static void refineRegular (Cell& cell, Mesh& mesh);
43
static void refineIrregular1(Cell& cell, Mesh& mesh);
44
static void refineIrregular2(Cell& cell, Mesh& mesh);
46
static Cell& createCell(Vertex& n0, Vertex& n1, Vertex& n2, Mesh& mesh,