RefinementManager2d.h 2.29 KB
Newer Older
1
2
3
4
5
6
7
/******************************************************************************
 *
 * AMDiS - Adaptive multidimensional simulations
 *
 * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
 * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
 *
8
 * Authors:
9
10
11
12
13
14
15
16
17
 * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 *
 * This file is part of AMDiS
 *
 * See also license.opensource.txt in the distribution.
18
 *
19
 ******************************************************************************/
20
21


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

/** \file RefinementManager2d.h */

#ifndef AMDIS_REFINEMENT_MANAGER_2D_H
#define AMDIS_REFINEMENT_MANAGER_2D_H

namespace AMDiS {

  /** \ingroup Adaption
   * \brief
   * Implements a RefinementManager for 2-dimensional meshes.
   */
  class RefinementManager2d : public RefinementManager
  {
  public:
37
    /// Calls base class constructor.
38
39
    RefinementManager2d()
      : RefinementManager()
40
    {}
41

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

  protected:
46
    /// Used by \ref setNewCoords
47
    void newCoordsFct(ElInfo *elInfo);
48

49
    /// Implements RefinementManager::setNewCoords
50
    void setNewCoords(int macroEl = -1);
51
52
53

    /** \brief
     *  gets the elements around the refinement edge with vertices  node[0] and
54
55
     *  node[1] ; refines those elements at this edge are not compatible
     *  devisible;
56
57
58
59
     *  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
     */
60
    void getRefinePatch(ElInfo **elInfo, DegreeOfFreedom *edge[2], int dir,
61
                        RCNeighbourList &refineList, int *n_neigh);
62

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

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

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

}

#endif // AMDIS_REFINEMENT_MANAGER_2D_H