RefinementManager2d.h 3.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  crystal growth group                                                  ==
// ==                                                                        ==
// ==  Stiftung caesar                                                       ==
// ==  Ludwig-Erhard-Allee 2                                                 ==
// ==  53175 Bonn                                                            ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  http://www.caesar.de/cg/AMDiS                                         ==
// ==                                                                        ==
// ============================================================================

/** \file RefinementManager2d.h */

#ifndef AMDIS_REFINEMENT_MANAGER_2D_H
#define AMDIS_REFINEMENT_MANAGER_2D_H

#include "MemoryManager.h"

namespace AMDiS {

  /** \ingroup Adaption
   * \brief
   * Implements a RefinementManager for 2-dimensional meshes.
   */
  class RefinementManager2d : public RefinementManager
  {
  public:
    MEMORY_MANAGED(RefinementManager2d);

38
    /// Calls base class constructor.
39
40
    RefinementManager2d()
      : RefinementManager()
41
    {}
42

43
44
    /// Destructor 
    virtual ~RefinementManager2d() {}
45
46

  protected:
47
    /// Used by \ref setNewCoords
48
49
    static int newCoordsFct(ElInfo *el_info);

50
    /// Implements RefinementManager::setNewCoords
51
52
53
54
55
56
57
58
59
60
61
62
63
    void setNewCoords();

    /** \brief
     *  gets the elements around the refinement edge with vertices  node[0] and
     *  node[1] ; refines those elements at this edge are not compatible 
     *  devisible;  			                                 
     *  dir determines the direction of the first neighbour
     *  get_refine_patch returns  1  if the domain's boundary is reached while
     *  looping around the refinement edge, otherwise  0
     */
    int getRefinePatch(ElInfo **el_info, DegreeOfFreedom *edge[2], int dir,
		       RCNeighbourList* refineList, int *n_neigh);

64
    /// Refines all elements in the patch.
65
66
67
    DegreeOfFreedom refinePatch(DegreeOfFreedom *edge[2], RCNeighbourList* refineList,
				int n_neigh, bool bound);

68
    /// Implements RefinementManager::refineFunction.
69
70
    ElInfo* refineFunction(ElInfo* el_info);

71
    /// Refines one Triangle.
72
73
74
75
76
77
    void bisectTriangle(Triangle *el, DegreeOfFreedom* newDofs[3]);
  };

}

#endif // AMDIS_REFINEMENT_MANAGER_2D_H