ParMooN
 All Classes Functions Variables Friends Pages
FEVectFunct2D.h
1 // =======================================================================
2 // @(#)FEVectFunct2D.h 1.2 07/20/99
3 //
4 // Class: TFEVectFunct2D
5 // Purpose: a function from a finite element space in 2D
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 
16 #ifndef __FEVECTFUNCT2D__
17 #define __FEVECTFUNCT2D__
18 
19 
20 #include <FEFunction2D.h>
21 
24 {
25  protected:
28 
29  public:
31  TFEVectFunct2D(TFESpace2D *fespace2D, char *name, char *description,
32  double *values, int length, int n_components);
33 
36  { return N_Components; }
37 
40  {
41  // the name of the component will include the index i
42  std::ostringstream os;
43  os.seekp(std::ios::beg);
44  os << Name << i <<ends;
45  return new TFEFunction2D(FESpace2D, (char*)os.str().c_str(), Description,
46  Values+i*Length, Length);
47  }
48 
50  void GridToData();
51 
53  void DataToGrid();
54 
57  DoubleFunct2D *Exact, DoubleFunct2D *Exact1,
58  int N_Derivatives,
59  MultiIndex2D *NeededDerivatives,
60  int N_Errors, ErrorMethod2D *ErrorMeth,
61  CoeffFct2D *Coeff, TAuxParam2D *Aux,
62  int n_fespaces, TFESpace2D **fespaces,
63  double *errors);
64 
66  double GetL2NormDivergence();
67 
69  void WriteSol(double t);
70 
72  void ReadSol(char *BaseName);
73 
76  void FindVectGradient(double x, double y, double *val1, double *val2);
77 
79  void Interpolate(TFEVectFunct2D *OldVectFunct);
80 
83  TFEVectFunct2D& operator*=(double alpha);
84 
88 
92 };
93 
94 #endif
95 
96 // #ifdef __2D__
97 // # endif // #ifdef __2D__
TFEVectFunct2D & operator*=(double alpha)
multiply function with a scalar alpha. Only non-Dirichlet dofs are multiplied!
Definition: FEVectFunct2D.C:986
void GetDeformationTensorErrors(DoubleFunct2D *Exact, DoubleFunct2D *Exact1, int N_Derivatives, MultiIndex2D *NeededDerivatives, int N_Errors, ErrorMethod2D *ErrorMeth, CoeffFct2D *Coeff, TAuxParam2D *Aux, int n_fespaces, TFESpace2D **fespaces, double *errors)
Definition: FEVectFunct2D.C:236
Definition: AuxParam2D.h:22
TFEVectFunct2D & operator=(const TFEVectFunct2D &rhs)
copy one TFEVectFunct2D to another one. Both have to be defined on the same space ...
Definition: FEVectFunct2D.C:1039
Definition: FESpace2D.h:28
double GetL2NormDivergence()
Definition: FEVectFunct2D.C:416
void WriteSol()
Definition: FEFunction2D.C:2071
char * Description
Definition: FEFunction2D.h:31
int N_Components
Definition: FEVectFunct2D.h:27
TFEVectFunct2D & operator+=(const TFEVectFunct2D &rhs)
add one TFEVectFunct2D to another one. Both have to be defined on the same space. Only non-Dirichlet ...
Definition: FEVectFunct2D.C:999
Definition: FEVectFunct2D.h:23
void ReadSol(char *BaseName)
Definition: FEVectFunct2D.C:567
TFEVectFunct2D(TFESpace2D *fespace2D, char *name, char *description, double *values, int length, int n_components)
Definition: FEVectFunct2D.C:48
TFEFunction2D * GetComponent(int i)
Definition: FEVectFunct2D.h:39
TFEFunction2D(TFESpace2D *fespace2D, char *name, char *description, double *values, int length)
Definition: FEFunction2D.C:48
void GridToData()
Definition: FEVectFunct2D.C:57
int GetN_Components()
Definition: FEVectFunct2D.h:35
double * Values
Definition: FEFunction2D.h:37
TFESpace2D * FESpace2D
Definition: FEFunction2D.h:34
int Length
Definition: FEFunction2D.h:40
void Interpolate(TFEVectFunct2D *OldVectFunct)
Definition: FEVectFunct2D.C:615
char * Name
Definition: FEFunction2D.h:28
void FindVectGradient(double x, double y, double *val1, double *val2)
Definition: FEVectFunct2D.C:789
void DataToGrid()
Definition: FEVectFunct2D.C:145
Definition: FEFunction2D.h:24