ParMooN
 All Classes Functions Variables Friends Pages
NF_D_T_P1_3D.h
1 // ***********************************************************************
2 // P1 element, discontinuous, 3D
3 //
4 // Author: Sashikumaar Ganesan
5 //
6 // ***********************************************************************
7 
8 /*
9  TNodalFunctional3D(NodalFunctional3D id,
10  int n_allfunctionals, int *n_facefunctionals,
11  int n_pointsall, int *n_pointsface,
12  double *xi, double *eta, double *zeta,
13  double **xiarray, double **etaarray,
14  double **zetaarray,
15  DoubleFunctVect *evalall,
16  DoubleFunctVect *evalface);
17 */
18 
19 /* for all functionals */
20 static double NF_D_T_P1_3D_Xi[] = {0, 1, 0, 0, 0.25 };
21 static double NF_D_T_P1_3D_Eta[] = {0, 0, 1, 0, 0.25 };
22 static double NF_D_T_P1_3D_Zeta[] = {0, 0, 0, 1, 0.25 };
23 
24 /* face 0 0 */
25 static double *NF_D_T_P1_3D_F0_Xi = NULL;
26 static double *NF_D_T_P1_3D_F0_Eta = NULL;
27 static double *NF_D_T_P1_3D_F0_Zeta = NULL;
28 
29 /* face 1 1 */
30 static double *NF_D_T_P1_3D_F1_Xi = NULL;
31 static double *NF_D_T_P1_3D_F1_Eta = NULL;
32 static double *NF_D_T_P1_3D_F1_Zeta = NULL;
33 
34 /* face 2 2 */
35 static double *NF_D_T_P1_3D_F2_Xi = NULL;
36 static double *NF_D_T_P1_3D_F2_Eta = NULL;
37 static double *NF_D_T_P1_3D_F2_Zeta = NULL;
38 
39 /* face 3 3 */
40 static double *NF_D_T_P1_3D_F3_Xi = NULL;
41 static double *NF_D_T_P1_3D_F3_Eta = NULL;
42 static double *NF_D_T_P1_3D_F3_Zeta = NULL;
43 
44 static double *NF_D_T_P1_3D_XiArray[4] = {
45  NF_D_T_P1_3D_F0_Xi,
46  NF_D_T_P1_3D_F1_Xi,
47  NF_D_T_P1_3D_F2_Xi,
48  NF_D_T_P1_3D_F3_Xi };
49 
50 static double *NF_D_T_P1_3D_EtaArray[4] = {
51  NF_D_T_P1_3D_F0_Eta,
52  NF_D_T_P1_3D_F1_Eta,
53  NF_D_T_P1_3D_F2_Eta,
54  NF_D_T_P1_3D_F3_Eta };
55 
56 static double *NF_D_T_P1_3D_ZetaArray[4] = {
57  NF_D_T_P1_3D_F0_Zeta,
58  NF_D_T_P1_3D_F1_Zeta,
59  NF_D_T_P1_3D_F2_Zeta,
60  NF_D_T_P1_3D_F3_Zeta };
61 
62 static double *NF_D_T_P1_3D_T = NULL;
63 static double *NF_D_T_P1_3D_S = NULL;
64 
65 void NF_D_T_P1_3D_EvalAll(TCollection *Coll, TBaseCell *Cell, double *PointValues, double *Functionals)
66 {
67  Functionals[0] = ( 16*PointValues[4] + PointValues[0] + PointValues[1]
68  + PointValues[2] + PointValues[3] )/120;
69  Functionals[1] =( -30*PointValues[0] +90*PointValues[1]
70  -30*PointValues[2] -30*PointValues[3] )/120;
71  Functionals[2] =( -30*PointValues[0] -30*PointValues[1]
72  +90*PointValues[2] -30*PointValues[3] )/120;
73  Functionals[3] =( -30*PointValues[0] -30*PointValues[1]
74  -30*PointValues[2] +90*PointValues[3] )/120;
75 }
76 
77 void NF_D_T_P1_3D_EvalFace(TCollection *Coll, TBaseCell *Cell, int Joint,
78  double *PointValues, double *Functionals)
79 {
80 }
81 
82 static int NF_D_T_P1_3D_N_AllFunctionals = 4;
83 static int NF_D_T_P1_3D_N_PointsAll = 5;
84 static int NF_D_T_P1_3D_N_FaceFunctionals[] = { 0, 0, 0, 0 };
85 static int NF_D_T_P1_3D_N_PointsFace[] = { 0, 0, 0, 0 };
86 
87 TNodalFunctional3D *NF_D_T_P1_3D_Obj = new TNodalFunctional3D
88  (NF_D_T_P1_3D, NF_D_T_P1_3D_N_AllFunctionals,
89  NF_D_T_P1_3D_N_FaceFunctionals, NF_D_T_P1_3D_N_PointsAll,
90  NF_D_T_P1_3D_N_PointsFace,
91  NF_D_T_P1_3D_Xi, NF_D_T_P1_3D_Eta, NF_D_T_P1_3D_Zeta,
92  NF_D_T_P1_3D_XiArray, NF_D_T_P1_3D_EtaArray,
93  NF_D_T_P1_3D_ZetaArray,
94  NF_D_T_P1_3D_T, NF_D_T_P1_3D_S,
95  NF_D_T_P1_3D_EvalAll, NF_D_T_P1_3D_EvalFace);
Definition: NodalFunctional3D.h:21
store cells in an array, used by cell iterators
Definition: Collection.h:18
information for finite element data structure
Definition: BaseCell.h:25