ParMooN
 All Classes Functions Variables Friends Pages
FESpace.h
1 // =======================================================================
2 // @(#)FESpace.h 1.1 10/30/98
3 //
4 // Class: TFESpace
5 // Purpose: general super class for all finite element spaces
6 // special spaces are implemented in subclasses
7 //
8 // Author: Gunar Matthies (03.11.97)
9 //
10 // History: start of implementation 03.11.97 (Gunar Matthies)
11 //
12 // add data for storing information on the used elements
13 // 29.11.1997 (Gunar Matthies)
14 //
15 // split FESpace into TFESpacexD
16 // 15.04.1998 (Volker Behns)
17 //
18 // start of reimplementation
19 // 30.07.1998 (Gunar Matthies)
20 //
21 // =======================================================================
22 
23 #ifndef __FESPACE__
24 #define __FESPACE__
25 
26 #include <Collection.h>
27 
30 class TFESpace
31 {
32  protected:
33 // =======================================================================
34 // administration
35 // =======================================================================
37  char *Name;
38 
40  char *Description;
41 
42 // =======================================================================
43 // information of cell collection
44 // =======================================================================
47 
49  int N_Cells;
50 
51 // =======================================================================
52 // general information on degrees of freedom and their numbers
53 // =======================================================================
56 
60 
63  int *BeginIndex;
64 
67 
68 // =======================================================================
69 // counts and bounds for different types of degrees of freedom
70 // =======================================================================
73 
75  BoundCond *BoundaryNodeTypes;
76 
79 
82 
84  int N_Inner;
85 
88 
91 
94 
97 
99  int DGSpace;
100 
101 #ifdef _MPI
102 
104 #endif
105 
106  private:
108  int InitData(TCollection *coll, char *name, char *description);
109 
110  public:
112  TFESpace(TCollection *coll, char *name, char *description);
113 
115  ~TFESpace();
116 
118  char *GetName() const
119  { return Name; }
120 
122  char *GetDescription() const
123  { return Description; }
124 
127  int GetN_Cells() const
128  { return N_Cells; }
129 
132  { return Collection; }
133 
135  int *GetGlobalNumbers() const
136  { return GlobalNumbers; }
137 
138  void SetGlobalNumbers(int* NewGN)
139  { GlobalNumbers=NewGN; }
140 
142  int *GetBeginIndex() const
143  { return BeginIndex; }
144 
150  int* GetGlobalDOF(int i) const
151  { return GlobalNumbers+BeginIndex[i];}
152 
154  int GetN_UsedElements() const
155  { return N_UsedElements; }
156 
159  { return N_DegreesOfFreedom; }
160 
161 // =======================================================================
162 // counts and bounds for different types of degrees of freedom
163 // =======================================================================
166  { return N_DiffBoundNodeTypes; }
167 
169  BoundCond *GetBoundaryNodeTypes() const
170  { return BoundaryNodeTypes; }
171 
173  int *GetN_BoundaryNodes() const
174  { return N_BoundaryNodes; }
175 
177  int GetN_Dirichlet() const
178  { return N_Dirichlet; }
179 
181  int GetN_Inner() const
182  { return N_Inner; }
183 
185  int GetInnerBound() const
186  { return InnerBound; }
187 
190  { return BoundaryNodesBound; }
191 
193  int GetDirichletBound() const
194  { return DirichletBound; }
195 
197  int GetActiveBound() const
198  { return ActiveBound; }
199 
201  int Write(const char *filename);
202 
203  void SetAsDGSpace()
204  { DGSpace = 1; }
205 
206  int IsDGSpace() const
207  { return DGSpace; }
208 
209 #ifdef _MPI
210 
211  void SetMaxSubDomainPerDof(int maxSubDomainPerDof)
212  { MaxSubDomainPerDof = maxSubDomainPerDof; }
213 
216  { return MaxSubDomainPerDof; }
217 #endif
218 
219 };
220 
221 #endif
int N_DiffBoundNodeTypes
Definition: FESpace.h:72
~TFESpace()
Definition: FESpace.C:56
TCollection * GetCollection() const
Definition: FESpace.h:131
int N_Inner
Definition: FESpace.h:84
int InnerBound
Definition: FESpace.h:87
int * BoundaryNodesBound
Definition: FESpace.h:90
int GetN_DiffBoundaryNodeTypes() const
Definition: FESpace.h:165
BoundCond * GetBoundaryNodeTypes() const
Definition: FESpace.h:169
int DGSpace
Definition: FESpace.h:99
BoundCond * BoundaryNodeTypes
Definition: FESpace.h:75
int GetN_Inner() const
Definition: FESpace.h:181
int N_UsedElements
Definition: FESpace.h:66
int DirichletBound
Definition: FESpace.h:93
int * GlobalNumbers
Definition: FESpace.h:59
char * Name
Definition: FESpace.h:37
int * BeginIndex
Definition: FESpace.h:63
store cells in an array, used by cell iterators
Definition: Collection.h:18
Definition: FESpace.h:30
int MaxSubDomainPerDof
Definition: FESpace.h:103
int N_DegreesOfFreedom
Definition: FESpace.h:55
int N_Dirichlet
Definition: FESpace.h:78
int GetN_UsedElements() const
Definition: FESpace.h:154
TCollection * Collection
Definition: FESpace.h:46
int GetActiveBound() const
Definition: FESpace.h:197
int ActiveBound
Definition: FESpace.h:96
int * GetBoundaryNodesBound() const
Definition: FESpace.h:189
int * N_BoundaryNodes
Definition: FESpace.h:81
int N_Cells
Definition: FESpace.h:49
char * Description
Definition: FESpace.h:40
TFESpace(TCollection *coll, char *name, char *description)
Definition: FESpace.C:50
int GetN_Dirichlet() const
Definition: FESpace.h:177
int * GetGlobalNumbers() const
Definition: FESpace.h:135
int * GetN_BoundaryNodes() const
Definition: FESpace.h:173
int GetInnerBound() const
Definition: FESpace.h:185
int GetN_DegreesOfFreedom() const
Definition: FESpace.h:158
int GetDirichletBound() const
Definition: FESpace.h:193
int GetMaxSubDomainPerDof()
Definition: FESpace.h:215
void SetMaxSubDomainPerDof(int maxSubDomainPerDof)
Definition: FESpace.h:211
int GetN_Cells() const
Definition: FESpace.h:127
int Write(const char *filename)
Definition: FESpace.C:67
int * GetGlobalDOF(int i) const
return correspondence map from local to global degrees of freedom
Definition: FESpace.h:150
int * GetBeginIndex() const
Definition: FESpace.h:142
char * GetDescription() const
Definition: FESpace.h:122
char * GetName() const
Definition: FESpace.h:118