ParMooN
 All Classes Functions Variables Friends Pages
FEFunction3D.h
1 // =======================================================================
2 // %W% %G%
3 //
4 // Class: TFEFunction3D
5 // Purpose: a function from a finite element space in 3D
6 //
7 // Author: Gunar Matthies (17.01.98)
8 //
9 // History: start of implementation 17.01.98 (Gunar Matthies)
10 //
11 // start of reimplementation 06.08.1998 (GM)
12 //
13 // =======================================================================
14 
15 #ifndef __FEFUNCTION3D__
16 #define __FEFUNCTION3D__
17 
18 #include <AllClasses.h>
19 #include <FESpace3D.h>
20 #include <AuxParam3D.h>
21 #include <Constants.h>
22 #include <vector>
23 
26 {
27  protected:
29  char *Name;
30 
32  char *Description;
33 
36 
38  double *Values;
39 
41  int Length;
42 
43  public:
45  TFEFunction3D(TFESpace3D *fespace3D, char *name, char *description,
46  double *values, int length);
47 
50 
52  char *GetName()
53  { return Name; }
54 
57  { return Description; }
58 
61  { return FESpace3D; }
62 
64  int GetLength()
65  { return Length; }
66 
68  double *GetValues()
69  { return Values; }
70 
73  void GetErrors(DoubleFunct3D *Exact, int N_Derivatives,
74  MultiIndex3D *NeededDerivatives,
75  int N_Errors, ErrorMethod3D *ErrorMeth,
76  CoeffFct3D *Coeff, TAuxParam3D *Aux,
77  int n_fespaces, TFESpace3D **fespaces,
78  double *errors);
79 
80  void GetErrorsForVectorValuedFunction(DoubleFunct3D ** const Exact,
81  ErrorMethod3D * const ErrMeth,
82  double * const errors);
83 
84  void GetErrorsAdapt(DoubleFunct3D *Exact, int N_Derivatives,
85  MultiIndex3D *NeededDerivatives,
86  int N_Errors, ErrorMethod3D *ErrorMeth,
87  CoeffFct3D *Coeff,
88  TAuxParam3D *Aux,
89  int n_fespaces, TFESpace3D **fespaces,
90  double *errors);
91 
93  void GetErrorsOPTPDE(DoubleFunct3D *Exact, int N_Derivatives,
94  MultiIndex3D *NeededDerivatives,
95  int N_Errors, ErrorMethod3D *ErrorMeth,
96  CoeffFct3D *Coeff, TAuxParam3D *Aux,
97  int n_fespaces, TFESpace3D **fespaces,
98  double radius, double upper, double lower, double *errors);
99 
100 
102  void GetMeshCellParams(DoubleFunct3D *Exact, int N_Derivatives,
103  MultiIndex3D *NeededDerivatives,
104  int N_Errors, ErrorMethod3D *ErrorMeth,
105  CoeffFct3D *Coeff, TAuxParam3D *Aux,
106  int n_fespaces, TFESpace3D **fespaces,
107  double *errors, double *cell_parameters);
108 
111  void FindGradient(double x, double y, double z, double *values);
112 
115  void FindGradientLocal(TBaseCell *cell, int cell_no,
116  double x, double y, double z,
117  double *values);
118 
121  void FindValueLocal(TBaseCell *cell, int cell_no,
122  double x, double y, double z,
123  double *values);
124 
126  void Interpolate(DoubleFunct3D *Exact);
127 
129  void InterpolateSuper(DoubleFunct3D *Exact);
130 
132  void Interpolate(int N_Coord, double *Coords, int N_AuxFeFcts,
133  TFEFunction3D **AuxFeFcts, DoubleFunctND *Exact);
134 
140  void Interpolate_vector_valued_function(std::vector<DoubleFunct3D*> Exact);
141 
152  void project_into_L20(double a = 0.0);
153 
160  void compute_integral_and_measure(double& integral, double& measure) const;
161 
163  void SetDirichletBC(BoundCondFunct3D *BoundaryCondition,
164  BoundValueFunct3D *BoudaryValue);
165 
168  void MinMax(double & min, double & max);
169 
172  void PrintMinMax();
173 };
174 
175 #endif
char * Description
Definition: FEFunction3D.h:32
void compute_integral_and_measure(double &integral, double &measure) const
find the integral of this function and the measure of its domain
Definition: FEFunction3D.C:2073
void InterpolateSuper(DoubleFunct3D *Exact)
Definition: FEFunction3D.C:1701
void Interpolate(DoubleFunct3D *Exact)
Definition: FEFunction3D.C:1444
char * GetDescription()
Definition: FEFunction3D.h:56
Definition: AuxParam3D.h:21
Definition: FESpace3D.h:22
int GetLength()
Definition: FEFunction3D.h:64
void FindGradientLocal(TBaseCell *cell, int cell_no, double x, double y, double z, double *values)
Definition: FEFunction3D.C:1252
void Interpolate_vector_valued_function(std::vector< DoubleFunct3D * > Exact)
interpolate a vector valued function
Definition: FEFunction3D.C:1608
TFEFunction3D(TFESpace3D *fespace3D, char *name, char *description, double *values, int length)
Definition: FEFunction3D.C:35
void GetMeshCellParams(DoubleFunct3D *Exact, int N_Derivatives, MultiIndex3D *NeededDerivatives, int N_Errors, ErrorMethod3D *ErrorMeth, CoeffFct3D *Coeff, TAuxParam3D *Aux, int n_fespaces, TFESpace3D **fespaces, double *errors, double *cell_parameters)
Definition: FEFunction3D.C:966
int Length
Definition: FEFunction3D.h:41
void project_into_L20(double a=0.0)
project this functions into the space L20 (having zero mean value)
Definition: FEFunction3D.C:2129
void MinMax(double &min, double &max)
find the largest and smallest element in the vector of this FE function
Definition: FEFunction3D.C:2440
char * Name
Definition: FEFunction3D.h:29
void PrintMinMax()
print the largest and smallest element in the vector of this FE function
Definition: FEFunction3D.C:2456
void FindGradient(double x, double y, double z, double *values)
Definition: FEFunction3D.C:1130
TFESpace3D * FESpace3D
Definition: FEFunction3D.h:35
information for finite element data structure
Definition: BaseCell.h:25
void GetErrors(DoubleFunct3D *Exact, int N_Derivatives, MultiIndex3D *NeededDerivatives, int N_Errors, ErrorMethod3D *ErrorMeth, CoeffFct3D *Coeff, TAuxParam3D *Aux, int n_fespaces, TFESpace3D **fespaces, double *errors)
Definition: FEFunction3D.C:57
void GetErrorsOPTPDE(DoubleFunct3D *Exact, int N_Derivatives, MultiIndex3D *NeededDerivatives, int N_Errors, ErrorMethod3D *ErrorMeth, CoeffFct3D *Coeff, TAuxParam3D *Aux, int n_fespaces, TFESpace3D **fespaces, double radius, double upper, double lower, double *errors)
Definition: FEFunction3D.C:577
void SetDirichletBC(BoundCondFunct3D *BoundaryCondition, BoundValueFunct3D *BoudaryValue)
Set Dirichlet values according to boundary conditions.
Definition: FEFunction3D.C:2182
void FindValueLocal(TBaseCell *cell, int cell_no, double x, double y, double z, double *values)
Definition: FEFunction3D.C:1345
double * GetValues()
Definition: FEFunction3D.h:68
~TFEFunction3D()
Definition: FEFunction3D.C:49
TFESpace3D * GetFESpace3D()
Definition: FEFunction3D.h:60
Definition: FEFunction3D.h:25
char * GetName()
Definition: FEFunction3D.h:52
double * Values
Definition: FEFunction3D.h:38