ParMooN
 All Classes Functions Variables Friends Pages
NF_N_T_P1_2D.h
1 /*
2  TNodalFunctional2D(NodalFunctional2D id,
3  int n_allfunctionals, int n_edgefunctionals,
4  int B_T_Pointsall, int B_T_Pointsedge,
5  double *xi, double *eta, double *t,
6  DoubleFunctVect *evalall,
7  DoubleFunctVect *evaledge);
8 */
9 
10 static double NF_N_T_P1_2D_Xi[] =
11  { 0.11270166537925831149, 0.5,
12  0.88729833462074168851,
13  0.88729833462074168851, 0.5,
14  0.11270166537925831149,
15  0, 0, 0 };
16 static double NF_N_T_P1_2D_Eta[] =
17  { 0, 0, 0,
18  0.11270166537925831149, 0.5,
19  0.88729833462074168851,
20  0.88729833462074168851, 0.5,
21  0.11270166537925831149 };
22 static double NF_N_T_P1_2D_T[] =
23  { -0.77459666924148337703585307995647992, 0,
24  0.77459666924148337703585307995647992 };
25 
26 void NF_N_T_P1_2D_EvalAll(TCollection *Coll, TBaseCell *Cell, double *PointValues,
27  double *Functionals)
28 {
29  static double weights[]={ 0.277777777777777777777778,
30  0.444444444444444444444444,
31  0.277777777777777777777778 };
32  Functionals[0] = weights[0]*PointValues[0]
33  +weights[1]*PointValues[1]
34  +weights[2]*PointValues[2];
35  Functionals[1] = weights[0]*PointValues[3]
36  +weights[1]*PointValues[4]
37  +weights[2]*PointValues[5];
38  Functionals[2] = weights[0]*PointValues[6]
39  +weights[1]*PointValues[7]
40  +weights[2]*PointValues[8];
41 }
42 
43 void NF_N_T_P1_2D_EvalEdge(TCollection *Coll, TBaseCell *Cell, int Joint,
44  double *PointValues, double *Functionals)
45 {
46  static double weights[3] = { 0.5555555555555555555555555555555556,
47  0.88888888888888888888888888888888889,
48  0.5555555555555555555555555555555556 };
49  Functionals[0] =( weights[0]*PointValues[0]
50  +weights[1]*PointValues[1]
51  +weights[2]*PointValues[2])*0.5;
52 }
53 
54 TNodalFunctional2D *NF_N_T_P1_2D_Obj = new TNodalFunctional2D
55  (NF_N_T_P1_2D, 3, 1, 9, 3, NF_N_T_P1_2D_Xi, NF_N_T_P1_2D_Eta,
56  NF_N_T_P1_2D_T, NF_N_T_P1_2D_EvalAll, NF_N_T_P1_2D_EvalEdge);
57 
store cells in an array, used by cell iterators
Definition: Collection.h:18
Definition: NodalFunctional2D.h:20
information for finite element data structure
Definition: BaseCell.h:25