ParMooN
 All Classes Functions Variables Friends Pages
BF_N_H_BDDF2_3D.h
1 // ***********************************************************************
2 // Brezzi-Douglas-Duran-Fortin element of second order on hexahedra, 3D
3 // ***********************************************************************
4 
5 static double N_H_BDDF2_3D_CM[1521] = {
6  -0,0,0,-0,-0,0,-0,0,0,0,0,-0,-0.0833333333,0.0833333333,0.0833333333,-0.0416666667,-0.0625,-0.0416666667,-0,0,0,-0,-0,-0,0.0833333333,-0.0833333333,-0.0833333333,0.0416666667,0.0625,0.0416666667,-0,0,0,-0,-0,-0,0.1875,0,0,
7  -0,0,0,0,0,-0,0.0833333333,-0.0833333333,-0.0833333333,0.0416666667,0.0625,0.0416666667,-0,0,0,0,-0,-0,-0.0833333333,0.0833333333,0.0833333333,-0.0416666667,-0.0625,-0.0416666667,-0,0,0,-0,-0,0,-0,0,0,-0,0,0,0,0.1875,0,
8  0.0833333333,-0.0833333333,-0.0833333333,0.0416666667,0.0625,0.0416666667,-0,0,0,-0,-0,0,-0,0,0,-0,0,0,-0,0,0,-0,-0,-0,-0,0,0,0,0,-0,-0.0833333333,0.0833333333,0.0833333333,-0.0416666667,-0.0625,-0.0416666667,0,0,0.1875,
9  0.0277777778,-0.0555555556,-0,0.0277777778,0,-0,0.0277777778,-0,-0.0555555556,0,0,0.0277777778,-0,0,0,-0,0.125,-0,0.0277777778,-0,-0.0555555556,0,0,0.0277777778,-0,0,0,0,0.125,-0,0.0277777778,-0,-0.0555555556,-0,0,0.0277777778,0,0,-0,
10  0,0,0,0,0,0,-0.0721687836,0.1443375673,0.1443375673,-0,-0.1443375673,-0.0721687836,-0,0,0,0,-0,0,0.0721687836,-0.1443375673,-0.1443375673,-0,0.1443375673,0.0721687836,-0,0,0,0,-0,0,0,0,0,0,0,0,0,-0,0,
11  -0.0721687836,0.1443375673,0.1443375673,-0.0721687836,-0.1443375673,0,0.0833333333,-0.0833333333,-0.0833333333,0,0.0833333333,-0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,-0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0,0.1443375673,0.0721687836,0,0,-0,
12  0.0833333333,-0.0833333333,-0.0833333333,0,0.0833333333,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0,0.1443375673,0.0721687836,0,0,0,0,0,0,-0.0721687836,0.1443375673,0.1443375673,-0.0721687836,-0.1443375673,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,0,0,0,0,
13  0.0277777778,0,-0.0555555556,0,0,0.0277777778,-0,0,-0,0,0.125,0,0.0277777778,0,-0.0555555556,-0,0,0.0277777778,-0,0,0,-0,0.125,0,0.0277777778,-0.0555555556,0,0.0277777778,-0,0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0,-0,0,
14  -0.0721687836,0.1443375673,0.1443375673,0,-0.1443375673,-0.0721687836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,-0,
15  -0,0,0,0,0,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,0,0,0,0,-0.0721687836,0.1443375673,0.1443375673,0,-0.1443375673,-0.0721687836,0,0,0,0,0,0,0,0,0,
16  0,0,0,0,0,0,-0.0721687836,0.1443375673,0.1443375673,-0.0721687836,-0.1443375673,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,-0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,0,0,0,0,0,0,0,-0,-0,0,
17  0,0,0,-0,0.125,-0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0.0277777778,0,-0.0555555556,0,0,0.0277777778,0,0,0,-0,0.125,0,0,0,-0,
18  -0,0,0,0,0,0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,0.0416666667,0.1875,0.0416666667,0,0,0,0,0,0,-0.0833333333,0.0833333333,0.0833333333,-0.0416666667,-0.1875,-0.0416666667,0,0,0,0,0,0,-0.1875,0,0,
19  0,0,0,0,0,0,-0.0833333333,-0,0.1666666667,-0,0,-0.0833333333,-0,0,0,0,-0,0,0.0833333333,-0,-0.1666666667,0,0,0.0833333333,-0,0,0,0,-0,0,0,0,0,0,0,0,0,-0,0,
20  -0.0833333333,0.1666666667,-0,-0.0833333333,0,0,-0,0,0,0,-0,-0,0,0,0,0,0,0,-0,0,0,0,-0,-0,0,0,0,0,0,0,0.0833333333,-0,-0.1666666667,0,0,0.0833333333,0,0,-0,
21  -0,0,0,0,0,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0,0.1443375673,0.0721687836,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,0,0,0,0,0,0,0,
22  0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0,0.1443375673,0.0721687836,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,-0,0.1443375673,0.0721687836,0,0,0,0,0,0,0,0,0,0,0,0,0,-0,0,
23  -0.1666666667,0.1666666667,0.1666666667,0,-0.1666666667,-0,0,-0,-0,0,0,-0,0,0,0,0,0,0,0,-0,-0,-0,0,-0,0,0,0,0,0,0,0.1666666667,-0.1666666667,-0.1666666667,-0,0.1666666667,0,0,0,0,
24  -0,0,0,0,0,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0,0.1443375673,0.0721687836,0,0,0,0,0,0,0,0,0,
25  0,0,0,0,0,0,-0.1666666667,0.1666666667,0.1666666667,-0,-0.1666666667,-0,-0,0,0,0,-0,0,0.1666666667,-0.1666666667,-0.1666666667,-0,0.1666666667,-0,-0,0,0,0,-0,0,0,0,0,0,0,0,0,-0,0,
26  0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,-0,0.1443375673,0.0721687836,0,0,-0,
27  -0,0,0,0,0,0,0,0,0,0,0,0,0.0833333333,0,-0.1666666667,0,0,0.0833333333,0,0,0,0,0,0,-0.0833333333,0.1666666667,0,-0.0833333333,0,0,0,0,0,0,0,0,0,0,0,
28  0,0,0,0,0,0,-0.0833333333,0.0833333333,0.0833333333,-0.0416666667,-0.1875,-0.0416666667,0,-0,-0,-0,0,-0,0.0833333333,-0.0833333333,-0.0833333333,0.0416666667,0.1875,0.0416666667,0,-0,-0,-0,0,0,0,0,0,0,0,0,0,-0.1875,0,
29  -0.0833333333,-0,0.1666666667,0,0,-0.0833333333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0833333333,-0.1666666667,-0,0.0833333333,0,0,0,0,0,
30  -0,0,0,0,0,0,0,0,0,0,0,0,0.1666666667,-0.1666666667,-0.1666666667,0,0.1666666667,0,0,0,0,0,0,0,-0.1666666667,0.1666666667,0.1666666667,0,-0.1666666667,0,0,0,0,0,0,0,-0,0,0,
31  0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
32  0.0721687836,-0.1443375673,-0.1443375673,-0,0.1443375673,0.0721687836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0721687836,-0.1443375673,-0.1443375673,0.0721687836,0.1443375673,0,0,0,-0,
33  -0,0,0,0,0,0,0,0,0,0,0,0,0.0833333333,-0.1666666667,-0,0.0833333333,0,-0,0,0,0,0,0,0,-0.0833333333,-0,0.1666666667,-0,0,-0.0833333333,0,0,0,0,0,0,0,0,0,
34  -0,0,0,0,0,0,-0.0833333333,0.1666666667,0,-0.0833333333,0,0,0,0,0,0,0,0,0.0833333333,-0.1666666667,0,0.0833333333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
35  -0.0833333333,0.0833333333,0.0833333333,-0.0416666667,-0.1875,-0.0416666667,0,-0,-0,0,0,0,0,0,0,0,0,0,0,-0,-0,-0,0,0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,0.0416666667,0.1875,0.0416666667,0,0,-0.1875,
36  -0,0,0,0,0,0,-0.0277777778,0,0.0555555556,-0,0,-0.0277777778,-0,0,0,-0,-0,-0,-0.0277777778,0,0.0555555556,-0,-0,-0.0277777778,-0,0,0,0,-0,0,0,0,0,0,0,0,-0,-0,0,
37  -0,0,0,0,0,0,0,0,0,0,0,0,-0.0277777778,0.0555555556,0,-0.0277777778,0,0,0,0,0,0,0,0,-0.0277777778,0,0.0555555556,0,0,-0.0277777778,0,0,0,0,0,0,0,0,0,
38  -0.0277777778,0,0.0555555556,0,0,-0.0277777778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0.0277777778,0.0555555556,0,-0.0277777778,0,0,0,0,0,
39  0,0,0,0,0,0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,-0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,0,0.0833333333,0,0,0,0,0,0,0,-0,0,0,
40  0,0,0,0,0,0,0,0,0,0,0,0,0.0277777778,0,-0.0555555556,0,0,0.0277777778,0,0,0,0,0,0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0,0,0,0,0,0,0,0,0,
41  0.0833333333,-0.0833333333,-0.0833333333,0,0.0833333333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,0,0,0,0,
42  0.0277777778,-0.0555555556,-0,0.0277777778,0,-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0277777778,-0,-0.0555555556,-0,0,0.0277777778,0,0,-0,
43  0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,0,0.0833333333,-0,0,0,0,0,0,0,0.0833333333,-0.0833333333,-0.0833333333,-0,0.0833333333,-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
44  0,0,0,0,0,0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0,0,0,0,0,0,0.0277777778,-0.0555555556,0,0.0277777778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
45 };
46 
47 static void N_H_BDDF2_3D_Funct(double xi, double eta, double zeta,
48  double *values)
49 {
50  int nBF = 39; // number of basis functions
51  // monomials x-component, y-component and z-component
52  double mon_x[]={1,0,0,xi,0,0,eta,0,0,zeta,0,0,
53  xi*xi,0,0,xi*eta,0,0,xi*zeta,0,0,eta*eta,0,0,eta*zeta,0,0,zeta*zeta,0,0,
54  xi*xi*xi,-3*xi*zeta*zeta,0,2*xi*eta*zeta,3*xi*eta*eta,-xi*xi*eta,-xi*xi*xi,0,0};
55  double mon_y[]={0,1,0,0,xi,0,0,eta,0,0,zeta,0,
56  0,xi*xi,0,0,xi*eta,0,0,xi*zeta,0,0,eta*eta,0,0,eta*zeta,0,0,zeta*zeta,0,
57  -3*xi*xi*eta,0,eta*eta*eta,-eta*eta*zeta,-eta*eta*eta,0,0,2*xi*eta*zeta,3*eta*zeta*zeta};
58  double mon_z[]={0,0,1,0,0,xi,0,0,eta,0,0,zeta,
59  0,0,xi*xi,0,0,xi*eta,0,0,xi*zeta,0,0,eta*eta,0,0,eta*zeta,0,0,zeta*zeta,
60  0,zeta*zeta*zeta,-3*eta*eta*zeta,0,0,2*xi*eta*zeta,3*xi*xi*zeta,-xi*zeta*zeta,-zeta*zeta*zeta};
61 
62  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
63  for(int i=0; i<nBF; i++)
64  {
65  for(int j=0; j<nBF; j++)
66  {
67  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
68  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
69  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
70  }
71  }
72 }
73 
74 static void N_H_BDDF2_3D_DeriveXi(double xi, double eta, double zeta,
75  double *values)
76 {
77  int nBF = 39; // number of basis functions
78  // monomials x-component, y-component and z-component
79  double mon_x[]={0,0,0,1,0,0,0,0,0,0,0,0,
80  2*xi,0,0,eta,0,0,zeta,0,0,0,0,0,0,0,0,0,0,0,
81  3*xi*xi,-3*zeta*zeta,0,2*eta*zeta,3*eta*eta,-2*xi*eta,-3*xi*xi,0,0};
82  double mon_y[]={0,0,0,0,1,0,0,0,0,0,0,0,
83  0,2*xi,0,0,eta,0,0,zeta,0,0,0,0,0,0,0,0,0,0,
84  -3*2*xi*eta,0,0,0,0,0,0,2*eta*zeta,0};
85  double mon_z[]={0,0,0,0,0,1,0,0,0,0,0,0,
86  0,0,2*xi,0,0,eta,0,0,zeta,0,0,0,0,0,0,0,0,0,
87  0,0,0,0,0,2*eta*zeta,3*2*xi*zeta,-zeta*zeta,0};
88 
89  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
90  for(int i=0; i<nBF; i++)
91  {
92  for(int j=0; j<nBF; j++)
93  {
94  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
95  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
96  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
97  }
98  }
99 }
100 
101 static void N_H_BDDF2_3D_DeriveEta(double xi, double eta, double zeta,
102  double *values)
103 {
104  int nBF = 39; // number of basis functions
105  // monomials x-component, y-component and z-component
106  double mon_x[]={0,0,0,0,0,0,1,0,0,0,0,0,
107  0,0,0,xi,0,0,0,0,0,2*eta,0,0,zeta,0,0,0,0,0,
108  0,0,0,2*xi*zeta,3*xi*2*eta,-xi*xi,0,0,0};
109  double mon_y[]={0,0,0,0,0,0,0,1,0,0,0,0,
110  0,0,0,0,xi,0,0,0,0,0,2*eta,0,0,zeta,0,0,0,0,
111  -3*xi*xi,0,3*eta*eta,-2*eta*zeta,-3*eta*eta,0,0,2*xi*zeta,3*zeta*zeta};
112  double mon_z[]={0,0,0,0,0,0,0,0,1,0,0,0,
113  0,0,0,0,0,xi,0,0,0,0,0,2*eta,0,0,zeta,0,0,0,
114  0,0,-3*2*eta*zeta,0,0,2*xi*zeta,0,0,0};
115 
116  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
117  for(int i=0; i<nBF; i++)
118  {
119  for(int j=0; j<nBF; j++)
120  {
121  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
122  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
123  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
124  }
125  }
126 }
127 
128 static void N_H_BDDF2_3D_DeriveZeta(double xi, double eta, double zeta,
129  double *values)
130 {
131  int nBF = 39; // number of basis functions
132  // monomials x-component, y-component and z-component
133  double mon_x[]={0,0,0,0,0,0,0,0,0,1,0,0,
134  0,0,0,0,0,0,xi,0,0,0,0,0,eta,0,0,2*zeta,0,0,
135  0,-3*xi*2*zeta,0,2*xi*eta,0,0,0,0,0};
136  double mon_y[]={0,0,0,0,0,0,0,0,0,0,1,0,
137  0,0,0,0,0,0,0,xi,0,0,0,0,0,eta,0,0,2*zeta,0,
138  0,0,0,-eta*eta,0,0,0,2*xi*eta,3*eta*2*zeta};
139  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,1,
140  0,0,0,0,0,0,0,0,xi,0,0,0,0,0,eta,0,0,2*zeta,
141  0,3*zeta*zeta,-3*eta*eta,0,0,2*xi*eta,3*xi*xi,-xi*2*zeta,-3*zeta*zeta};
142 
143  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
144  for(int i=0; i<nBF; i++)
145  {
146  for(int j=0; j<nBF; j++)
147  {
148  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
149  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
150  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
151  }
152  }
153 }
154 
155 static void N_H_BDDF2_3D_DeriveXiXi(double xi, double eta, double zeta,
156  double *values)
157 {
158  int nBF = 39; // number of basis functions
159  // monomials x-component, y-component and z-component
160  double mon_x[]={0,0,0,0,0,0,0,0,0,0,0,0,
161  2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
162  3*2*xi,0,0,0,0,-2*eta,-3*2*xi,0,0};
163  double mon_y[]={0,0,0,0,0,0,0,0,0,0,0,0,
164  0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
165  -3*2*eta,0,0,0,0,0,0,0,0};
166  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,0,
167  0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
168  0,0,0,0,0,0,3*2*zeta,0,0};
169 
170  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
171  for(int i=0; i<nBF; i++)
172  {
173  for(int j=0; j<nBF; j++)
174  {
175  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
176  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
177  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
178  }
179  }
180 }
181 
182 static void N_H_BDDF2_3D_DeriveXiEta(double xi, double eta, double zeta,
183  double *values)
184 {
185  int nBF = 39; // number of basis functions
186  // monomials x-component, y-component and z-component
187  double mon_x[]={0,0,0,0,0,0,0,0,0,0,0,0,
188  0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
189  0,0,0,2*zeta,3*2*eta,-2*xi,0,0,0};
190  double mon_y[]={0,0,0,0,0,0,0,0,0,0,0,0,
191  0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
192  -3*2*xi,0,0,0,0,0,0,2*zeta,0};
193  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,0,
194  0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
195  0,0,0,0,0,2*zeta,0,0,0};
196 
197  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
198  for(int i=0; i<nBF; i++)
199  {
200  for(int j=0; j<nBF; j++)
201  {
202  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
203  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
204  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
205  }
206  }
207 }
208 
209 static void N_H_BDDF2_3D_DeriveXiZeta(double xi, double eta, double zeta,
210  double *values)
211 {
212  int nBF = 39; // number of basis functions
213  // monomials x-component, y-component and z-component
214  double mon_x[]={0,0,0,0,0,0,0,0,0,0,0,0,
215  0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
216  0,-3*2*zeta,0,2*eta,0,0,0,0,0};
217  double mon_y[]={0,0,0,0,0,0,0,0,0,0,0,0,
218  0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
219  0,0,0,0,0,0,0,2*eta,0};
220  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,0,
221  0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
222  0,0,0,0,0,2*eta,3*2*xi,-2*zeta,0};
223 
224  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
225  for(int i=0; i<nBF; i++)
226  {
227  for(int j=0; j<nBF; j++)
228  {
229  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
230  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
231  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
232  }
233  }
234 }
235 
236 static void N_H_BDDF2_3D_DeriveEtaEta(double xi, double eta, double zeta,
237  double *values)
238 {
239  int nBF = 39; // number of basis functions
240  // monomials x-component, y-component and z-component
241  double mon_x[]={0,0,0,0,0,0,0,0,0,0,0,0,
242  0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
243  0,0,0,0,3*xi*2,0,0,0,0};
244  double mon_y[]={0,0,0,0,0,0,0,0,0,0,0,0,
245  0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
246  0,0,3*2*eta,-2*zeta,-3*2*eta,0,0,0,0};
247  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,0,
248  0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,
249  0,0,-3*2*zeta,0,0,0,0,0,0};
250 
251  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
252  for(int i=0; i<nBF; i++)
253  {
254  for(int j=0; j<nBF; j++)
255  {
256  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
257  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
258  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
259  }
260  }
261 }
262 
263 static void N_H_BDDF2_3D_DeriveEtaZeta(double xi, double eta, double zeta,
264  double *values)
265 {
266  int nBF = 39; // number of basis functions
267  // monomials x-component, y-component and z-component
268  double mon_x[]={0,0,0,0,0,0,0,0,0,0,0,0,
269  0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
270  0,0,0,2*xi,0,0,0,0,0};
271  double mon_y[]={0,0,0,0,0,0,0,0,0,0,0,0,
272  0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
273  0,0,0,-2*eta,0,0,0,2*xi,3*2*zeta};
274  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,0,
275  0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
276  0,0,-3*2*eta,0,0,2*xi,0,0,0};
277 
278  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
279  for(int i=0; i<nBF; i++)
280  {
281  for(int j=0; j<nBF; j++)
282  {
283  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
284  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
285  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
286  }
287  }
288 }
289 
290 static void N_H_BDDF2_3D_DeriveZetaZeta(double xi, double eta, double zeta,
291  double *values)
292 {
293  int nBF = 39; // number of basis functions
294  // monomials x-component, y-component and z-component
295  double mon_x[]={0,0,0,0,0,0,0,0,0,0,0,0,
296  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
297  0,-3*xi*2,0,0,0,0,0,0,0};
298  double mon_y[]={0,0,0,0,0,0,0,0,0,0,0,0,
299  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
300  0,0,0,0,0,0,0,0,3*eta*2};
301  double mon_z[]={0,0,0,0,0,0,0,0,0,0,0,0,
302  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
303  0,3*2*zeta,0,0,0,0,0,-xi*2,-3*2*zeta};
304 
305  memset(values, 0.0, 3*nBF*SizeOfDouble); // 3 is the space dimension
306  for(int i=0; i<nBF; i++)
307  {
308  for(int j=0; j<nBF; j++)
309  {
310  values[i ] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_x[j];
311  values[i+ nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_y[j];
312  values[i+2*nBF] += N_H_BDDF2_3D_CM[i+j*nBF]*mon_z[j];
313  }
314  }
315 }
316 
317 TBaseFunct3D *BF_N_H_BDDF2_3D_Obj =
318 new TBaseFunct3D(39, BF_N_H_BDDF2_3D, BFUnitHexahedron,
319  N_H_BDDF2_3D_Funct, N_H_BDDF2_3D_DeriveXi,
320  N_H_BDDF2_3D_DeriveEta, N_H_BDDF2_3D_DeriveZeta,
321  N_H_BDDF2_3D_DeriveXiXi, N_H_BDDF2_3D_DeriveXiEta,
322  N_H_BDDF2_3D_DeriveXiZeta, N_H_BDDF2_3D_DeriveEtaEta,
323  N_H_BDDF2_3D_DeriveEtaZeta, N_H_BDDF2_3D_DeriveZetaZeta,
324  3, 1, 0, NULL, 3);
Definition: BaseFunct3D.h:27