RefinementManager3d.h 2.89 KB
Newer Older
1
2
3
4
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
5
// ==  http://www.amdis-fem.org                                              ==
6
7
// ==                                                                        ==
// ============================================================================
8
9
10
11
12
13
14
15
16
17
18
19
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

/** \file RefinementManager3d.h */

#ifndef AMDIS_REFINEMENT_MANAGER_3D_H
#define AMDIS_REFINEMENT_MANAGER_3D_H

namespace AMDiS {

  /** \ingroup Adaption 
   * \brief
   * Implements a RefinementManager for 3-dimensional meshes.
   */
  class RefinementManager3d : public RefinementManager
  {
  public:
35
    /// Calls base class constructor.
36
37
    RefinementManager3d() 
      : RefinementManager()
Thomas Witkowski's avatar
Thomas Witkowski committed
38
    {}
39

40
    /// destructor 
Thomas Witkowski's avatar
Thomas Witkowski committed
41
    virtual ~RefinementManager3d() {}
42
43

  protected:
44
    /// Used by \ref setNewCoords
45
    void newCoordsFct(ElInfo *el_info, RCNeighbourList &refineList);
46

47
    /// Implements RefinementManager::setNewCoords
48
    void setNewCoords(int macroEl = -1);
49
50

    /** \brief
51
52
     * Gets the elements around the refinement edge with vertices edge[0] and
     * edge[1]. Refines those elements at this edge that are not compatible 
53
54
55
56
57
     * devisible. The function returns 1 if the domain's boundary is reached
     * while looping around the refinement edge, otherwise 0.
     * 
     * \param[in] direction   Determines the direction of the first neighbour
     *  
58
     */
59
60
61
62
63
    bool getRefinePatch(ElInfo **el_info, 
			DegreeOfFreedom *edge[2], 
			int direction,
			RCNeighbourList &refineList, 
			int *n_neigh);
64

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

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

72
    /// Refines one Tetrahedron.
73
    void bisectTetrahedron(RCNeighbourList &refineList, int index,
74
75
			   DegreeOfFreedom *dof[3], DegreeOfFreedom *edge[2]);

76
    /// Used by \ref bisectTetrahedron
77
    void fillPatchConnectivity(RCNeighbourList &refineList, int index);
78
79
  };

80
81
82
83
84
85
86
87
88
  class FixRefinementPatch 
  {
  public:
    typedef std::pair<Element*, int> EdgeInEl;
    typedef std::pair<EdgeInEl, EdgeInEl> EdgesMap;
    typedef std::vector<EdgesMap> ConnectedEdges;

    static ConnectedEdges connectedEdges;

Thomas Witkowski's avatar
Thomas Witkowski committed
89
90
    static void getOtherEl(TraverseStack *stack, 
			   vector<EdgeInEl> &refineEdges);
91
92
  };

93
94
95
}

#endif // AMDIS_REFINEMENT_MANAGER_3D_H