FiniteElemSpace.h 4 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
67
					   Mesh *mesh,
					   const ::std::string& name_ = "");
68
69
70
71
72
73
74
75
76

    /** \brief
     * destructor
     */
    virtual ~FiniteElemSpace() {};

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

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

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

    /** \brief
     * Returns \ref mesh
     */
98
99
100
    inline Mesh* getMesh() const { 
      return mesh; 
    };
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
  
  protected:
    /** \brief
     * Constructs a FiniteElemSpace with name name_ and the given DOFAdmin,
     * BasisFunction and Mesh.
     */
    FiniteElemSpace(DOFAdmin* admin_,
		    const BasisFunction* basisFcts, 
		    Mesh* mesh,
		    const ::std::string& name_="");

  protected:
    /** \brief
     * Name of this FiniteElemSpace
     */
    const ::std::string name;

    /** \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
136
137
138
139
140
141

    /** \brief
     * 
     */
    static ::std::vector<FiniteElemSpace*> feSpaces;
  };

}

#endif  // !_FINITEELEMSPACE_H_