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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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
131
132
133
// ============================================================================
// ==                                                                        ==
// == 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
     * 
     */
    static FiniteElemSpace *provideFESpace(DOFAdmin            *admin,
					   const BasisFunction *basFcts,
					   Mesh                *mesh,
					   const ::std::string&   name_="");

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

    /** \brief
     * Returns \ref name
     */  
    inline ::std::string getName() const { return name;};

    /** \brief
     * Returns \ref admin
     */
    inline DOFAdmin* getAdmin() const { return admin;};

    /** \brief
     * Returns \ref basFcts
     */
    inline const BasisFunction* getBasisFcts() const { return basFcts;};

    /** \brief
     * Returns \ref mesh
     */
    inline Mesh* getMesh() const { return mesh; };
  
  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
     */
    Mesh*                 mesh;

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

}

#endif  // !_FINITEELEMSPACE_H_