ParMooN
 All Classes Functions Variables Friends Pages
NF_N_Q_Q1_2D.h
1 /*
2  TNodalFunctional2D(NodalFunctional2D id,
3  int n_allfunctionals, int n_edgefunctionals,
4  int n_pointsall, int n_pointsedge,
5  double *xi, double *eta, double *t,
6  DoubleFunctVect *evalall,
7  DoubleFunctVect *evaledge);
8 */
9 
10 static double NF_N_Q_Q1_2D_Xi[] =
11  { -0.77459666924148337703585307995647992, 0,
12  0.77459666924148337703585307995647992,
13  1, 1, 1,
14  0.77459666924148337703585307995647992, 0,
15  -0.77459666924148337703585307995647992,
16  -1, -1, -1 };
17 static double NF_N_Q_Q1_2D_Eta[] =
18  { -1, -1, -1,
19  -0.77459666924148337703585307995647992, 0,
20  0.77459666924148337703585307995647992,
21  1, 1, 1,
22  0.77459666924148337703585307995647992, 0,
23  -0.77459666924148337703585307995647992 };
24 static double NF_N_Q_Q1_2D_T[] =
25  { -0.77459666924148337703585307995647992, 0,
26  0.77459666924148337703585307995647992 };
27 
28 void NF_N_Q_Q1_2D_EvalAll(TCollection *Coll, TBaseCell *Cell, double *PointValues,
29  double *Functionals)
30 {
31  static double weights[3] = { 0.5555555555555555555555555555555556,
32  0.88888888888888888888888888888888889,
33  0.5555555555555555555555555555555556 };
34  Functionals[0] = ( weights[0]*PointValues[0]
35  +weights[1]*PointValues[1]
36  +weights[2]*PointValues[2]) * 0.5;
37  Functionals[1] = ( weights[0]*PointValues[3]
38  +weights[1]*PointValues[4]
39  +weights[2]*PointValues[5]) * 0.5;
40  Functionals[2] = ( weights[0]*PointValues[6]
41  +weights[1]*PointValues[7]
42  +weights[2]*PointValues[8]) * 0.5;
43  Functionals[3] = ( weights[0]*PointValues[9]
44  +weights[1]*PointValues[10]
45  +weights[2]*PointValues[11]) * 0.5;
46 }
47 
48 void NF_N_Q_Q1_2D_EvalEdge(TCollection *Coll, TBaseCell *Cell, int Joint, double *PointValues,
49  double *Functionals)
50 {
51  static double weights[3] = { 0.5555555555555555555555555555555556,
52  0.88888888888888888888888888888888889,
53  0.5555555555555555555555555555555556 };
54  Functionals[0] =( weights[0]*PointValues[0]
55  +weights[1]*PointValues[1]
56  +weights[2]*PointValues[2])*0.5;
57 }
58 
59 TNodalFunctional2D *NF_N_Q_Q1_2D_Obj = new TNodalFunctional2D
60  (NF_N_Q_Q1_2D, 4, 1, 12, 3, NF_N_Q_Q1_2D_Xi, NF_N_Q_Q1_2D_Eta,
61  NF_N_Q_Q1_2D_T, NF_N_Q_Q1_2D_EvalAll, NF_N_Q_Q1_2D_EvalEdge);
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