FiniteElemSpace.h 3.99 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  crystal growth group                                                  ==
// ==                                                                        ==
// ==  Stiftung caesar                                                       ==
// ==  Ludwig-Erhard-Allee 2                                                 ==
// ==  53175 Bonn                                                            ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  http://www.caesar.de/cg/AMDiS                                         ==
// ==                                                                        ==
// ============================================================================

/** \file FiniteElemSpace.h */

/** \defgroup FEMSpace FEMSpace
 * @{ <img src="femspace.png"> @}
 */

#ifndef AMDIS_FINITEELEMSPACE_H
#define AMDIS_FINITEELEMSPACE_H

#include <string>
#include <vector>
#include "MemoryManager.h"

namespace AMDiS {

  // ============================================================================
  // ===== forward declarations =================================================
  // ============================================================================

  class DOFAdmin;
  class BasisFunction;
  class Mesh;

  template<typename T> class DOFVector;
  template<typename T> class DimVec;

  // ============================================================================
  // ===== class FiniteElemSpace ================================================
  // ============================================================================

  /** \ingroup FEMSpace
   * \brief
   * A FiniteElemSpace is a triple of a DOFAdmin and a set of BasisFunction on a 
   * Mesh.
   */
  class FiniteElemSpace
  {
  public:
    MEMORY_MANAGED(FiniteElemSpace);


    /** \brief
     * 
     */
64
    static FiniteElemSpace *provideFESpace(DOFAdmin *admin,
65
					   const BasisFunction *basFcts,
66
					   Mesh *mesh,
67
					   const std::string& name_ = "");
68
69
70
71

    /** \brief
     * destructor
     */
72
    virtual ~FiniteElemSpace() {}
73
74
75
76

    /** \brief
     * Returns \ref name
     */  
77
    inline std::string getName() const { 
78
      return name;
79
    }
80
81
82
83

    /** \brief
     * Returns \ref admin
     */
84
85
    inline DOFAdmin* getAdmin() const { 
      return admin;
86
    }
87
88
89
90

    /** \brief
     * Returns \ref basFcts
     */
91
92
    inline const BasisFunction* getBasisFcts() const { 
      return basFcts;
93
    }
94
95
96
97

    /** \brief
     * Returns \ref mesh
     */
98
99
    inline Mesh* getMesh() const { 
      return mesh; 
100
    }
101
102
103
104
105
106
107
108
109
  
  protected:
    /** \brief
     * Constructs a FiniteElemSpace with name name_ and the given DOFAdmin,
     * BasisFunction and Mesh.
     */
    FiniteElemSpace(DOFAdmin* admin_,
		    const BasisFunction* basisFcts, 
		    Mesh* mesh,
110
		    const std::string& name_ = "");
111
112
113
114
115

  protected:
    /** \brief
     * Name of this FiniteElemSpace
     */
116
    const std::string name;
117
118
119
120
121
122
123
124
125
126
127
128
129
130

    /** \brief
     * DOFAdmin corresponding to this FiniteElemSpace
     */
    DOFAdmin* admin;

    /** \brief
     * set of BasisFunction of this FiniteElemSpace
     */
    const BasisFunction* basFcts;

    /** \brief
     * The Mesh this FiniteElemSpace belongs to
     */
131
    Mesh* mesh;
132
133
134
135

    /** \brief
     * 
     */
136
    static std::vector<FiniteElemSpace*> feSpaces;
137
138
139
140
141
  };

}

#endif  // !_FINITEELEMSPACE_H_