ParMooN
 All Classes Functions Variables Friends Pages
BF_D_L_P2_1D.h
1 // ***********************************************************************
2 // P2 discontinuous element, 1D
3 // ***********************************************************************
4 
5 // base function values
6 static void D_L_P2_1D_Funct(double xi, double *values)
7 {
8  double t1 = xi*xi;
9  double t2 = 2.5/3.;
10  double t3 = 10./3.;
11  double t4 = t2*xi;
12  double t5 = 10.*t1;
13 
14  values[0]= 6.-15.*t1;
15  values[1]= t3+t4-t5;
16  values[2]= -t3+t4+t5;
17 }
18 
19 // values of the derivatives in xi direction
20 static void D_L_P2_1D_DeriveXi(double xi, double *values)
21 {
22  double t1 = 2.5/3.;
23  double t2 = 20.*xi;
24 
25  values[0] = -30.*xi;
26  values[1] = t1-t2;
27  values[2] = t1+t2;
28 }
29 
30 // values of the derivatives in xi-xi direction
31 static void D_L_P2_1D_DeriveXiXi(double xi, double *values)
32 {
33  values[0]=-30.;
34  values[1]=-20.;
35  values[2]=20.;
36 }
37 
38 // ***********************************************************************
39 TBaseFunct1D *BF_D_L_P2_1D_Obj = new TBaseFunct1D
40  (3, BF_D_L_P2_1D, D_L_P2_1D_Funct, D_L_P2_1D_DeriveXi,
41  D_L_P2_1D_DeriveXiXi, 2, 2);
Definition: BaseFunct1D.h:25