1
// This code conforms with the UFC specification version 1.0
2
// and was automatically generated by FFC version 0.7.0.
4
// Warning: This code was generated with the option '-l dolfin'
5
// and contains DOLFIN-specific wrappers that depend on DOLFIN.
7
#ifndef __POISSON3DP3_H
8
#define __POISSON3DP3_H
15
/// This class defines the interface for a finite element.
17
class poisson3dp3_0_finite_element_0: public ufc::finite_element
22
poisson3dp3_0_finite_element_0() : ufc::finite_element()
28
virtual ~poisson3dp3_0_finite_element_0()
33
/// Return a string identifying the finite element
34
virtual const char* signature() const
36
return "FiniteElement('Lagrange', 'tetrahedron', 3)";
39
/// Return the cell shape
40
virtual ufc::shape cell_shape() const
42
return ufc::tetrahedron;
45
/// Return the dimension of the finite element function space
46
virtual unsigned int space_dimension() const
51
/// Return the rank of the value space
52
virtual unsigned int value_rank() const
57
/// Return the dimension of the value space for axis i
58
virtual unsigned int value_dimension(unsigned int i) const
63
/// Evaluate basis function i at given point in cell
64
virtual void evaluate_basis(unsigned int i,
66
const double* coordinates,
67
const ufc::cell& c) const
69
// Extract vertex coordinates
70
const double * const * element_coordinates = c.coordinates;
72
// Compute Jacobian of affine map from reference cell
73
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
74
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
75
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
76
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
77
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
78
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
79
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
80
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
81
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
83
// Compute sub determinants
84
const double d00 = J_11*J_22 - J_12*J_21;
85
const double d01 = J_12*J_20 - J_10*J_22;
86
const double d02 = J_10*J_21 - J_11*J_20;
88
const double d10 = J_02*J_21 - J_01*J_22;
89
const double d11 = J_00*J_22 - J_02*J_20;
90
const double d12 = J_01*J_20 - J_00*J_21;
92
const double d20 = J_01*J_12 - J_02*J_11;
93
const double d21 = J_02*J_10 - J_00*J_12;
94
const double d22 = J_00*J_11 - J_01*J_10;
96
// Compute determinant of Jacobian
97
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
99
// Compute inverse of Jacobian
102
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
103
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
104
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
106
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
107
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
108
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
110
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
111
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
112
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
114
// Get coordinates and map to the UFC reference element
115
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
116
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
117
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
119
// Map coordinates to the reference cube
120
if (std::abs(y + z - 1.0) < 1e-14)
123
x = -2.0 * x/(y + z - 1.0) - 1.0;
124
if (std::abs(z - 1.0) < 1e-14)
127
y = 2.0 * y/(1.0 - z) - 1.0;
133
// Map degree of freedom to element degree of freedom
134
const unsigned int dof = i;
137
const double scalings_y_0 = 1;
138
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
139
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
140
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
141
const double scalings_z_0 = 1;
142
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
143
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
144
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
146
// Compute psitilde_a
147
const double psitilde_a_0 = 1;
148
const double psitilde_a_1 = x;
149
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
150
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
152
// Compute psitilde_bs
153
const double psitilde_bs_0_0 = 1;
154
const double psitilde_bs_0_1 = 1.5*y + 0.5;
155
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
156
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
157
const double psitilde_bs_1_0 = 1;
158
const double psitilde_bs_1_1 = 2.5*y + 1.5;
159
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
160
const double psitilde_bs_2_0 = 1;
161
const double psitilde_bs_2_1 = 3.5*y + 2.5;
162
const double psitilde_bs_3_0 = 1;
164
// Compute psitilde_cs
165
const double psitilde_cs_00_0 = 1;
166
const double psitilde_cs_00_1 = 2*z + 1;
167
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
168
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
169
const double psitilde_cs_01_0 = 1;
170
const double psitilde_cs_01_1 = 3*z + 2;
171
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
172
const double psitilde_cs_02_0 = 1;
173
const double psitilde_cs_02_1 = 4*z + 3;
174
const double psitilde_cs_03_0 = 1;
175
const double psitilde_cs_10_0 = 1;
176
const double psitilde_cs_10_1 = 3*z + 2;
177
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
178
const double psitilde_cs_11_0 = 1;
179
const double psitilde_cs_11_1 = 4*z + 3;
180
const double psitilde_cs_12_0 = 1;
181
const double psitilde_cs_20_0 = 1;
182
const double psitilde_cs_20_1 = 4*z + 3;
183
const double psitilde_cs_21_0 = 1;
184
const double psitilde_cs_30_0 = 1;
186
// Compute basisvalues
187
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
188
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
189
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
190
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
191
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
192
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
193
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
194
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
195
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
196
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
197
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
198
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
199
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
200
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
201
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
202
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
203
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
204
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
205
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
206
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
208
// Table(s) of coefficients
209
static const double coefficients0[20][20] = \
210
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
211
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
212
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
213
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
214
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
215
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
216
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
217
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
218
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
219
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
220
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
221
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
222
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
223
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
224
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
225
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
226
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
227
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
228
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
229
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
231
// Extract relevant coefficients
232
const double coeff0_0 = coefficients0[dof][0];
233
const double coeff0_1 = coefficients0[dof][1];
234
const double coeff0_2 = coefficients0[dof][2];
235
const double coeff0_3 = coefficients0[dof][3];
236
const double coeff0_4 = coefficients0[dof][4];
237
const double coeff0_5 = coefficients0[dof][5];
238
const double coeff0_6 = coefficients0[dof][6];
239
const double coeff0_7 = coefficients0[dof][7];
240
const double coeff0_8 = coefficients0[dof][8];
241
const double coeff0_9 = coefficients0[dof][9];
242
const double coeff0_10 = coefficients0[dof][10];
243
const double coeff0_11 = coefficients0[dof][11];
244
const double coeff0_12 = coefficients0[dof][12];
245
const double coeff0_13 = coefficients0[dof][13];
246
const double coeff0_14 = coefficients0[dof][14];
247
const double coeff0_15 = coefficients0[dof][15];
248
const double coeff0_16 = coefficients0[dof][16];
249
const double coeff0_17 = coefficients0[dof][17];
250
const double coeff0_18 = coefficients0[dof][18];
251
const double coeff0_19 = coefficients0[dof][19];
254
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9 + coeff0_10*basisvalue10 + coeff0_11*basisvalue11 + coeff0_12*basisvalue12 + coeff0_13*basisvalue13 + coeff0_14*basisvalue14 + coeff0_15*basisvalue15 + coeff0_16*basisvalue16 + coeff0_17*basisvalue17 + coeff0_18*basisvalue18 + coeff0_19*basisvalue19;
257
/// Evaluate all basis functions at given point in cell
258
virtual void evaluate_basis_all(double* values,
259
const double* coordinates,
260
const ufc::cell& c) const
262
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
265
/// Evaluate order n derivatives of basis function i at given point in cell
266
virtual void evaluate_basis_derivatives(unsigned int i,
269
const double* coordinates,
270
const ufc::cell& c) const
272
// Extract vertex coordinates
273
const double * const * element_coordinates = c.coordinates;
275
// Compute Jacobian of affine map from reference cell
276
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
277
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
278
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
279
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
280
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
281
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
282
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
283
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
284
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
286
// Compute sub determinants
287
const double d00 = J_11*J_22 - J_12*J_21;
288
const double d01 = J_12*J_20 - J_10*J_22;
289
const double d02 = J_10*J_21 - J_11*J_20;
291
const double d10 = J_02*J_21 - J_01*J_22;
292
const double d11 = J_00*J_22 - J_02*J_20;
293
const double d12 = J_01*J_20 - J_00*J_21;
295
const double d20 = J_01*J_12 - J_02*J_11;
296
const double d21 = J_02*J_10 - J_00*J_12;
297
const double d22 = J_00*J_11 - J_01*J_10;
299
// Compute determinant of Jacobian
300
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
302
// Compute inverse of Jacobian
305
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
306
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
307
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
309
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
310
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
311
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
313
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
314
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
315
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
317
// Get coordinates and map to the UFC reference element
318
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
319
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
320
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
322
// Map coordinates to the reference cube
323
if (std::abs(y + z - 1.0) < 1e-14)
326
x = -2.0 * x/(y + z - 1.0) - 1.0;
327
if (std::abs(z - 1.0) < 1e-14)
330
y = 2.0 * y/(1.0 - z) - 1.0;
333
// Compute number of derivatives
334
unsigned int num_derivatives = 1;
336
for (unsigned int j = 0; j < n; j++)
337
num_derivatives *= 3;
340
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
341
unsigned int **combinations = new unsigned int *[num_derivatives];
343
for (unsigned int j = 0; j < num_derivatives; j++)
345
combinations[j] = new unsigned int [n];
346
for (unsigned int k = 0; k < n; k++)
347
combinations[j][k] = 0;
350
// Generate combinations of derivatives
351
for (unsigned int row = 1; row < num_derivatives; row++)
353
for (unsigned int num = 0; num < row; num++)
355
for (unsigned int col = n-1; col+1 > 0; col--)
357
if (combinations[row][col] + 1 > 2)
358
combinations[row][col] = 0;
361
combinations[row][col] += 1;
368
// Compute inverse of Jacobian
369
const double Jinv[3][3] ={{d00 / detJ, d10 / detJ, d20 / detJ}, {d01 / detJ, d11 / detJ, d21 / detJ}, {d02 / detJ, d12 / detJ, d22 / detJ}};
371
// Declare transformation matrix
372
// Declare pointer to two dimensional array and initialise
373
double **transform = new double *[num_derivatives];
375
for (unsigned int j = 0; j < num_derivatives; j++)
377
transform[j] = new double [num_derivatives];
378
for (unsigned int k = 0; k < num_derivatives; k++)
382
// Construct transformation matrix
383
for (unsigned int row = 0; row < num_derivatives; row++)
385
for (unsigned int col = 0; col < num_derivatives; col++)
387
for (unsigned int k = 0; k < n; k++)
388
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
393
for (unsigned int j = 0; j < 1*num_derivatives; j++)
396
// Map degree of freedom to element degree of freedom
397
const unsigned int dof = i;
400
const double scalings_y_0 = 1;
401
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
402
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
403
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
404
const double scalings_z_0 = 1;
405
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
406
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
407
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
409
// Compute psitilde_a
410
const double psitilde_a_0 = 1;
411
const double psitilde_a_1 = x;
412
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
413
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
415
// Compute psitilde_bs
416
const double psitilde_bs_0_0 = 1;
417
const double psitilde_bs_0_1 = 1.5*y + 0.5;
418
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
419
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
420
const double psitilde_bs_1_0 = 1;
421
const double psitilde_bs_1_1 = 2.5*y + 1.5;
422
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
423
const double psitilde_bs_2_0 = 1;
424
const double psitilde_bs_2_1 = 3.5*y + 2.5;
425
const double psitilde_bs_3_0 = 1;
427
// Compute psitilde_cs
428
const double psitilde_cs_00_0 = 1;
429
const double psitilde_cs_00_1 = 2*z + 1;
430
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
431
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
432
const double psitilde_cs_01_0 = 1;
433
const double psitilde_cs_01_1 = 3*z + 2;
434
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
435
const double psitilde_cs_02_0 = 1;
436
const double psitilde_cs_02_1 = 4*z + 3;
437
const double psitilde_cs_03_0 = 1;
438
const double psitilde_cs_10_0 = 1;
439
const double psitilde_cs_10_1 = 3*z + 2;
440
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
441
const double psitilde_cs_11_0 = 1;
442
const double psitilde_cs_11_1 = 4*z + 3;
443
const double psitilde_cs_12_0 = 1;
444
const double psitilde_cs_20_0 = 1;
445
const double psitilde_cs_20_1 = 4*z + 3;
446
const double psitilde_cs_21_0 = 1;
447
const double psitilde_cs_30_0 = 1;
449
// Compute basisvalues
450
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
451
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
452
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
453
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
454
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
455
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
456
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
457
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
458
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
459
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
460
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
461
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
462
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
463
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
464
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
465
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
466
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
467
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
468
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
469
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
471
// Table(s) of coefficients
472
static const double coefficients0[20][20] = \
473
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
474
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
475
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
476
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
477
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
478
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
479
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
480
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
481
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
482
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
483
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
484
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
485
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
486
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
487
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
488
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
489
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
490
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
491
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
492
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
494
// Interesting (new) part
495
// Tables of derivatives of the polynomial base (transpose)
496
static const double dmats0[20][20] = \
497
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
498
{6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
499
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
500
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
501
{0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
502
{4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
503
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
504
{3.74165738677394, 0, 0, 8.69482604771367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
505
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
506
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
507
{5.49909083394701, 0, -3.3466401061363, -2.36643191323985, 15.4919333848297, 0, 0.69282032302755, 0, 0.565685424949241, 0.400000000000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
508
{0, 4.89897948556636, 0, 0, 0, 14.1985914794391, 0, -0.82807867121083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
509
{3.6, 0, 8.76356092008267, -1.54919333848297, 0, 0, 9.52470471983253, 0, -1.48131215963609, 0.261861468283192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
510
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
511
{0, 4.24264068711928, 0, 0, 0, 0, 0, 14.3427433120127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
512
{3.11769145362398, 0, 3.16227766016838, 4.91934955049954, 0, 0, 0, 0, 10.690449676497, -2.41897262725906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
513
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
514
{2.54558441227157, 0, 0, 7.66811580507233, 0, 0, 0, 0, 0, 10.3691851174526, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
515
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
516
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
518
static const double dmats1[20][20] = \
519
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
520
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
521
{5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
522
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
523
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
524
{2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
525
{-2.64575131106459, 0, 9.66091783079296, 0.683130051063971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
526
{1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
527
{3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
528
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
529
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
530
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 9.16515138991168, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
531
{1.8, -5.69209978830308, 4.38178046004133, -0.774596669241485, 0, 10.998181667894, 4.76235235991626, 0.962140470884725, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
532
{5.19615242270664, 0, -3.16227766016838, -2.23606797749979, 0, 0, 13.7477270848675, 0, 0.534522483824851, 0.377964473009229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
533
{2.01246117974981, 2.12132034355964, -0.408248290463861, 3.17542648054294, 0, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
534
{1.55884572681199, 2.73861278752583, 1.58113883008419, 2.45967477524977, 0, 0, 0, 9.25820099772552, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
535
{-1.8, 0, 3.65148371670111, -2.84018778721878, 0, 0, 0, 0, 12.3442679969674, 1.39659449751035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
536
{1.27279220613579, 0, 0, 3.83405790253617, 0, 0, 0, 0, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
537
{2.20454076850486, 0, 0, 6.6407830863536, 0, 0, 0, 0, 0, 8.97997772825746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
538
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
540
static const double dmats2[20][20] = \
541
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
542
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
543
{1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
544
{5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
545
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
546
{2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
547
{1.32287565553229, 0, 3.86436713231719, -0.341565025531988, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
548
{1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
549
{1.08012344973464, 0, 7.09929573971954, 2.50998007960222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
550
{-3.81881307912986, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
551
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
552
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 1.30930734141595, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
553
{1.8, 0.632455532033674, 4.38178046004133, -0.774596669241485, 0, 3.14233761939829, 4.76235235991626, -0.10690449676497, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
554
{1.03923048454133, 0, 3.16227766016838, -0.44721359549996, 0, 0, 5.8918830363718, 0, -0.53452248382485, 0.0755928946018458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
555
{2.01246117974981, 2.12132034355964, -0.408248290463862, 3.17542648054295, 9.07114735222145, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
556
{1.55884572681199, 0.547722557505165, 1.58113883008419, 2.45967477524977, 0, 9.07114735222145, 0, 1.8516401995451, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
557
{0.900000000000001, 0, 1.46059348668044, 1.42009389360939, 0, 0, 9.07114735222145, 0, 4.93770719878694, -0.698297248755176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
558
{1.27279220613578, -6.26099033699941, 0, 3.83405790253617, 0, 0, 0, 10.5830052442584, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
559
{0.734846922834953, 0, -6.26099033699942, 2.21359436211787, 0, 0, 0, 0, 10.5830052442584, 2.99332590941915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
560
{5.71576766497729, 0, 0, -4.69574275274956, 0, 0, 0, 0, 0, 12.69960629311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
562
// Compute reference derivatives
563
// Declare pointer to array of derivatives on FIAT element
564
double *derivatives = new double [num_derivatives];
566
// Declare coefficients
577
double coeff0_10 = 0;
578
double coeff0_11 = 0;
579
double coeff0_12 = 0;
580
double coeff0_13 = 0;
581
double coeff0_14 = 0;
582
double coeff0_15 = 0;
583
double coeff0_16 = 0;
584
double coeff0_17 = 0;
585
double coeff0_18 = 0;
586
double coeff0_19 = 0;
588
// Declare new coefficients
589
double new_coeff0_0 = 0;
590
double new_coeff0_1 = 0;
591
double new_coeff0_2 = 0;
592
double new_coeff0_3 = 0;
593
double new_coeff0_4 = 0;
594
double new_coeff0_5 = 0;
595
double new_coeff0_6 = 0;
596
double new_coeff0_7 = 0;
597
double new_coeff0_8 = 0;
598
double new_coeff0_9 = 0;
599
double new_coeff0_10 = 0;
600
double new_coeff0_11 = 0;
601
double new_coeff0_12 = 0;
602
double new_coeff0_13 = 0;
603
double new_coeff0_14 = 0;
604
double new_coeff0_15 = 0;
605
double new_coeff0_16 = 0;
606
double new_coeff0_17 = 0;
607
double new_coeff0_18 = 0;
608
double new_coeff0_19 = 0;
610
// Loop possible derivatives
611
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
613
// Get values from coefficients array
614
new_coeff0_0 = coefficients0[dof][0];
615
new_coeff0_1 = coefficients0[dof][1];
616
new_coeff0_2 = coefficients0[dof][2];
617
new_coeff0_3 = coefficients0[dof][3];
618
new_coeff0_4 = coefficients0[dof][4];
619
new_coeff0_5 = coefficients0[dof][5];
620
new_coeff0_6 = coefficients0[dof][6];
621
new_coeff0_7 = coefficients0[dof][7];
622
new_coeff0_8 = coefficients0[dof][8];
623
new_coeff0_9 = coefficients0[dof][9];
624
new_coeff0_10 = coefficients0[dof][10];
625
new_coeff0_11 = coefficients0[dof][11];
626
new_coeff0_12 = coefficients0[dof][12];
627
new_coeff0_13 = coefficients0[dof][13];
628
new_coeff0_14 = coefficients0[dof][14];
629
new_coeff0_15 = coefficients0[dof][15];
630
new_coeff0_16 = coefficients0[dof][16];
631
new_coeff0_17 = coefficients0[dof][17];
632
new_coeff0_18 = coefficients0[dof][18];
633
new_coeff0_19 = coefficients0[dof][19];
635
// Loop derivative order
636
for (unsigned int j = 0; j < n; j++)
638
// Update old coefficients
639
coeff0_0 = new_coeff0_0;
640
coeff0_1 = new_coeff0_1;
641
coeff0_2 = new_coeff0_2;
642
coeff0_3 = new_coeff0_3;
643
coeff0_4 = new_coeff0_4;
644
coeff0_5 = new_coeff0_5;
645
coeff0_6 = new_coeff0_6;
646
coeff0_7 = new_coeff0_7;
647
coeff0_8 = new_coeff0_8;
648
coeff0_9 = new_coeff0_9;
649
coeff0_10 = new_coeff0_10;
650
coeff0_11 = new_coeff0_11;
651
coeff0_12 = new_coeff0_12;
652
coeff0_13 = new_coeff0_13;
653
coeff0_14 = new_coeff0_14;
654
coeff0_15 = new_coeff0_15;
655
coeff0_16 = new_coeff0_16;
656
coeff0_17 = new_coeff0_17;
657
coeff0_18 = new_coeff0_18;
658
coeff0_19 = new_coeff0_19;
660
if(combinations[deriv_num][j] == 0)
662
new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0] + coeff0_10*dmats0[10][0] + coeff0_11*dmats0[11][0] + coeff0_12*dmats0[12][0] + coeff0_13*dmats0[13][0] + coeff0_14*dmats0[14][0] + coeff0_15*dmats0[15][0] + coeff0_16*dmats0[16][0] + coeff0_17*dmats0[17][0] + coeff0_18*dmats0[18][0] + coeff0_19*dmats0[19][0];
663
new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1] + coeff0_10*dmats0[10][1] + coeff0_11*dmats0[11][1] + coeff0_12*dmats0[12][1] + coeff0_13*dmats0[13][1] + coeff0_14*dmats0[14][1] + coeff0_15*dmats0[15][1] + coeff0_16*dmats0[16][1] + coeff0_17*dmats0[17][1] + coeff0_18*dmats0[18][1] + coeff0_19*dmats0[19][1];
664
new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2] + coeff0_10*dmats0[10][2] + coeff0_11*dmats0[11][2] + coeff0_12*dmats0[12][2] + coeff0_13*dmats0[13][2] + coeff0_14*dmats0[14][2] + coeff0_15*dmats0[15][2] + coeff0_16*dmats0[16][2] + coeff0_17*dmats0[17][2] + coeff0_18*dmats0[18][2] + coeff0_19*dmats0[19][2];
665
new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3] + coeff0_10*dmats0[10][3] + coeff0_11*dmats0[11][3] + coeff0_12*dmats0[12][3] + coeff0_13*dmats0[13][3] + coeff0_14*dmats0[14][3] + coeff0_15*dmats0[15][3] + coeff0_16*dmats0[16][3] + coeff0_17*dmats0[17][3] + coeff0_18*dmats0[18][3] + coeff0_19*dmats0[19][3];
666
new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4] + coeff0_10*dmats0[10][4] + coeff0_11*dmats0[11][4] + coeff0_12*dmats0[12][4] + coeff0_13*dmats0[13][4] + coeff0_14*dmats0[14][4] + coeff0_15*dmats0[15][4] + coeff0_16*dmats0[16][4] + coeff0_17*dmats0[17][4] + coeff0_18*dmats0[18][4] + coeff0_19*dmats0[19][4];
667
new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5] + coeff0_10*dmats0[10][5] + coeff0_11*dmats0[11][5] + coeff0_12*dmats0[12][5] + coeff0_13*dmats0[13][5] + coeff0_14*dmats0[14][5] + coeff0_15*dmats0[15][5] + coeff0_16*dmats0[16][5] + coeff0_17*dmats0[17][5] + coeff0_18*dmats0[18][5] + coeff0_19*dmats0[19][5];
668
new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6] + coeff0_10*dmats0[10][6] + coeff0_11*dmats0[11][6] + coeff0_12*dmats0[12][6] + coeff0_13*dmats0[13][6] + coeff0_14*dmats0[14][6] + coeff0_15*dmats0[15][6] + coeff0_16*dmats0[16][6] + coeff0_17*dmats0[17][6] + coeff0_18*dmats0[18][6] + coeff0_19*dmats0[19][6];
669
new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7] + coeff0_10*dmats0[10][7] + coeff0_11*dmats0[11][7] + coeff0_12*dmats0[12][7] + coeff0_13*dmats0[13][7] + coeff0_14*dmats0[14][7] + coeff0_15*dmats0[15][7] + coeff0_16*dmats0[16][7] + coeff0_17*dmats0[17][7] + coeff0_18*dmats0[18][7] + coeff0_19*dmats0[19][7];
670
new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8] + coeff0_10*dmats0[10][8] + coeff0_11*dmats0[11][8] + coeff0_12*dmats0[12][8] + coeff0_13*dmats0[13][8] + coeff0_14*dmats0[14][8] + coeff0_15*dmats0[15][8] + coeff0_16*dmats0[16][8] + coeff0_17*dmats0[17][8] + coeff0_18*dmats0[18][8] + coeff0_19*dmats0[19][8];
671
new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9] + coeff0_10*dmats0[10][9] + coeff0_11*dmats0[11][9] + coeff0_12*dmats0[12][9] + coeff0_13*dmats0[13][9] + coeff0_14*dmats0[14][9] + coeff0_15*dmats0[15][9] + coeff0_16*dmats0[16][9] + coeff0_17*dmats0[17][9] + coeff0_18*dmats0[18][9] + coeff0_19*dmats0[19][9];
672
new_coeff0_10 = coeff0_0*dmats0[0][10] + coeff0_1*dmats0[1][10] + coeff0_2*dmats0[2][10] + coeff0_3*dmats0[3][10] + coeff0_4*dmats0[4][10] + coeff0_5*dmats0[5][10] + coeff0_6*dmats0[6][10] + coeff0_7*dmats0[7][10] + coeff0_8*dmats0[8][10] + coeff0_9*dmats0[9][10] + coeff0_10*dmats0[10][10] + coeff0_11*dmats0[11][10] + coeff0_12*dmats0[12][10] + coeff0_13*dmats0[13][10] + coeff0_14*dmats0[14][10] + coeff0_15*dmats0[15][10] + coeff0_16*dmats0[16][10] + coeff0_17*dmats0[17][10] + coeff0_18*dmats0[18][10] + coeff0_19*dmats0[19][10];
673
new_coeff0_11 = coeff0_0*dmats0[0][11] + coeff0_1*dmats0[1][11] + coeff0_2*dmats0[2][11] + coeff0_3*dmats0[3][11] + coeff0_4*dmats0[4][11] + coeff0_5*dmats0[5][11] + coeff0_6*dmats0[6][11] + coeff0_7*dmats0[7][11] + coeff0_8*dmats0[8][11] + coeff0_9*dmats0[9][11] + coeff0_10*dmats0[10][11] + coeff0_11*dmats0[11][11] + coeff0_12*dmats0[12][11] + coeff0_13*dmats0[13][11] + coeff0_14*dmats0[14][11] + coeff0_15*dmats0[15][11] + coeff0_16*dmats0[16][11] + coeff0_17*dmats0[17][11] + coeff0_18*dmats0[18][11] + coeff0_19*dmats0[19][11];
674
new_coeff0_12 = coeff0_0*dmats0[0][12] + coeff0_1*dmats0[1][12] + coeff0_2*dmats0[2][12] + coeff0_3*dmats0[3][12] + coeff0_4*dmats0[4][12] + coeff0_5*dmats0[5][12] + coeff0_6*dmats0[6][12] + coeff0_7*dmats0[7][12] + coeff0_8*dmats0[8][12] + coeff0_9*dmats0[9][12] + coeff0_10*dmats0[10][12] + coeff0_11*dmats0[11][12] + coeff0_12*dmats0[12][12] + coeff0_13*dmats0[13][12] + coeff0_14*dmats0[14][12] + coeff0_15*dmats0[15][12] + coeff0_16*dmats0[16][12] + coeff0_17*dmats0[17][12] + coeff0_18*dmats0[18][12] + coeff0_19*dmats0[19][12];
675
new_coeff0_13 = coeff0_0*dmats0[0][13] + coeff0_1*dmats0[1][13] + coeff0_2*dmats0[2][13] + coeff0_3*dmats0[3][13] + coeff0_4*dmats0[4][13] + coeff0_5*dmats0[5][13] + coeff0_6*dmats0[6][13] + coeff0_7*dmats0[7][13] + coeff0_8*dmats0[8][13] + coeff0_9*dmats0[9][13] + coeff0_10*dmats0[10][13] + coeff0_11*dmats0[11][13] + coeff0_12*dmats0[12][13] + coeff0_13*dmats0[13][13] + coeff0_14*dmats0[14][13] + coeff0_15*dmats0[15][13] + coeff0_16*dmats0[16][13] + coeff0_17*dmats0[17][13] + coeff0_18*dmats0[18][13] + coeff0_19*dmats0[19][13];
676
new_coeff0_14 = coeff0_0*dmats0[0][14] + coeff0_1*dmats0[1][14] + coeff0_2*dmats0[2][14] + coeff0_3*dmats0[3][14] + coeff0_4*dmats0[4][14] + coeff0_5*dmats0[5][14] + coeff0_6*dmats0[6][14] + coeff0_7*dmats0[7][14] + coeff0_8*dmats0[8][14] + coeff0_9*dmats0[9][14] + coeff0_10*dmats0[10][14] + coeff0_11*dmats0[11][14] + coeff0_12*dmats0[12][14] + coeff0_13*dmats0[13][14] + coeff0_14*dmats0[14][14] + coeff0_15*dmats0[15][14] + coeff0_16*dmats0[16][14] + coeff0_17*dmats0[17][14] + coeff0_18*dmats0[18][14] + coeff0_19*dmats0[19][14];
677
new_coeff0_15 = coeff0_0*dmats0[0][15] + coeff0_1*dmats0[1][15] + coeff0_2*dmats0[2][15] + coeff0_3*dmats0[3][15] + coeff0_4*dmats0[4][15] + coeff0_5*dmats0[5][15] + coeff0_6*dmats0[6][15] + coeff0_7*dmats0[7][15] + coeff0_8*dmats0[8][15] + coeff0_9*dmats0[9][15] + coeff0_10*dmats0[10][15] + coeff0_11*dmats0[11][15] + coeff0_12*dmats0[12][15] + coeff0_13*dmats0[13][15] + coeff0_14*dmats0[14][15] + coeff0_15*dmats0[15][15] + coeff0_16*dmats0[16][15] + coeff0_17*dmats0[17][15] + coeff0_18*dmats0[18][15] + coeff0_19*dmats0[19][15];
678
new_coeff0_16 = coeff0_0*dmats0[0][16] + coeff0_1*dmats0[1][16] + coeff0_2*dmats0[2][16] + coeff0_3*dmats0[3][16] + coeff0_4*dmats0[4][16] + coeff0_5*dmats0[5][16] + coeff0_6*dmats0[6][16] + coeff0_7*dmats0[7][16] + coeff0_8*dmats0[8][16] + coeff0_9*dmats0[9][16] + coeff0_10*dmats0[10][16] + coeff0_11*dmats0[11][16] + coeff0_12*dmats0[12][16] + coeff0_13*dmats0[13][16] + coeff0_14*dmats0[14][16] + coeff0_15*dmats0[15][16] + coeff0_16*dmats0[16][16] + coeff0_17*dmats0[17][16] + coeff0_18*dmats0[18][16] + coeff0_19*dmats0[19][16];
679
new_coeff0_17 = coeff0_0*dmats0[0][17] + coeff0_1*dmats0[1][17] + coeff0_2*dmats0[2][17] + coeff0_3*dmats0[3][17] + coeff0_4*dmats0[4][17] + coeff0_5*dmats0[5][17] + coeff0_6*dmats0[6][17] + coeff0_7*dmats0[7][17] + coeff0_8*dmats0[8][17] + coeff0_9*dmats0[9][17] + coeff0_10*dmats0[10][17] + coeff0_11*dmats0[11][17] + coeff0_12*dmats0[12][17] + coeff0_13*dmats0[13][17] + coeff0_14*dmats0[14][17] + coeff0_15*dmats0[15][17] + coeff0_16*dmats0[16][17] + coeff0_17*dmats0[17][17] + coeff0_18*dmats0[18][17] + coeff0_19*dmats0[19][17];
680
new_coeff0_18 = coeff0_0*dmats0[0][18] + coeff0_1*dmats0[1][18] + coeff0_2*dmats0[2][18] + coeff0_3*dmats0[3][18] + coeff0_4*dmats0[4][18] + coeff0_5*dmats0[5][18] + coeff0_6*dmats0[6][18] + coeff0_7*dmats0[7][18] + coeff0_8*dmats0[8][18] + coeff0_9*dmats0[9][18] + coeff0_10*dmats0[10][18] + coeff0_11*dmats0[11][18] + coeff0_12*dmats0[12][18] + coeff0_13*dmats0[13][18] + coeff0_14*dmats0[14][18] + coeff0_15*dmats0[15][18] + coeff0_16*dmats0[16][18] + coeff0_17*dmats0[17][18] + coeff0_18*dmats0[18][18] + coeff0_19*dmats0[19][18];
681
new_coeff0_19 = coeff0_0*dmats0[0][19] + coeff0_1*dmats0[1][19] + coeff0_2*dmats0[2][19] + coeff0_3*dmats0[3][19] + coeff0_4*dmats0[4][19] + coeff0_5*dmats0[5][19] + coeff0_6*dmats0[6][19] + coeff0_7*dmats0[7][19] + coeff0_8*dmats0[8][19] + coeff0_9*dmats0[9][19] + coeff0_10*dmats0[10][19] + coeff0_11*dmats0[11][19] + coeff0_12*dmats0[12][19] + coeff0_13*dmats0[13][19] + coeff0_14*dmats0[14][19] + coeff0_15*dmats0[15][19] + coeff0_16*dmats0[16][19] + coeff0_17*dmats0[17][19] + coeff0_18*dmats0[18][19] + coeff0_19*dmats0[19][19];
683
if(combinations[deriv_num][j] == 1)
685
new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0] + coeff0_10*dmats1[10][0] + coeff0_11*dmats1[11][0] + coeff0_12*dmats1[12][0] + coeff0_13*dmats1[13][0] + coeff0_14*dmats1[14][0] + coeff0_15*dmats1[15][0] + coeff0_16*dmats1[16][0] + coeff0_17*dmats1[17][0] + coeff0_18*dmats1[18][0] + coeff0_19*dmats1[19][0];
686
new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1] + coeff0_10*dmats1[10][1] + coeff0_11*dmats1[11][1] + coeff0_12*dmats1[12][1] + coeff0_13*dmats1[13][1] + coeff0_14*dmats1[14][1] + coeff0_15*dmats1[15][1] + coeff0_16*dmats1[16][1] + coeff0_17*dmats1[17][1] + coeff0_18*dmats1[18][1] + coeff0_19*dmats1[19][1];
687
new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2] + coeff0_10*dmats1[10][2] + coeff0_11*dmats1[11][2] + coeff0_12*dmats1[12][2] + coeff0_13*dmats1[13][2] + coeff0_14*dmats1[14][2] + coeff0_15*dmats1[15][2] + coeff0_16*dmats1[16][2] + coeff0_17*dmats1[17][2] + coeff0_18*dmats1[18][2] + coeff0_19*dmats1[19][2];
688
new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3] + coeff0_10*dmats1[10][3] + coeff0_11*dmats1[11][3] + coeff0_12*dmats1[12][3] + coeff0_13*dmats1[13][3] + coeff0_14*dmats1[14][3] + coeff0_15*dmats1[15][3] + coeff0_16*dmats1[16][3] + coeff0_17*dmats1[17][3] + coeff0_18*dmats1[18][3] + coeff0_19*dmats1[19][3];
689
new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4] + coeff0_10*dmats1[10][4] + coeff0_11*dmats1[11][4] + coeff0_12*dmats1[12][4] + coeff0_13*dmats1[13][4] + coeff0_14*dmats1[14][4] + coeff0_15*dmats1[15][4] + coeff0_16*dmats1[16][4] + coeff0_17*dmats1[17][4] + coeff0_18*dmats1[18][4] + coeff0_19*dmats1[19][4];
690
new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5] + coeff0_10*dmats1[10][5] + coeff0_11*dmats1[11][5] + coeff0_12*dmats1[12][5] + coeff0_13*dmats1[13][5] + coeff0_14*dmats1[14][5] + coeff0_15*dmats1[15][5] + coeff0_16*dmats1[16][5] + coeff0_17*dmats1[17][5] + coeff0_18*dmats1[18][5] + coeff0_19*dmats1[19][5];
691
new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6] + coeff0_10*dmats1[10][6] + coeff0_11*dmats1[11][6] + coeff0_12*dmats1[12][6] + coeff0_13*dmats1[13][6] + coeff0_14*dmats1[14][6] + coeff0_15*dmats1[15][6] + coeff0_16*dmats1[16][6] + coeff0_17*dmats1[17][6] + coeff0_18*dmats1[18][6] + coeff0_19*dmats1[19][6];
692
new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7] + coeff0_10*dmats1[10][7] + coeff0_11*dmats1[11][7] + coeff0_12*dmats1[12][7] + coeff0_13*dmats1[13][7] + coeff0_14*dmats1[14][7] + coeff0_15*dmats1[15][7] + coeff0_16*dmats1[16][7] + coeff0_17*dmats1[17][7] + coeff0_18*dmats1[18][7] + coeff0_19*dmats1[19][7];
693
new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8] + coeff0_10*dmats1[10][8] + coeff0_11*dmats1[11][8] + coeff0_12*dmats1[12][8] + coeff0_13*dmats1[13][8] + coeff0_14*dmats1[14][8] + coeff0_15*dmats1[15][8] + coeff0_16*dmats1[16][8] + coeff0_17*dmats1[17][8] + coeff0_18*dmats1[18][8] + coeff0_19*dmats1[19][8];
694
new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9] + coeff0_10*dmats1[10][9] + coeff0_11*dmats1[11][9] + coeff0_12*dmats1[12][9] + coeff0_13*dmats1[13][9] + coeff0_14*dmats1[14][9] + coeff0_15*dmats1[15][9] + coeff0_16*dmats1[16][9] + coeff0_17*dmats1[17][9] + coeff0_18*dmats1[18][9] + coeff0_19*dmats1[19][9];
695
new_coeff0_10 = coeff0_0*dmats1[0][10] + coeff0_1*dmats1[1][10] + coeff0_2*dmats1[2][10] + coeff0_3*dmats1[3][10] + coeff0_4*dmats1[4][10] + coeff0_5*dmats1[5][10] + coeff0_6*dmats1[6][10] + coeff0_7*dmats1[7][10] + coeff0_8*dmats1[8][10] + coeff0_9*dmats1[9][10] + coeff0_10*dmats1[10][10] + coeff0_11*dmats1[11][10] + coeff0_12*dmats1[12][10] + coeff0_13*dmats1[13][10] + coeff0_14*dmats1[14][10] + coeff0_15*dmats1[15][10] + coeff0_16*dmats1[16][10] + coeff0_17*dmats1[17][10] + coeff0_18*dmats1[18][10] + coeff0_19*dmats1[19][10];
696
new_coeff0_11 = coeff0_0*dmats1[0][11] + coeff0_1*dmats1[1][11] + coeff0_2*dmats1[2][11] + coeff0_3*dmats1[3][11] + coeff0_4*dmats1[4][11] + coeff0_5*dmats1[5][11] + coeff0_6*dmats1[6][11] + coeff0_7*dmats1[7][11] + coeff0_8*dmats1[8][11] + coeff0_9*dmats1[9][11] + coeff0_10*dmats1[10][11] + coeff0_11*dmats1[11][11] + coeff0_12*dmats1[12][11] + coeff0_13*dmats1[13][11] + coeff0_14*dmats1[14][11] + coeff0_15*dmats1[15][11] + coeff0_16*dmats1[16][11] + coeff0_17*dmats1[17][11] + coeff0_18*dmats1[18][11] + coeff0_19*dmats1[19][11];
697
new_coeff0_12 = coeff0_0*dmats1[0][12] + coeff0_1*dmats1[1][12] + coeff0_2*dmats1[2][12] + coeff0_3*dmats1[3][12] + coeff0_4*dmats1[4][12] + coeff0_5*dmats1[5][12] + coeff0_6*dmats1[6][12] + coeff0_7*dmats1[7][12] + coeff0_8*dmats1[8][12] + coeff0_9*dmats1[9][12] + coeff0_10*dmats1[10][12] + coeff0_11*dmats1[11][12] + coeff0_12*dmats1[12][12] + coeff0_13*dmats1[13][12] + coeff0_14*dmats1[14][12] + coeff0_15*dmats1[15][12] + coeff0_16*dmats1[16][12] + coeff0_17*dmats1[17][12] + coeff0_18*dmats1[18][12] + coeff0_19*dmats1[19][12];
698
new_coeff0_13 = coeff0_0*dmats1[0][13] + coeff0_1*dmats1[1][13] + coeff0_2*dmats1[2][13] + coeff0_3*dmats1[3][13] + coeff0_4*dmats1[4][13] + coeff0_5*dmats1[5][13] + coeff0_6*dmats1[6][13] + coeff0_7*dmats1[7][13] + coeff0_8*dmats1[8][13] + coeff0_9*dmats1[9][13] + coeff0_10*dmats1[10][13] + coeff0_11*dmats1[11][13] + coeff0_12*dmats1[12][13] + coeff0_13*dmats1[13][13] + coeff0_14*dmats1[14][13] + coeff0_15*dmats1[15][13] + coeff0_16*dmats1[16][13] + coeff0_17*dmats1[17][13] + coeff0_18*dmats1[18][13] + coeff0_19*dmats1[19][13];
699
new_coeff0_14 = coeff0_0*dmats1[0][14] + coeff0_1*dmats1[1][14] + coeff0_2*dmats1[2][14] + coeff0_3*dmats1[3][14] + coeff0_4*dmats1[4][14] + coeff0_5*dmats1[5][14] + coeff0_6*dmats1[6][14] + coeff0_7*dmats1[7][14] + coeff0_8*dmats1[8][14] + coeff0_9*dmats1[9][14] + coeff0_10*dmats1[10][14] + coeff0_11*dmats1[11][14] + coeff0_12*dmats1[12][14] + coeff0_13*dmats1[13][14] + coeff0_14*dmats1[14][14] + coeff0_15*dmats1[15][14] + coeff0_16*dmats1[16][14] + coeff0_17*dmats1[17][14] + coeff0_18*dmats1[18][14] + coeff0_19*dmats1[19][14];
700
new_coeff0_15 = coeff0_0*dmats1[0][15] + coeff0_1*dmats1[1][15] + coeff0_2*dmats1[2][15] + coeff0_3*dmats1[3][15] + coeff0_4*dmats1[4][15] + coeff0_5*dmats1[5][15] + coeff0_6*dmats1[6][15] + coeff0_7*dmats1[7][15] + coeff0_8*dmats1[8][15] + coeff0_9*dmats1[9][15] + coeff0_10*dmats1[10][15] + coeff0_11*dmats1[11][15] + coeff0_12*dmats1[12][15] + coeff0_13*dmats1[13][15] + coeff0_14*dmats1[14][15] + coeff0_15*dmats1[15][15] + coeff0_16*dmats1[16][15] + coeff0_17*dmats1[17][15] + coeff0_18*dmats1[18][15] + coeff0_19*dmats1[19][15];
701
new_coeff0_16 = coeff0_0*dmats1[0][16] + coeff0_1*dmats1[1][16] + coeff0_2*dmats1[2][16] + coeff0_3*dmats1[3][16] + coeff0_4*dmats1[4][16] + coeff0_5*dmats1[5][16] + coeff0_6*dmats1[6][16] + coeff0_7*dmats1[7][16] + coeff0_8*dmats1[8][16] + coeff0_9*dmats1[9][16] + coeff0_10*dmats1[10][16] + coeff0_11*dmats1[11][16] + coeff0_12*dmats1[12][16] + coeff0_13*dmats1[13][16] + coeff0_14*dmats1[14][16] + coeff0_15*dmats1[15][16] + coeff0_16*dmats1[16][16] + coeff0_17*dmats1[17][16] + coeff0_18*dmats1[18][16] + coeff0_19*dmats1[19][16];
702
new_coeff0_17 = coeff0_0*dmats1[0][17] + coeff0_1*dmats1[1][17] + coeff0_2*dmats1[2][17] + coeff0_3*dmats1[3][17] + coeff0_4*dmats1[4][17] + coeff0_5*dmats1[5][17] + coeff0_6*dmats1[6][17] + coeff0_7*dmats1[7][17] + coeff0_8*dmats1[8][17] + coeff0_9*dmats1[9][17] + coeff0_10*dmats1[10][17] + coeff0_11*dmats1[11][17] + coeff0_12*dmats1[12][17] + coeff0_13*dmats1[13][17] + coeff0_14*dmats1[14][17] + coeff0_15*dmats1[15][17] + coeff0_16*dmats1[16][17] + coeff0_17*dmats1[17][17] + coeff0_18*dmats1[18][17] + coeff0_19*dmats1[19][17];
703
new_coeff0_18 = coeff0_0*dmats1[0][18] + coeff0_1*dmats1[1][18] + coeff0_2*dmats1[2][18] + coeff0_3*dmats1[3][18] + coeff0_4*dmats1[4][18] + coeff0_5*dmats1[5][18] + coeff0_6*dmats1[6][18] + coeff0_7*dmats1[7][18] + coeff0_8*dmats1[8][18] + coeff0_9*dmats1[9][18] + coeff0_10*dmats1[10][18] + coeff0_11*dmats1[11][18] + coeff0_12*dmats1[12][18] + coeff0_13*dmats1[13][18] + coeff0_14*dmats1[14][18] + coeff0_15*dmats1[15][18] + coeff0_16*dmats1[16][18] + coeff0_17*dmats1[17][18] + coeff0_18*dmats1[18][18] + coeff0_19*dmats1[19][18];
704
new_coeff0_19 = coeff0_0*dmats1[0][19] + coeff0_1*dmats1[1][19] + coeff0_2*dmats1[2][19] + coeff0_3*dmats1[3][19] + coeff0_4*dmats1[4][19] + coeff0_5*dmats1[5][19] + coeff0_6*dmats1[6][19] + coeff0_7*dmats1[7][19] + coeff0_8*dmats1[8][19] + coeff0_9*dmats1[9][19] + coeff0_10*dmats1[10][19] + coeff0_11*dmats1[11][19] + coeff0_12*dmats1[12][19] + coeff0_13*dmats1[13][19] + coeff0_14*dmats1[14][19] + coeff0_15*dmats1[15][19] + coeff0_16*dmats1[16][19] + coeff0_17*dmats1[17][19] + coeff0_18*dmats1[18][19] + coeff0_19*dmats1[19][19];
706
if(combinations[deriv_num][j] == 2)
708
new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0] + coeff0_10*dmats2[10][0] + coeff0_11*dmats2[11][0] + coeff0_12*dmats2[12][0] + coeff0_13*dmats2[13][0] + coeff0_14*dmats2[14][0] + coeff0_15*dmats2[15][0] + coeff0_16*dmats2[16][0] + coeff0_17*dmats2[17][0] + coeff0_18*dmats2[18][0] + coeff0_19*dmats2[19][0];
709
new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1] + coeff0_10*dmats2[10][1] + coeff0_11*dmats2[11][1] + coeff0_12*dmats2[12][1] + coeff0_13*dmats2[13][1] + coeff0_14*dmats2[14][1] + coeff0_15*dmats2[15][1] + coeff0_16*dmats2[16][1] + coeff0_17*dmats2[17][1] + coeff0_18*dmats2[18][1] + coeff0_19*dmats2[19][1];
710
new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2] + coeff0_10*dmats2[10][2] + coeff0_11*dmats2[11][2] + coeff0_12*dmats2[12][2] + coeff0_13*dmats2[13][2] + coeff0_14*dmats2[14][2] + coeff0_15*dmats2[15][2] + coeff0_16*dmats2[16][2] + coeff0_17*dmats2[17][2] + coeff0_18*dmats2[18][2] + coeff0_19*dmats2[19][2];
711
new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3] + coeff0_10*dmats2[10][3] + coeff0_11*dmats2[11][3] + coeff0_12*dmats2[12][3] + coeff0_13*dmats2[13][3] + coeff0_14*dmats2[14][3] + coeff0_15*dmats2[15][3] + coeff0_16*dmats2[16][3] + coeff0_17*dmats2[17][3] + coeff0_18*dmats2[18][3] + coeff0_19*dmats2[19][3];
712
new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4] + coeff0_10*dmats2[10][4] + coeff0_11*dmats2[11][4] + coeff0_12*dmats2[12][4] + coeff0_13*dmats2[13][4] + coeff0_14*dmats2[14][4] + coeff0_15*dmats2[15][4] + coeff0_16*dmats2[16][4] + coeff0_17*dmats2[17][4] + coeff0_18*dmats2[18][4] + coeff0_19*dmats2[19][4];
713
new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5] + coeff0_10*dmats2[10][5] + coeff0_11*dmats2[11][5] + coeff0_12*dmats2[12][5] + coeff0_13*dmats2[13][5] + coeff0_14*dmats2[14][5] + coeff0_15*dmats2[15][5] + coeff0_16*dmats2[16][5] + coeff0_17*dmats2[17][5] + coeff0_18*dmats2[18][5] + coeff0_19*dmats2[19][5];
714
new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6] + coeff0_10*dmats2[10][6] + coeff0_11*dmats2[11][6] + coeff0_12*dmats2[12][6] + coeff0_13*dmats2[13][6] + coeff0_14*dmats2[14][6] + coeff0_15*dmats2[15][6] + coeff0_16*dmats2[16][6] + coeff0_17*dmats2[17][6] + coeff0_18*dmats2[18][6] + coeff0_19*dmats2[19][6];
715
new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7] + coeff0_10*dmats2[10][7] + coeff0_11*dmats2[11][7] + coeff0_12*dmats2[12][7] + coeff0_13*dmats2[13][7] + coeff0_14*dmats2[14][7] + coeff0_15*dmats2[15][7] + coeff0_16*dmats2[16][7] + coeff0_17*dmats2[17][7] + coeff0_18*dmats2[18][7] + coeff0_19*dmats2[19][7];
716
new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8] + coeff0_10*dmats2[10][8] + coeff0_11*dmats2[11][8] + coeff0_12*dmats2[12][8] + coeff0_13*dmats2[13][8] + coeff0_14*dmats2[14][8] + coeff0_15*dmats2[15][8] + coeff0_16*dmats2[16][8] + coeff0_17*dmats2[17][8] + coeff0_18*dmats2[18][8] + coeff0_19*dmats2[19][8];
717
new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9] + coeff0_10*dmats2[10][9] + coeff0_11*dmats2[11][9] + coeff0_12*dmats2[12][9] + coeff0_13*dmats2[13][9] + coeff0_14*dmats2[14][9] + coeff0_15*dmats2[15][9] + coeff0_16*dmats2[16][9] + coeff0_17*dmats2[17][9] + coeff0_18*dmats2[18][9] + coeff0_19*dmats2[19][9];
718
new_coeff0_10 = coeff0_0*dmats2[0][10] + coeff0_1*dmats2[1][10] + coeff0_2*dmats2[2][10] + coeff0_3*dmats2[3][10] + coeff0_4*dmats2[4][10] + coeff0_5*dmats2[5][10] + coeff0_6*dmats2[6][10] + coeff0_7*dmats2[7][10] + coeff0_8*dmats2[8][10] + coeff0_9*dmats2[9][10] + coeff0_10*dmats2[10][10] + coeff0_11*dmats2[11][10] + coeff0_12*dmats2[12][10] + coeff0_13*dmats2[13][10] + coeff0_14*dmats2[14][10] + coeff0_15*dmats2[15][10] + coeff0_16*dmats2[16][10] + coeff0_17*dmats2[17][10] + coeff0_18*dmats2[18][10] + coeff0_19*dmats2[19][10];
719
new_coeff0_11 = coeff0_0*dmats2[0][11] + coeff0_1*dmats2[1][11] + coeff0_2*dmats2[2][11] + coeff0_3*dmats2[3][11] + coeff0_4*dmats2[4][11] + coeff0_5*dmats2[5][11] + coeff0_6*dmats2[6][11] + coeff0_7*dmats2[7][11] + coeff0_8*dmats2[8][11] + coeff0_9*dmats2[9][11] + coeff0_10*dmats2[10][11] + coeff0_11*dmats2[11][11] + coeff0_12*dmats2[12][11] + coeff0_13*dmats2[13][11] + coeff0_14*dmats2[14][11] + coeff0_15*dmats2[15][11] + coeff0_16*dmats2[16][11] + coeff0_17*dmats2[17][11] + coeff0_18*dmats2[18][11] + coeff0_19*dmats2[19][11];
720
new_coeff0_12 = coeff0_0*dmats2[0][12] + coeff0_1*dmats2[1][12] + coeff0_2*dmats2[2][12] + coeff0_3*dmats2[3][12] + coeff0_4*dmats2[4][12] + coeff0_5*dmats2[5][12] + coeff0_6*dmats2[6][12] + coeff0_7*dmats2[7][12] + coeff0_8*dmats2[8][12] + coeff0_9*dmats2[9][12] + coeff0_10*dmats2[10][12] + coeff0_11*dmats2[11][12] + coeff0_12*dmats2[12][12] + coeff0_13*dmats2[13][12] + coeff0_14*dmats2[14][12] + coeff0_15*dmats2[15][12] + coeff0_16*dmats2[16][12] + coeff0_17*dmats2[17][12] + coeff0_18*dmats2[18][12] + coeff0_19*dmats2[19][12];
721
new_coeff0_13 = coeff0_0*dmats2[0][13] + coeff0_1*dmats2[1][13] + coeff0_2*dmats2[2][13] + coeff0_3*dmats2[3][13] + coeff0_4*dmats2[4][13] + coeff0_5*dmats2[5][13] + coeff0_6*dmats2[6][13] + coeff0_7*dmats2[7][13] + coeff0_8*dmats2[8][13] + coeff0_9*dmats2[9][13] + coeff0_10*dmats2[10][13] + coeff0_11*dmats2[11][13] + coeff0_12*dmats2[12][13] + coeff0_13*dmats2[13][13] + coeff0_14*dmats2[14][13] + coeff0_15*dmats2[15][13] + coeff0_16*dmats2[16][13] + coeff0_17*dmats2[17][13] + coeff0_18*dmats2[18][13] + coeff0_19*dmats2[19][13];
722
new_coeff0_14 = coeff0_0*dmats2[0][14] + coeff0_1*dmats2[1][14] + coeff0_2*dmats2[2][14] + coeff0_3*dmats2[3][14] + coeff0_4*dmats2[4][14] + coeff0_5*dmats2[5][14] + coeff0_6*dmats2[6][14] + coeff0_7*dmats2[7][14] + coeff0_8*dmats2[8][14] + coeff0_9*dmats2[9][14] + coeff0_10*dmats2[10][14] + coeff0_11*dmats2[11][14] + coeff0_12*dmats2[12][14] + coeff0_13*dmats2[13][14] + coeff0_14*dmats2[14][14] + coeff0_15*dmats2[15][14] + coeff0_16*dmats2[16][14] + coeff0_17*dmats2[17][14] + coeff0_18*dmats2[18][14] + coeff0_19*dmats2[19][14];
723
new_coeff0_15 = coeff0_0*dmats2[0][15] + coeff0_1*dmats2[1][15] + coeff0_2*dmats2[2][15] + coeff0_3*dmats2[3][15] + coeff0_4*dmats2[4][15] + coeff0_5*dmats2[5][15] + coeff0_6*dmats2[6][15] + coeff0_7*dmats2[7][15] + coeff0_8*dmats2[8][15] + coeff0_9*dmats2[9][15] + coeff0_10*dmats2[10][15] + coeff0_11*dmats2[11][15] + coeff0_12*dmats2[12][15] + coeff0_13*dmats2[13][15] + coeff0_14*dmats2[14][15] + coeff0_15*dmats2[15][15] + coeff0_16*dmats2[16][15] + coeff0_17*dmats2[17][15] + coeff0_18*dmats2[18][15] + coeff0_19*dmats2[19][15];
724
new_coeff0_16 = coeff0_0*dmats2[0][16] + coeff0_1*dmats2[1][16] + coeff0_2*dmats2[2][16] + coeff0_3*dmats2[3][16] + coeff0_4*dmats2[4][16] + coeff0_5*dmats2[5][16] + coeff0_6*dmats2[6][16] + coeff0_7*dmats2[7][16] + coeff0_8*dmats2[8][16] + coeff0_9*dmats2[9][16] + coeff0_10*dmats2[10][16] + coeff0_11*dmats2[11][16] + coeff0_12*dmats2[12][16] + coeff0_13*dmats2[13][16] + coeff0_14*dmats2[14][16] + coeff0_15*dmats2[15][16] + coeff0_16*dmats2[16][16] + coeff0_17*dmats2[17][16] + coeff0_18*dmats2[18][16] + coeff0_19*dmats2[19][16];
725
new_coeff0_17 = coeff0_0*dmats2[0][17] + coeff0_1*dmats2[1][17] + coeff0_2*dmats2[2][17] + coeff0_3*dmats2[3][17] + coeff0_4*dmats2[4][17] + coeff0_5*dmats2[5][17] + coeff0_6*dmats2[6][17] + coeff0_7*dmats2[7][17] + coeff0_8*dmats2[8][17] + coeff0_9*dmats2[9][17] + coeff0_10*dmats2[10][17] + coeff0_11*dmats2[11][17] + coeff0_12*dmats2[12][17] + coeff0_13*dmats2[13][17] + coeff0_14*dmats2[14][17] + coeff0_15*dmats2[15][17] + coeff0_16*dmats2[16][17] + coeff0_17*dmats2[17][17] + coeff0_18*dmats2[18][17] + coeff0_19*dmats2[19][17];
726
new_coeff0_18 = coeff0_0*dmats2[0][18] + coeff0_1*dmats2[1][18] + coeff0_2*dmats2[2][18] + coeff0_3*dmats2[3][18] + coeff0_4*dmats2[4][18] + coeff0_5*dmats2[5][18] + coeff0_6*dmats2[6][18] + coeff0_7*dmats2[7][18] + coeff0_8*dmats2[8][18] + coeff0_9*dmats2[9][18] + coeff0_10*dmats2[10][18] + coeff0_11*dmats2[11][18] + coeff0_12*dmats2[12][18] + coeff0_13*dmats2[13][18] + coeff0_14*dmats2[14][18] + coeff0_15*dmats2[15][18] + coeff0_16*dmats2[16][18] + coeff0_17*dmats2[17][18] + coeff0_18*dmats2[18][18] + coeff0_19*dmats2[19][18];
727
new_coeff0_19 = coeff0_0*dmats2[0][19] + coeff0_1*dmats2[1][19] + coeff0_2*dmats2[2][19] + coeff0_3*dmats2[3][19] + coeff0_4*dmats2[4][19] + coeff0_5*dmats2[5][19] + coeff0_6*dmats2[6][19] + coeff0_7*dmats2[7][19] + coeff0_8*dmats2[8][19] + coeff0_9*dmats2[9][19] + coeff0_10*dmats2[10][19] + coeff0_11*dmats2[11][19] + coeff0_12*dmats2[12][19] + coeff0_13*dmats2[13][19] + coeff0_14*dmats2[14][19] + coeff0_15*dmats2[15][19] + coeff0_16*dmats2[16][19] + coeff0_17*dmats2[17][19] + coeff0_18*dmats2[18][19] + coeff0_19*dmats2[19][19];
731
// Compute derivatives on reference element as dot product of coefficients and basisvalues
732
derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9 + new_coeff0_10*basisvalue10 + new_coeff0_11*basisvalue11 + new_coeff0_12*basisvalue12 + new_coeff0_13*basisvalue13 + new_coeff0_14*basisvalue14 + new_coeff0_15*basisvalue15 + new_coeff0_16*basisvalue16 + new_coeff0_17*basisvalue17 + new_coeff0_18*basisvalue18 + new_coeff0_19*basisvalue19;
735
// Transform derivatives back to physical element
736
for (unsigned int row = 0; row < num_derivatives; row++)
738
for (unsigned int col = 0; col < num_derivatives; col++)
740
values[row] += transform[row][col]*derivatives[col];
743
// Delete pointer to array of derivatives on FIAT element
744
delete [] derivatives;
746
// Delete pointer to array of combinations of derivatives and transform
747
for (unsigned int row = 0; row < num_derivatives; row++)
749
delete [] combinations[row];
750
delete [] transform[row];
753
delete [] combinations;
757
/// Evaluate order n derivatives of all basis functions at given point in cell
758
virtual void evaluate_basis_derivatives_all(unsigned int n,
760
const double* coordinates,
761
const ufc::cell& c) const
763
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
766
/// Evaluate linear functional for dof i on the function f
767
virtual double evaluate_dof(unsigned int i,
768
const ufc::function& f,
769
const ufc::cell& c) const
771
// The reference points, direction and weights:
772
static const double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.666666666666667, 0.333333333333333}}, {{0, 0.333333333333333, 0.666666666666667}}, {{0.666666666666667, 0, 0.333333333333333}}, {{0.333333333333333, 0, 0.666666666666667}}, {{0.666666666666667, 0.333333333333333, 0}}, {{0.333333333333333, 0.666666666666667, 0}}, {{0, 0, 0.333333333333333}}, {{0, 0, 0.666666666666667}}, {{0, 0.333333333333333, 0}}, {{0, 0.666666666666667, 0}}, {{0.333333333333333, 0, 0}}, {{0.666666666666667, 0, 0}}, {{0.333333333333333, 0.333333333333333, 0.333333333333333}}, {{0, 0.333333333333333, 0.333333333333333}}, {{0.333333333333333, 0, 0.333333333333333}}, {{0.333333333333333, 0.333333333333333, 0}}};
773
static const double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
774
static const double D[20][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
776
const double * const * x = c.coordinates;
778
// Iterate over the points:
779
// Evaluate basis functions for affine mapping
780
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
781
const double w1 = X[i][0][0];
782
const double w2 = X[i][0][1];
783
const double w3 = X[i][0][2];
785
// Compute affine mapping y = F(X)
787
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
788
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
789
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
791
// Evaluate function at physical points
793
f.evaluate(values, y, c);
795
// Map function values using appropriate mapping
796
// Affine map: Do nothing
798
// Note that we do not map the weights (yet).
800
// Take directional components
801
for(int k = 0; k < 1; k++)
802
result += values[k]*D[i][0][k];
803
// Multiply by weights
809
/// Evaluate linear functionals for all dofs on the function f
810
virtual void evaluate_dofs(double* values,
811
const ufc::function& f,
812
const ufc::cell& c) const
814
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
817
/// Interpolate vertex values from dof values
818
virtual void interpolate_vertex_values(double* vertex_values,
819
const double* dof_values,
820
const ufc::cell& c) const
822
// Evaluate at vertices and use affine mapping
823
vertex_values[0] = dof_values[0];
824
vertex_values[1] = dof_values[1];
825
vertex_values[2] = dof_values[2];
826
vertex_values[3] = dof_values[3];
829
/// Return the number of sub elements (for a mixed element)
830
virtual unsigned int num_sub_elements() const
835
/// Create a new finite element for sub element i (for a mixed element)
836
virtual ufc::finite_element* create_sub_element(unsigned int i) const
838
return new poisson3dp3_0_finite_element_0();
843
/// This class defines the interface for a finite element.
845
class poisson3dp3_0_finite_element_1: public ufc::finite_element
850
poisson3dp3_0_finite_element_1() : ufc::finite_element()
856
virtual ~poisson3dp3_0_finite_element_1()
861
/// Return a string identifying the finite element
862
virtual const char* signature() const
864
return "FiniteElement('Lagrange', 'tetrahedron', 3)";
867
/// Return the cell shape
868
virtual ufc::shape cell_shape() const
870
return ufc::tetrahedron;
873
/// Return the dimension of the finite element function space
874
virtual unsigned int space_dimension() const
879
/// Return the rank of the value space
880
virtual unsigned int value_rank() const
885
/// Return the dimension of the value space for axis i
886
virtual unsigned int value_dimension(unsigned int i) const
891
/// Evaluate basis function i at given point in cell
892
virtual void evaluate_basis(unsigned int i,
894
const double* coordinates,
895
const ufc::cell& c) const
897
// Extract vertex coordinates
898
const double * const * element_coordinates = c.coordinates;
900
// Compute Jacobian of affine map from reference cell
901
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
902
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
903
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
904
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
905
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
906
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
907
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
908
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
909
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
911
// Compute sub determinants
912
const double d00 = J_11*J_22 - J_12*J_21;
913
const double d01 = J_12*J_20 - J_10*J_22;
914
const double d02 = J_10*J_21 - J_11*J_20;
916
const double d10 = J_02*J_21 - J_01*J_22;
917
const double d11 = J_00*J_22 - J_02*J_20;
918
const double d12 = J_01*J_20 - J_00*J_21;
920
const double d20 = J_01*J_12 - J_02*J_11;
921
const double d21 = J_02*J_10 - J_00*J_12;
922
const double d22 = J_00*J_11 - J_01*J_10;
924
// Compute determinant of Jacobian
925
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
927
// Compute inverse of Jacobian
930
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
931
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
932
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
934
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
935
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
936
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
938
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
939
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
940
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
942
// Get coordinates and map to the UFC reference element
943
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
944
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
945
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
947
// Map coordinates to the reference cube
948
if (std::abs(y + z - 1.0) < 1e-14)
951
x = -2.0 * x/(y + z - 1.0) - 1.0;
952
if (std::abs(z - 1.0) < 1e-14)
955
y = 2.0 * y/(1.0 - z) - 1.0;
961
// Map degree of freedom to element degree of freedom
962
const unsigned int dof = i;
965
const double scalings_y_0 = 1;
966
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
967
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
968
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
969
const double scalings_z_0 = 1;
970
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
971
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
972
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
974
// Compute psitilde_a
975
const double psitilde_a_0 = 1;
976
const double psitilde_a_1 = x;
977
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
978
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
980
// Compute psitilde_bs
981
const double psitilde_bs_0_0 = 1;
982
const double psitilde_bs_0_1 = 1.5*y + 0.5;
983
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
984
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
985
const double psitilde_bs_1_0 = 1;
986
const double psitilde_bs_1_1 = 2.5*y + 1.5;
987
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
988
const double psitilde_bs_2_0 = 1;
989
const double psitilde_bs_2_1 = 3.5*y + 2.5;
990
const double psitilde_bs_3_0 = 1;
992
// Compute psitilde_cs
993
const double psitilde_cs_00_0 = 1;
994
const double psitilde_cs_00_1 = 2*z + 1;
995
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
996
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
997
const double psitilde_cs_01_0 = 1;
998
const double psitilde_cs_01_1 = 3*z + 2;
999
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
1000
const double psitilde_cs_02_0 = 1;
1001
const double psitilde_cs_02_1 = 4*z + 3;
1002
const double psitilde_cs_03_0 = 1;
1003
const double psitilde_cs_10_0 = 1;
1004
const double psitilde_cs_10_1 = 3*z + 2;
1005
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
1006
const double psitilde_cs_11_0 = 1;
1007
const double psitilde_cs_11_1 = 4*z + 3;
1008
const double psitilde_cs_12_0 = 1;
1009
const double psitilde_cs_20_0 = 1;
1010
const double psitilde_cs_20_1 = 4*z + 3;
1011
const double psitilde_cs_21_0 = 1;
1012
const double psitilde_cs_30_0 = 1;
1014
// Compute basisvalues
1015
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
1016
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
1017
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
1018
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
1019
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
1020
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
1021
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
1022
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
1023
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
1024
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
1025
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
1026
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
1027
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
1028
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
1029
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
1030
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
1031
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
1032
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
1033
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
1034
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
1036
// Table(s) of coefficients
1037
static const double coefficients0[20][20] = \
1038
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
1039
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
1040
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
1041
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
1042
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
1043
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
1044
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
1045
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
1046
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
1047
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
1048
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
1049
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
1050
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
1051
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
1052
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
1053
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
1054
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
1055
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
1056
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
1057
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
1059
// Extract relevant coefficients
1060
const double coeff0_0 = coefficients0[dof][0];
1061
const double coeff0_1 = coefficients0[dof][1];
1062
const double coeff0_2 = coefficients0[dof][2];
1063
const double coeff0_3 = coefficients0[dof][3];
1064
const double coeff0_4 = coefficients0[dof][4];
1065
const double coeff0_5 = coefficients0[dof][5];
1066
const double coeff0_6 = coefficients0[dof][6];
1067
const double coeff0_7 = coefficients0[dof][7];
1068
const double coeff0_8 = coefficients0[dof][8];
1069
const double coeff0_9 = coefficients0[dof][9];
1070
const double coeff0_10 = coefficients0[dof][10];
1071
const double coeff0_11 = coefficients0[dof][11];
1072
const double coeff0_12 = coefficients0[dof][12];
1073
const double coeff0_13 = coefficients0[dof][13];
1074
const double coeff0_14 = coefficients0[dof][14];
1075
const double coeff0_15 = coefficients0[dof][15];
1076
const double coeff0_16 = coefficients0[dof][16];
1077
const double coeff0_17 = coefficients0[dof][17];
1078
const double coeff0_18 = coefficients0[dof][18];
1079
const double coeff0_19 = coefficients0[dof][19];
1082
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9 + coeff0_10*basisvalue10 + coeff0_11*basisvalue11 + coeff0_12*basisvalue12 + coeff0_13*basisvalue13 + coeff0_14*basisvalue14 + coeff0_15*basisvalue15 + coeff0_16*basisvalue16 + coeff0_17*basisvalue17 + coeff0_18*basisvalue18 + coeff0_19*basisvalue19;
1085
/// Evaluate all basis functions at given point in cell
1086
virtual void evaluate_basis_all(double* values,
1087
const double* coordinates,
1088
const ufc::cell& c) const
1090
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
1093
/// Evaluate order n derivatives of basis function i at given point in cell
1094
virtual void evaluate_basis_derivatives(unsigned int i,
1097
const double* coordinates,
1098
const ufc::cell& c) const
1100
// Extract vertex coordinates
1101
const double * const * element_coordinates = c.coordinates;
1103
// Compute Jacobian of affine map from reference cell
1104
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
1105
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
1106
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
1107
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
1108
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
1109
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
1110
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
1111
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
1112
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
1114
// Compute sub determinants
1115
const double d00 = J_11*J_22 - J_12*J_21;
1116
const double d01 = J_12*J_20 - J_10*J_22;
1117
const double d02 = J_10*J_21 - J_11*J_20;
1119
const double d10 = J_02*J_21 - J_01*J_22;
1120
const double d11 = J_00*J_22 - J_02*J_20;
1121
const double d12 = J_01*J_20 - J_00*J_21;
1123
const double d20 = J_01*J_12 - J_02*J_11;
1124
const double d21 = J_02*J_10 - J_00*J_12;
1125
const double d22 = J_00*J_11 - J_01*J_10;
1127
// Compute determinant of Jacobian
1128
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
1130
// Compute inverse of Jacobian
1132
// Compute constants
1133
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
1134
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
1135
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
1137
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
1138
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
1139
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
1141
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
1142
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
1143
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
1145
// Get coordinates and map to the UFC reference element
1146
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
1147
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
1148
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
1150
// Map coordinates to the reference cube
1151
if (std::abs(y + z - 1.0) < 1e-14)
1154
x = -2.0 * x/(y + z - 1.0) - 1.0;
1155
if (std::abs(z - 1.0) < 1e-14)
1158
y = 2.0 * y/(1.0 - z) - 1.0;
1161
// Compute number of derivatives
1162
unsigned int num_derivatives = 1;
1164
for (unsigned int j = 0; j < n; j++)
1165
num_derivatives *= 3;
1168
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
1169
unsigned int **combinations = new unsigned int *[num_derivatives];
1171
for (unsigned int j = 0; j < num_derivatives; j++)
1173
combinations[j] = new unsigned int [n];
1174
for (unsigned int k = 0; k < n; k++)
1175
combinations[j][k] = 0;
1178
// Generate combinations of derivatives
1179
for (unsigned int row = 1; row < num_derivatives; row++)
1181
for (unsigned int num = 0; num < row; num++)
1183
for (unsigned int col = n-1; col+1 > 0; col--)
1185
if (combinations[row][col] + 1 > 2)
1186
combinations[row][col] = 0;
1189
combinations[row][col] += 1;
1196
// Compute inverse of Jacobian
1197
const double Jinv[3][3] ={{d00 / detJ, d10 / detJ, d20 / detJ}, {d01 / detJ, d11 / detJ, d21 / detJ}, {d02 / detJ, d12 / detJ, d22 / detJ}};
1199
// Declare transformation matrix
1200
// Declare pointer to two dimensional array and initialise
1201
double **transform = new double *[num_derivatives];
1203
for (unsigned int j = 0; j < num_derivatives; j++)
1205
transform[j] = new double [num_derivatives];
1206
for (unsigned int k = 0; k < num_derivatives; k++)
1207
transform[j][k] = 1;
1210
// Construct transformation matrix
1211
for (unsigned int row = 0; row < num_derivatives; row++)
1213
for (unsigned int col = 0; col < num_derivatives; col++)
1215
for (unsigned int k = 0; k < n; k++)
1216
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
1221
for (unsigned int j = 0; j < 1*num_derivatives; j++)
1224
// Map degree of freedom to element degree of freedom
1225
const unsigned int dof = i;
1227
// Generate scalings
1228
const double scalings_y_0 = 1;
1229
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
1230
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
1231
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
1232
const double scalings_z_0 = 1;
1233
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
1234
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
1235
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
1237
// Compute psitilde_a
1238
const double psitilde_a_0 = 1;
1239
const double psitilde_a_1 = x;
1240
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
1241
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
1243
// Compute psitilde_bs
1244
const double psitilde_bs_0_0 = 1;
1245
const double psitilde_bs_0_1 = 1.5*y + 0.5;
1246
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
1247
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
1248
const double psitilde_bs_1_0 = 1;
1249
const double psitilde_bs_1_1 = 2.5*y + 1.5;
1250
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
1251
const double psitilde_bs_2_0 = 1;
1252
const double psitilde_bs_2_1 = 3.5*y + 2.5;
1253
const double psitilde_bs_3_0 = 1;
1255
// Compute psitilde_cs
1256
const double psitilde_cs_00_0 = 1;
1257
const double psitilde_cs_00_1 = 2*z + 1;
1258
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
1259
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
1260
const double psitilde_cs_01_0 = 1;
1261
const double psitilde_cs_01_1 = 3*z + 2;
1262
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
1263
const double psitilde_cs_02_0 = 1;
1264
const double psitilde_cs_02_1 = 4*z + 3;
1265
const double psitilde_cs_03_0 = 1;
1266
const double psitilde_cs_10_0 = 1;
1267
const double psitilde_cs_10_1 = 3*z + 2;
1268
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
1269
const double psitilde_cs_11_0 = 1;
1270
const double psitilde_cs_11_1 = 4*z + 3;
1271
const double psitilde_cs_12_0 = 1;
1272
const double psitilde_cs_20_0 = 1;
1273
const double psitilde_cs_20_1 = 4*z + 3;
1274
const double psitilde_cs_21_0 = 1;
1275
const double psitilde_cs_30_0 = 1;
1277
// Compute basisvalues
1278
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
1279
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
1280
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
1281
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
1282
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
1283
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
1284
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
1285
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
1286
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
1287
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
1288
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
1289
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
1290
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
1291
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
1292
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
1293
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
1294
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
1295
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
1296
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
1297
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
1299
// Table(s) of coefficients
1300
static const double coefficients0[20][20] = \
1301
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
1302
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
1303
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
1304
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
1305
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
1306
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
1307
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
1308
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
1309
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
1310
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
1311
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
1312
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
1313
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
1314
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
1315
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
1316
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
1317
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
1318
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
1319
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
1320
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
1322
// Interesting (new) part
1323
// Tables of derivatives of the polynomial base (transpose)
1324
static const double dmats0[20][20] = \
1325
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1326
{6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1327
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1328
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1329
{0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1330
{4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1331
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1332
{3.74165738677394, 0, 0, 8.69482604771367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1333
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1334
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1335
{5.49909083394701, 0, -3.3466401061363, -2.36643191323985, 15.4919333848297, 0, 0.69282032302755, 0, 0.565685424949241, 0.400000000000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1336
{0, 4.89897948556636, 0, 0, 0, 14.1985914794391, 0, -0.82807867121083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1337
{3.6, 0, 8.76356092008267, -1.54919333848297, 0, 0, 9.52470471983253, 0, -1.48131215963609, 0.261861468283192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1338
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1339
{0, 4.24264068711928, 0, 0, 0, 0, 0, 14.3427433120127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1340
{3.11769145362398, 0, 3.16227766016838, 4.91934955049954, 0, 0, 0, 0, 10.690449676497, -2.41897262725906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1341
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1342
{2.54558441227157, 0, 0, 7.66811580507233, 0, 0, 0, 0, 0, 10.3691851174526, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1343
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1344
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
1346
static const double dmats1[20][20] = \
1347
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1348
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1349
{5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1350
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1351
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1352
{2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1353
{-2.64575131106459, 0, 9.66091783079296, 0.683130051063971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1354
{1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1355
{3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1356
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1357
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1358
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 9.16515138991168, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1359
{1.8, -5.69209978830308, 4.38178046004133, -0.774596669241485, 0, 10.998181667894, 4.76235235991626, 0.962140470884725, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1360
{5.19615242270664, 0, -3.16227766016838, -2.23606797749979, 0, 0, 13.7477270848675, 0, 0.534522483824851, 0.377964473009229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1361
{2.01246117974981, 2.12132034355964, -0.408248290463861, 3.17542648054294, 0, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1362
{1.55884572681199, 2.73861278752583, 1.58113883008419, 2.45967477524977, 0, 0, 0, 9.25820099772552, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1363
{-1.8, 0, 3.65148371670111, -2.84018778721878, 0, 0, 0, 0, 12.3442679969674, 1.39659449751035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1364
{1.27279220613579, 0, 0, 3.83405790253617, 0, 0, 0, 0, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1365
{2.20454076850486, 0, 0, 6.6407830863536, 0, 0, 0, 0, 0, 8.97997772825746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1366
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
1368
static const double dmats2[20][20] = \
1369
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1370
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1371
{1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1372
{5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1373
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1374
{2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1375
{1.32287565553229, 0, 3.86436713231719, -0.341565025531988, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1376
{1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1377
{1.08012344973464, 0, 7.09929573971954, 2.50998007960222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1378
{-3.81881307912986, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1379
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1380
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 1.30930734141595, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1381
{1.8, 0.632455532033674, 4.38178046004133, -0.774596669241485, 0, 3.14233761939829, 4.76235235991626, -0.10690449676497, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1382
{1.03923048454133, 0, 3.16227766016838, -0.44721359549996, 0, 0, 5.8918830363718, 0, -0.53452248382485, 0.0755928946018458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1383
{2.01246117974981, 2.12132034355964, -0.408248290463862, 3.17542648054295, 9.07114735222145, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1384
{1.55884572681199, 0.547722557505165, 1.58113883008419, 2.45967477524977, 0, 9.07114735222145, 0, 1.8516401995451, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1385
{0.900000000000001, 0, 1.46059348668044, 1.42009389360939, 0, 0, 9.07114735222145, 0, 4.93770719878694, -0.698297248755176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1386
{1.27279220613578, -6.26099033699941, 0, 3.83405790253617, 0, 0, 0, 10.5830052442584, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1387
{0.734846922834953, 0, -6.26099033699942, 2.21359436211787, 0, 0, 0, 0, 10.5830052442584, 2.99332590941915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1388
{5.71576766497729, 0, 0, -4.69574275274956, 0, 0, 0, 0, 0, 12.69960629311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
1390
// Compute reference derivatives
1391
// Declare pointer to array of derivatives on FIAT element
1392
double *derivatives = new double [num_derivatives];
1394
// Declare coefficients
1395
double coeff0_0 = 0;
1396
double coeff0_1 = 0;
1397
double coeff0_2 = 0;
1398
double coeff0_3 = 0;
1399
double coeff0_4 = 0;
1400
double coeff0_5 = 0;
1401
double coeff0_6 = 0;
1402
double coeff0_7 = 0;
1403
double coeff0_8 = 0;
1404
double coeff0_9 = 0;
1405
double coeff0_10 = 0;
1406
double coeff0_11 = 0;
1407
double coeff0_12 = 0;
1408
double coeff0_13 = 0;
1409
double coeff0_14 = 0;
1410
double coeff0_15 = 0;
1411
double coeff0_16 = 0;
1412
double coeff0_17 = 0;
1413
double coeff0_18 = 0;
1414
double coeff0_19 = 0;
1416
// Declare new coefficients
1417
double new_coeff0_0 = 0;
1418
double new_coeff0_1 = 0;
1419
double new_coeff0_2 = 0;
1420
double new_coeff0_3 = 0;
1421
double new_coeff0_4 = 0;
1422
double new_coeff0_5 = 0;
1423
double new_coeff0_6 = 0;
1424
double new_coeff0_7 = 0;
1425
double new_coeff0_8 = 0;
1426
double new_coeff0_9 = 0;
1427
double new_coeff0_10 = 0;
1428
double new_coeff0_11 = 0;
1429
double new_coeff0_12 = 0;
1430
double new_coeff0_13 = 0;
1431
double new_coeff0_14 = 0;
1432
double new_coeff0_15 = 0;
1433
double new_coeff0_16 = 0;
1434
double new_coeff0_17 = 0;
1435
double new_coeff0_18 = 0;
1436
double new_coeff0_19 = 0;
1438
// Loop possible derivatives
1439
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
1441
// Get values from coefficients array
1442
new_coeff0_0 = coefficients0[dof][0];
1443
new_coeff0_1 = coefficients0[dof][1];
1444
new_coeff0_2 = coefficients0[dof][2];
1445
new_coeff0_3 = coefficients0[dof][3];
1446
new_coeff0_4 = coefficients0[dof][4];
1447
new_coeff0_5 = coefficients0[dof][5];
1448
new_coeff0_6 = coefficients0[dof][6];
1449
new_coeff0_7 = coefficients0[dof][7];
1450
new_coeff0_8 = coefficients0[dof][8];
1451
new_coeff0_9 = coefficients0[dof][9];
1452
new_coeff0_10 = coefficients0[dof][10];
1453
new_coeff0_11 = coefficients0[dof][11];
1454
new_coeff0_12 = coefficients0[dof][12];
1455
new_coeff0_13 = coefficients0[dof][13];
1456
new_coeff0_14 = coefficients0[dof][14];
1457
new_coeff0_15 = coefficients0[dof][15];
1458
new_coeff0_16 = coefficients0[dof][16];
1459
new_coeff0_17 = coefficients0[dof][17];
1460
new_coeff0_18 = coefficients0[dof][18];
1461
new_coeff0_19 = coefficients0[dof][19];
1463
// Loop derivative order
1464
for (unsigned int j = 0; j < n; j++)
1466
// Update old coefficients
1467
coeff0_0 = new_coeff0_0;
1468
coeff0_1 = new_coeff0_1;
1469
coeff0_2 = new_coeff0_2;
1470
coeff0_3 = new_coeff0_3;
1471
coeff0_4 = new_coeff0_4;
1472
coeff0_5 = new_coeff0_5;
1473
coeff0_6 = new_coeff0_6;
1474
coeff0_7 = new_coeff0_7;
1475
coeff0_8 = new_coeff0_8;
1476
coeff0_9 = new_coeff0_9;
1477
coeff0_10 = new_coeff0_10;
1478
coeff0_11 = new_coeff0_11;
1479
coeff0_12 = new_coeff0_12;
1480
coeff0_13 = new_coeff0_13;
1481
coeff0_14 = new_coeff0_14;
1482
coeff0_15 = new_coeff0_15;
1483
coeff0_16 = new_coeff0_16;
1484
coeff0_17 = new_coeff0_17;
1485
coeff0_18 = new_coeff0_18;
1486
coeff0_19 = new_coeff0_19;
1488
if(combinations[deriv_num][j] == 0)
1490
new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0] + coeff0_10*dmats0[10][0] + coeff0_11*dmats0[11][0] + coeff0_12*dmats0[12][0] + coeff0_13*dmats0[13][0] + coeff0_14*dmats0[14][0] + coeff0_15*dmats0[15][0] + coeff0_16*dmats0[16][0] + coeff0_17*dmats0[17][0] + coeff0_18*dmats0[18][0] + coeff0_19*dmats0[19][0];
1491
new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1] + coeff0_10*dmats0[10][1] + coeff0_11*dmats0[11][1] + coeff0_12*dmats0[12][1] + coeff0_13*dmats0[13][1] + coeff0_14*dmats0[14][1] + coeff0_15*dmats0[15][1] + coeff0_16*dmats0[16][1] + coeff0_17*dmats0[17][1] + coeff0_18*dmats0[18][1] + coeff0_19*dmats0[19][1];
1492
new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2] + coeff0_10*dmats0[10][2] + coeff0_11*dmats0[11][2] + coeff0_12*dmats0[12][2] + coeff0_13*dmats0[13][2] + coeff0_14*dmats0[14][2] + coeff0_15*dmats0[15][2] + coeff0_16*dmats0[16][2] + coeff0_17*dmats0[17][2] + coeff0_18*dmats0[18][2] + coeff0_19*dmats0[19][2];
1493
new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3] + coeff0_10*dmats0[10][3] + coeff0_11*dmats0[11][3] + coeff0_12*dmats0[12][3] + coeff0_13*dmats0[13][3] + coeff0_14*dmats0[14][3] + coeff0_15*dmats0[15][3] + coeff0_16*dmats0[16][3] + coeff0_17*dmats0[17][3] + coeff0_18*dmats0[18][3] + coeff0_19*dmats0[19][3];
1494
new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4] + coeff0_10*dmats0[10][4] + coeff0_11*dmats0[11][4] + coeff0_12*dmats0[12][4] + coeff0_13*dmats0[13][4] + coeff0_14*dmats0[14][4] + coeff0_15*dmats0[15][4] + coeff0_16*dmats0[16][4] + coeff0_17*dmats0[17][4] + coeff0_18*dmats0[18][4] + coeff0_19*dmats0[19][4];
1495
new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5] + coeff0_10*dmats0[10][5] + coeff0_11*dmats0[11][5] + coeff0_12*dmats0[12][5] + coeff0_13*dmats0[13][5] + coeff0_14*dmats0[14][5] + coeff0_15*dmats0[15][5] + coeff0_16*dmats0[16][5] + coeff0_17*dmats0[17][5] + coeff0_18*dmats0[18][5] + coeff0_19*dmats0[19][5];
1496
new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6] + coeff0_10*dmats0[10][6] + coeff0_11*dmats0[11][6] + coeff0_12*dmats0[12][6] + coeff0_13*dmats0[13][6] + coeff0_14*dmats0[14][6] + coeff0_15*dmats0[15][6] + coeff0_16*dmats0[16][6] + coeff0_17*dmats0[17][6] + coeff0_18*dmats0[18][6] + coeff0_19*dmats0[19][6];
1497
new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7] + coeff0_10*dmats0[10][7] + coeff0_11*dmats0[11][7] + coeff0_12*dmats0[12][7] + coeff0_13*dmats0[13][7] + coeff0_14*dmats0[14][7] + coeff0_15*dmats0[15][7] + coeff0_16*dmats0[16][7] + coeff0_17*dmats0[17][7] + coeff0_18*dmats0[18][7] + coeff0_19*dmats0[19][7];
1498
new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8] + coeff0_10*dmats0[10][8] + coeff0_11*dmats0[11][8] + coeff0_12*dmats0[12][8] + coeff0_13*dmats0[13][8] + coeff0_14*dmats0[14][8] + coeff0_15*dmats0[15][8] + coeff0_16*dmats0[16][8] + coeff0_17*dmats0[17][8] + coeff0_18*dmats0[18][8] + coeff0_19*dmats0[19][8];
1499
new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9] + coeff0_10*dmats0[10][9] + coeff0_11*dmats0[11][9] + coeff0_12*dmats0[12][9] + coeff0_13*dmats0[13][9] + coeff0_14*dmats0[14][9] + coeff0_15*dmats0[15][9] + coeff0_16*dmats0[16][9] + coeff0_17*dmats0[17][9] + coeff0_18*dmats0[18][9] + coeff0_19*dmats0[19][9];
1500
new_coeff0_10 = coeff0_0*dmats0[0][10] + coeff0_1*dmats0[1][10] + coeff0_2*dmats0[2][10] + coeff0_3*dmats0[3][10] + coeff0_4*dmats0[4][10] + coeff0_5*dmats0[5][10] + coeff0_6*dmats0[6][10] + coeff0_7*dmats0[7][10] + coeff0_8*dmats0[8][10] + coeff0_9*dmats0[9][10] + coeff0_10*dmats0[10][10] + coeff0_11*dmats0[11][10] + coeff0_12*dmats0[12][10] + coeff0_13*dmats0[13][10] + coeff0_14*dmats0[14][10] + coeff0_15*dmats0[15][10] + coeff0_16*dmats0[16][10] + coeff0_17*dmats0[17][10] + coeff0_18*dmats0[18][10] + coeff0_19*dmats0[19][10];
1501
new_coeff0_11 = coeff0_0*dmats0[0][11] + coeff0_1*dmats0[1][11] + coeff0_2*dmats0[2][11] + coeff0_3*dmats0[3][11] + coeff0_4*dmats0[4][11] + coeff0_5*dmats0[5][11] + coeff0_6*dmats0[6][11] + coeff0_7*dmats0[7][11] + coeff0_8*dmats0[8][11] + coeff0_9*dmats0[9][11] + coeff0_10*dmats0[10][11] + coeff0_11*dmats0[11][11] + coeff0_12*dmats0[12][11] + coeff0_13*dmats0[13][11] + coeff0_14*dmats0[14][11] + coeff0_15*dmats0[15][11] + coeff0_16*dmats0[16][11] + coeff0_17*dmats0[17][11] + coeff0_18*dmats0[18][11] + coeff0_19*dmats0[19][11];
1502
new_coeff0_12 = coeff0_0*dmats0[0][12] + coeff0_1*dmats0[1][12] + coeff0_2*dmats0[2][12] + coeff0_3*dmats0[3][12] + coeff0_4*dmats0[4][12] + coeff0_5*dmats0[5][12] + coeff0_6*dmats0[6][12] + coeff0_7*dmats0[7][12] + coeff0_8*dmats0[8][12] + coeff0_9*dmats0[9][12] + coeff0_10*dmats0[10][12] + coeff0_11*dmats0[11][12] + coeff0_12*dmats0[12][12] + coeff0_13*dmats0[13][12] + coeff0_14*dmats0[14][12] + coeff0_15*dmats0[15][12] + coeff0_16*dmats0[16][12] + coeff0_17*dmats0[17][12] + coeff0_18*dmats0[18][12] + coeff0_19*dmats0[19][12];
1503
new_coeff0_13 = coeff0_0*dmats0[0][13] + coeff0_1*dmats0[1][13] + coeff0_2*dmats0[2][13] + coeff0_3*dmats0[3][13] + coeff0_4*dmats0[4][13] + coeff0_5*dmats0[5][13] + coeff0_6*dmats0[6][13] + coeff0_7*dmats0[7][13] + coeff0_8*dmats0[8][13] + coeff0_9*dmats0[9][13] + coeff0_10*dmats0[10][13] + coeff0_11*dmats0[11][13] + coeff0_12*dmats0[12][13] + coeff0_13*dmats0[13][13] + coeff0_14*dmats0[14][13] + coeff0_15*dmats0[15][13] + coeff0_16*dmats0[16][13] + coeff0_17*dmats0[17][13] + coeff0_18*dmats0[18][13] + coeff0_19*dmats0[19][13];
1504
new_coeff0_14 = coeff0_0*dmats0[0][14] + coeff0_1*dmats0[1][14] + coeff0_2*dmats0[2][14] + coeff0_3*dmats0[3][14] + coeff0_4*dmats0[4][14] + coeff0_5*dmats0[5][14] + coeff0_6*dmats0[6][14] + coeff0_7*dmats0[7][14] + coeff0_8*dmats0[8][14] + coeff0_9*dmats0[9][14] + coeff0_10*dmats0[10][14] + coeff0_11*dmats0[11][14] + coeff0_12*dmats0[12][14] + coeff0_13*dmats0[13][14] + coeff0_14*dmats0[14][14] + coeff0_15*dmats0[15][14] + coeff0_16*dmats0[16][14] + coeff0_17*dmats0[17][14] + coeff0_18*dmats0[18][14] + coeff0_19*dmats0[19][14];
1505
new_coeff0_15 = coeff0_0*dmats0[0][15] + coeff0_1*dmats0[1][15] + coeff0_2*dmats0[2][15] + coeff0_3*dmats0[3][15] + coeff0_4*dmats0[4][15] + coeff0_5*dmats0[5][15] + coeff0_6*dmats0[6][15] + coeff0_7*dmats0[7][15] + coeff0_8*dmats0[8][15] + coeff0_9*dmats0[9][15] + coeff0_10*dmats0[10][15] + coeff0_11*dmats0[11][15] + coeff0_12*dmats0[12][15] + coeff0_13*dmats0[13][15] + coeff0_14*dmats0[14][15] + coeff0_15*dmats0[15][15] + coeff0_16*dmats0[16][15] + coeff0_17*dmats0[17][15] + coeff0_18*dmats0[18][15] + coeff0_19*dmats0[19][15];
1506
new_coeff0_16 = coeff0_0*dmats0[0][16] + coeff0_1*dmats0[1][16] + coeff0_2*dmats0[2][16] + coeff0_3*dmats0[3][16] + coeff0_4*dmats0[4][16] + coeff0_5*dmats0[5][16] + coeff0_6*dmats0[6][16] + coeff0_7*dmats0[7][16] + coeff0_8*dmats0[8][16] + coeff0_9*dmats0[9][16] + coeff0_10*dmats0[10][16] + coeff0_11*dmats0[11][16] + coeff0_12*dmats0[12][16] + coeff0_13*dmats0[13][16] + coeff0_14*dmats0[14][16] + coeff0_15*dmats0[15][16] + coeff0_16*dmats0[16][16] + coeff0_17*dmats0[17][16] + coeff0_18*dmats0[18][16] + coeff0_19*dmats0[19][16];
1507
new_coeff0_17 = coeff0_0*dmats0[0][17] + coeff0_1*dmats0[1][17] + coeff0_2*dmats0[2][17] + coeff0_3*dmats0[3][17] + coeff0_4*dmats0[4][17] + coeff0_5*dmats0[5][17] + coeff0_6*dmats0[6][17] + coeff0_7*dmats0[7][17] + coeff0_8*dmats0[8][17] + coeff0_9*dmats0[9][17] + coeff0_10*dmats0[10][17] + coeff0_11*dmats0[11][17] + coeff0_12*dmats0[12][17] + coeff0_13*dmats0[13][17] + coeff0_14*dmats0[14][17] + coeff0_15*dmats0[15][17] + coeff0_16*dmats0[16][17] + coeff0_17*dmats0[17][17] + coeff0_18*dmats0[18][17] + coeff0_19*dmats0[19][17];
1508
new_coeff0_18 = coeff0_0*dmats0[0][18] + coeff0_1*dmats0[1][18] + coeff0_2*dmats0[2][18] + coeff0_3*dmats0[3][18] + coeff0_4*dmats0[4][18] + coeff0_5*dmats0[5][18] + coeff0_6*dmats0[6][18] + coeff0_7*dmats0[7][18] + coeff0_8*dmats0[8][18] + coeff0_9*dmats0[9][18] + coeff0_10*dmats0[10][18] + coeff0_11*dmats0[11][18] + coeff0_12*dmats0[12][18] + coeff0_13*dmats0[13][18] + coeff0_14*dmats0[14][18] + coeff0_15*dmats0[15][18] + coeff0_16*dmats0[16][18] + coeff0_17*dmats0[17][18] + coeff0_18*dmats0[18][18] + coeff0_19*dmats0[19][18];
1509
new_coeff0_19 = coeff0_0*dmats0[0][19] + coeff0_1*dmats0[1][19] + coeff0_2*dmats0[2][19] + coeff0_3*dmats0[3][19] + coeff0_4*dmats0[4][19] + coeff0_5*dmats0[5][19] + coeff0_6*dmats0[6][19] + coeff0_7*dmats0[7][19] + coeff0_8*dmats0[8][19] + coeff0_9*dmats0[9][19] + coeff0_10*dmats0[10][19] + coeff0_11*dmats0[11][19] + coeff0_12*dmats0[12][19] + coeff0_13*dmats0[13][19] + coeff0_14*dmats0[14][19] + coeff0_15*dmats0[15][19] + coeff0_16*dmats0[16][19] + coeff0_17*dmats0[17][19] + coeff0_18*dmats0[18][19] + coeff0_19*dmats0[19][19];
1511
if(combinations[deriv_num][j] == 1)
1513
new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0] + coeff0_10*dmats1[10][0] + coeff0_11*dmats1[11][0] + coeff0_12*dmats1[12][0] + coeff0_13*dmats1[13][0] + coeff0_14*dmats1[14][0] + coeff0_15*dmats1[15][0] + coeff0_16*dmats1[16][0] + coeff0_17*dmats1[17][0] + coeff0_18*dmats1[18][0] + coeff0_19*dmats1[19][0];
1514
new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1] + coeff0_10*dmats1[10][1] + coeff0_11*dmats1[11][1] + coeff0_12*dmats1[12][1] + coeff0_13*dmats1[13][1] + coeff0_14*dmats1[14][1] + coeff0_15*dmats1[15][1] + coeff0_16*dmats1[16][1] + coeff0_17*dmats1[17][1] + coeff0_18*dmats1[18][1] + coeff0_19*dmats1[19][1];
1515
new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2] + coeff0_10*dmats1[10][2] + coeff0_11*dmats1[11][2] + coeff0_12*dmats1[12][2] + coeff0_13*dmats1[13][2] + coeff0_14*dmats1[14][2] + coeff0_15*dmats1[15][2] + coeff0_16*dmats1[16][2] + coeff0_17*dmats1[17][2] + coeff0_18*dmats1[18][2] + coeff0_19*dmats1[19][2];
1516
new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3] + coeff0_10*dmats1[10][3] + coeff0_11*dmats1[11][3] + coeff0_12*dmats1[12][3] + coeff0_13*dmats1[13][3] + coeff0_14*dmats1[14][3] + coeff0_15*dmats1[15][3] + coeff0_16*dmats1[16][3] + coeff0_17*dmats1[17][3] + coeff0_18*dmats1[18][3] + coeff0_19*dmats1[19][3];
1517
new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4] + coeff0_10*dmats1[10][4] + coeff0_11*dmats1[11][4] + coeff0_12*dmats1[12][4] + coeff0_13*dmats1[13][4] + coeff0_14*dmats1[14][4] + coeff0_15*dmats1[15][4] + coeff0_16*dmats1[16][4] + coeff0_17*dmats1[17][4] + coeff0_18*dmats1[18][4] + coeff0_19*dmats1[19][4];
1518
new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5] + coeff0_10*dmats1[10][5] + coeff0_11*dmats1[11][5] + coeff0_12*dmats1[12][5] + coeff0_13*dmats1[13][5] + coeff0_14*dmats1[14][5] + coeff0_15*dmats1[15][5] + coeff0_16*dmats1[16][5] + coeff0_17*dmats1[17][5] + coeff0_18*dmats1[18][5] + coeff0_19*dmats1[19][5];
1519
new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6] + coeff0_10*dmats1[10][6] + coeff0_11*dmats1[11][6] + coeff0_12*dmats1[12][6] + coeff0_13*dmats1[13][6] + coeff0_14*dmats1[14][6] + coeff0_15*dmats1[15][6] + coeff0_16*dmats1[16][6] + coeff0_17*dmats1[17][6] + coeff0_18*dmats1[18][6] + coeff0_19*dmats1[19][6];
1520
new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7] + coeff0_10*dmats1[10][7] + coeff0_11*dmats1[11][7] + coeff0_12*dmats1[12][7] + coeff0_13*dmats1[13][7] + coeff0_14*dmats1[14][7] + coeff0_15*dmats1[15][7] + coeff0_16*dmats1[16][7] + coeff0_17*dmats1[17][7] + coeff0_18*dmats1[18][7] + coeff0_19*dmats1[19][7];
1521
new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8] + coeff0_10*dmats1[10][8] + coeff0_11*dmats1[11][8] + coeff0_12*dmats1[12][8] + coeff0_13*dmats1[13][8] + coeff0_14*dmats1[14][8] + coeff0_15*dmats1[15][8] + coeff0_16*dmats1[16][8] + coeff0_17*dmats1[17][8] + coeff0_18*dmats1[18][8] + coeff0_19*dmats1[19][8];
1522
new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9] + coeff0_10*dmats1[10][9] + coeff0_11*dmats1[11][9] + coeff0_12*dmats1[12][9] + coeff0_13*dmats1[13][9] + coeff0_14*dmats1[14][9] + coeff0_15*dmats1[15][9] + coeff0_16*dmats1[16][9] + coeff0_17*dmats1[17][9] + coeff0_18*dmats1[18][9] + coeff0_19*dmats1[19][9];
1523
new_coeff0_10 = coeff0_0*dmats1[0][10] + coeff0_1*dmats1[1][10] + coeff0_2*dmats1[2][10] + coeff0_3*dmats1[3][10] + coeff0_4*dmats1[4][10] + coeff0_5*dmats1[5][10] + coeff0_6*dmats1[6][10] + coeff0_7*dmats1[7][10] + coeff0_8*dmats1[8][10] + coeff0_9*dmats1[9][10] + coeff0_10*dmats1[10][10] + coeff0_11*dmats1[11][10] + coeff0_12*dmats1[12][10] + coeff0_13*dmats1[13][10] + coeff0_14*dmats1[14][10] + coeff0_15*dmats1[15][10] + coeff0_16*dmats1[16][10] + coeff0_17*dmats1[17][10] + coeff0_18*dmats1[18][10] + coeff0_19*dmats1[19][10];
1524
new_coeff0_11 = coeff0_0*dmats1[0][11] + coeff0_1*dmats1[1][11] + coeff0_2*dmats1[2][11] + coeff0_3*dmats1[3][11] + coeff0_4*dmats1[4][11] + coeff0_5*dmats1[5][11] + coeff0_6*dmats1[6][11] + coeff0_7*dmats1[7][11] + coeff0_8*dmats1[8][11] + coeff0_9*dmats1[9][11] + coeff0_10*dmats1[10][11] + coeff0_11*dmats1[11][11] + coeff0_12*dmats1[12][11] + coeff0_13*dmats1[13][11] + coeff0_14*dmats1[14][11] + coeff0_15*dmats1[15][11] + coeff0_16*dmats1[16][11] + coeff0_17*dmats1[17][11] + coeff0_18*dmats1[18][11] + coeff0_19*dmats1[19][11];
1525
new_coeff0_12 = coeff0_0*dmats1[0][12] + coeff0_1*dmats1[1][12] + coeff0_2*dmats1[2][12] + coeff0_3*dmats1[3][12] + coeff0_4*dmats1[4][12] + coeff0_5*dmats1[5][12] + coeff0_6*dmats1[6][12] + coeff0_7*dmats1[7][12] + coeff0_8*dmats1[8][12] + coeff0_9*dmats1[9][12] + coeff0_10*dmats1[10][12] + coeff0_11*dmats1[11][12] + coeff0_12*dmats1[12][12] + coeff0_13*dmats1[13][12] + coeff0_14*dmats1[14][12] + coeff0_15*dmats1[15][12] + coeff0_16*dmats1[16][12] + coeff0_17*dmats1[17][12] + coeff0_18*dmats1[18][12] + coeff0_19*dmats1[19][12];
1526
new_coeff0_13 = coeff0_0*dmats1[0][13] + coeff0_1*dmats1[1][13] + coeff0_2*dmats1[2][13] + coeff0_3*dmats1[3][13] + coeff0_4*dmats1[4][13] + coeff0_5*dmats1[5][13] + coeff0_6*dmats1[6][13] + coeff0_7*dmats1[7][13] + coeff0_8*dmats1[8][13] + coeff0_9*dmats1[9][13] + coeff0_10*dmats1[10][13] + coeff0_11*dmats1[11][13] + coeff0_12*dmats1[12][13] + coeff0_13*dmats1[13][13] + coeff0_14*dmats1[14][13] + coeff0_15*dmats1[15][13] + coeff0_16*dmats1[16][13] + coeff0_17*dmats1[17][13] + coeff0_18*dmats1[18][13] + coeff0_19*dmats1[19][13];
1527
new_coeff0_14 = coeff0_0*dmats1[0][14] + coeff0_1*dmats1[1][14] + coeff0_2*dmats1[2][14] + coeff0_3*dmats1[3][14] + coeff0_4*dmats1[4][14] + coeff0_5*dmats1[5][14] + coeff0_6*dmats1[6][14] + coeff0_7*dmats1[7][14] + coeff0_8*dmats1[8][14] + coeff0_9*dmats1[9][14] + coeff0_10*dmats1[10][14] + coeff0_11*dmats1[11][14] + coeff0_12*dmats1[12][14] + coeff0_13*dmats1[13][14] + coeff0_14*dmats1[14][14] + coeff0_15*dmats1[15][14] + coeff0_16*dmats1[16][14] + coeff0_17*dmats1[17][14] + coeff0_18*dmats1[18][14] + coeff0_19*dmats1[19][14];
1528
new_coeff0_15 = coeff0_0*dmats1[0][15] + coeff0_1*dmats1[1][15] + coeff0_2*dmats1[2][15] + coeff0_3*dmats1[3][15] + coeff0_4*dmats1[4][15] + coeff0_5*dmats1[5][15] + coeff0_6*dmats1[6][15] + coeff0_7*dmats1[7][15] + coeff0_8*dmats1[8][15] + coeff0_9*dmats1[9][15] + coeff0_10*dmats1[10][15] + coeff0_11*dmats1[11][15] + coeff0_12*dmats1[12][15] + coeff0_13*dmats1[13][15] + coeff0_14*dmats1[14][15] + coeff0_15*dmats1[15][15] + coeff0_16*dmats1[16][15] + coeff0_17*dmats1[17][15] + coeff0_18*dmats1[18][15] + coeff0_19*dmats1[19][15];
1529
new_coeff0_16 = coeff0_0*dmats1[0][16] + coeff0_1*dmats1[1][16] + coeff0_2*dmats1[2][16] + coeff0_3*dmats1[3][16] + coeff0_4*dmats1[4][16] + coeff0_5*dmats1[5][16] + coeff0_6*dmats1[6][16] + coeff0_7*dmats1[7][16] + coeff0_8*dmats1[8][16] + coeff0_9*dmats1[9][16] + coeff0_10*dmats1[10][16] + coeff0_11*dmats1[11][16] + coeff0_12*dmats1[12][16] + coeff0_13*dmats1[13][16] + coeff0_14*dmats1[14][16] + coeff0_15*dmats1[15][16] + coeff0_16*dmats1[16][16] + coeff0_17*dmats1[17][16] + coeff0_18*dmats1[18][16] + coeff0_19*dmats1[19][16];
1530
new_coeff0_17 = coeff0_0*dmats1[0][17] + coeff0_1*dmats1[1][17] + coeff0_2*dmats1[2][17] + coeff0_3*dmats1[3][17] + coeff0_4*dmats1[4][17] + coeff0_5*dmats1[5][17] + coeff0_6*dmats1[6][17] + coeff0_7*dmats1[7][17] + coeff0_8*dmats1[8][17] + coeff0_9*dmats1[9][17] + coeff0_10*dmats1[10][17] + coeff0_11*dmats1[11][17] + coeff0_12*dmats1[12][17] + coeff0_13*dmats1[13][17] + coeff0_14*dmats1[14][17] + coeff0_15*dmats1[15][17] + coeff0_16*dmats1[16][17] + coeff0_17*dmats1[17][17] + coeff0_18*dmats1[18][17] + coeff0_19*dmats1[19][17];
1531
new_coeff0_18 = coeff0_0*dmats1[0][18] + coeff0_1*dmats1[1][18] + coeff0_2*dmats1[2][18] + coeff0_3*dmats1[3][18] + coeff0_4*dmats1[4][18] + coeff0_5*dmats1[5][18] + coeff0_6*dmats1[6][18] + coeff0_7*dmats1[7][18] + coeff0_8*dmats1[8][18] + coeff0_9*dmats1[9][18] + coeff0_10*dmats1[10][18] + coeff0_11*dmats1[11][18] + coeff0_12*dmats1[12][18] + coeff0_13*dmats1[13][18] + coeff0_14*dmats1[14][18] + coeff0_15*dmats1[15][18] + coeff0_16*dmats1[16][18] + coeff0_17*dmats1[17][18] + coeff0_18*dmats1[18][18] + coeff0_19*dmats1[19][18];
1532
new_coeff0_19 = coeff0_0*dmats1[0][19] + coeff0_1*dmats1[1][19] + coeff0_2*dmats1[2][19] + coeff0_3*dmats1[3][19] + coeff0_4*dmats1[4][19] + coeff0_5*dmats1[5][19] + coeff0_6*dmats1[6][19] + coeff0_7*dmats1[7][19] + coeff0_8*dmats1[8][19] + coeff0_9*dmats1[9][19] + coeff0_10*dmats1[10][19] + coeff0_11*dmats1[11][19] + coeff0_12*dmats1[12][19] + coeff0_13*dmats1[13][19] + coeff0_14*dmats1[14][19] + coeff0_15*dmats1[15][19] + coeff0_16*dmats1[16][19] + coeff0_17*dmats1[17][19] + coeff0_18*dmats1[18][19] + coeff0_19*dmats1[19][19];
1534
if(combinations[deriv_num][j] == 2)
1536
new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0] + coeff0_10*dmats2[10][0] + coeff0_11*dmats2[11][0] + coeff0_12*dmats2[12][0] + coeff0_13*dmats2[13][0] + coeff0_14*dmats2[14][0] + coeff0_15*dmats2[15][0] + coeff0_16*dmats2[16][0] + coeff0_17*dmats2[17][0] + coeff0_18*dmats2[18][0] + coeff0_19*dmats2[19][0];
1537
new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1] + coeff0_10*dmats2[10][1] + coeff0_11*dmats2[11][1] + coeff0_12*dmats2[12][1] + coeff0_13*dmats2[13][1] + coeff0_14*dmats2[14][1] + coeff0_15*dmats2[15][1] + coeff0_16*dmats2[16][1] + coeff0_17*dmats2[17][1] + coeff0_18*dmats2[18][1] + coeff0_19*dmats2[19][1];
1538
new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2] + coeff0_10*dmats2[10][2] + coeff0_11*dmats2[11][2] + coeff0_12*dmats2[12][2] + coeff0_13*dmats2[13][2] + coeff0_14*dmats2[14][2] + coeff0_15*dmats2[15][2] + coeff0_16*dmats2[16][2] + coeff0_17*dmats2[17][2] + coeff0_18*dmats2[18][2] + coeff0_19*dmats2[19][2];
1539
new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3] + coeff0_10*dmats2[10][3] + coeff0_11*dmats2[11][3] + coeff0_12*dmats2[12][3] + coeff0_13*dmats2[13][3] + coeff0_14*dmats2[14][3] + coeff0_15*dmats2[15][3] + coeff0_16*dmats2[16][3] + coeff0_17*dmats2[17][3] + coeff0_18*dmats2[18][3] + coeff0_19*dmats2[19][3];
1540
new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4] + coeff0_10*dmats2[10][4] + coeff0_11*dmats2[11][4] + coeff0_12*dmats2[12][4] + coeff0_13*dmats2[13][4] + coeff0_14*dmats2[14][4] + coeff0_15*dmats2[15][4] + coeff0_16*dmats2[16][4] + coeff0_17*dmats2[17][4] + coeff0_18*dmats2[18][4] + coeff0_19*dmats2[19][4];
1541
new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5] + coeff0_10*dmats2[10][5] + coeff0_11*dmats2[11][5] + coeff0_12*dmats2[12][5] + coeff0_13*dmats2[13][5] + coeff0_14*dmats2[14][5] + coeff0_15*dmats2[15][5] + coeff0_16*dmats2[16][5] + coeff0_17*dmats2[17][5] + coeff0_18*dmats2[18][5] + coeff0_19*dmats2[19][5];
1542
new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6] + coeff0_10*dmats2[10][6] + coeff0_11*dmats2[11][6] + coeff0_12*dmats2[12][6] + coeff0_13*dmats2[13][6] + coeff0_14*dmats2[14][6] + coeff0_15*dmats2[15][6] + coeff0_16*dmats2[16][6] + coeff0_17*dmats2[17][6] + coeff0_18*dmats2[18][6] + coeff0_19*dmats2[19][6];
1543
new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7] + coeff0_10*dmats2[10][7] + coeff0_11*dmats2[11][7] + coeff0_12*dmats2[12][7] + coeff0_13*dmats2[13][7] + coeff0_14*dmats2[14][7] + coeff0_15*dmats2[15][7] + coeff0_16*dmats2[16][7] + coeff0_17*dmats2[17][7] + coeff0_18*dmats2[18][7] + coeff0_19*dmats2[19][7];
1544
new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8] + coeff0_10*dmats2[10][8] + coeff0_11*dmats2[11][8] + coeff0_12*dmats2[12][8] + coeff0_13*dmats2[13][8] + coeff0_14*dmats2[14][8] + coeff0_15*dmats2[15][8] + coeff0_16*dmats2[16][8] + coeff0_17*dmats2[17][8] + coeff0_18*dmats2[18][8] + coeff0_19*dmats2[19][8];
1545
new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9] + coeff0_10*dmats2[10][9] + coeff0_11*dmats2[11][9] + coeff0_12*dmats2[12][9] + coeff0_13*dmats2[13][9] + coeff0_14*dmats2[14][9] + coeff0_15*dmats2[15][9] + coeff0_16*dmats2[16][9] + coeff0_17*dmats2[17][9] + coeff0_18*dmats2[18][9] + coeff0_19*dmats2[19][9];
1546
new_coeff0_10 = coeff0_0*dmats2[0][10] + coeff0_1*dmats2[1][10] + coeff0_2*dmats2[2][10] + coeff0_3*dmats2[3][10] + coeff0_4*dmats2[4][10] + coeff0_5*dmats2[5][10] + coeff0_6*dmats2[6][10] + coeff0_7*dmats2[7][10] + coeff0_8*dmats2[8][10] + coeff0_9*dmats2[9][10] + coeff0_10*dmats2[10][10] + coeff0_11*dmats2[11][10] + coeff0_12*dmats2[12][10] + coeff0_13*dmats2[13][10] + coeff0_14*dmats2[14][10] + coeff0_15*dmats2[15][10] + coeff0_16*dmats2[16][10] + coeff0_17*dmats2[17][10] + coeff0_18*dmats2[18][10] + coeff0_19*dmats2[19][10];
1547
new_coeff0_11 = coeff0_0*dmats2[0][11] + coeff0_1*dmats2[1][11] + coeff0_2*dmats2[2][11] + coeff0_3*dmats2[3][11] + coeff0_4*dmats2[4][11] + coeff0_5*dmats2[5][11] + coeff0_6*dmats2[6][11] + coeff0_7*dmats2[7][11] + coeff0_8*dmats2[8][11] + coeff0_9*dmats2[9][11] + coeff0_10*dmats2[10][11] + coeff0_11*dmats2[11][11] + coeff0_12*dmats2[12][11] + coeff0_13*dmats2[13][11] + coeff0_14*dmats2[14][11] + coeff0_15*dmats2[15][11] + coeff0_16*dmats2[16][11] + coeff0_17*dmats2[17][11] + coeff0_18*dmats2[18][11] + coeff0_19*dmats2[19][11];
1548
new_coeff0_12 = coeff0_0*dmats2[0][12] + coeff0_1*dmats2[1][12] + coeff0_2*dmats2[2][12] + coeff0_3*dmats2[3][12] + coeff0_4*dmats2[4][12] + coeff0_5*dmats2[5][12] + coeff0_6*dmats2[6][12] + coeff0_7*dmats2[7][12] + coeff0_8*dmats2[8][12] + coeff0_9*dmats2[9][12] + coeff0_10*dmats2[10][12] + coeff0_11*dmats2[11][12] + coeff0_12*dmats2[12][12] + coeff0_13*dmats2[13][12] + coeff0_14*dmats2[14][12] + coeff0_15*dmats2[15][12] + coeff0_16*dmats2[16][12] + coeff0_17*dmats2[17][12] + coeff0_18*dmats2[18][12] + coeff0_19*dmats2[19][12];
1549
new_coeff0_13 = coeff0_0*dmats2[0][13] + coeff0_1*dmats2[1][13] + coeff0_2*dmats2[2][13] + coeff0_3*dmats2[3][13] + coeff0_4*dmats2[4][13] + coeff0_5*dmats2[5][13] + coeff0_6*dmats2[6][13] + coeff0_7*dmats2[7][13] + coeff0_8*dmats2[8][13] + coeff0_9*dmats2[9][13] + coeff0_10*dmats2[10][13] + coeff0_11*dmats2[11][13] + coeff0_12*dmats2[12][13] + coeff0_13*dmats2[13][13] + coeff0_14*dmats2[14][13] + coeff0_15*dmats2[15][13] + coeff0_16*dmats2[16][13] + coeff0_17*dmats2[17][13] + coeff0_18*dmats2[18][13] + coeff0_19*dmats2[19][13];
1550
new_coeff0_14 = coeff0_0*dmats2[0][14] + coeff0_1*dmats2[1][14] + coeff0_2*dmats2[2][14] + coeff0_3*dmats2[3][14] + coeff0_4*dmats2[4][14] + coeff0_5*dmats2[5][14] + coeff0_6*dmats2[6][14] + coeff0_7*dmats2[7][14] + coeff0_8*dmats2[8][14] + coeff0_9*dmats2[9][14] + coeff0_10*dmats2[10][14] + coeff0_11*dmats2[11][14] + coeff0_12*dmats2[12][14] + coeff0_13*dmats2[13][14] + coeff0_14*dmats2[14][14] + coeff0_15*dmats2[15][14] + coeff0_16*dmats2[16][14] + coeff0_17*dmats2[17][14] + coeff0_18*dmats2[18][14] + coeff0_19*dmats2[19][14];
1551
new_coeff0_15 = coeff0_0*dmats2[0][15] + coeff0_1*dmats2[1][15] + coeff0_2*dmats2[2][15] + coeff0_3*dmats2[3][15] + coeff0_4*dmats2[4][15] + coeff0_5*dmats2[5][15] + coeff0_6*dmats2[6][15] + coeff0_7*dmats2[7][15] + coeff0_8*dmats2[8][15] + coeff0_9*dmats2[9][15] + coeff0_10*dmats2[10][15] + coeff0_11*dmats2[11][15] + coeff0_12*dmats2[12][15] + coeff0_13*dmats2[13][15] + coeff0_14*dmats2[14][15] + coeff0_15*dmats2[15][15] + coeff0_16*dmats2[16][15] + coeff0_17*dmats2[17][15] + coeff0_18*dmats2[18][15] + coeff0_19*dmats2[19][15];
1552
new_coeff0_16 = coeff0_0*dmats2[0][16] + coeff0_1*dmats2[1][16] + coeff0_2*dmats2[2][16] + coeff0_3*dmats2[3][16] + coeff0_4*dmats2[4][16] + coeff0_5*dmats2[5][16] + coeff0_6*dmats2[6][16] + coeff0_7*dmats2[7][16] + coeff0_8*dmats2[8][16] + coeff0_9*dmats2[9][16] + coeff0_10*dmats2[10][16] + coeff0_11*dmats2[11][16] + coeff0_12*dmats2[12][16] + coeff0_13*dmats2[13][16] + coeff0_14*dmats2[14][16] + coeff0_15*dmats2[15][16] + coeff0_16*dmats2[16][16] + coeff0_17*dmats2[17][16] + coeff0_18*dmats2[18][16] + coeff0_19*dmats2[19][16];
1553
new_coeff0_17 = coeff0_0*dmats2[0][17] + coeff0_1*dmats2[1][17] + coeff0_2*dmats2[2][17] + coeff0_3*dmats2[3][17] + coeff0_4*dmats2[4][17] + coeff0_5*dmats2[5][17] + coeff0_6*dmats2[6][17] + coeff0_7*dmats2[7][17] + coeff0_8*dmats2[8][17] + coeff0_9*dmats2[9][17] + coeff0_10*dmats2[10][17] + coeff0_11*dmats2[11][17] + coeff0_12*dmats2[12][17] + coeff0_13*dmats2[13][17] + coeff0_14*dmats2[14][17] + coeff0_15*dmats2[15][17] + coeff0_16*dmats2[16][17] + coeff0_17*dmats2[17][17] + coeff0_18*dmats2[18][17] + coeff0_19*dmats2[19][17];
1554
new_coeff0_18 = coeff0_0*dmats2[0][18] + coeff0_1*dmats2[1][18] + coeff0_2*dmats2[2][18] + coeff0_3*dmats2[3][18] + coeff0_4*dmats2[4][18] + coeff0_5*dmats2[5][18] + coeff0_6*dmats2[6][18] + coeff0_7*dmats2[7][18] + coeff0_8*dmats2[8][18] + coeff0_9*dmats2[9][18] + coeff0_10*dmats2[10][18] + coeff0_11*dmats2[11][18] + coeff0_12*dmats2[12][18] + coeff0_13*dmats2[13][18] + coeff0_14*dmats2[14][18] + coeff0_15*dmats2[15][18] + coeff0_16*dmats2[16][18] + coeff0_17*dmats2[17][18] + coeff0_18*dmats2[18][18] + coeff0_19*dmats2[19][18];
1555
new_coeff0_19 = coeff0_0*dmats2[0][19] + coeff0_1*dmats2[1][19] + coeff0_2*dmats2[2][19] + coeff0_3*dmats2[3][19] + coeff0_4*dmats2[4][19] + coeff0_5*dmats2[5][19] + coeff0_6*dmats2[6][19] + coeff0_7*dmats2[7][19] + coeff0_8*dmats2[8][19] + coeff0_9*dmats2[9][19] + coeff0_10*dmats2[10][19] + coeff0_11*dmats2[11][19] + coeff0_12*dmats2[12][19] + coeff0_13*dmats2[13][19] + coeff0_14*dmats2[14][19] + coeff0_15*dmats2[15][19] + coeff0_16*dmats2[16][19] + coeff0_17*dmats2[17][19] + coeff0_18*dmats2[18][19] + coeff0_19*dmats2[19][19];
1559
// Compute derivatives on reference element as dot product of coefficients and basisvalues
1560
derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9 + new_coeff0_10*basisvalue10 + new_coeff0_11*basisvalue11 + new_coeff0_12*basisvalue12 + new_coeff0_13*basisvalue13 + new_coeff0_14*basisvalue14 + new_coeff0_15*basisvalue15 + new_coeff0_16*basisvalue16 + new_coeff0_17*basisvalue17 + new_coeff0_18*basisvalue18 + new_coeff0_19*basisvalue19;
1563
// Transform derivatives back to physical element
1564
for (unsigned int row = 0; row < num_derivatives; row++)
1566
for (unsigned int col = 0; col < num_derivatives; col++)
1568
values[row] += transform[row][col]*derivatives[col];
1571
// Delete pointer to array of derivatives on FIAT element
1572
delete [] derivatives;
1574
// Delete pointer to array of combinations of derivatives and transform
1575
for (unsigned int row = 0; row < num_derivatives; row++)
1577
delete [] combinations[row];
1578
delete [] transform[row];
1581
delete [] combinations;
1582
delete [] transform;
1585
/// Evaluate order n derivatives of all basis functions at given point in cell
1586
virtual void evaluate_basis_derivatives_all(unsigned int n,
1588
const double* coordinates,
1589
const ufc::cell& c) const
1591
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
1594
/// Evaluate linear functional for dof i on the function f
1595
virtual double evaluate_dof(unsigned int i,
1596
const ufc::function& f,
1597
const ufc::cell& c) const
1599
// The reference points, direction and weights:
1600
static const double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.666666666666667, 0.333333333333333}}, {{0, 0.333333333333333, 0.666666666666667}}, {{0.666666666666667, 0, 0.333333333333333}}, {{0.333333333333333, 0, 0.666666666666667}}, {{0.666666666666667, 0.333333333333333, 0}}, {{0.333333333333333, 0.666666666666667, 0}}, {{0, 0, 0.333333333333333}}, {{0, 0, 0.666666666666667}}, {{0, 0.333333333333333, 0}}, {{0, 0.666666666666667, 0}}, {{0.333333333333333, 0, 0}}, {{0.666666666666667, 0, 0}}, {{0.333333333333333, 0.333333333333333, 0.333333333333333}}, {{0, 0.333333333333333, 0.333333333333333}}, {{0.333333333333333, 0, 0.333333333333333}}, {{0.333333333333333, 0.333333333333333, 0}}};
1601
static const double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
1602
static const double D[20][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
1604
const double * const * x = c.coordinates;
1605
double result = 0.0;
1606
// Iterate over the points:
1607
// Evaluate basis functions for affine mapping
1608
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
1609
const double w1 = X[i][0][0];
1610
const double w2 = X[i][0][1];
1611
const double w3 = X[i][0][2];
1613
// Compute affine mapping y = F(X)
1615
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
1616
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
1617
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
1619
// Evaluate function at physical points
1621
f.evaluate(values, y, c);
1623
// Map function values using appropriate mapping
1624
// Affine map: Do nothing
1626
// Note that we do not map the weights (yet).
1628
// Take directional components
1629
for(int k = 0; k < 1; k++)
1630
result += values[k]*D[i][0][k];
1631
// Multiply by weights
1637
/// Evaluate linear functionals for all dofs on the function f
1638
virtual void evaluate_dofs(double* values,
1639
const ufc::function& f,
1640
const ufc::cell& c) const
1642
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1645
/// Interpolate vertex values from dof values
1646
virtual void interpolate_vertex_values(double* vertex_values,
1647
const double* dof_values,
1648
const ufc::cell& c) const
1650
// Evaluate at vertices and use affine mapping
1651
vertex_values[0] = dof_values[0];
1652
vertex_values[1] = dof_values[1];
1653
vertex_values[2] = dof_values[2];
1654
vertex_values[3] = dof_values[3];
1657
/// Return the number of sub elements (for a mixed element)
1658
virtual unsigned int num_sub_elements() const
1663
/// Create a new finite element for sub element i (for a mixed element)
1664
virtual ufc::finite_element* create_sub_element(unsigned int i) const
1666
return new poisson3dp3_0_finite_element_1();
1671
/// This class defines the interface for a local-to-global mapping of
1672
/// degrees of freedom (dofs).
1674
class poisson3dp3_0_dof_map_0: public ufc::dof_map
1678
unsigned int __global_dimension;
1683
poisson3dp3_0_dof_map_0() : ufc::dof_map()
1685
__global_dimension = 0;
1689
virtual ~poisson3dp3_0_dof_map_0()
1694
/// Return a string identifying the dof map
1695
virtual const char* signature() const
1697
return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 3)";
1700
/// Return true iff mesh entities of topological dimension d are needed
1701
virtual bool needs_mesh_entities(unsigned int d) const
1721
/// Initialize dof map for mesh (return true iff init_cell() is needed)
1722
virtual bool init_mesh(const ufc::mesh& m)
1724
__global_dimension = m.num_entities[0] + 2*m.num_entities[1] + m.num_entities[2];
1728
/// Initialize dof map for given cell
1729
virtual void init_cell(const ufc::mesh& m,
1735
/// Finish initialization of dof map for cells
1736
virtual void init_cell_finalize()
1741
/// Return the dimension of the global finite element function space
1742
virtual unsigned int global_dimension() const
1744
return __global_dimension;
1747
/// Return the dimension of the local finite element function space for a cell
1748
virtual unsigned int local_dimension(const ufc::cell& c) const
1753
/// Return the maximum dimension of the local finite element function space
1754
virtual unsigned int max_local_dimension() const
1759
// Return the geometric dimension of the coordinates this dof map provides
1760
virtual unsigned int geometric_dimension() const
1765
/// Return the number of dofs on each cell facet
1766
virtual unsigned int num_facet_dofs() const
1771
/// Return the number of dofs associated with each cell entity of dimension d
1772
virtual unsigned int num_entity_dofs(unsigned int d) const
1774
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1777
/// Tabulate the local-to-global mapping of dofs on a cell
1778
virtual void tabulate_dofs(unsigned int* dofs,
1780
const ufc::cell& c) const
1782
dofs[0] = c.entity_indices[0][0];
1783
dofs[1] = c.entity_indices[0][1];
1784
dofs[2] = c.entity_indices[0][2];
1785
dofs[3] = c.entity_indices[0][3];
1786
unsigned int offset = m.num_entities[0];
1787
dofs[4] = offset + 2*c.entity_indices[1][0];
1788
dofs[5] = offset + 2*c.entity_indices[1][0] + 1;
1789
dofs[6] = offset + 2*c.entity_indices[1][1];
1790
dofs[7] = offset + 2*c.entity_indices[1][1] + 1;
1791
dofs[8] = offset + 2*c.entity_indices[1][2];
1792
dofs[9] = offset + 2*c.entity_indices[1][2] + 1;
1793
dofs[10] = offset + 2*c.entity_indices[1][3];
1794
dofs[11] = offset + 2*c.entity_indices[1][3] + 1;
1795
dofs[12] = offset + 2*c.entity_indices[1][4];
1796
dofs[13] = offset + 2*c.entity_indices[1][4] + 1;
1797
dofs[14] = offset + 2*c.entity_indices[1][5];
1798
dofs[15] = offset + 2*c.entity_indices[1][5] + 1;
1799
offset = offset + 2*m.num_entities[1];
1800
dofs[16] = offset + c.entity_indices[2][0];
1801
dofs[17] = offset + c.entity_indices[2][1];
1802
dofs[18] = offset + c.entity_indices[2][2];
1803
dofs[19] = offset + c.entity_indices[2][3];
1806
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
1807
virtual void tabulate_facet_dofs(unsigned int* dofs,
1808
unsigned int facet) const
1863
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
1864
virtual void tabulate_entity_dofs(unsigned int* dofs,
1865
unsigned int d, unsigned int i) const
1867
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1870
/// Tabulate the coordinates of all dofs on a cell
1871
virtual void tabulate_coordinates(double** coordinates,
1872
const ufc::cell& c) const
1874
const double * const * x = c.coordinates;
1875
coordinates[0][0] = x[0][0];
1876
coordinates[0][1] = x[0][1];
1877
coordinates[0][2] = x[0][2];
1878
coordinates[1][0] = x[1][0];
1879
coordinates[1][1] = x[1][1];
1880
coordinates[1][2] = x[1][2];
1881
coordinates[2][0] = x[2][0];
1882
coordinates[2][1] = x[2][1];
1883
coordinates[2][2] = x[2][2];
1884
coordinates[3][0] = x[3][0];
1885
coordinates[3][1] = x[3][1];
1886
coordinates[3][2] = x[3][2];
1887
coordinates[4][0] = 0.666666666666667*x[2][0] + 0.333333333333333*x[3][0];
1888
coordinates[4][1] = 0.666666666666667*x[2][1] + 0.333333333333333*x[3][1];
1889
coordinates[4][2] = 0.666666666666667*x[2][2] + 0.333333333333333*x[3][2];
1890
coordinates[5][0] = 0.333333333333333*x[2][0] + 0.666666666666667*x[3][0];
1891
coordinates[5][1] = 0.333333333333333*x[2][1] + 0.666666666666667*x[3][1];
1892
coordinates[5][2] = 0.333333333333333*x[2][2] + 0.666666666666667*x[3][2];
1893
coordinates[6][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[3][0];
1894
coordinates[6][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[3][1];
1895
coordinates[6][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[3][2];
1896
coordinates[7][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[3][0];
1897
coordinates[7][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[3][1];
1898
coordinates[7][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[3][2];
1899
coordinates[8][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[2][0];
1900
coordinates[8][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[2][1];
1901
coordinates[8][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[2][2];
1902
coordinates[9][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[2][0];
1903
coordinates[9][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[2][1];
1904
coordinates[9][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[2][2];
1905
coordinates[10][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[3][0];
1906
coordinates[10][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[3][1];
1907
coordinates[10][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[3][2];
1908
coordinates[11][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[3][0];
1909
coordinates[11][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[3][1];
1910
coordinates[11][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[3][2];
1911
coordinates[12][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[2][0];
1912
coordinates[12][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[2][1];
1913
coordinates[12][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[2][2];
1914
coordinates[13][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[2][0];
1915
coordinates[13][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[2][1];
1916
coordinates[13][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[2][2];
1917
coordinates[14][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[1][0];
1918
coordinates[14][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[1][1];
1919
coordinates[14][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[1][2];
1920
coordinates[15][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[1][0];
1921
coordinates[15][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[1][1];
1922
coordinates[15][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[1][2];
1923
coordinates[16][0] = 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
1924
coordinates[16][1] = 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
1925
coordinates[16][2] = 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
1926
coordinates[17][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
1927
coordinates[17][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
1928
coordinates[17][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
1929
coordinates[18][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[3][0];
1930
coordinates[18][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[3][1];
1931
coordinates[18][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[3][2];
1932
coordinates[19][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0];
1933
coordinates[19][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1];
1934
coordinates[19][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2];
1937
/// Return the number of sub dof maps (for a mixed element)
1938
virtual unsigned int num_sub_dof_maps() const
1943
/// Create a new dof_map for sub dof map i (for a mixed element)
1944
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
1946
return new poisson3dp3_0_dof_map_0();
1951
/// This class defines the interface for a local-to-global mapping of
1952
/// degrees of freedom (dofs).
1954
class poisson3dp3_0_dof_map_1: public ufc::dof_map
1958
unsigned int __global_dimension;
1963
poisson3dp3_0_dof_map_1() : ufc::dof_map()
1965
__global_dimension = 0;
1969
virtual ~poisson3dp3_0_dof_map_1()
1974
/// Return a string identifying the dof map
1975
virtual const char* signature() const
1977
return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 3)";
1980
/// Return true iff mesh entities of topological dimension d are needed
1981
virtual bool needs_mesh_entities(unsigned int d) const
2001
/// Initialize dof map for mesh (return true iff init_cell() is needed)
2002
virtual bool init_mesh(const ufc::mesh& m)
2004
__global_dimension = m.num_entities[0] + 2*m.num_entities[1] + m.num_entities[2];
2008
/// Initialize dof map for given cell
2009
virtual void init_cell(const ufc::mesh& m,
2015
/// Finish initialization of dof map for cells
2016
virtual void init_cell_finalize()
2021
/// Return the dimension of the global finite element function space
2022
virtual unsigned int global_dimension() const
2024
return __global_dimension;
2027
/// Return the dimension of the local finite element function space for a cell
2028
virtual unsigned int local_dimension(const ufc::cell& c) const
2033
/// Return the maximum dimension of the local finite element function space
2034
virtual unsigned int max_local_dimension() const
2039
// Return the geometric dimension of the coordinates this dof map provides
2040
virtual unsigned int geometric_dimension() const
2045
/// Return the number of dofs on each cell facet
2046
virtual unsigned int num_facet_dofs() const
2051
/// Return the number of dofs associated with each cell entity of dimension d
2052
virtual unsigned int num_entity_dofs(unsigned int d) const
2054
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2057
/// Tabulate the local-to-global mapping of dofs on a cell
2058
virtual void tabulate_dofs(unsigned int* dofs,
2060
const ufc::cell& c) const
2062
dofs[0] = c.entity_indices[0][0];
2063
dofs[1] = c.entity_indices[0][1];
2064
dofs[2] = c.entity_indices[0][2];
2065
dofs[3] = c.entity_indices[0][3];
2066
unsigned int offset = m.num_entities[0];
2067
dofs[4] = offset + 2*c.entity_indices[1][0];
2068
dofs[5] = offset + 2*c.entity_indices[1][0] + 1;
2069
dofs[6] = offset + 2*c.entity_indices[1][1];
2070
dofs[7] = offset + 2*c.entity_indices[1][1] + 1;
2071
dofs[8] = offset + 2*c.entity_indices[1][2];
2072
dofs[9] = offset + 2*c.entity_indices[1][2] + 1;
2073
dofs[10] = offset + 2*c.entity_indices[1][3];
2074
dofs[11] = offset + 2*c.entity_indices[1][3] + 1;
2075
dofs[12] = offset + 2*c.entity_indices[1][4];
2076
dofs[13] = offset + 2*c.entity_indices[1][4] + 1;
2077
dofs[14] = offset + 2*c.entity_indices[1][5];
2078
dofs[15] = offset + 2*c.entity_indices[1][5] + 1;
2079
offset = offset + 2*m.num_entities[1];
2080
dofs[16] = offset + c.entity_indices[2][0];
2081
dofs[17] = offset + c.entity_indices[2][1];
2082
dofs[18] = offset + c.entity_indices[2][2];
2083
dofs[19] = offset + c.entity_indices[2][3];
2086
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
2087
virtual void tabulate_facet_dofs(unsigned int* dofs,
2088
unsigned int facet) const
2143
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
2144
virtual void tabulate_entity_dofs(unsigned int* dofs,
2145
unsigned int d, unsigned int i) const
2147
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2150
/// Tabulate the coordinates of all dofs on a cell
2151
virtual void tabulate_coordinates(double** coordinates,
2152
const ufc::cell& c) const
2154
const double * const * x = c.coordinates;
2155
coordinates[0][0] = x[0][0];
2156
coordinates[0][1] = x[0][1];
2157
coordinates[0][2] = x[0][2];
2158
coordinates[1][0] = x[1][0];
2159
coordinates[1][1] = x[1][1];
2160
coordinates[1][2] = x[1][2];
2161
coordinates[2][0] = x[2][0];
2162
coordinates[2][1] = x[2][1];
2163
coordinates[2][2] = x[2][2];
2164
coordinates[3][0] = x[3][0];
2165
coordinates[3][1] = x[3][1];
2166
coordinates[3][2] = x[3][2];
2167
coordinates[4][0] = 0.666666666666667*x[2][0] + 0.333333333333333*x[3][0];
2168
coordinates[4][1] = 0.666666666666667*x[2][1] + 0.333333333333333*x[3][1];
2169
coordinates[4][2] = 0.666666666666667*x[2][2] + 0.333333333333333*x[3][2];
2170
coordinates[5][0] = 0.333333333333333*x[2][0] + 0.666666666666667*x[3][0];
2171
coordinates[5][1] = 0.333333333333333*x[2][1] + 0.666666666666667*x[3][1];
2172
coordinates[5][2] = 0.333333333333333*x[2][2] + 0.666666666666667*x[3][2];
2173
coordinates[6][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[3][0];
2174
coordinates[6][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[3][1];
2175
coordinates[6][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[3][2];
2176
coordinates[7][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[3][0];
2177
coordinates[7][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[3][1];
2178
coordinates[7][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[3][2];
2179
coordinates[8][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[2][0];
2180
coordinates[8][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[2][1];
2181
coordinates[8][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[2][2];
2182
coordinates[9][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[2][0];
2183
coordinates[9][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[2][1];
2184
coordinates[9][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[2][2];
2185
coordinates[10][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[3][0];
2186
coordinates[10][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[3][1];
2187
coordinates[10][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[3][2];
2188
coordinates[11][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[3][0];
2189
coordinates[11][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[3][1];
2190
coordinates[11][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[3][2];
2191
coordinates[12][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[2][0];
2192
coordinates[12][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[2][1];
2193
coordinates[12][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[2][2];
2194
coordinates[13][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[2][0];
2195
coordinates[13][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[2][1];
2196
coordinates[13][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[2][2];
2197
coordinates[14][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[1][0];
2198
coordinates[14][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[1][1];
2199
coordinates[14][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[1][2];
2200
coordinates[15][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[1][0];
2201
coordinates[15][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[1][1];
2202
coordinates[15][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[1][2];
2203
coordinates[16][0] = 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
2204
coordinates[16][1] = 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
2205
coordinates[16][2] = 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
2206
coordinates[17][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
2207
coordinates[17][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
2208
coordinates[17][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
2209
coordinates[18][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[3][0];
2210
coordinates[18][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[3][1];
2211
coordinates[18][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[3][2];
2212
coordinates[19][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0];
2213
coordinates[19][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1];
2214
coordinates[19][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2];
2217
/// Return the number of sub dof maps (for a mixed element)
2218
virtual unsigned int num_sub_dof_maps() const
2223
/// Create a new dof_map for sub dof map i (for a mixed element)
2224
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
2226
return new poisson3dp3_0_dof_map_1();
2231
/// This class defines the interface for the tabulation of the cell
2232
/// tensor corresponding to the local contribution to a form from
2233
/// the integral over a cell.
2235
class poisson3dp3_0_cell_integral_0_quadrature: public ufc::cell_integral
2240
poisson3dp3_0_cell_integral_0_quadrature() : ufc::cell_integral()
2246
virtual ~poisson3dp3_0_cell_integral_0_quadrature()
2251
/// Tabulate the tensor for the contribution from a local cell
2252
virtual void tabulate_tensor(double* A,
2253
const double * const * w,
2254
const ufc::cell& c) const
2256
// Extract vertex coordinates
2257
const double * const * x = c.coordinates;
2259
// Compute Jacobian of affine map from reference cell
2260
const double J_00 = x[1][0] - x[0][0];
2261
const double J_01 = x[2][0] - x[0][0];
2262
const double J_02 = x[3][0] - x[0][0];
2263
const double J_10 = x[1][1] - x[0][1];
2264
const double J_11 = x[2][1] - x[0][1];
2265
const double J_12 = x[3][1] - x[0][1];
2266
const double J_20 = x[1][2] - x[0][2];
2267
const double J_21 = x[2][2] - x[0][2];
2268
const double J_22 = x[3][2] - x[0][2];
2270
// Compute sub determinants
2271
const double d_00 = J_11*J_22 - J_12*J_21;
2272
const double d_01 = J_12*J_20 - J_10*J_22;
2273
const double d_02 = J_10*J_21 - J_11*J_20;
2275
const double d_10 = J_02*J_21 - J_01*J_22;
2276
const double d_11 = J_00*J_22 - J_02*J_20;
2277
const double d_12 = J_01*J_20 - J_00*J_21;
2279
const double d_20 = J_01*J_12 - J_02*J_11;
2280
const double d_21 = J_02*J_10 - J_00*J_12;
2281
const double d_22 = J_00*J_11 - J_01*J_10;
2283
// Compute determinant of Jacobian
2284
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
2286
// Compute inverse of Jacobian
2287
const double Jinv_00 = d_00 / detJ;
2288
const double Jinv_01 = d_10 / detJ;
2289
const double Jinv_02 = d_20 / detJ;
2290
const double Jinv_10 = d_01 / detJ;
2291
const double Jinv_11 = d_11 / detJ;
2292
const double Jinv_12 = d_21 / detJ;
2293
const double Jinv_20 = d_02 / detJ;
2294
const double Jinv_21 = d_12 / detJ;
2295
const double Jinv_22 = d_22 / detJ;
2298
const double det = std::abs(detJ);
2301
// Array of quadrature weights
2302
static const double W64[64] = {0.0026134590075074, 0.00338108957856492, 0.00161758872343451, 0.000243985421620605, 0.00392412678076307, 0.00507672939399183, 0.00242882065938497, 0.000366345798555432, 0.00250430944300902, 0.0032398803788146, 0.00155003109035391, 0.000233795515279108, 0.000601372928720174, 0.000778009425931694, 0.000372217075256263, 5.6142540266951e-05, 0.00489961445988875, 0.00633873932658916, 0.00303259438036939, 0.00045741467393993, 0.00735680500908296, 0.00951766095289489, 0.00455346144286727, 0.000686811297504771, 0.00469498496963441, 0.00607400564032183, 0.00290593987575818, 0.000438311021534327, 0.00112743130421366, 0.00145858275269461, 0.000697818545806259, 0.000105253918778391, 0.00489961445988875, 0.00633873932658916, 0.00303259438036939, 0.00045741467393993, 0.00735680500908296, 0.00951766095289489, 0.00455346144286727, 0.000686811297504771, 0.00469498496963441, 0.00607400564032183, 0.00290593987575818, 0.000438311021534327, 0.00112743130421366, 0.00145858275269461, 0.000697818545806259, 0.000105253918778391, 0.0026134590075074, 0.00338108957856492, 0.00161758872343451, 0.000243985421620605, 0.00392412678076307, 0.00507672939399183, 0.00242882065938497, 0.000366345798555432, 0.00250430944300902, 0.0032398803788146, 0.00155003109035391, 0.000233795515279108, 0.000601372928720174, 0.000778009425931694, 0.000372217075256263, 5.6142540266951e-05};
2303
// Quadrature points on the UFC reference element: (0.0622918093484527, 0.0543346112272345, 0.0485005494469973), (0.0498465213688842, 0.0434790928042876, 0.238600737551862), (0.0316174621017319, 0.027578625974397, 0.517047295104368), (0.0133649941129659, 0.0116577406689234, 0.795851417896773), (0.0477749046478169, 0.263415975366112, 0.0485005494469973), (0.0382299507805671, 0.210788066397987, 0.238600737551862), (0.024249114818074, 0.13370208226799, 0.517047295104368), (0.0102503254608295, 0.0565171086994073, 0.795851417896773), (0.0275098322538483, 0.555285975747014, 0.0485005494469973), (0.0220136396042882, 0.444345324777483, 0.238600737551862), (0.013963169280339, 0.28184657786378, 0.517047295104368), (0.00590236100005809, 0.119139159297124, 0.795851417896773), (0.00923314621657362, 0.818518016420533, 0.0485005494469973), (0.007388454838612, 0.654986204816931, 0.238600737551862), (0.00468646927478461, 0.415455300374957, 0.517047295104368), (0.00198101397470041, 0.175616803962505, 0.795851417896773), (0.296072900492077, 0.0543346112272345, 0.0485005494469973), (0.236920460578858, 0.0434790928042876, 0.238600737551862), (0.150277762174051, 0.027578625974397, 0.517047295104368), (0.063523802141471, 0.0116577406689234, 0.795851417896773), (0.227074068609678, 0.263415975366112, 0.0485005494469973), (0.181706913503757, 0.210788066397987, 0.238600737551862), (0.115256015737018, 0.13370208226799, 0.517047295104368), (0.0487197855050096, 0.0565171086994073, 0.795851417896773), (0.130754202079533, 0.555285975747014, 0.0485005494469973), (0.104630804534349, 0.444345324777483, 0.238600737551862), (0.0663669280461273, 0.28184657786378, 0.517047295104368), (0.0280539152629691, 0.119139159297124, 0.795851417896773), (0.0438851336893508, 0.818518016420533, 0.0485005494469973), (0.0351173176233467, 0.654986204816931, 0.238600737551862), (0.0222747832462335, 0.415455300374957, 0.517047295104368), (0.00941575721655391, 0.175616803962505, 0.795851417896773), (0.601091938833691, 0.0543346112272345, 0.0485005494469973), (0.480999709064992, 0.0434790928042876, 0.238600737551862), (0.305096316747185, 0.027578625974397, 0.517047295104368), (0.128967039292833, 0.0116577406689234, 0.795851417896773), (0.461009406577212, 0.263415975366112, 0.0485005494469973), (0.368904282546393, 0.210788066397987, 0.238600737551862), (0.233994606890624, 0.13370208226799, 0.517047295104368), (0.0989116878988102, 0.0565171086994073, 0.795851417896773), (0.265459272726456, 0.555285975747014, 0.0485005494469973), (0.212423133136306, 0.444345324777483, 0.238600737551862), (0.134739198985725, 0.28184657786378, 0.517047295104368), (0.0569555075431344, 0.119139159297124, 0.795851417896773), (0.0890963004431186, 0.818518016420533, 0.0485005494469973), (0.0712957400078597, 0.654986204816931, 0.238600737551862), (0.045222621274442, 0.415455300374957, 0.517047295104368), (0.0191160209241683, 0.175616803962505, 0.795851417896773), (0.834873029977315, 0.0543346112272345, 0.0485005494469973), (0.668073648274966, 0.0434790928042876, 0.238600737551862), (0.423756616819504, 0.027578625974397, 0.517047295104368), (0.179125847321338, 0.0116577406689234, 0.795851417896773), (0.640308570539073, 0.263415975366112, 0.0485005494469973), (0.512381245269583, 0.210788066397987, 0.238600737551862), (0.325001507809568, 0.13370208226799, 0.517047295104368), (0.13738114794299, 0.0565171086994073, 0.795851417896773), (0.368703642552141, 0.555285975747014, 0.0485005494469973), (0.295040298066366, 0.444345324777483, 0.238600737551862), (0.187142957751513, 0.28184657786378, 0.517047295104368), (0.0791070618060454, 0.119139159297124, 0.795851417896773), (0.123748287915896, 0.818518016420533, 0.0485005494469973), (0.0990246027925943, 0.654986204816931, 0.238600737551862), (0.0628109352458909, 0.415455300374957, 0.517047295104368), (0.0265507641660218, 0.175616803962505, 0.795851417896773)
2305
// Value of basis functions at quadrature points.
2306
static const double FE0_D001[64][16] = \
2307
{{-2.89581790868146, 0.595251149481942, -0.204650375830157, -0.173353771062787, -0.227929503657332, -0.198741093622954, 4.77772039793662, -2.47715363873711, -0.980281790191305, 0.204650375830158, -1.12384215149678, 0.227929503657333, 0.091384233576906, 1.15363556125409, 1.32258324511974, -0.091384233576906},
2308
{-1.01268955903752, -0.37884742650281, -0.170135092219663, 0.0844459598828055, -0.190766224310168, 0.0968129064413029, -0.211153065610757, 1.60269005115108, -0.588619458523755, 0.170135092219663, -0.674821633227638, 0.190766224310167, 0.0585166012713517, 0.504173498640949, 0.578008726786336, -0.0585166012713515},
2309
{0.389619002348325, -0.0443639333802776, -0.113835978641205, 0.260901440109651, -0.12878311667611, 0.29910994850187, -3.07176113643667, 2.72650606746862, -0.19143506458012, 0.113835978641205, -0.219470357403725, 0.128783116676109, 0.023543086362208, -0.0694663755295311, -0.079639591098143, -0.0235430863622075},
2310
{0.178970691981112, 2.38796021040115, -0.0506251436238552, 0.198041561892404, -0.0577310620952115, 0.227044363396273, -0.640627106961096, -1.92630379542116, -0.0039216392195247, 0.0506251436238544, -0.00449595565475535, 0.0577310620952113, 0.00420675215608439, -0.194119922672882, -0.222548407741519, -0.00420675215608366},
2311
{-0.772156249476526, 0.595251149481943, -0.248634212093421, -0.84042476161143, -0.184174110474718, -0.152425124534857, 2.03330371727115, -1.85639861727657, -3.36865079023594, 0.248634212093422, -0.610961313457298, 0.184174110474718, 0.339786173857347, 4.20907555184737, 0.763386437992154, -0.339786173857347},
2312
{0.0672149106221295, -0.37884742650281, -0.348719578157611, 0.409396780170706, -0.15230413516731, 0.0742509717134456, -0.988668649710359, 1.30030116559104, -1.9675577038312, 0.348719578157612, -0.356849585751078, 0.15230413516731, 0.2175772698952, 1.5581609236605, 0.282598614037633, -0.217577269895201},
2313
{0.49906283922646, -0.0443639333802784, -0.360330038368204, 1.26485872942917, -0.101182752493622, 0.229403342403398, -2.24695429009376, 1.79225538424758, -0.57158184482219, 0.360330038368204, -0.103665953049545, 0.101182752493621, 0.0875382428969645, -0.693276884606977, -0.125737389353853, -0.0875382428969649},
2314
{-0.0183629959498944, 2.38796021040115, -0.211205510874836, 0.9601119803866, -0.0447080307510176, 0.174132408827691, 0.265865044895522, -2.63546225934677, 0.044688586815663, 0.211205510874836, 0.00810502465158773, 0.0447080307510176, 0.0156416064733958, -1.00480056720226, -0.18223743347928, -0.0156416064733952},
2315
{0.48311070654784, 0.595251149481943, 1.66383705976616, -1.77163166791512, -0.113577568388746, -0.0877697116956461, -0.0885147322176989, -0.989847123812084, -3.02908408087161, -1.66383705976616, -0.150066089523472, 0.113577568388746, 0.4124472492343, 4.80071574878674, 0.237835801219117, -0.412447249234301},
2316
{0.480204186575578, -0.37884742650281, 0.665923401798019, 0.863016338431318, -0.0925192737828253, 0.0427553292168731, -0.979534009899769, 0.878177249827001, -1.54014001930344, -0.665923401798019, -0.0763012131208204, 0.0925192737828252, 0.264104761666552, 0.677123680872123, 0.0335458839039475, -0.264104761666553},
2317
{0.211483050177826, -0.0443639333802788, -0.195903438764438, 2.66634668902302, -0.0602021654607812, 0.132095448740534, -0.655194435114137, 0.48807531831659, -0.155821659379379, 0.195903438764438, -0.00771967580358115, 0.0602021654607807, 0.106257729900498, -2.51052502964364, -0.124375772936954, -0.106257729900498},
2318
{-0.372518461317996, 2.38796021040115, -0.344505336583714, 2.02393464221137, -0.0260903133176974, 0.10026923951228, 1.60998000277298, -3.62542175185613, 0.281657998210035, 0.344505336583714, 0.0139538267165683, 0.0260903133176976, 0.0189864628402054, -2.3055926404214, -0.114223066228851, -0.0189864628402044},
2319
{-0.0929995320454971, 0.595251149481942, 5.36128745937516, -2.61146958861852, -0.0403982696223155, -0.0294582160296172, -0.293930918661733, -0.208320698774712, 0.948495588562795, -5.36128745937517, 0.0106993349923761, 0.0403982696223156, 0.20405240621579, 1.66297400005573, 0.0187588810372401, -0.204052406215793},
2320
{-0.241157846302772, -0.37884742650281, 2.84415561308039, 1.27212725032541, -0.032511091697572, 0.0143500041205054, 0.12253360977631, 0.497471663029272, 1.19622470497731, -2.84415561308039, 0.0134937990213529, 0.0325110916975708, 0.130662071843505, -2.46835195530272, -0.0278438031418584, -0.130662071843505},
2321
{-0.48796196620424, -0.0443639333802785, 0.460593087542911, 3.93032220929508, -0.0207926113139715, 0.0443352973406311, 1.22046595014009, -0.688140050555571, 1.16498018051314, -0.460593087542912, 0.0131413507464737, 0.0207926113139701, 0.0525694995068508, -5.09530238980823, -0.057476648087106, -0.0525694995068486},
2322
{-0.770559854056101, 2.38796021040115, -0.373918583072206, 2.98337620805032, -0.00886158326518219, 0.0336534421910924, 2.90084716402885, -4.5182475203739, 0.664381088500103, 0.373918583072207, 0.00749443214515569, 0.00886158326518224, 0.00939328225673307, -3.64775729655043, -0.0411478743362511, -0.00939328225673128},
2323
{-0.4678780560632, 0.595251149481942, -0.204650375830157, -0.173353771062788, -0.148929359736164, -0.944616196758085, 1.60390544218324, -1.73127853560198, -0.637316863302983, 0.204650375830158, -3.47278186019387, 0.148929359736165, 0.434349160465227, 0.810670634365771, 4.41739805695196, -0.434349160465228},
2324
{0.205627659956735, -0.378847426502809, -0.170135092219662, 0.0844459598828058, -0.308369459952734, 0.460151636546686, -1.06613155449962, 1.2393513210457, -0.369006719091053, 0.170135092219663, -2.01074208786445, 0.308369459952734, 0.278129340704052, 0.284560759208247, 1.55059045131777, -0.278129340704052},
2325
{0.489236057073233, -0.0443639333802778, -0.113835978641205, 0.260901440109652, -0.371373951428681, 1.42166925227039, -2.04881888739305, 1.6039467637001, -0.103077887670107, 0.113835978641205, -0.561678246881204, 0.371373951428681, 0.111900263272222, -0.157823552439546, -0.859991005389186, -0.111900263272221},
2326
{-0.0638353588879535, 2.38796021040115, -0.0506251436238554, 0.198041561892405, -0.23138091821675, 1.07914160648444, 0.454276186996138, -2.77840103850933, 0.0118662969394588, 0.0506251436238547, 0.0646602390927712, 0.231380918216751, 0.0199946883150681, -0.209907858831866, -1.14380184557721, -0.0199946883150676},
2327
{0.279934074333821, 0.595251149481942, -0.248634212093421, -0.840424761611429, -0.325737768171688, -0.72447644723972, 0.409162070755938, -1.2843472945717, -2.0934336579877, 0.248634212093422, -1.80461529496461, 0.325737768171689, 1.61500330610559, 2.93385841959913, 2.52909174220433, -1.61500330610559},
2328
{0.482918552223106, -0.37884742650281, -0.348719578157611, 0.409396780170706, -0.371946178163572, 0.352914785900354, -1.12570847712443, 1.02163735140413, -1.15099045211411, 0.348719578157612, -0.992195270348315, 0.371946178163572, 1.03414452161229, 0.741593671943407, 0.639280484447962, -1.03414452161229},
2329
{0.366779535287998, -0.0443639333802783, -0.360330038368204, 1.26485872942917, -0.339318757108362, 1.09035383107937, -1.25372049747933, 0.931304895571607, -0.243050916674464, 0.360330038368204, -0.209518653725823, 0.339318757108362, 0.416069171044691, -1.0218078127547, -0.880835177353546, -0.416069171044691},
2330
{-0.241872355951096, 2.38796021040115, -0.211205510874836, 0.9601119803866, -0.187195198527211, 0.827651145319748, 1.14289314138878, -3.28898099583883, 0.103391518498623, 0.211205510874836, 0.0891272168765957, 0.187195198527212, 0.0743445381563563, -1.06350349888522, -0.916778362196345, -0.0743445381563559},
2331
{0.437807010605908, 0.595251149481942, 1.66383705976616, -1.77163166791512, -0.357588980978252, -0.417169341987151, -0.372610666567272, -0.660447493520578, -1.48117001361751, -1.66383705976616, -0.348773806171044, 0.357588980978252, 1.96036131648841, 3.25280168153263, 0.765943148158195, -1.96036131648841},
2332
{0.302639767092249, -0.37884742650281, 0.665923401798019, 0.863016338431317, -0.32304594942825, 0.20321603217402, -0.641508887459292, 0.717716546869853, -0.548955142761289, -0.665923401798019, -0.129263469282916, 0.32304594942825, 1.2552896382087, -0.314061195670028, -0.073952562891104, -1.2552896382087},
2333
{-0.0324350076632249, -0.0443639333802785, -0.195903438764438, 2.66634668902302, -0.239189492840794, 0.627849520819607, 0.0844776948059878, -0.00767875376248435, 0.242963482654707, 0.195903438764438, 0.057211054657456, 0.239189492840794, 0.505042871934584, -2.90931017167773, -0.685060575477064, -0.505042871934584},
2334
{-0.531193484944987, 2.38796021040115, -0.344505336583714, 2.02393464221137, -0.115617819502004, 0.476579583785566, 2.14496537067326, -4.00173209612941, 0.352914172114247, 0.344505336583714, 0.0831013441592525, 0.115617819502005, 0.0902426367444173, -2.37684881432562, -0.559680927944821, -0.0902426367444164},
2335
{-0.305298331172714, 0.595251149481941, 5.36128745937516, -2.61146958861852, -0.171483384656493, -0.14001486799689, -0.192188771501789, -0.097764046807439, 1.71430404194646, -5.36128745937517, 0.0919130190854158, 0.171483384656494, 0.969860859599452, 0.897165546672069, 0.0481018489114732, -0.969860859599455},
2336
{-0.426959954263386, -0.378847426502809, 2.84415561308039, 1.27212725032541, -0.141379378344762, 0.0682055536108254, 0.362191267227245, 0.443616113538951, 1.68659931515741, -2.84415561308039, 0.0904276203347779, 0.14137937834476, 0.621036682023601, -2.95872656548282, -0.158633173945604, -0.6210366820236},
2337
{-0.6206050624416, -0.0443639333802783, 0.460593087542911, 3.93032220929508, -0.0935382840310485, 0.210725618907479, 1.5194993679443, -0.85453037212242, 1.36227345364377, -0.460593087542912, 0.0730387742667559, 0.0935382840310472, 0.24986277263748, -5.29259566293886, -0.283764393174236, -0.249862772637477},
2338
{-0.832889012138125, 2.38796021040115, -0.373918583072206, 2.98337620805032, -0.0411740449410156, 0.159954773272396, 3.08947765319218, -4.6445488514552, 0.699634066353339, 0.373918583072207, 0.0375111285513463, 0.0411740449410158, 0.0446462601099692, -3.68301027440366, -0.197465901823745, -0.0446462601099674},
2339
{0.48125741195051, 0.595251149481943, -0.204650375830157, -0.173353771062788, 2.17279178081481, -1.91777491360855, -0.318388742680938, -0.758119818751515, -0.189843409942675, 0.204650375830158, -2.10019618765661, -2.17279178081481, 0.881822613825533, 0.363197181005464, 4.01797110126516, -0.881822613825535},
2340
{0.374511532557597, -0.37884742650281, -0.170135092219662, 0.0844459598828063, 0.958871030835726, 0.93420721352627, -0.760959850120903, 0.765295744066115, -0.0824734230847603, 0.170135092219663, -0.912385469676855, -0.958871030835727, 0.564662636710344, -0.00197253679804641, -0.021821743849414, -0.564662636710344},
2341
{0.0476238812119082, -0.0443639333802784, -0.113835978641206, 0.260901440109653, -0.116302631710901, 2.88629565828948, -0.142580305512644, 0.139320357681015, 0.0122035536125633, 0.113835978641205, 0.135005248697902, 0.1163026317109, 0.227181704554891, -0.273104993722217, -3.02130090698738, -0.227181704554891},
2342
{-0.482761972146629, 2.38796021040115, -0.0506251436238558, 0.198041561892405, -0.355812964294298, 2.1908905524273, 1.98495174619767, -3.89014998445218, 0.0324651446950859, 0.0506251436238551, 0.359154806273899, 0.355812964294299, 0.0405935360706954, -0.230506706587493, -2.5500453587012, -0.0405935360706952},
2343
{0.347571076915241, 0.595251149481942, -0.248634212093421, -0.840424761611429, 0.794608255263633, -1.47084367257827, -0.404842157164035, -0.537980069233149, -0.429631416958082, 0.248634212093422, -0.751906274110712, -0.794608255263634, 3.2788055471352, 1.27005617856951, 2.22274994668898, -3.2788055471352},
2344
{0.189627288930479, -0.37884742650281, -0.348719578157611, 0.409396780170706, 0.177150719235663, 0.716493243884701, -0.468838755847452, 0.658058893419783, -0.0855982228213465, 0.348719578157612, -0.149807109656454, -0.177150719235664, 2.09953675090505, -0.323798557349359, -0.566686134228247, -2.09953675090506},
2345
{-0.142029172075058, -0.0443639333802782, -0.360330038368205, 1.26485872942917, -0.313803804280188, 2.21365379016098, 0.378388168965344, -0.191995063510007, 0.185590199161266, 0.360330038368204, 0.324805006465407, 0.313803804280189, 0.844710286880421, -1.45044892859043, -2.53845879662639, -0.844710286880421},
2346
{-0.593565766700245, 2.38796021040115, -0.211205510874836, 0.9601119803866, -0.313025048504257, 1.6803105950978, 2.34724600191598, -4.14164044561688, 0.179982450990976, 0.211205510874836, 0.314990777648698, 0.313025048504258, 0.15093547064871, -1.14009443137758, -1.9953013727465, -0.15093547064871},
2347
{-0.0540171096638481, 0.595251149481941, 1.66383705976616, -1.77163166791512, -0.243240283336858, -0.846943871527147, -0.310561075837515, -0.23067296398058, 0.538425574373153, -1.66383705976617, 0.257399011740106, 0.243240283336858, 3.97995690447907, 1.23320609354197, 0.589544859787042, -3.97995690447907},
2348
{-0.20611543016718, -0.378847426502809, 0.665923401798019, 0.863016338431317, -0.346735667978872, 0.412572439350424, 0.076602716976541, 0.508360139693449, 0.744264323289971, -0.665923401798019, 0.35580200942589, 0.346735667978872, 2.54850910425996, -1.60728066172129, -0.768374448776314, -2.54850910425996},
2349
{-0.462159330951633, -0.0443639333802781, -0.195903438764438, 2.66634668902302, -0.361238596901012, 1.27467014082689, 1.16102263810168, -0.654499373769769, 0.763266728452429, 0.195903438764438, 0.364886273885646, 0.361238596901012, 1.02534611773231, -3.42961341747545, -1.63955641471254, -1.02534611773231},
2350
{-0.758139561814633, 2.38796021040115, -0.344505336583714, 2.02393464221137, -0.212506731110906, 0.96755949480721, 2.86289135856455, -4.49271200715106, 0.44588358009264, 0.344505336583715, 0.213158509419996, 0.212506731110907, 0.18321204472281, -2.46981822230401, -1.18071800422721, -0.18321204472281},
2351
{-0.631033513741427, 0.595251149481941, 5.36128745937516, -2.61146958861852, -0.293768316833253, -0.28426042481401, -0.0106991457501968, 0.0464815100096822, 2.71347021429296, -5.36128745937517, 0.29536326947737, 0.293768316833253, 1.96902703194595, -0.102000625674433, -0.0111028446633603, -1.96902703194596},
2352
{-0.700592692350177, -0.378847426502809, 2.84415561308039, 1.27212725032541, -0.252209215701245, 0.138472006019522, 0.706090457722733, 0.373349661130254, 2.3264012396526, -2.84415561308039, 0.253230521065085, 0.252209215701244, 1.26083860651879, -3.59852848997801, -0.391702527084608, -1.26083860651879},
2353
{-0.8062251913609, -0.044363933380278, 0.460593087542911, 3.93032220929508, -0.17589314182341, 0.427818522466956, 1.92221240042307, -1.0716232756819, 1.61968607904983, -0.460593087542912, 0.176304045393694, 0.175893141823409, 0.507275398043541, -5.55000828834492, -0.60412256786065, -0.507275398043538},
2354
{-0.91645504758449, 2.38796021040115, -0.373918583072206, 2.98337620805032, -0.0810888937031161, 0.324742739481423, 3.33783165484757, -4.80933681766423, 0.745629357721306, 0.373918583072207, 0.0811623152356107, 0.0810888937031163, 0.0906415514779366, -3.72900556577163, -0.405905054717037, -0.0906415514779348},
2355
{-0.491757354274629, 0.595251149481943, -0.204650375830157, -0.173353771062788, 5.65274654357938, -2.66365001674368, -0.0912490795909291, -0.0122447156163844, 0.153121516945649, 0.204650375830158, 2.35277334133309, -5.65274654357937, 1.22478754071386, 0.020232254117138, 0.310876675410583, -1.22478754071386},
2356
{-0.584924429529852, -0.37884742650281, -0.170135092219662, 0.0844459598828069, 3.01902097627486, 1.29754594363165, 0.56181484207193, 0.401957013960733, 0.137139316347941, 0.170135092219663, 2.10720043784973, -3.01902097627486, 0.784275376143044, -0.221585276230749, -3.40474638148138, -0.784275376143044},
2357
{-0.728938303866098, -0.0443639333802792, -0.113835978641206, 0.260901440109654, 0.517285773339441, 4.008854962058, 1.75654118333388, -0.983238946087504, 0.100560730522576, 0.113835978641206, 1.54515583882625, -0.517285773339441, 0.315538881464903, -0.36146217063223, -5.55401080088425, -0.315538881464903},
2358
{-0.882126464396442, 2.38796021040115, -0.0506251436238561, 0.198041561892406, -0.372904379035091, 3.04298779551547, 3.23641348153565, -4.74224722754035, 0.048253080854069, 0.0506251436238555, 0.74142788378292, 0.372904379035092, 0.0563814722296786, -0.246294642746477, -3.78441567929839, -0.0563814722296787},
2359
{-0.600838818610104, 0.595251149481942, -0.248634212093421, -0.840424761611429, 2.65354481690236, -2.04289499528313, -0.0284835843435508, 0.0340712534717136, 0.845585715290159, 0.248634212093422, 2.05544018305336, -2.65354481690236, 4.55402267938344, -0.00516095367872851, -0.0125451877702227, -4.55402267938344},
2360
{-0.675661086320138, -0.37884742650281, -0.348719578157611, 0.409396780170706, 1.23850069309099, 0.995157058071609, 0.675113433590073, 0.379395079232875, 0.730969028895741, 0.348719578157612, 1.77683123944949, -1.23850069309099, 2.91610400262214, -1.14036580906645, -2.7719882975211, -2.91610400262214},
2361
{-0.789696230825047, -0.0443639333802784, -0.360330038368205, 1.26485872942917, -0.0365560540834038, 3.07460427883695, 1.8870057163913, -1.05294555218598, 0.514121127308991, 0.360330038368205, 1.24971981541218, 0.0365560540834039, 1.17324121502815, -1.77897985673816, -4.32432409424913, -1.17324121502815},
2362
{-0.909165504675249, 2.38796021040115, -0.211205510874837, 0.9601119803866, -0.363421838306648, 2.33382933158985, 3.31636447638304, -4.79515918210893, 0.238685382673936, 0.211205510874836, 0.580193725821311, 0.363421838306649, 0.20963840233167, -1.19879736306054, -2.91402305741117, -0.20963840233167},
2363
{-0.762628186468936, 0.595251149481941, 1.66383705976617, -1.77163166791512, 0.176055684936793, -1.17634350181865, 0.068650370676068, 0.0987266663109265, 2.08633964162726, -1.66383705976617, 1.38530605681884, -0.176055684936793, 5.52787097173318, -0.31470797371214, -0.208962555000192, -5.52787097173318},
2364
{-0.808419347997877, -0.378847426502809, 0.665923401798019, 0.863016338431316, -0.152522845276929, 0.573033142307571, 0.839367337764386, 0.347899436736301, 1.73544919983212, -0.66592340179802, 1.15231874995853, 0.152522845276929, 3.53969398080211, -2.59846553826344, -1.7253518922661, -3.53969398080211},
2365
{-0.876963572777694, -0.0443639333802778, -0.195903438764438, 2.66634668902302, -0.369339740296016, 1.77042421290596, 2.07158095200682, -1.15025344584884, 1.16205187048651, 0.195903438764438, 0.771589372316702, 0.369339740296016, 1.42413125976639, -3.82839855950953, -2.54201358522267, -1.42413125976639},
2366
{-0.94734906218204, 2.38796021040115, -0.344505336583714, 2.02393464221137, -0.271499760554798, 1.3438698390805, 3.42841120320524, -4.86902235142434, 0.517139753996851, 0.344505336583715, 0.343374980343511, 0.271499760554799, 0.254468218627022, -2.54107439620822, -1.68724481942401, -0.254468218627022},
2367
{-0.918052572403102, 0.595251149481941, 5.36128745937516, -2.61146958861852, -0.350133172332973, -0.394817076781283, 0.165763260944205, 0.157038161976955, 3.47927866767662, -5.36128745937517, 0.526017472639324, 0.350133172332974, 2.73483548532962, -0.867809079058096, -0.131200395858042, -2.73483548532962},
2368
{-0.934240861528672, -0.378847426502809, 2.84415561308039, 1.27212725032541, -0.313231441130554, 0.192327555509842, 0.993594176391548, 0.319494111639934, 2.81677584983269, -2.84415561308039, 0.425856464814271, 0.313231441130553, 1.75121321669889, -4.0889031001581, -0.618184020324113, -1.75121321669889},
2369
{-0.958118276949497, -0.0443639333802778, 0.460593087542911, 3.93032220929508, -0.22938882518925, 0.594208844033803, 2.24049580757852, -1.23801359724875, 1.81697935218046, -0.460593087542912, 0.274701447616451, 0.229388825189249, 0.704568671174169, -5.74730156147554, -0.868910291650255, -0.704568671174167},
2370
{-0.982223853848664, 2.38796021040115, -0.373918583072206, 2.98337620805032, -0.109961707196799, 0.451044070562726, 3.52990179219305, -4.93563814874553, 0.780882335574542, 0.373918583072207, 0.118058308006101, 0.1099617071968, 0.125894529331173, -3.76425854362487, -0.569102378568831, -0.125894529331171}};
2372
// Array of non-zero columns
2373
static const unsigned int nzc0[16] = {0, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
2374
static const double FE0_D100[64][16] = \
2375
{{-2.89581790868146, 0.491757354274631, -0.136680424066403, -0.186496378006569, -0.153121516945648, -0.204650375830158, -0.875026145642752, 0.186496378006569, -0.980281790191305, 0.204650375830158, 4.5289043920826, -2.12484383767577, 0.0711519794597668, -0.0711519794597669, 1.01170656970915, 1.13340330713695},
2376
{-1.01268955903752, 0.584924429529853, -0.752581066382098, -0.305144107519429, -0.13713931634794, -0.170135092219663, -3.23017404188562, 0.305144107519429, -0.588619458523755, 0.170135092219663, 2.34419934304722, -1.91643421353956, 0.280101877502098, -0.280101877502098, 3.98275510826772, 0.725758774871695},
2377
{0.389619002348326, 0.728938303866098, -1.88532430000999, 1.28234889458938, -0.100560730522577, -0.113835978641205, -3.58904690977611, -1.28234889458938, -0.19143506458012, 0.113835978641205, 0.297815415935717, -1.41637272215014, 0.385005256994436, -0.385005256994436, 5.4743712097861, 0.291995795102697},
2378
{0.178970691981113, 0.882126464396443, -3.29414454363086, 4.96929159093663, -0.0482530808540704, -0.0506251436238535, -0.267722727926007, -4.96929159093663, -0.00392163921952433, 0.0506251436238531, -0.377400334689846, -0.683696821687709, 0.25050139490256, -0.250501394902559, 3.56186727155687, 0.0521747200735935},
2379
{-0.772156249476526, 0.600838818610107, -0.155690526131168, -0.18649637800657, -0.845585715290158, -0.248634212093422, -0.620241099631208, 0.18649637800657, -3.36865079023594, 0.248634212093422, 2.04258350344506, -1.87126607257864, 0.344947127536074, -0.344947127536074, 0.775931625762376, 4.21423650552609},
2380
{0.0672149106221297, 0.675661086320138, -0.827417568757383, -0.305144107519429, -0.730969028895742, -0.348719578157612, -2.22716934280135, 0.305144107519429, -1.9675577038312, 0.348719578157612, 0.881651107339918, -1.62452710428219, 1.35794307896165, -1.35794307896165, 3.05458691155874, 2.69852673272694},
2381
{0.499062839226461, 0.789696230825046, -1.98818846888492, 1.28234889458937, -0.514121127308992, -0.360330038368204, -2.21039823601036, -1.28234889458938, -0.571581844822189, 0.360330038368204, -0.140222007132949, -1.14853706291856, 1.86651809963512, -1.86651809963512, 4.19858670489528, 1.08570297213118},
2382
{-0.0183629959498933, 0.90916550467525, -3.36107250713405, 4.96929159093663, -0.238685382673937, -0.211205510874835, 0.62928688320217, -4.96929159093663, 0.0446885868156633, 0.211205510874834, -0.355316813655062, -0.535485695070294, 1.21443896953393, -1.21443896953393, 2.73178562393189, 0.193996795858273},
2383
{0.48311070654784, 0.762628186468936, -0.182227939064815, -0.18649637800657, -2.08633964162726, 1.66383705976616, -0.264570417154492, 0.18649637800657, -3.02908408087161, -1.66383705976616, 0.025989595413321, -1.2717284884301, 0.727155222946436, -0.727155222946435, 0.446798356219306, 5.11542372249887},
2384
{0.480204186575578, 0.808419347997877, -0.93188661154721, -0.305144107519429, -1.73544919983212, 0.665923401798019, -0.827011164622839, 0.305144107519429, -1.54014001930344, -0.665923401798019, -0.228824058397751, -1.05979947617571, 2.86257029992999, -2.86257029992999, 1.75889777617005, 3.27558921913556},
2385
{0.211483050177827, 0.876963572777693, -2.13178311746759, 1.28234889458937, -1.16205187048651, -0.195903438764439, -0.28585469481812, -1.28234889458938, -0.155821659379379, 0.195903438764438, -0.377059416099599, -0.711387206855921, 3.93465628941003, -3.93465628941003, 2.41763781228571, 1.31787352986589},
2386
{-0.372518461317995, 0.94734906218204, -3.45450151652294, 4.96929159093662, -0.517139753996851, -0.344505336583714, 1.88147976332778, -4.96929159093663, 0.281657998210035, 0.344505336583713, -0.257545933838233, -0.317284667025813, 2.56006085904842, -2.56006085904842, 1.57302175319516, 0.235481755786815},
2387
{-0.0929995320454972, 0.918052572403102, -0.206161530566521, -0.186496378006571, -3.47927866767661, 5.36128745937517, 0.0562022536712431, 0.186496378006571, 0.948495588562793, -5.36128745937517, -0.339433837340599, -0.485619203017006, 1.07186148527388, -1.07186148527388, 0.149959276895278, 2.53078307911382},
2388
{-0.241157846302772, 0.934240861528673, -1.02610526808912, -0.305144107519429, -2.81677584983269, 2.84415561308039, 0.435765050906867, 0.305144107519428, 1.19622470497731, -2.84415561308039, -0.299737642109204, -0.393345373116698, 4.21956517200161, -4.21956517200161, 0.590340217182254, 1.62055114485538},
2389
{-0.48796196620424, 0.958118276949496, -2.26128841889249, 1.28234889458937, -1.81697935218046, 0.460593087542911, 1.44985477532934, -1.28234889458938, 1.16498018051314, -0.460593087542911, -0.21624747444278, -0.253908836302478, 5.79987106098239, -5.79987106098239, 0.811433643563148, 0.651999171667313},
2390
{-0.7705598540561, 0.982223853848664, -3.53876337545823, 4.96929159093662, -0.780882335574539, -0.373918583072206, 3.01080887122566, -4.96929159093663, 0.664381088500102, 0.373918583072206, -0.102467275051648, -0.109196724740916, 3.7736518258816, -3.7736518258816, 0.527954504232578, 0.116501247074436},
2391
{-0.467878056063201, -0.481257411950509, 0.169459382944773, -0.18649637800657, 0.189843409942674, -0.204650375830158, -0.568886338631576, 0.18649637800657, -0.637316863302983, 0.204650375830158, -1.29999007937906, 2.24912554739277, 0.0711519794597661, -0.0711519794597664, 0.399426955686803, 0.447473453360309},
2392
{0.205627659956735, -0.374511532557597, 0.452590390168168, -0.305144107519429, 0.0824734230847601, -0.170135092219663, -2.02500258533535, 0.305144107519429, -0.369006719091053, 0.170135092219663, -1.05187105702873, 1.22075492962959, 0.280101877502098, -0.280101877502099, 1.57241219516718, 0.286533296006293},
2393
{0.489236057073233, -0.0476238812119084, -0.228793645916036, 1.28234889458938, -0.0122035536125636, -0.113835978641205, -1.93251625568215, -1.28234889458938, -0.103077887670106, 0.113835978641205, -0.677980878592105, 0.23636870273078, 0.385005256994437, -0.385005256994437, 2.16130990159819, 0.11528144128267},
2394
{-0.0638353588879527, 0.48276197214663, -2.21633266441442, 4.96929159093663, -0.032465144695087, -0.0506251436238537, 0.810089151290436, -4.96929159093663, 0.011866296939459, 0.0506251436238534, -0.291152725201528, -0.127773888057149, 0.250501394902561, -0.250501394902559, 1.40624351312398, 0.020598847755627},
2395
{0.279934074333821, -0.347571076915241, 0.0791043889923453, -0.18649637800657, 0.429631416958082, -0.248634212093422, -0.385446184507694, 0.18649637800657, -2.0934336579877, 0.248634212093422, -1.01000703970098, 1.0776440422824, 0.344947127536074, -0.344947127536074, 0.306341795515349, 1.66380224102961},
2396
{0.482918552223106, -0.189627288930479, 0.0968925776838803, -0.305144107519429, 0.085598222821346, -0.348719578157612, -1.30285919636009, 0.305144107519429, -1.15099045211411, 0.348719578157612, -0.815044551112652, 0.521753287820025, 1.35794307896165, -1.35794307896165, 1.20596661867621, 1.06539222929277},
2397
{0.366779535287999, 0.142029172075058, -0.717706926073704, 1.28234889458938, -0.185590199161266, -0.360330038368204, -0.939916693199137, -1.28234889458938, -0.243050916674464, 0.360330038368204, -0.523322458006013, 0.0145137506429557, 1.86651809963512, -1.86651809963512, 1.65762361927284, 0.428641115835729},
2398
{-0.241872355951095, 0.593565766700245, -2.53444120044319, 4.96929159093663, -0.179982450990977, -0.211205510874835, 1.45591818989304, -4.96929159093663, 0.103391518498623, 0.211205510874835, -0.223897831627663, -0.127795579121487, 1.21443896953393, -1.21443896953393, 1.07852301055015, 0.0765909324923525},
2399
{0.437807010605908, 0.054017109663848, -0.0470279051407378, -0.18649637800657, -0.538425574373153, 1.66383705976617, -0.129370383230415, 0.18649637800657, -1.48117001361751, -1.66383705976616, -0.592014089507902, 0.100189969238147, 0.727155222946437, -0.727155222946436, 0.176398288371152, 2.01959558799066},
2400
{0.302639767092249, 0.20611543016718, -0.399648666404791, -0.305144107519429, -0.744264323289971, 0.665923401798019, -0.294773219480419, 0.305144107519429, -0.548955142761289, -0.665923401798019, -0.47599913726179, -0.0327560599976398, 2.86257029992999, -2.86257029992999, 0.694421885885211, 1.29321946605126},
2401
{-0.0324350076632244, 0.462159330951632, -1.40021213094247, 1.28234889458937, -0.763266728452427, -0.195903438764439, 0.445716291707001, -1.28234889458938, 0.242963482654706, 0.195903438764438, -0.304027542243558, -0.125696781044851, 3.93465628941003, -3.93465628941003, 0.954495839235472, 0.520303245797721},
2402
{-0.531193484944986, 0.758139561814633, -2.97850917806655, 4.96929159093662, -0.445883580092639, -0.344505336583714, 2.35747210178416, -4.96929159093663, 0.352914172114247, 0.344505336583713, -0.129405386951656, -0.0975406899179906, 2.56006085904842, -2.56006085904842, 0.621037076282388, 0.0929694079783913},
2403
{-0.305298331172714, 0.631033513741428, -0.160784238906297, -0.186496378006571, -2.71347021429295, 5.36128745937517, 0.101579545331467, 0.186496378006571, 1.71430404194646, -5.36128745937517, -0.20185529774784, -0.123879884820874, 1.07186148527388, -1.07186148527388, 0.0592046935748301, 0.999166172346498},
2404
{-0.426959954263386, 0.700592692350177, -0.847469836067494, -0.305144107519429, -2.32640123965259, 2.84415561308039, 0.614400482928493, 0.305144107519428, 1.6865993151574, -2.84415561308039, -0.16178159536647, -0.111851142720322, 4.21956517200161, -4.21956517200161, 0.233069353139002, 0.639801924495189},
2405
{-0.6206050624416, 0.806225191360899, -2.01575068445412, 1.28234889458937, -1.61968607904983, 0.460593087542911, 1.69539250976771, -1.28234889458938, 1.36227345364377, -0.460593087542911, -0.102854367556658, -0.0827657613626429, 5.79987106098239, -5.79987106098239, 0.320358174686412, 0.257412625406057},
2406
{-0.832889012138124, 0.91645504758449, -3.37900569978859, 4.96929159093662, -0.745629357721303, -0.373918583072206, 3.1705665468953, -4.96929159093663, 0.699634066353338, 0.373918583072206, -0.0435777651517734, -0.039988270294592, 3.7736518258816, -3.7736518258816, 0.20843915289329, 0.0459952913679643},
2407
{0.481257411950509, 0.467878056063201, 0.568886338631574, -0.18649637800657, 0.637316863302981, -0.204650375830157, -0.169459382944775, 0.18649637800657, -0.189843409942675, 0.204650375830158, -2.24912554739277, 1.29999007937906, 0.0711519794597647, -0.0711519794597651, -0.399426955686799, -0.447473453360305},
2408
{0.374511532557597, -0.205627659956735, 2.02500258533535, -0.305144107519429, 0.369006719091052, -0.170135092219663, -0.452590390168168, 0.305144107519429, -0.0824734230847598, 0.170135092219663, -1.22075492962959, 1.05187105702873, 0.280101877502098, -0.280101877502099, -1.57241219516718, -0.286533296006292},
2409
{0.0476238812119085, -0.489236057073233, 1.93251625568215, 1.28234889458938, 0.103077887670105, -0.113835978641205, 0.228793645916037, -1.28234889458938, 0.0122035536125635, 0.113835978641205, -0.236368702730779, 0.677980878592104, 0.385005256994438, -0.385005256994439, -2.16130990159819, -0.115281441282669},
2410
{-0.482761972146629, 0.0638353588879532, -0.810089151290436, 4.96929159093663, -0.01186629693946, -0.050625143623854, 2.21633266441442, -4.96929159093663, 0.0324651446950859, 0.0506251436238538, 0.127773888057148, 0.291152725201528, 0.250501394902561, -0.25050139490256, -1.40624351312398, -0.0205988477556269},
2411
{0.347571076915241, -0.27993407433382, 0.385446184507694, -0.18649637800657, 2.09343365798769, -0.248634212093422, -0.0791043889923458, 0.18649637800657, -0.429631416958082, 0.248634212093422, -1.0776440422824, 1.01000703970098, 0.344947127536074, -0.344947127536075, -0.306341795515348, -1.66380224102961},
2412
{0.189627288930479, -0.482918552223106, 1.30285919636009, -0.305144107519429, 1.15099045211411, -0.348719578157612, -0.0968925776838802, 0.305144107519429, -0.0855982228213463, 0.348719578157612, -0.521753287820026, 0.815044551112652, 1.35794307896165, -1.35794307896165, -1.20596661867621, -1.06539222929277},
2413
{-0.142029172075058, -0.366779535287999, 0.939916693199139, 1.28234889458938, 0.243050916674464, -0.360330038368204, 0.717706926073706, -1.28234889458938, 0.185590199161266, 0.360330038368204, -0.0145137506429555, 0.523322458006012, 1.86651809963512, -1.86651809963512, -1.65762361927284, -0.428641115835729},
2414
{-0.593565766700244, 0.241872355951096, -1.45591818989304, 4.96929159093663, -0.103391518498624, -0.211205510874835, 2.53444120044319, -4.96929159093663, 0.179982450990976, 0.211205510874835, 0.127795579121486, 0.223897831627663, 1.21443896953393, -1.21443896953393, -1.07852301055015, -0.0765909324923536},
2415
{-0.0540171096638479, -0.437807010605908, 0.129370383230415, -0.18649637800657, 1.48117001361751, 1.66383705976617, 0.0470279051407378, 0.186496378006571, 0.538425574373154, -1.66383705976617, -0.100189969238147, 0.592014089507902, 0.727155222946438, -0.727155222946438, -0.176398288371152, -2.01959558799066},
2416
{-0.20611543016718, -0.302639767092249, 0.29477321948042, -0.305144107519429, 0.548955142761289, 0.66592340179802, 0.399648666404792, 0.305144107519428, 0.744264323289971, -0.665923401798019, 0.0327560599976389, 0.47599913726179, 2.86257029992999, -2.86257029992999, -0.694421885885211, -1.29321946605126},
2417
{-0.462159330951633, 0.0324350076632237, -0.445716291706998, 1.28234889458937, -0.242963482654704, -0.195903438764438, 1.40021213094248, -1.28234889458938, 0.763266728452429, 0.195903438764438, 0.125696781044851, 0.304027542243558, 3.93465628941003, -3.93465628941003, -0.954495839235477, -0.520303245797725},
2418
{-0.758139561814633, 0.531193484944987, -2.35747210178416, 4.96929159093662, -0.352914172114246, -0.344505336583714, 2.97850917806655, -4.96929159093663, 0.445883580092639, 0.344505336583713, 0.0975406899179897, 0.129405386951656, 2.56006085904842, -2.56006085904842, -0.621037076282388, -0.0929694079783943},
2419
{-0.631033513741427, 0.305298331172715, -0.101579545331464, -0.186496378006572, -1.71430404194645, 5.36128745937517, 0.160784238906301, 0.186496378006572, 2.71347021429296, -5.36128745937517, 0.123879884820873, 0.201855297747839, 1.07186148527388, -1.07186148527388, -0.0592046935748368, -0.999166172346504},
2420
{-0.700592692350177, 0.426959954263386, -0.614400482928489, -0.305144107519429, -1.6865993151574, 2.84415561308039, 0.847469836067498, 0.305144107519428, 2.3264012396526, -2.84415561308039, 0.111851142720321, 0.161781595366469, 4.21956517200161, -4.21956517200161, -0.233069353139008, -0.639801924495196},
2421
{-0.8062251913609, 0.620605062441599, -1.69539250976771, 1.28234889458937, -1.36227345364377, 0.460593087542911, 2.01575068445413, -1.28234889458938, 1.61968607904983, -0.460593087542911, 0.0827657613626421, 0.102854367556657, 5.79987106098239, -5.79987106098239, -0.320358174686418, -0.257412625406065},
2422
{-0.916455047584489, 0.832889012138124, -3.1705665468953, 4.96929159093662, -0.699634066353336, -0.373918583072207, 3.37900569978859, -4.96929159093663, 0.745629357721305, 0.373918583072206, 0.0399882702945916, 0.0435777651517732, 3.7736518258816, -3.7736518258816, -0.208439152893294, -0.0459952913679701},
2423
{-0.49175735427463, 2.89581790868146, 0.875026145642751, -0.186496378006569, 0.980281790191304, -0.204650375830158, 0.136680424066403, 0.186496378006569, 0.15312151694565, 0.204650375830158, 2.12484383767576, -4.52890439208259, 0.0711519794597628, -0.0711519794597634, -1.01170656970915, -1.13340330713695},
2424
{-0.584924429529852, 1.01268955903751, 3.23017404188562, -0.305144107519429, 0.588619458523752, -0.170135092219663, 0.752581066382098, 0.305144107519429, 0.137139316347942, 0.170135092219663, 1.91643421353956, -2.34419934304722, 0.280101877502098, -0.280101877502099, -3.98275510826771, -0.725758774871694},
2425
{-0.728938303866097, -0.389619002348326, 3.58904690977611, 1.28234889458938, 0.191435064580118, -0.113835978641205, 1.88532430000999, -1.28234889458937, 0.100560730522576, 0.113835978641206, 1.41637272215014, -0.297815415935717, 0.385005256994438, -0.38500525699444, -5.4743712097861, -0.291995795102694},
2426
{-0.882126464396441, -0.178970691981113, 0.267722727926007, 4.96929159093663, 0.00392163921952302, -0.0506251436238542, 3.29414454363086, -4.96929159093663, 0.0482530808540689, 0.0506251436238541, 0.683696821687708, 0.377400334689847, 0.250501394902562, -0.250501394902561, -3.56186727155686, -0.0521747200735929},
2427
{-0.600838818610105, 0.772156249476524, 0.620241099631208, -0.18649637800657, 3.36865079023593, -0.248634212093422, 0.155690526131168, 0.18649637800657, 0.845585715290158, 0.248634212093422, 1.87126607257864, -2.04258350344506, 0.344947127536075, -0.344947127536075, -0.775931625762377, -4.21423650552609},
2428
{-0.675661086320137, -0.0672149106221305, 2.22716934280135, -0.305144107519429, 1.9675577038312, -0.348719578157611, 0.827417568757383, 0.305144107519429, 0.730969028895741, 0.348719578157612, 1.62452710428218, -0.881651107339915, 1.35794307896165, -1.35794307896165, -3.05458691155874, -2.69852673272694},
2429
{-0.789696230825046, -0.499062839226461, 2.21039823601036, 1.28234889458938, 0.571581844822189, -0.360330038368205, 1.98818846888492, -1.28234889458938, 0.514121127308991, 0.360330038368205, 1.14853706291856, 0.140222007132949, 1.86651809963512, -1.86651809963512, -4.19858670489528, -1.08570297213118},
2430
{-0.909165504675249, 0.0183629959498933, -0.629286883202169, 4.96929159093663, -0.0446885868156636, -0.211205510874835, 3.36107250713406, -4.96929159093663, 0.238685382673936, 0.211205510874835, 0.535485695070293, 0.355316813655063, 1.21443896953393, -1.21443896953393, -2.73178562393189, -0.193996795858273},
2431
{-0.762628186468936, -0.48311070654784, 0.264570417154492, -0.186496378006571, 3.02908408087161, 1.66383705976617, 0.182227939064815, 0.186496378006571, 2.08633964162726, -1.66383705976617, 1.2717284884301, -0.0259895954133212, 0.72715522294644, -0.72715522294644, -0.446798356219307, -5.11542372249888},
2432
{-0.808419347997877, -0.480204186575578, 0.82701116462284, -0.305144107519429, 1.54014001930344, 0.66592340179802, 0.931886611547211, 0.305144107519429, 1.73544919983212, -0.66592340179802, 1.0597994761757, 0.228824058397751, 2.86257029992999, -2.86257029992999, -1.75889777617005, -3.27558921913556},
2433
{-0.876963572777694, -0.211483050177827, 0.285854694818123, 1.28234889458937, 0.155821659379381, -0.195903438764438, 2.1317831174676, -1.28234889458938, 1.16205187048651, 0.195903438764438, 0.711387206855922, 0.3770594160996, 3.93465628941003, -3.93465628941003, -2.41763781228572, -1.3178735298659},
2434
{-0.947349062182039, 0.372518461317995, -1.88147976332778, 4.96929159093662, -0.281657998210034, -0.344505336583714, 3.45450151652294, -4.96929159093663, 0.517139753996851, 0.344505336583713, 0.317284667025811, 0.257545933838233, 2.56006085904842, -2.56006085904842, -1.57302175319516, -0.235481755786817},
2435
{-0.918052572403101, 0.0929995320454974, -0.0562022536712399, -0.186496378006572, -0.948495588562792, 5.36128745937517, 0.206161530566525, 0.186496378006572, 3.47927866767662, -5.36128745937517, 0.485619203017004, 0.3394338373406, 1.07186148527388, -1.07186148527388, -0.149959276895285, -2.53078307911383},
2436
{-0.934240861528672, 0.241157846302772, -0.435765050906863, -0.305144107519429, -1.19622470497731, 2.84415561308039, 1.02610526808912, 0.305144107519428, 2.81677584983269, -2.84415561308039, 0.393345373116696, 0.299737642109204, 4.21956517200161, -4.21956517200161, -0.590340217182259, -1.62055114485539},
2437
{-0.958118276949497, 0.48796196620424, -1.44985477532934, 1.28234889458937, -1.16498018051314, 0.460593087542911, 2.26128841889249, -1.28234889458938, 1.81697935218046, -0.460593087542911, 0.253908836302477, 0.21624747444278, 5.79987106098239, -5.79987106098239, -0.811433643563154, -0.651999171667321},
2438
{-0.982223853848664, 0.7705598540561, -3.01080887122565, 4.96929159093662, -0.6643810885001, -0.373918583072207, 3.53876337545824, -4.96929159093663, 0.780882335574541, 0.373918583072206, 0.109196724740916, 0.102467275051648, 3.7736518258816, -3.7736518258816, -0.527954504232582, -0.116501247074442}};
2440
// Array of non-zero columns
2441
static const unsigned int nzc1[16] = {0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
2442
static const double FE0[64][20] = \
2443
{{0.316942646270776, 0.0459182870838374, 0.0417713284261773, 0.0384285806226176, -0.00992565567229704, -0.0101332081942744, -0.011054706162562, -0.0116171968229622, -0.0123844609684378, -0.0127480421943013, 0.274161313248215, -0.155700796186139, 0.307139785811479, -0.170857079355319, 0.352119809987772, -0.190292195339624, 0.00443218553927295, 0.0594028686804588, 0.0681023032468037, 0.076294231978508},
2444
{0.00141590232956291, 0.0392228167323023, 0.0353420251164078, 0.0435405986330707, -0.0405943584870655, -0.0132673889695188, -0.04551696182039, -0.0152103722760563, -0.00829434237070532, -0.00848064250992449, 0.720340631623725, -0.203858737160113, 0.131264293205546, -0.113662771758787, 0.150487693606995, -0.127445887442534, 0.0139621042223731, 0.187128683191495, 0.214533314837614, 0.0390933992960042},
2445
{-0.0418846376623705, 0.0272612052688519, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, -0.066586962132492, 0.0405446175758774, -0.00355166140662744, -0.00359920474050182, 0.267461209901129, 0.543403829153424, 0.0142660308648051, -0.0482387491813342, 0.0163552633343248, -0.0545726978261391, 0.0121728891219892, 0.163148525161687, 0.187041309311128, 0.00997653862633955},
2446
{0.0606020354974101, 0.0125719331417011, 0.0110533069845138, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.0459453476251609, 0.0664145528584789, -0.000673013750447378, -0.000676604746500841, -0.296776478794994, 0.890128566813322, -0.00434722254509705, -0.00906827174738709, -0.00498386483050325, -0.0103411254145656, 0.00334794966816241, 0.044871274617098, 0.051442585500075, 0.000753538044430032},
2447
{-0.0233141297875962, 0.0379946132499842, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, -0.00893254555193576, -0.00890984667642712, -0.048514402947884, -0.0118784757749483, 0.128698381601996, -0.119415229212101, 0.698986096122026, -0.159202616932648, 0.126772850606219, -0.117928261408372, 0.0164798161265746, 0.220872602144184, 0.0400589504569247, 0.21756799927154},
2448
{-0.0636942004447079, 0.0319045035068057, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, -0.0363398789831187, -0.0116656442114478, -0.0321038941563349, -0.0133315323091856, 0.295507178830004, -0.156350117797481, 0.261061166329218, -0.178677371706281, 0.047347820538567, -0.0780377824367332, 0.0519140970715157, 0.695784565803582, 0.12619219939295, 0.111482512491259},
2449
{0.00416331000853175, 0.0216671920487514, 0.0640143830484231, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.0523162684880416, 0.031095825581728, -0.0135283446980037, -0.00873768447279164, -0.0189012088835134, 0.41676532427948, -0.00488762055045253, -0.117107805778746, -0.000886451952764201, -0.0328845471247492, 0.0452614117080655, 0.606621196735265, 0.110020927132805, 0.0284500609325142},
2450
{0.0641179720678825, 0.00978236065603381, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.0355809496645704, 0.0509368561168637, -0.00252676863369164, -0.00216492522558783, -0.289229785310999, 0.682686983226322, -0.0205395515393154, -0.0290156555358705, -0.00372519212221613, -0.0061420405868454, 0.0124483946900372, 0.166841019741274, 0.0302594168725173, 0.00214886185298794},
2451
{-0.0174860280987736, 0.0241979596905522, -0.0617731070981597, 0.0384285806226176, 0.0806970115889356, -0.103558823234662, -0.00550857447170805, -0.00513048407491107, -0.0630680308857183, 0.0457718784119034, 0.00853879745270188, -0.0687618938938031, 0.0977612527959358, 0.613462784549029, 0.00484326235994762, -0.0418764631771457, 0.0200039182057663, 0.268104779401166, 0.0132823767030295, 0.152070803153297},
2452
{0.018893837039617, 0.019880943301904, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.022075166962345, -0.00671733241030488, -0.0411105067572066, 0.0146593977712432, -0.036392063376584, -0.0900298084357277, -0.0677728132205631, 0.196474238955856, -0.00335758294734686, -0.0272969141137686, 0.0630155909245982, 0.844573594527272, 0.0418416436327583, 0.077921547602846},
2453
{0.0590357207055018, 0.0130980546488276, 0.0251291929007073, -0.0639547452440237, -0.101291343114797, 0.361425647567417, -0.0311273668109228, 0.017905654691607, -0.0169677743151103, -0.00273543287806846, -0.190966113694605, 0.239982565002839, -0.10409714187153, -0.0366619489640695, -0.00515715331570969, -0.0112664113073766, 0.0549402718289831, 0.736343215735788, 0.0364797225770017, 0.0198853858575406},
2454
{0.0531740973437773, 0.00574651592133119, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.0207640128472617, 0.029330552884261, -0.00310837799446909, -0.00203339486296364, -0.216073469396172, 0.393106057016485, -0.0323462532218693, -0.0272528049536403, -0.00160248959822376, -0.00206392802816228, 0.0151104033722227, 0.202518892603982, 0.0100331378912924, 0.00150196328937838},
2455
{0.0633645780899607, 0.00885305887263062, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.00195933827339023, -0.00172194832699608, -0.0330667115180807, 0.0495015510214934, -0.0169816512377694, -0.0230786074808287, -0.286590309701014, 0.663450144122639, -0.00323283077542312, -0.00499921670052641, 0.00989665381744754, 0.132641023685632, 0.00149623336497991, 0.0252511359143223},
2456
{0.0592677805711995, 0.00714461813298492, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.00775717045765741, -0.00225454345767584, -0.0212943165654493, 0.0210139153012292, -0.0747372528781832, -0.0302167740416121, -0.20516227285544, 0.281641379865613, -0.00231429635682643, -0.00321939794170582, 0.031176066711914, 0.417840765114924, 0.00471337808350589, 0.0129387597643601},
2457
{0.0461725856048027, 0.00458809898063897, -0.0385687396087239, -0.0639547452440237, 0.238148410057832, 0.532758645187123, -0.0107507634380464, 0.00600968869404704, -0.00863840057902653, 0.00215855535294798, -0.118604871591271, 0.0805455333806929, -0.0953008032716591, 0.0289302825963627, -0.00107502368122833, -0.00130600336283491, 0.0271809175250065, 0.364295325645881, 0.00410936832204637, 0.0033019394294335},
2458
{0.0234627458142642, 0.00196338908550111, 0.0612042229600472, 0.213985565988335, -0.297583634515967, 0.872691107158041, -0.00705250360640732, 0.00984423608600665, -0.00155624293107923, -0.000740737938466264, -0.0875131805869248, 0.131938489103154, -0.0193111235761632, -0.00992782411644321, -0.000217835678638767, -0.000235281807411464, 0.00747565700272528, 0.10019333967366, 0.00113021306382384, 0.000249398821943363},
2459
{-0.0474934098882189, 0.0183974307728652, 0.0417713284261773, 0.0384285806226176, -0.00992565567229704, -0.0101332081942744, -0.00722315577599345, -0.0552165235676718, -0.00809201886158537, -0.0605914303588281, 0.105381595203438, -0.11210146944143, 0.118057796688303, -0.123013691190792, 0.643304764711186, -0.0895202375930712, 0.0210661729344058, 0.0427688812853259, 0.233050470905012, 0.261083778994831},
2460
{-0.0593435556758836, 0.044173535162678, 0.0353420251164078, 0.0435405986330707, -0.0405943584870655, -0.0132673889695187, -0.0735771805831919, -0.0722948824964278, -0.0134076243672929, -0.0403084844093089, 0.228787335174519, -0.146774226939742, 0.0416908425370495, -0.081834929859403, 0.227176166261325, -0.148325620521794, 0.0663618658268005, 0.134728921587068, 0.734146830049622, 0.133780131961088},
2461
{0.0140171944147558, 0.0639244626451169, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, -0.19201789705842, 0.192708522205259, -0.0102419833030854, -0.0171070161250932, -0.0601339611396411, 0.391239924524043, -0.00320746677979301, -0.0347309377967427, -0.0174776992284671, -0.113304824716738, 0.0578577284463695, 0.117463685837307, 0.640067415277826, 0.0341403581673956},
2462
{0.0637734994386082, 0.0465185832699072, 0.0110533069845138, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.184144831837059, 0.315668295805934, -0.00269737874030819, -0.00321590160694519, -0.283174252139673, 0.640874823865867, -0.00414797526438387, -0.00652897488694275, -0.0226025923432014, -0.0298405119712715, 0.0159128010459527, 0.0323064232393078, 0.176039843056651, 0.0025786557535776},
2463
{-0.0544723188739935, 0.0477306372652925, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, -0.0157984607319655, -0.0423484913349203, -0.0858045319165257, -0.056458382135615, 0.0385389369754061, -0.0859765845536079, 0.209312508594235, -0.114622710571981, 0.180434929473551, -0.150168175204615, 0.0783285477048384, 0.15902387056592, 0.137084310263545, 0.744531715767973},
2464
{-0.0175829401694107, 0.0601263089173645, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, -0.0887466324394246, -0.0554467939512141, -0.0784018156992204, -0.0633647582253519, 0.0422682922674721, -0.112568968057714, 0.0373412575686983, -0.128644145790115, 0.0321895104172831, -0.137212538001305, 0.24674764559191, 0.500951017283187, 0.431837839411788, 0.381500342794664},
2465
{0.0452580461211559, 0.0623679922432538, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.175443845541055, 0.14779842437514, -0.0453676243779744, -0.041530204572686, -0.162251408196532, 0.300062725486068, -0.0419562220558782, -0.0843152856788516, -0.0361677762044535, -0.0793987591801864, 0.215127439464974, 0.436755168978356, 0.376498703498837, 0.0973579421179106},
2466
{0.0592405099224476, 0.0385588963661094, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.14897956417135, 0.24210282042228, -0.0105797313831695, -0.0102898871872979, -0.249121428689321, 0.491521018920905, -0.0176912706919525, -0.0208906935741604, -0.0152505132208227, -0.0185157930528795, 0.0591672061046181, 0.120122208326693, 0.103549674757618, 0.00735354375510284},
2467
{0.0325299333929531, 0.0638787973684188, -0.0617731070981597, 0.0384285806226176, 0.0806970115889355, -0.103558823234662, -0.017343262053637, -0.0243851850969721, -0.198564146218889, 0.217553687140082, -0.0117972873894809, -0.0495071928717421, -0.135067918073687, 0.44168097582085, -0.0318046891613103, -0.094925310825481, 0.0950786009643269, 0.193030096642605, 0.0454531491271413, 0.52039608935609},
2468
{0.0525008116745778, 0.0605211362317534, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.0770790017967222, -0.0319274734686737, -0.143543957316746, 0.0696761012883771, -0.0827313861152967, -0.0648196673773589, -0.15407037300001, 0.141457535438722, -0.0362792319013842, -0.0686224327245416, 0.299513033517807, 0.608076151934063, 0.143184801205848, 0.266652557941832},
2469
{0.0640509106927241, 0.0478617966777029, 0.0251291929007073, -0.0639547452440237, -0.101291343114797, 0.361425647567417, -0.123672280290719, 0.0851055568172439, -0.0674147400181511, -0.0130015094244685, -0.186777439414966, 0.172782662877202, -0.101813862328864, -0.0263958724176695, -0.0239742959680135, -0.0322282006711705, 0.261131050845518, 0.530152436719253, 0.124835961777158, 0.0680490720179158},
2470
{0.043189241782395, 0.0246116712744907, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.0920146055848046, 0.139408085209121, -0.0137746098152355, -0.00966472352016019, -0.169123783267225, 0.283028524691626, -0.0253178732895336, -0.0196214762964438, -0.00596164582739598, -0.00658507159076726, 0.0718197304077884, 0.145809565568416, 0.0343340444998879, 0.00513981517780901},
2471
{0.0565572914460857, 0.0355988950588367, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.00831703837687068, -0.00818441848139805, -0.140362239858113, 0.235280816901719, -0.0142479247765323, -0.0166161373264267, -0.240454659981553, 0.477670878242413, -0.0128920618579229, -0.0152785351603578, 0.0470387845777104, 0.0954988929253688, 0.00512020700722333, 0.0864110145348935},
2472
{0.0500526781546474, 0.0297626847872616, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.0337332239476843, -0.0107158425446524, -0.0926015424614136, 0.0998791160347682, -0.0601773048836941, -0.0217554749546355, -0.165193557012014, 0.202776179132074, -0.00885691113531579, -0.010079747400941, 0.148179810377592, 0.300837021449246, 0.0161294835790437, 0.0442772698168981},
2473
{0.0364359152038298, 0.0200917703395614, -0.0385687396087239, -0.0639547452440237, 0.238148410057832, 0.532758645187123, -0.0483637167469587, 0.0285640436730254, -0.0388609758886781, 0.0102596111897318, -0.0909450732072041, 0.0579911784017145, -0.0730757380701406, 0.0208292267595789, -0.00391798160861548, -0.00423004639339734, 0.129190870739485, 0.262285372431402, 0.0140625232468916, 0.0112994495375666},
2474
{0.0175030551599998, 0.00902055949440797, 0.0612042229600472, 0.213985565988335, -0.297583634515967, 0.872691107158041, -0.0327684220468546, 0.0467896431585221, -0.00723085417875004, -0.00352072659696579, -0.0645347110293077, 0.0949930820306381, -0.014240572348997, -0.0071478354579437, -0.000763513336067498, -0.000787083904625139, 0.0355317894123066, 0.0721372072640786, 0.00386766194665403, 0.000853458842447994},
2475
{0.0183974307728653, -0.0474934098882189, 0.0417713284261773, 0.0384285806226176, -0.00992565567229703, -0.0101332081942744, 0.105381595203438, -0.11210146944143, 0.118057796688303, -0.123013691190792, -0.00722315577599352, -0.0552165235676718, -0.00809201886158544, -0.0605914303588281, -0.0895202375930713, 0.643304764711186, 0.0427688812853259, 0.0210661729344057, 0.233050470905012, 0.261083778994831},
2476
{0.0441735351626781, -0.0593435556758837, 0.0353420251164078, 0.0435405986330707, -0.0405943584870654, -0.0132673889695187, 0.228787335174519, -0.146774226939742, 0.0416908425370495, -0.081834929859403, -0.073577180583192, -0.0722948824964278, -0.013407624367293, -0.0403084844093089, -0.148325620521794, 0.227176166261325, 0.134728921587068, 0.0663618658268004, 0.734146830049622, 0.133780131961088},
2477
{0.0639244626451169, 0.0140171944147557, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, -0.0601339611396408, 0.391239924524043, -0.00320746677979297, -0.0347309377967428, -0.19201789705842, 0.192708522205259, -0.0102419833030855, -0.0171070161250932, -0.113304824716739, -0.017477699228467, 0.117463685837307, 0.0578577284463694, 0.640067415277826, 0.0341403581673956},
2478
{0.0465185832699073, 0.0637734994386082, 0.0110533069845139, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.283174252139672, 0.640874823865867, -0.00414797526438382, -0.00652897488694276, -0.184144831837059, 0.315668295805934, -0.00269737874030827, -0.0032159016069452, -0.0298405119712715, -0.0226025923432015, 0.0323064232393079, 0.0159128010459527, 0.176039843056651, 0.00257865575357757},
2479
{0.0477306372652926, -0.0544723188739936, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, 0.0385389369754061, -0.085976584553608, 0.209312508594235, -0.114622710571981, -0.0157984607319655, -0.0423484913349203, -0.0858045319165258, -0.0564583821356151, -0.150168175204615, 0.180434929473551, 0.15902387056592, 0.0783285477048383, 0.137084310263545, 0.744531715767973},
2480
{0.0601263089173645, -0.0175829401694107, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, 0.0422682922674721, -0.112568968057714, 0.0373412575686983, -0.128644145790115, -0.0887466324394247, -0.0554467939512141, -0.0784018156992205, -0.0633647582253519, -0.137212538001305, 0.0321895104172831, 0.500951017283187, 0.24674764559191, 0.431837839411788, 0.381500342794665},
2481
{0.0623679922432539, 0.0452580461211558, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.162251408196532, 0.300062725486068, -0.0419562220558781, -0.0843152856788517, -0.175443845541055, 0.14779842437514, -0.0453676243779745, -0.041530204572686, -0.0793987591801865, -0.0361677762044535, 0.436755168978356, 0.215127439464974, 0.376498703498837, 0.0973579421179105},
2482
{0.0385588963661094, 0.0592405099224476, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.24912142868932, 0.491521018920905, -0.0176912706919524, -0.0208906935741604, -0.14897956417135, 0.24210282042228, -0.0105797313831696, -0.0102898871872979, -0.0185157930528794, -0.0152505132208228, 0.120122208326693, 0.0591672061046181, 0.103549674757618, 0.00735354375510282},
2483
{0.0638787973684189, 0.032529933392953, -0.0617731070981598, 0.0384285806226176, 0.0806970115889355, -0.103558823234662, -0.0117972873894808, -0.0495071928717421, -0.135067918073687, 0.44168097582085, -0.0173432620536371, -0.024385185096972, -0.198564146218889, 0.217553687140082, -0.0949253108254811, -0.0318046891613103, 0.193030096642606, 0.0950786009643268, 0.0454531491271413, 0.52039608935609},
2484
{0.0605211362317534, 0.0525008116745777, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.0827313861152966, -0.0648196673773589, -0.15407037300001, 0.141457535438722, -0.0770790017967223, -0.0319274734686737, -0.143543957316746, 0.0696761012883772, -0.0686224327245416, -0.0362792319013842, 0.608076151934063, 0.299513033517807, 0.143184801205848, 0.266652557941832},
2485
{0.0478617966777029, 0.0640509106927241, 0.0251291929007073, -0.0639547452440237, -0.101291343114797, 0.361425647567417, -0.186777439414966, 0.172782662877202, -0.101813862328864, -0.0263958724176696, -0.123672280290718, 0.0851055568172438, -0.0674147400181512, -0.0130015094244684, -0.0322282006711705, -0.0239742959680135, 0.530152436719253, 0.261131050845517, 0.124835961777158, 0.0680490720179158},
2486
{0.0246116712744908, 0.0431892417823949, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.169123783267225, 0.283028524691625, -0.0253178732895334, -0.0196214762964438, -0.0920146055848049, 0.139408085209121, -0.0137746098152356, -0.00966472352016022, -0.00658507159076725, -0.00596164582739602, 0.145809565568416, 0.0718197304077886, 0.034334044499888, 0.005139815177809},
2487
{0.0355988950588367, 0.0565572914460857, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.0142479247765323, -0.0166161373264268, -0.240454659981553, 0.477670878242413, -0.00831703837687075, -0.00818441848139802, -0.140362239858113, 0.235280816901719, -0.0152785351603579, -0.0128920618579228, 0.095498892925369, 0.0470387845777103, 0.00512020700722332, 0.0864110145348935},
2488
{0.0297626847872616, 0.0500526781546473, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.060177304883694, -0.0217554749546356, -0.165193557012014, 0.202776179132074, -0.0337332239476843, -0.0107158425446524, -0.0926015424614136, 0.0998791160347682, -0.010079747400941, -0.00885691113531576, 0.300837021449246, 0.148179810377592, 0.0161294835790437, 0.0442772698168981},
2489
{0.0200917703395613, 0.0364359152038299, -0.0385687396087239, -0.0639547452440237, 0.238148410057832, 0.532758645187123, -0.0909450732072041, 0.0579911784017145, -0.0730757380701405, 0.0208292267595789, -0.0483637167469586, 0.0285640436730253, -0.0388609758886781, 0.0102596111897318, -0.00423004639339734, -0.00391798160861548, 0.262285372431403, 0.129190870739485, 0.0140625232468916, 0.0112994495375665},
2490
{0.00902055949440803, 0.0175030551599997, 0.0612042229600472, 0.213985565988335, -0.297583634515967, 0.872691107158041, -0.0645347110293075, 0.0949930820306377, -0.0142405723489969, -0.00714783545794369, -0.0327684220468548, 0.0467896431585224, -0.00723085417875017, -0.0035207265969658, -0.000787083904625131, -0.000763513336067518, 0.0721372072640785, 0.0355317894123067, 0.00386766194665405, 0.00085345884244799},
2491
{0.0459182870838375, 0.316942646270776, 0.0417713284261773, 0.0384285806226176, -0.00992565567229701, -0.0101332081942743, 0.274161313248215, -0.155700796186139, 0.307139785811479, -0.170857079355319, -0.011054706162562, -0.0116171968229622, -0.0123844609684377, -0.0127480421943014, -0.190292195339624, 0.352119809987772, 0.0594028686804587, 0.00443218553927282, 0.0681023032468037, 0.0762942319785081},
2492
{0.0392228167323025, 0.00141590232956263, 0.0353420251164078, 0.0435405986330708, -0.0405943584870654, -0.0132673889695187, 0.720340631623725, -0.203858737160113, 0.131264293205546, -0.113662771758787, -0.04551696182039, -0.0152103722760563, -0.00829434237070529, -0.0084806425099245, -0.127445887442534, 0.150487693606995, 0.187128683191495, 0.0139621042223729, 0.214533314837614, 0.0390933992960044},
2493
{0.027261205268852, -0.0418846376623705, 0.0242504041833649, -0.0639547452440238, -0.0588585848419933, 0.0353654205325618, 0.267461209901129, 0.543403829153424, 0.0142660308648051, -0.0482387491813341, -0.0665869621324919, 0.0405446175758774, -0.00355166140662746, -0.00359920474050181, -0.0545726978261391, 0.0163552633343248, 0.163148525161687, 0.012172889121989, 0.187041309311128, 0.00997653862633953},
2494
{0.0125719331417013, 0.0606020354974101, 0.0110533069845139, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.296776478794994, 0.890128566813322, -0.00434722254509705, -0.00906827174738711, -0.0459453476251611, 0.0664145528584792, -0.000673013750447483, -0.000676604746500861, -0.0103411254145656, -0.00498386483050329, 0.0448712746170982, 0.00334794966816239, 0.0514425855000751, 0.000753538044429961},
2495
{0.0379946132499844, -0.0233141297875965, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, 0.128698381601996, -0.119415229212101, 0.698986096122025, -0.159202616932648, -0.00893254555193573, -0.00890984667642714, -0.0485144029478841, -0.0118784757749484, -0.117928261408373, 0.126772850606219, 0.220872602144184, 0.0164798161265745, 0.0400589504569248, 0.21756799927154},
2496
{0.0319045035068058, -0.063694200444708, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.0643207363967599, 0.295507178830004, -0.156350117797481, 0.261061166329218, -0.178677371706281, -0.0363398789831187, -0.0116656442114479, -0.032103894156335, -0.0133315323091857, -0.0780377824367335, 0.0473478205385671, 0.695784565803581, 0.0519140970715157, 0.12619219939295, 0.11148251249126},
2497
{0.0216671920487514, 0.0041633100085317, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.0189012088835131, 0.41676532427948, -0.0048876205504524, -0.117107805778746, -0.0523162684880414, 0.031095825581728, -0.0135283446980038, -0.00873768447279162, -0.0328845471247492, -0.000886451952764223, 0.606621196735265, 0.0452614117080653, 0.110020927132805, 0.0284500609325141},
2498
{0.00978236065603392, 0.0641179720678825, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.289229785310999, 0.682686983226322, -0.0205395515393154, -0.0290156555358705, -0.0355809496645706, 0.0509368561168639, -0.00252676863369175, -0.00216492522558786, -0.0061420405868454, -0.0037251921222162, 0.166841019741274, 0.0124483946900372, 0.0302594168725175, 0.00214886185298789},
2499
{0.0241979596905522, -0.0174860280987737, -0.0617731070981598, 0.0384285806226176, 0.0806970115889355, -0.103558823234662, 0.00853879745270196, -0.0687618938938031, 0.097761252795936, 0.613462784549029, -0.00550857447170807, -0.00513048407491103, -0.0630680308857182, 0.0457718784119034, -0.0418764631771457, 0.00484326235994764, 0.268104779401166, 0.0200039182057662, 0.0132823767030295, 0.152070803153297},
2500
{0.019880943301904, 0.018893837039617, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.0363920633765839, -0.0900298084357277, -0.067772813220563, 0.196474238955856, -0.022075166962345, -0.00671733241030489, -0.0411105067572068, 0.0146593977712433, -0.0272969141137688, -0.0033575829473469, 0.844573594527272, 0.0630155909245982, 0.0418416436327584, 0.0779215476028461},
2501
{0.0130980546488274, 0.0590357207055018, 0.0251291929007073, -0.0639547452440238, -0.101291343114797, 0.361425647567417, -0.190966113694605, 0.239982565002839, -0.104097141871529, -0.0366619489640696, -0.0311273668109225, 0.0179056546916068, -0.0169677743151103, -0.00273543287806841, -0.0112664113073766, -0.00515715331570972, 0.736343215735788, 0.0549402718289825, 0.0364797225770015, 0.0198853858575404},
2502
{0.00574651592133132, 0.0531740973437773, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.216073469396172, 0.393106057016485, -0.0323462532218692, -0.0272528049536403, -0.0207640128472621, 0.0293305528842615, -0.00310837799446924, -0.00203339486296368, -0.0020639280281623, -0.00160248959822383, 0.202518892603981, 0.0151104033722229, 0.0100331378912926, 0.00150196328937837},
2503
{0.00885305887263062, 0.0633645780899607, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.0169816512377693, -0.0230786074808287, -0.286590309701014, 0.663450144122639, -0.0019593382733903, -0.00172194832699607, -0.0330667115180806, 0.0495015510214933, -0.00499921670052645, -0.00323283077542309, 0.132641023685632, 0.00989665381744747, 0.0014962333649799, 0.0252511359143222},
2504
{0.00714461813298495, 0.0592677805711995, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.0747372528781831, -0.0302167740416121, -0.20516227285544, 0.281641379865613, -0.00775717045765746, -0.00225454345767584, -0.0212943165654494, 0.0210139153012293, -0.0032193979417059, -0.00231429635682643, 0.417840765114924, 0.031176066711914, 0.00471337808350594, 0.0129387597643601},
2505
{0.00458809898063892, 0.0461725856048027, -0.0385687396087239, -0.0639547452440237, 0.238148410057832, 0.532758645187123, -0.118604871591271, 0.0805455333806929, -0.095300803271659, 0.0289302825963627, -0.0107507634380463, 0.00600968869404697, -0.00863840057902652, 0.00215855535294799, -0.00130600336283492, -0.00107502368122835, 0.364295325645881, 0.0271809175250061, 0.00410936832204636, 0.00330193942943344},
2506
{0.00196338908550119, 0.0234627458142642, 0.0612042229600472, 0.213985565988335, -0.297583634515967, 0.872691107158041, -0.0875131805869245, 0.131938489103153, -0.0193111235761631, -0.00992782411644321, -0.00705250360640757, 0.00984423608600694, -0.00155624293107936, -0.000740737938466279, -0.000235281807411467, -0.000217835678638792, 0.10019333967366, 0.00747565700272542, 0.00113021306382388, 0.000249398821943354}};
2508
static const double FE0_D010[64][16] = \
2509
{{-2.89581790868146, 0.550843873647288, -0.147100493051721, -0.186496378006569, -0.227929503657332, -0.188928908491132, -0.875026145642752, 0.186496378006569, 4.67246475338807, -2.3274907183539, -1.12384215149678, 0.227929503657332, 0.0815720484450847, 1.02212663869447, -0.081572048445085, 1.31277105998792},
2510
{-1.01268955903752, 0.634208990161043, -0.793601441481282, -0.305144107519429, -0.190766224310168, -0.165792744888627, -3.23017404188562, 0.305144107519429, 2.43040151775111, -2.05192094887464, -0.674821633227638, 0.190766224310168, 0.321122252601283, 4.0237754833669, -0.321122252601281, 0.840614378116265},
2511
{0.389619002348325, 0.762060204474009, -1.94170757097522, 1.28234889458938, -0.12878311667611, -0.118735493095584, -3.58904690977611, -1.28234889458938, 0.325850708759322, -1.47752991558166, -0.219470357403724, 0.128783116676109, 0.441388527959663, 5.53075448075133, -0.441388527959662, 0.338205850499309},
2512
{0.178970691981112, 0.896915023365993, -3.33082998563292, 4.96929159093663, -0.0577310620952133, -0.0559357213522612, -0.267722727926006, -4.96929159093663, -0.376826018254617, -0.69905969709249, -0.00449595565475457, 0.0577310620952123, 0.287186836904624, 3.59855271355893, -0.287186836904623, 0.0604316770070172},
2513
{-0.772156249476526, -0.434006101240926, 0.126694655024588, -0.186496378006569, -0.184174110474718, 0.12479910294217, -0.620241099631208, 0.186496378006569, -0.715105973333578, 1.92126832405103, -0.610961313457298, 0.184174110474717, 0.0625619463803196, 0.493546444606621, -0.0625619463803203, 0.486162210515127},
2514
{0.0672149106221293, -0.297265876948554, 0.284239759978268, -0.305144107519429, -0.15230413516731, 0.0455424913826485, -2.22716934280135, 0.305144107519429, -0.729057010740207, 0.959107977066631, -0.356849585751078, 0.152304135167311, 0.246285750225997, 1.94292958282309, -0.246285750225997, 0.311307094368429},
2515
{0.49906283922646, 0.0380105914258389, -0.46019472833453, 1.28234889458938, -0.101182752493622, -0.0215827737843673, -2.21039823601036, -1.28234889458938, -0.608137898905595, 0.0710644682532944, -0.103665953049544, 0.101182752493622, 0.33852435908473, 2.67059296434489, -0.33852435908473, 0.125248726833912},
2516
{-0.0183629959498944, 0.534467499977834, -2.36689241100155, 4.96929159093663, -0.0447080307510196, -0.0304848581003364, 0.629286883202171, -4.96929159093663, -0.318733251490988, -0.197371252536953, 0.00810502465158824, 0.0447080307510188, 0.220258873401427, 1.73760552779938, -0.220258873401427, 0.0223798334487492},
2517
{0.48311070654784, 0.165050168904604, 0.508902750434951, -0.18649637800657, -0.113577568388747, 0.288653004091984, -0.264570417154491, 0.18649637800657, -2.85302839593482, 2.20486752048238, -0.150066089523472, 0.113577568388746, 0.0360245334466714, -0.24433233328046, -0.0360245334466716, -0.138586914568512},
2518
{0.480204186575578, -0.333630559700654, 1.78886698094661, -0.305144107519429, -0.0925192737828259, 0.165043383447255, -0.827011164622839, 0.305144107519429, -1.69266286458037, 1.54608923770545, -0.0763012131208206, 0.0925192737828256, 0.14181670743617, -0.96185581632377, -0.141816707436171, -0.0887421703264342},
2519
{0.211483050177827, -0.464213039151449, 1.60794346144038, 1.28234889458937, -0.0602021654607815, 0.043423468138972, -0.28585469481812, -1.28234889458937, -0.525161399675397, 0.77789138864902, -0.00771967580358129, 0.0602021654607812, 0.194929710502059, -1.32208876662226, -0.194929710502061, -0.0357037923353905},
2520
{-0.372518461317996, 0.119368446579232, -1.02127052148706, 4.96929159093662, -0.0260903133176998, -0.00757416166005619, 1.88147976332778, -4.96929159093663, 0.010158237655233, 0.242991777083531, 0.0139538267165684, 0.0260903133176989, 0.126829864012545, -0.86020924184072, -0.126829864012546, -0.00637966505651153},
2521
{-0.0929995320454974, 2.67795638548276, 0.853609012762395, -0.186496378006571, -0.0403982696223159, 0.162503248241208, 0.0562022536712438, 0.186496378006571, 0.598362416229819, -3.18331926966708, 0.010699334992376, 0.040398269622315, 0.0120909419449659, -0.909811266433639, -0.0120909419449657, -0.173202583233583},
2522
{-0.241157846302771, 0.896717691404195, 3.14586185301822, -0.305144107519429, -0.0325110916975726, 0.0974140250697482, 0.435765050906867, 0.305144107519429, 0.882993263846752, -1.53855310894818, 0.0134937990213523, 0.0325110916975708, 0.0475980508942626, -3.58162690392509, -0.0475980508942622, -0.110907824091098},
2523
{-0.48796196620424, -0.408955764144395, 3.47315823301274, 1.28234889458937, -0.0207926113139723, 0.0314803877703174, 1.44985477532934, -1.28234889458938, 0.935591355323889, -0.0386736249752544, 0.0131413507464731, 0.0207926113139706, 0.0654244090771633, -4.92301300834208, -0.0654244090771642, -0.044621738516789},
2524
{-0.7705598540561, -0.164194200903477, 0.192320445346117, 4.96929159093662, -0.008861583265185, 0.00047871937058011, 3.01080887122566, -4.96929159093663, 0.554419381303298, 0.38033467365628, 0.00749443214515546, 0.00886158326518377, 0.0425680050772475, -3.20312931657177, -0.0425680050772485, -0.00797315151573477},
2525
{-0.467878056063201, 0.550843873647288, -0.147100493051721, -0.186496378006569, -0.148929359736163, -0.897978891749118, -0.568886338631576, 0.18649637800657, 1.53547491751183, -1.61844073509592, -3.47278186019387, 0.148929359736164, 0.38771185545626, 0.715986831683297, -0.38771185545626, 4.37076075194299},
2526
{0.205627659956735, 0.634208990161044, -0.793601441481281, -0.305144107519429, -0.308369459952734, -0.78801273190081, -2.02500258533535, 0.305144107519429, 0.589864311744675, -1.42970096186245, -2.01074208786445, 0.308369459952734, 1.52629370915155, 2.81860402681663, -1.52629370915155, 2.79875481976526},
2527
{0.489236057073233, 0.762060204474009, -1.94170757097522, 1.28234889458938, -0.371373951428681, -0.564349666511006, -1.93251625568215, -1.28234889458938, -0.219380519381007, -1.03191574216624, -0.561678246881203, 0.371373951428681, 2.09791918205362, 3.87422382665737, -2.09791918205362, 1.12602791339221},
2528
{-0.0638353588879538, 0.896915023365993, -3.33082998563292, 4.96929159093663, -0.231380918216752, -0.265862421321552, 0.810089151290437, -4.96929159093663, -0.343946667354841, -0.489132997123199, 0.0646602390927717, 0.231380918216752, 1.36499871612107, 2.52074083434249, -1.36499871612107, 0.201202182228781},
2529
{0.27993407433382, -0.434006101240926, 0.126694655024588, -0.18649637800657, -0.325737768171688, 0.593169997362034, -0.385446184507694, 0.18649637800657, -1.29882540272406, 1.45289742963117, -1.80461529496461, 0.325737768171688, 0.297356861503832, 0.258751529483107, -0.297356861503832, 1.21144529760258},
2530
{0.482918552223105, -0.297265876948554, 0.284239759978268, -0.305144107519429, -0.371946178163572, 0.216463410845381, -1.30285919636009, 0.305144107519429, -0.97383973287845, 0.788187057603898, -0.992195270348315, 0.371946178163572, 1.17059589666726, 1.01861943638182, -1.17059589666726, 0.775731859502934},
2531
{0.366779535287998, 0.0380105914258388, -0.46019472833453, 1.28234889458938, -0.339318757108362, -0.102582899771889, -0.939916693199137, -1.28234889458938, -0.556854720954653, 0.152064594240816, -0.209518653725823, 0.339318757108362, 1.60900590189595, 1.40011142153367, -1.60900590189595, 0.312101553497711},
2532
{-0.241872355951096, 0.534467499977834, -2.36689241100155, 4.96929159093663, -0.187195198527213, -0.144894496616187, 1.45591818989304, -4.96929159093663, -0.209633530005636, -0.0829616140211016, 0.089127216876596, 0.187195198527213, 1.0468901800923, 0.910974221108511, -1.04689018009229, 0.0557672797395916},
2533
{0.437807010605908, 0.165050168904603, 0.508902750434952, -0.18649637800657, -0.357588980978253, 1.37196740713051, -0.129370383230414, 0.18649637800657, -1.72441029695436, 1.12155311744385, -0.348773806171044, 0.357588980978252, 0.171224567370748, -0.379532367204537, -0.171224567370748, -1.02319360095947},
2534
{0.302639767092249, -0.333630559700654, 1.78886698094661, -0.305144107519429, -0.323045949428251, 0.784451017804134, -0.294773219480419, 0.305144107519429, -0.895690810740162, 0.926681603348568, -0.129263469282916, 0.32304594942825, 0.67405465257859, -1.49409376146619, -0.67405465257859, -0.655187548521217},
2535
{-0.0324350076632246, -0.464213039151449, 1.60794346144038, 1.28234889458937, -0.239189492840795, 0.20639169572701, 0.445716291707001, -1.28234889458938, -0.118275114246308, 0.614923161060981, 0.0572110546574559, 0.239189492840794, 0.926500697027181, -2.05365975314738, -0.926500697027181, -0.263602750384466},
2536
{-0.531193484944987, 0.119368446579232, -1.02127052148706, 4.96929159093662, -0.115617819502007, -0.0359999819389442, 2.35747210178416, -4.96929159093663, 0.140407441003337, 0.271417597362419, 0.0831013441592525, 0.115617819502006, 0.602822202468931, -1.33620158029711, -0.602822202468931, -0.047101362220308},
2537
{-0.305298331172715, 2.67795638548276, 0.853609012762396, -0.186496378006571, -0.171483384656493, 0.772377757997374, 0.101579545331468, 0.186496378006571, 1.4205357251132, -3.79319377942325, 0.0919130190854158, 0.171483384656493, 0.0574682336051896, -0.955188558093863, -0.0574682336051899, -0.864290777082788},
2538
{-0.426959954263386, 0.896717691404195, 3.14586185301822, -0.305144107519429, -0.141379378344762, 0.463008752718538, 0.614400482928493, 0.305144107519429, 1.43439009945616, -1.90414783659697, 0.0904276203347775, 0.14137937834476, 0.226233482915889, -3.76026233594672, -0.226233482915888, -0.553436373053314},
2539
{-0.620605062441599, -0.408955764144395, 3.47315823301274, 1.28234889458937, -0.0935382840310493, 0.149626248029426, 1.69539250976771, -1.28234889458938, 1.18638031182036, -0.156819485234363, 0.0730387742667553, 0.0935382840310477, 0.310962143515531, -5.16855074278045, -0.310962143515532, -0.22266502229618},
2540
{-0.832889012138124, -0.164194200903477, 0.192320445346117, 4.96929159093662, -0.0411740449410185, 0.00227535263547532, 3.1705665468953, -4.96929159093663, 0.618545172650217, 0.378538040391385, 0.037511128551346, 0.0411740449410173, 0.202325680746892, -3.36288699224142, -0.202325680746893, -0.0397864811868207},
2541
{0.481257411950509, 0.550843873647289, -0.147100493051722, -0.18649637800657, 2.17279178081481, -1.82309111092608, -0.169459382944774, 0.186496378006569, -0.338772769678836, -0.693328515918961, -2.10019618765661, -2.17279178081481, 0.787138811143062, 0.316559875996497, -0.787138811143061, 3.92328729858268},
2542
{0.374511532557597, 0.634208990161044, -0.793601441481281, -0.305144107519429, 0.958871030835728, -1.59983605408212, -0.452590390168168, 0.305144107519429, -0.390842883037494, -0.617877639681148, -0.912385469676855, -0.958871030835727, 3.09870590431873, 1.24619183164945, -3.09870590431873, 2.51222152375897},
2543
{0.047623881211908, 0.762060204474009, -1.94170757097522, 1.28234889458938, -0.1163026317109, -1.14575172080744, 0.228793645916037, -1.28234889458938, -0.359170397816118, -0.4505136878698, 0.135005248697902, 0.116302631710901, 4.25922908365181, 1.71291392505918, -4.25922908365181, 1.01074647210954},
2544
{-0.48276197214663, 0.896915023365993, -3.33082998563292, 4.96929159093663, -0.3558129642943, -0.539758140747053, 2.21633266441442, -4.96929159093663, -0.198915773521666, -0.215237277697697, 0.359154806273899, 0.3558129642943, 2.77124222924505, 1.11449732121851, -2.77124222924505, 0.180603334473153},
2545
{0.347571076915241, -0.434006101240927, 0.126694655024588, -0.18649637800657, 0.794608255263633, 1.20426321753775, -0.0791043889923459, 0.18649637800657, -0.75536918512977, 0.841804209455456, -0.751906274110712, -0.794608255263634, 0.603698657019181, -0.0475902660322414, -0.603698657019181, -0.452356943427033},
2546
{0.189627288930479, -0.297265876948554, 0.284239759978268, -0.305144107519429, 0.177150719235663, 0.439467479446286, -0.0968925776838803, 0.305144107519429, -0.457544400984918, 0.565182989002993, -0.149807109656454, -0.177150719235663, 2.37656251534347, -0.187347182294387, -2.37656251534347, -0.289660369789832},
2547
{-0.142029172075059, 0.0380105914258387, -0.46019472833453, 1.28234889458938, -0.313803804280189, -0.208265444127389, 0.717706926073706, -1.28234889458938, -0.153728557947097, 0.257747138596316, 0.324805006465407, 0.313803804280189, 3.26662952116879, -0.257512197739175, -3.26662952116879, -0.116539562338018},
2548
{-0.593565766700245, 0.534467499977833, -2.36689241100155, 4.96929159093663, -0.313025048504259, -0.294167124895937, 2.53444120044319, -4.96929159093663, -0.00721274753623695, 0.0663110142586485, 0.314990777648698, 0.313025048504259, 2.12541319064245, -0.16754878944164, -2.12541319064245, -0.0208236527527615},
2549
{-0.0540171096638478, 0.165050168904603, 0.508902750434953, -0.18649637800657, -0.243240283336858, 2.78539017721002, 0.0470279051407377, 0.18649637800657, 0.1808365933949, -0.291869652635655, 0.257399011740106, 0.243240283336858, 0.3476228557419, -0.55593065557569, -0.347622855741901, -3.04278918895013},
2550
{-0.20611543016718, -0.333630559700654, 1.78886698094661, -0.305144107519429, -0.346735667978873, 1.59260500514659, 0.399648666404792, 0.305144107519429, 0.421218373861721, 0.118527616006114, 0.35580200942589, 0.346735667978872, 1.3684765384638, -2.1885156473514, -1.3684765384638, -1.94840701457248},
2551
{-0.462159330951633, -0.464213039151449, 1.60794346144038, 1.28234889458938, -0.361238596901013, 0.419019722296543, 1.40021213094248, -1.28234889458938, 0.524077235611634, 0.402295134491448, 0.364886273885646, 0.361238596901012, 1.88099653626266, -3.00815559238285, -1.88099653626266, -0.783905996182189},
2552
{-0.758139561814633, 0.119368446579232, -1.02127052148706, 4.96929159093662, -0.212506731110909, -0.0730877392212954, 2.97850917806655, -4.96929159093663, 0.330265760590632, 0.30850535464477, 0.213158509419996, 0.212506731110908, 1.22385927875132, -1.95723865657949, -1.22385927875132, -0.140070770198701},
2553
{-0.631033513741427, 2.67795638548276, 0.853609012762397, -0.186496378006571, -0.293768316833252, 1.56809367995192, 0.160784238906301, 0.186496378006571, 2.54198682963646, -4.5889097013778, 0.29536326947737, 0.293768316833252, 0.116672927180023, -1.0143932516687, -0.116672927180024, -1.86345694942929},
2554
{-0.700592692350177, 0.896717691404196, 3.14586185301822, -0.305144107519429, -0.252209215701245, 0.940007776483423, 0.847469836067498, 0.305144107519429, 2.18502186130783, -2.38114686036185, 0.253230521065085, 0.252209215701243, 0.459302836054894, -3.99333168908572, -0.459302836054893, -1.19323829754851},
2555
{-0.806225191360899, -0.408955764144395, 3.47315823301274, 1.28234889458937, -0.175893141823411, 0.303773602308549, 2.01575068445413, -1.28234889458938, 1.52614779501878, -0.310966839513486, 0.176304045393693, 0.175893141823409, 0.631320318201947, -5.48890891746686, -0.631320318201947, -0.480077647702241},
2556
{-0.91645504758449, -0.164194200903477, 0.192320445346117, 4.96929159093662, -0.0810888937031189, 0.004619457319178, 3.37900569978859, -4.96929159093663, 0.704455312780285, 0.376193935707682, 0.0811623152356104, 0.0810888937031178, 0.410764833640184, -3.57132614513471, -0.410764833640184, -0.0857817725547879},
2557
{-0.49175735427463, 0.550843873647289, -0.147100493051723, -0.186496378006569, 5.65274654357938, -2.53214109418406, 0.136680424066405, 0.186496378006569, -0.0748079867116807, 0.0157214673390227, 2.3527733413331, -5.65274654357938, 1.09327861815424, 0.0104200689853184, -1.09327861815424, 0.179367752850965},
2558
{-0.584924429529852, 0.634208990161044, -0.793601441481281, -0.305144107519429, 3.01902097627486, -2.2220560410943, 0.752581066382098, 0.305144107519429, -0.0536269079622267, 0.0043423473310342, 2.10720043784973, -3.01902097627486, 4.303877360869, 0.0410203750991849, -4.303877360869, 0.114855603244573},
2559
{-0.728938303866098, 0.762060204474009, -1.94170757097521, 1.28234889458937, 0.517285773339441, -1.59136589422286, 1.88532430000999, -1.28234889458938, -0.0282223861535331, -0.00489951445437849, 1.54515583882625, -0.517285773339441, 5.91575973774576, 0.0563832709652265, -5.91575973774576, 0.046210055396613},
2560
{-0.882126464396442, 0.896915023365992, -3.33082998563292, 4.96929159093663, -0.372904379035093, -0.749684840716344, 3.29414454363086, -4.96929159093663, -0.00947798124114361, -0.00531057772840652, 0.741427883782919, 0.372904379035093, 3.84905410846149, 0.0366854420020629, -3.84905410846149, 0.00825695693342338},
2561
{-0.600838818610105, -0.434006101240927, 0.126694655024588, -0.18649637800657, 2.65354481690235, 1.67263411195761, 0.155690526131169, 0.18649637800657, 0.661411604815439, 0.373433315035593, 2.05544018305336, -2.65354481690236, 0.838493572142695, -0.282385181155756, -0.838493572142697, -3.72807429501096},
2562
{-0.675661086320138, -0.297265876948554, 0.284239759978268, -0.305144107519429, 1.23850069309099, 0.610388398909019, 0.827417568757383, 0.305144107519429, 0.578664893728431, 0.39426206954026, 1.77683123944949, -1.23850069309099, 3.30087266178473, -1.11165732873565, -3.30087266178473, -2.38721963835851},
2563
{-0.789696230825047, 0.0380105914258387, -0.46019472833453, 1.28234889458937, -0.0365560540834043, -0.28926557011491, 1.98818846888492, -1.28234889458938, 0.41293837481537, 0.338747264583837, 1.24971981541218, 0.0365560540834042, 4.53711106398001, -1.52799374055039, -4.53711106398001, -0.960454245297269},
2564
{-0.909165504675249, 0.534467499977833, -2.36689241100155, 4.96929159093663, -0.363421838306651, -0.408576763411788, 3.36107250713406, -4.96929159093663, 0.193977351922917, 0.180720652774499, 0.580193725821311, 0.36342183830665, 2.95204449733331, -0.994180096132508, -2.95204449733331, -0.171616962409524},
2565
{-0.762628186468936, 0.165050168904603, 0.508902750434954, -0.186496378006571, 0.176055684936792, 3.86870458024855, 0.182227939064815, 0.186496378006571, 1.97276207323851, -1.37518405567418, 1.38530605681884, -0.176055684936793, 0.482822889665977, -0.691130689499767, -0.48282288966598, -5.25401063706739},
2566
{-0.808419347997877, -0.333630559700654, 1.78886698094661, -0.305144107519429, -0.15252284527693, 2.21201263950347, 0.931886611547211, 0.305144107519429, 1.6429299260493, -0.500880018350764, 1.15231874995853, 0.152522845276929, 1.90071448360622, -2.72075359249382, -1.90071448360622, -3.364331389462},
2567
{-0.876963572777694, -0.464213039151449, 1.60794346144038, 1.28234889458938, -0.369339740296017, 0.581987949884581, 2.1317831174676, -1.28234889458938, 1.10184970502573, 0.23932690690341, 0.771589372316702, 0.369339740296016, 2.61256752278778, -3.73972657890797, -2.61256752278778, -1.35357732220128},
2568
{-0.94734906218204, 0.119368446579231, -1.02127052148706, 4.96929159093662, -0.271499760554801, -0.101513559500183, 3.45450151652294, -4.96929159093663, 0.49104944067915, 0.336931174923658, 0.34337498034351, 0.2714997605548, 1.6998516172077, -2.43323099503588, -1.6998516172077, -0.241861420843327},
2569
{-0.918052572403102, 2.67795638548276, 0.853609012762397, -0.186496378006572, -0.350133172332972, 2.17796818970809, 0.206161530566525, 0.186496378006572, 3.4388803980543, -5.19878421113396, 0.526017472639324, 0.350133172332973, 0.162050218840247, -1.05977054332892, -0.162050218840248, -2.70398566234741},
2570
{-0.934240861528672, 0.896717691404196, 3.14586185301822, -0.305144107519429, -0.313231441130554, 1.30560250413221, 1.02610526808912, 0.305144107519429, 2.78426475813512, -2.74674158801064, 0.425856464814271, 0.313231441130552, 0.637938268076519, -4.17196712110735, -0.637938268076519, -1.73145896894648},
2571
{-0.958118276949496, -0.408955764144395, 3.47315823301274, 1.28234889458937, -0.229388825189251, 0.421919462567658, 2.26128841889249, -1.28234889458938, 1.79618674086649, -0.429112699772595, 0.27470144761645, 0.229388825189249, 0.876858052640315, -5.73444665190523, -0.876858052640315, -0.696620910184106},
2572
{-0.982223853848664, -0.164194200903477, 0.192320445346116, 4.96929159093662, -0.109961707196802, 0.00641609058407321, 3.53876337545824, -4.96929159093663, 0.772020752309354, 0.374397302442787, 0.118058308006101, 0.109961707196801, 0.570522509309828, -3.73108382080435, -0.570522509309828, -0.124474398590174}};
2574
// Array of non-zero columns
2575
static const unsigned int nzc2[16] = {0, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
2577
// Number of operations to compute geometry constants: 36
2578
const double G0 = det*(Jinv_00*Jinv_10 + Jinv_01*Jinv_11 + Jinv_02*Jinv_12);
2579
const double G1 = det*(Jinv_00*Jinv_20 + Jinv_01*Jinv_21 + Jinv_02*Jinv_22);
2580
const double G2 = det*(Jinv_00*Jinv_00 + Jinv_01*Jinv_01 + Jinv_02*Jinv_02);
2581
const double G3 = det*(Jinv_10*Jinv_20 + Jinv_11*Jinv_21 + Jinv_12*Jinv_22);
2582
const double G4 = det*(Jinv_20*Jinv_20 + Jinv_21*Jinv_21 + Jinv_22*Jinv_22);
2583
const double G5 = det*(Jinv_10*Jinv_10 + Jinv_11*Jinv_11 + Jinv_12*Jinv_12);
2585
// Compute element tensor using UFL quadrature representation
2586
// Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
2587
// Total number of operations to compute element tensor: 519652
2589
// Loop quadrature points for integral
2590
// Number of operations to compute element tensor for following IP loop = 519616
2591
for (unsigned int ip = 0; ip < 64; ip++)
2594
// Number of operations to compute ip constants: 7
2595
// Number of operations: 1
2596
const double Gip0 = G0*W64[ip];
2598
// Number of operations: 1
2599
const double Gip1 = G1*W64[ip];
2601
// Number of operations: 1
2602
const double Gip2 = W64[ip]*det;
2604
// Number of operations: 1
2605
const double Gip3 = G2*W64[ip];
2607
// Number of operations: 1
2608
const double Gip4 = G3*W64[ip];
2610
// Number of operations: 1
2611
const double Gip5 = G4*W64[ip];
2613
// Number of operations: 1
2614
const double Gip6 = G5*W64[ip];
2617
// Number of operations for primary indices = 6912
2618
for (unsigned int j = 0; j < 16; j++)
2620
for (unsigned int k = 0; k < 16; k++)
2622
// Number of operations to compute entry = 3
2623
A[nzc1[j]*20 + nzc2[k]] += FE0_D010[ip][k]*FE0_D100[ip][j]*Gip0;
2624
// Number of operations to compute entry = 3
2625
A[nzc1[j]*20 + nzc0[k]] += FE0_D001[ip][k]*FE0_D100[ip][j]*Gip1;
2626
// Number of operations to compute entry = 3
2627
A[nzc1[j]*20 + nzc1[k]] += FE0_D100[ip][j]*FE0_D100[ip][k]*Gip3;
2628
// Number of operations to compute entry = 3
2629
A[nzc0[j]*20 + nzc2[k]] += FE0_D001[ip][j]*FE0_D010[ip][k]*Gip4;
2630
// Number of operations to compute entry = 3
2631
A[nzc2[j]*20 + nzc1[k]] += FE0_D010[ip][j]*FE0_D100[ip][k]*Gip0;
2632
// Number of operations to compute entry = 3
2633
A[nzc0[j]*20 + nzc0[k]] += FE0_D001[ip][j]*FE0_D001[ip][k]*Gip5;
2634
// Number of operations to compute entry = 3
2635
A[nzc2[j]*20 + nzc2[k]] += FE0_D010[ip][j]*FE0_D010[ip][k]*Gip6;
2636
// Number of operations to compute entry = 3
2637
A[nzc0[j]*20 + nzc1[k]] += FE0_D001[ip][j]*FE0_D100[ip][k]*Gip1;
2638
// Number of operations to compute entry = 3
2639
A[nzc2[j]*20 + nzc0[k]] += FE0_D001[ip][k]*FE0_D010[ip][j]*Gip4;
2640
}// end loop over 'k'
2641
}// end loop over 'j'
2643
// Number of operations for primary indices = 1200
2644
for (unsigned int j = 0; j < 20; j++)
2646
for (unsigned int k = 0; k < 20; k++)
2648
// Number of operations to compute entry = 3
2649
A[j*20 + k] += FE0[ip][j]*FE0[ip][k]*Gip2;
2650
}// end loop over 'k'
2651
}// end loop over 'j'
2652
}// end loop over 'ip'
2657
/// This class defines the interface for the tabulation of the cell
2658
/// tensor corresponding to the local contribution to a form from
2659
/// the integral over a cell.
2661
class poisson3dp3_0_cell_integral_0: public ufc::cell_integral
2665
poisson3dp3_0_cell_integral_0_quadrature integral_0_quadrature;
2670
poisson3dp3_0_cell_integral_0() : ufc::cell_integral()
2676
virtual ~poisson3dp3_0_cell_integral_0()
2681
/// Tabulate the tensor for the contribution from a local cell
2682
virtual void tabulate_tensor(double* A,
2683
const double * const * w,
2684
const ufc::cell& c) const
2686
// Reset values of the element tensor block
2687
for (unsigned int j = 0; j < 400; j++)
2690
// Add all contributions to element tensor
2691
integral_0_quadrature.tabulate_tensor(A, w, c);
2696
/// This class defines the interface for the assembly of the global
2697
/// tensor corresponding to a form with r + n arguments, that is, a
2700
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
2702
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
2703
/// global tensor A is defined by
2705
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
2707
/// where each argument Vj represents the application to the
2708
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
2709
/// fixed functions (coefficients).
2711
class poisson3dp3_form_0: public ufc::form
2716
poisson3dp3_form_0() : ufc::form()
2722
virtual ~poisson3dp3_form_0()
2727
/// Return a string identifying the form
2728
virtual const char* signature() const
2730
return "Form([Integral(Sum(IndexSum(Product(Indexed(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 3), 0), MultiIndex((Index(0),), {Index(0): 3})), MultiIndex((Index(0),), {Index(0): 3})), MultiIndex((Index(1),), {Index(1): 3})), Indexed(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 3), 1), MultiIndex((Index(2),), {Index(2): 3})), MultiIndex((Index(2),), {Index(2): 3})), MultiIndex((Index(1),), {Index(1): 3}))), MultiIndex((Index(1),), {Index(1): 3})), Product(BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 3), 0), BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 3), 1))), Measure('cell', 0, None))])";
2733
/// Return the rank of the global tensor (r)
2734
virtual unsigned int rank() const
2739
/// Return the number of coefficients (n)
2740
virtual unsigned int num_coefficients() const
2745
/// Return the number of cell integrals
2746
virtual unsigned int num_cell_integrals() const
2751
/// Return the number of exterior facet integrals
2752
virtual unsigned int num_exterior_facet_integrals() const
2757
/// Return the number of interior facet integrals
2758
virtual unsigned int num_interior_facet_integrals() const
2763
/// Create a new finite element for argument function i
2764
virtual ufc::finite_element* create_finite_element(unsigned int i) const
2769
return new poisson3dp3_0_finite_element_0();
2772
return new poisson3dp3_0_finite_element_1();
2778
/// Create a new dof map for argument function i
2779
virtual ufc::dof_map* create_dof_map(unsigned int i) const
2784
return new poisson3dp3_0_dof_map_0();
2787
return new poisson3dp3_0_dof_map_1();
2793
/// Create a new cell integral on sub domain i
2794
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
2796
return new poisson3dp3_0_cell_integral_0();
2799
/// Create a new exterior facet integral on sub domain i
2800
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
2805
/// Create a new interior facet integral on sub domain i
2806
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
2813
/// This class defines the interface for a finite element.
2815
class poisson3dp3_1_finite_element_0: public ufc::finite_element
2820
poisson3dp3_1_finite_element_0() : ufc::finite_element()
2826
virtual ~poisson3dp3_1_finite_element_0()
2831
/// Return a string identifying the finite element
2832
virtual const char* signature() const
2834
return "FiniteElement('Lagrange', 'tetrahedron', 3)";
2837
/// Return the cell shape
2838
virtual ufc::shape cell_shape() const
2840
return ufc::tetrahedron;
2843
/// Return the dimension of the finite element function space
2844
virtual unsigned int space_dimension() const
2849
/// Return the rank of the value space
2850
virtual unsigned int value_rank() const
2855
/// Return the dimension of the value space for axis i
2856
virtual unsigned int value_dimension(unsigned int i) const
2861
/// Evaluate basis function i at given point in cell
2862
virtual void evaluate_basis(unsigned int i,
2864
const double* coordinates,
2865
const ufc::cell& c) const
2867
// Extract vertex coordinates
2868
const double * const * element_coordinates = c.coordinates;
2870
// Compute Jacobian of affine map from reference cell
2871
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
2872
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
2873
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
2874
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
2875
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
2876
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
2877
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
2878
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
2879
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
2881
// Compute sub determinants
2882
const double d00 = J_11*J_22 - J_12*J_21;
2883
const double d01 = J_12*J_20 - J_10*J_22;
2884
const double d02 = J_10*J_21 - J_11*J_20;
2886
const double d10 = J_02*J_21 - J_01*J_22;
2887
const double d11 = J_00*J_22 - J_02*J_20;
2888
const double d12 = J_01*J_20 - J_00*J_21;
2890
const double d20 = J_01*J_12 - J_02*J_11;
2891
const double d21 = J_02*J_10 - J_00*J_12;
2892
const double d22 = J_00*J_11 - J_01*J_10;
2894
// Compute determinant of Jacobian
2895
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
2897
// Compute inverse of Jacobian
2899
// Compute constants
2900
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
2901
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
2902
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
2904
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
2905
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
2906
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
2908
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
2909
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
2910
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
2912
// Get coordinates and map to the UFC reference element
2913
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
2914
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
2915
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
2917
// Map coordinates to the reference cube
2918
if (std::abs(y + z - 1.0) < 1e-14)
2921
x = -2.0 * x/(y + z - 1.0) - 1.0;
2922
if (std::abs(z - 1.0) < 1e-14)
2925
y = 2.0 * y/(1.0 - z) - 1.0;
2931
// Map degree of freedom to element degree of freedom
2932
const unsigned int dof = i;
2934
// Generate scalings
2935
const double scalings_y_0 = 1;
2936
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
2937
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
2938
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
2939
const double scalings_z_0 = 1;
2940
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
2941
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
2942
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
2944
// Compute psitilde_a
2945
const double psitilde_a_0 = 1;
2946
const double psitilde_a_1 = x;
2947
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
2948
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
2950
// Compute psitilde_bs
2951
const double psitilde_bs_0_0 = 1;
2952
const double psitilde_bs_0_1 = 1.5*y + 0.5;
2953
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
2954
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
2955
const double psitilde_bs_1_0 = 1;
2956
const double psitilde_bs_1_1 = 2.5*y + 1.5;
2957
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
2958
const double psitilde_bs_2_0 = 1;
2959
const double psitilde_bs_2_1 = 3.5*y + 2.5;
2960
const double psitilde_bs_3_0 = 1;
2962
// Compute psitilde_cs
2963
const double psitilde_cs_00_0 = 1;
2964
const double psitilde_cs_00_1 = 2*z + 1;
2965
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
2966
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
2967
const double psitilde_cs_01_0 = 1;
2968
const double psitilde_cs_01_1 = 3*z + 2;
2969
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
2970
const double psitilde_cs_02_0 = 1;
2971
const double psitilde_cs_02_1 = 4*z + 3;
2972
const double psitilde_cs_03_0 = 1;
2973
const double psitilde_cs_10_0 = 1;
2974
const double psitilde_cs_10_1 = 3*z + 2;
2975
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
2976
const double psitilde_cs_11_0 = 1;
2977
const double psitilde_cs_11_1 = 4*z + 3;
2978
const double psitilde_cs_12_0 = 1;
2979
const double psitilde_cs_20_0 = 1;
2980
const double psitilde_cs_20_1 = 4*z + 3;
2981
const double psitilde_cs_21_0 = 1;
2982
const double psitilde_cs_30_0 = 1;
2984
// Compute basisvalues
2985
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
2986
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
2987
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
2988
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
2989
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
2990
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
2991
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
2992
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
2993
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
2994
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
2995
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
2996
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
2997
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
2998
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
2999
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
3000
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
3001
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
3002
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
3003
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
3004
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
3006
// Table(s) of coefficients
3007
static const double coefficients0[20][20] = \
3008
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
3009
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
3010
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
3011
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
3012
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
3013
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
3014
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
3015
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
3016
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
3017
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
3018
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
3019
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
3020
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
3021
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
3022
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
3023
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
3024
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
3025
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
3026
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
3027
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
3029
// Extract relevant coefficients
3030
const double coeff0_0 = coefficients0[dof][0];
3031
const double coeff0_1 = coefficients0[dof][1];
3032
const double coeff0_2 = coefficients0[dof][2];
3033
const double coeff0_3 = coefficients0[dof][3];
3034
const double coeff0_4 = coefficients0[dof][4];
3035
const double coeff0_5 = coefficients0[dof][5];
3036
const double coeff0_6 = coefficients0[dof][6];
3037
const double coeff0_7 = coefficients0[dof][7];
3038
const double coeff0_8 = coefficients0[dof][8];
3039
const double coeff0_9 = coefficients0[dof][9];
3040
const double coeff0_10 = coefficients0[dof][10];
3041
const double coeff0_11 = coefficients0[dof][11];
3042
const double coeff0_12 = coefficients0[dof][12];
3043
const double coeff0_13 = coefficients0[dof][13];
3044
const double coeff0_14 = coefficients0[dof][14];
3045
const double coeff0_15 = coefficients0[dof][15];
3046
const double coeff0_16 = coefficients0[dof][16];
3047
const double coeff0_17 = coefficients0[dof][17];
3048
const double coeff0_18 = coefficients0[dof][18];
3049
const double coeff0_19 = coefficients0[dof][19];
3052
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9 + coeff0_10*basisvalue10 + coeff0_11*basisvalue11 + coeff0_12*basisvalue12 + coeff0_13*basisvalue13 + coeff0_14*basisvalue14 + coeff0_15*basisvalue15 + coeff0_16*basisvalue16 + coeff0_17*basisvalue17 + coeff0_18*basisvalue18 + coeff0_19*basisvalue19;
3055
/// Evaluate all basis functions at given point in cell
3056
virtual void evaluate_basis_all(double* values,
3057
const double* coordinates,
3058
const ufc::cell& c) const
3060
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
3063
/// Evaluate order n derivatives of basis function i at given point in cell
3064
virtual void evaluate_basis_derivatives(unsigned int i,
3067
const double* coordinates,
3068
const ufc::cell& c) const
3070
// Extract vertex coordinates
3071
const double * const * element_coordinates = c.coordinates;
3073
// Compute Jacobian of affine map from reference cell
3074
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3075
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3076
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
3077
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3078
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3079
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
3080
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
3081
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
3082
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
3084
// Compute sub determinants
3085
const double d00 = J_11*J_22 - J_12*J_21;
3086
const double d01 = J_12*J_20 - J_10*J_22;
3087
const double d02 = J_10*J_21 - J_11*J_20;
3089
const double d10 = J_02*J_21 - J_01*J_22;
3090
const double d11 = J_00*J_22 - J_02*J_20;
3091
const double d12 = J_01*J_20 - J_00*J_21;
3093
const double d20 = J_01*J_12 - J_02*J_11;
3094
const double d21 = J_02*J_10 - J_00*J_12;
3095
const double d22 = J_00*J_11 - J_01*J_10;
3097
// Compute determinant of Jacobian
3098
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
3100
// Compute inverse of Jacobian
3102
// Compute constants
3103
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
3104
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
3105
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
3107
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
3108
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
3109
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
3111
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
3112
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
3113
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
3115
// Get coordinates and map to the UFC reference element
3116
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
3117
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
3118
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
3120
// Map coordinates to the reference cube
3121
if (std::abs(y + z - 1.0) < 1e-14)
3124
x = -2.0 * x/(y + z - 1.0) - 1.0;
3125
if (std::abs(z - 1.0) < 1e-14)
3128
y = 2.0 * y/(1.0 - z) - 1.0;
3131
// Compute number of derivatives
3132
unsigned int num_derivatives = 1;
3134
for (unsigned int j = 0; j < n; j++)
3135
num_derivatives *= 3;
3138
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
3139
unsigned int **combinations = new unsigned int *[num_derivatives];
3141
for (unsigned int j = 0; j < num_derivatives; j++)
3143
combinations[j] = new unsigned int [n];
3144
for (unsigned int k = 0; k < n; k++)
3145
combinations[j][k] = 0;
3148
// Generate combinations of derivatives
3149
for (unsigned int row = 1; row < num_derivatives; row++)
3151
for (unsigned int num = 0; num < row; num++)
3153
for (unsigned int col = n-1; col+1 > 0; col--)
3155
if (combinations[row][col] + 1 > 2)
3156
combinations[row][col] = 0;
3159
combinations[row][col] += 1;
3166
// Compute inverse of Jacobian
3167
const double Jinv[3][3] ={{d00 / detJ, d10 / detJ, d20 / detJ}, {d01 / detJ, d11 / detJ, d21 / detJ}, {d02 / detJ, d12 / detJ, d22 / detJ}};
3169
// Declare transformation matrix
3170
// Declare pointer to two dimensional array and initialise
3171
double **transform = new double *[num_derivatives];
3173
for (unsigned int j = 0; j < num_derivatives; j++)
3175
transform[j] = new double [num_derivatives];
3176
for (unsigned int k = 0; k < num_derivatives; k++)
3177
transform[j][k] = 1;
3180
// Construct transformation matrix
3181
for (unsigned int row = 0; row < num_derivatives; row++)
3183
for (unsigned int col = 0; col < num_derivatives; col++)
3185
for (unsigned int k = 0; k < n; k++)
3186
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
3191
for (unsigned int j = 0; j < 1*num_derivatives; j++)
3194
// Map degree of freedom to element degree of freedom
3195
const unsigned int dof = i;
3197
// Generate scalings
3198
const double scalings_y_0 = 1;
3199
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
3200
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
3201
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
3202
const double scalings_z_0 = 1;
3203
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
3204
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
3205
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
3207
// Compute psitilde_a
3208
const double psitilde_a_0 = 1;
3209
const double psitilde_a_1 = x;
3210
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
3211
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
3213
// Compute psitilde_bs
3214
const double psitilde_bs_0_0 = 1;
3215
const double psitilde_bs_0_1 = 1.5*y + 0.5;
3216
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
3217
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
3218
const double psitilde_bs_1_0 = 1;
3219
const double psitilde_bs_1_1 = 2.5*y + 1.5;
3220
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
3221
const double psitilde_bs_2_0 = 1;
3222
const double psitilde_bs_2_1 = 3.5*y + 2.5;
3223
const double psitilde_bs_3_0 = 1;
3225
// Compute psitilde_cs
3226
const double psitilde_cs_00_0 = 1;
3227
const double psitilde_cs_00_1 = 2*z + 1;
3228
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
3229
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
3230
const double psitilde_cs_01_0 = 1;
3231
const double psitilde_cs_01_1 = 3*z + 2;
3232
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
3233
const double psitilde_cs_02_0 = 1;
3234
const double psitilde_cs_02_1 = 4*z + 3;
3235
const double psitilde_cs_03_0 = 1;
3236
const double psitilde_cs_10_0 = 1;
3237
const double psitilde_cs_10_1 = 3*z + 2;
3238
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
3239
const double psitilde_cs_11_0 = 1;
3240
const double psitilde_cs_11_1 = 4*z + 3;
3241
const double psitilde_cs_12_0 = 1;
3242
const double psitilde_cs_20_0 = 1;
3243
const double psitilde_cs_20_1 = 4*z + 3;
3244
const double psitilde_cs_21_0 = 1;
3245
const double psitilde_cs_30_0 = 1;
3247
// Compute basisvalues
3248
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
3249
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
3250
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
3251
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
3252
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
3253
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
3254
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
3255
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
3256
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
3257
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
3258
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
3259
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
3260
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
3261
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
3262
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
3263
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
3264
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
3265
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
3266
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
3267
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
3269
// Table(s) of coefficients
3270
static const double coefficients0[20][20] = \
3271
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
3272
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
3273
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
3274
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
3275
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
3276
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
3277
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
3278
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
3279
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
3280
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
3281
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
3282
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
3283
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
3284
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
3285
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
3286
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
3287
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
3288
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
3289
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
3290
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
3292
// Interesting (new) part
3293
// Tables of derivatives of the polynomial base (transpose)
3294
static const double dmats0[20][20] = \
3295
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3296
{6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3297
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3298
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3299
{0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3300
{4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3301
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3302
{3.74165738677394, 0, 0, 8.69482604771367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3303
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3304
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3305
{5.49909083394701, 0, -3.3466401061363, -2.36643191323985, 15.4919333848297, 0, 0.69282032302755, 0, 0.565685424949241, 0.400000000000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3306
{0, 4.89897948556636, 0, 0, 0, 14.1985914794391, 0, -0.82807867121083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3307
{3.6, 0, 8.76356092008267, -1.54919333848297, 0, 0, 9.52470471983253, 0, -1.48131215963609, 0.261861468283192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3308
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3309
{0, 4.24264068711928, 0, 0, 0, 0, 0, 14.3427433120127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3310
{3.11769145362398, 0, 3.16227766016838, 4.91934955049954, 0, 0, 0, 0, 10.690449676497, -2.41897262725906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3311
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3312
{2.54558441227157, 0, 0, 7.66811580507233, 0, 0, 0, 0, 0, 10.3691851174526, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3313
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3314
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
3316
static const double dmats1[20][20] = \
3317
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3318
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3319
{5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3320
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3321
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3322
{2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3323
{-2.64575131106459, 0, 9.66091783079296, 0.683130051063971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3324
{1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3325
{3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3326
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3327
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3328
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 9.16515138991168, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3329
{1.8, -5.69209978830308, 4.38178046004133, -0.774596669241485, 0, 10.998181667894, 4.76235235991626, 0.962140470884725, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3330
{5.19615242270664, 0, -3.16227766016838, -2.23606797749979, 0, 0, 13.7477270848675, 0, 0.534522483824851, 0.377964473009229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3331
{2.01246117974981, 2.12132034355964, -0.408248290463861, 3.17542648054294, 0, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3332
{1.55884572681199, 2.73861278752583, 1.58113883008419, 2.45967477524977, 0, 0, 0, 9.25820099772552, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3333
{-1.8, 0, 3.65148371670111, -2.84018778721878, 0, 0, 0, 0, 12.3442679969674, 1.39659449751035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3334
{1.27279220613579, 0, 0, 3.83405790253617, 0, 0, 0, 0, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3335
{2.20454076850486, 0, 0, 6.6407830863536, 0, 0, 0, 0, 0, 8.97997772825746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3336
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
3338
static const double dmats2[20][20] = \
3339
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3340
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3341
{1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3342
{5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3343
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3344
{2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3345
{1.32287565553229, 0, 3.86436713231719, -0.341565025531988, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3346
{1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3347
{1.08012344973464, 0, 7.09929573971954, 2.50998007960222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3348
{-3.81881307912986, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3349
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3350
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 1.30930734141595, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3351
{1.8, 0.632455532033674, 4.38178046004133, -0.774596669241485, 0, 3.14233761939829, 4.76235235991626, -0.10690449676497, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3352
{1.03923048454133, 0, 3.16227766016838, -0.44721359549996, 0, 0, 5.8918830363718, 0, -0.53452248382485, 0.0755928946018458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3353
{2.01246117974981, 2.12132034355964, -0.408248290463862, 3.17542648054295, 9.07114735222145, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3354
{1.55884572681199, 0.547722557505165, 1.58113883008419, 2.45967477524977, 0, 9.07114735222145, 0, 1.8516401995451, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3355
{0.900000000000001, 0, 1.46059348668044, 1.42009389360939, 0, 0, 9.07114735222145, 0, 4.93770719878694, -0.698297248755176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3356
{1.27279220613578, -6.26099033699941, 0, 3.83405790253617, 0, 0, 0, 10.5830052442584, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3357
{0.734846922834953, 0, -6.26099033699942, 2.21359436211787, 0, 0, 0, 0, 10.5830052442584, 2.99332590941915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
3358
{5.71576766497729, 0, 0, -4.69574275274956, 0, 0, 0, 0, 0, 12.69960629311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
3360
// Compute reference derivatives
3361
// Declare pointer to array of derivatives on FIAT element
3362
double *derivatives = new double [num_derivatives];
3364
// Declare coefficients
3365
double coeff0_0 = 0;
3366
double coeff0_1 = 0;
3367
double coeff0_2 = 0;
3368
double coeff0_3 = 0;
3369
double coeff0_4 = 0;
3370
double coeff0_5 = 0;
3371
double coeff0_6 = 0;
3372
double coeff0_7 = 0;
3373
double coeff0_8 = 0;
3374
double coeff0_9 = 0;
3375
double coeff0_10 = 0;
3376
double coeff0_11 = 0;
3377
double coeff0_12 = 0;
3378
double coeff0_13 = 0;
3379
double coeff0_14 = 0;
3380
double coeff0_15 = 0;
3381
double coeff0_16 = 0;
3382
double coeff0_17 = 0;
3383
double coeff0_18 = 0;
3384
double coeff0_19 = 0;
3386
// Declare new coefficients
3387
double new_coeff0_0 = 0;
3388
double new_coeff0_1 = 0;
3389
double new_coeff0_2 = 0;
3390
double new_coeff0_3 = 0;
3391
double new_coeff0_4 = 0;
3392
double new_coeff0_5 = 0;
3393
double new_coeff0_6 = 0;
3394
double new_coeff0_7 = 0;
3395
double new_coeff0_8 = 0;
3396
double new_coeff0_9 = 0;
3397
double new_coeff0_10 = 0;
3398
double new_coeff0_11 = 0;
3399
double new_coeff0_12 = 0;
3400
double new_coeff0_13 = 0;
3401
double new_coeff0_14 = 0;
3402
double new_coeff0_15 = 0;
3403
double new_coeff0_16 = 0;
3404
double new_coeff0_17 = 0;
3405
double new_coeff0_18 = 0;
3406
double new_coeff0_19 = 0;
3408
// Loop possible derivatives
3409
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
3411
// Get values from coefficients array
3412
new_coeff0_0 = coefficients0[dof][0];
3413
new_coeff0_1 = coefficients0[dof][1];
3414
new_coeff0_2 = coefficients0[dof][2];
3415
new_coeff0_3 = coefficients0[dof][3];
3416
new_coeff0_4 = coefficients0[dof][4];
3417
new_coeff0_5 = coefficients0[dof][5];
3418
new_coeff0_6 = coefficients0[dof][6];
3419
new_coeff0_7 = coefficients0[dof][7];
3420
new_coeff0_8 = coefficients0[dof][8];
3421
new_coeff0_9 = coefficients0[dof][9];
3422
new_coeff0_10 = coefficients0[dof][10];
3423
new_coeff0_11 = coefficients0[dof][11];
3424
new_coeff0_12 = coefficients0[dof][12];
3425
new_coeff0_13 = coefficients0[dof][13];
3426
new_coeff0_14 = coefficients0[dof][14];
3427
new_coeff0_15 = coefficients0[dof][15];
3428
new_coeff0_16 = coefficients0[dof][16];
3429
new_coeff0_17 = coefficients0[dof][17];
3430
new_coeff0_18 = coefficients0[dof][18];
3431
new_coeff0_19 = coefficients0[dof][19];
3433
// Loop derivative order
3434
for (unsigned int j = 0; j < n; j++)
3436
// Update old coefficients
3437
coeff0_0 = new_coeff0_0;
3438
coeff0_1 = new_coeff0_1;
3439
coeff0_2 = new_coeff0_2;
3440
coeff0_3 = new_coeff0_3;
3441
coeff0_4 = new_coeff0_4;
3442
coeff0_5 = new_coeff0_5;
3443
coeff0_6 = new_coeff0_6;
3444
coeff0_7 = new_coeff0_7;
3445
coeff0_8 = new_coeff0_8;
3446
coeff0_9 = new_coeff0_9;
3447
coeff0_10 = new_coeff0_10;
3448
coeff0_11 = new_coeff0_11;
3449
coeff0_12 = new_coeff0_12;
3450
coeff0_13 = new_coeff0_13;
3451
coeff0_14 = new_coeff0_14;
3452
coeff0_15 = new_coeff0_15;
3453
coeff0_16 = new_coeff0_16;
3454
coeff0_17 = new_coeff0_17;
3455
coeff0_18 = new_coeff0_18;
3456
coeff0_19 = new_coeff0_19;
3458
if(combinations[deriv_num][j] == 0)
3460
new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0] + coeff0_10*dmats0[10][0] + coeff0_11*dmats0[11][0] + coeff0_12*dmats0[12][0] + coeff0_13*dmats0[13][0] + coeff0_14*dmats0[14][0] + coeff0_15*dmats0[15][0] + coeff0_16*dmats0[16][0] + coeff0_17*dmats0[17][0] + coeff0_18*dmats0[18][0] + coeff0_19*dmats0[19][0];
3461
new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1] + coeff0_10*dmats0[10][1] + coeff0_11*dmats0[11][1] + coeff0_12*dmats0[12][1] + coeff0_13*dmats0[13][1] + coeff0_14*dmats0[14][1] + coeff0_15*dmats0[15][1] + coeff0_16*dmats0[16][1] + coeff0_17*dmats0[17][1] + coeff0_18*dmats0[18][1] + coeff0_19*dmats0[19][1];
3462
new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2] + coeff0_10*dmats0[10][2] + coeff0_11*dmats0[11][2] + coeff0_12*dmats0[12][2] + coeff0_13*dmats0[13][2] + coeff0_14*dmats0[14][2] + coeff0_15*dmats0[15][2] + coeff0_16*dmats0[16][2] + coeff0_17*dmats0[17][2] + coeff0_18*dmats0[18][2] + coeff0_19*dmats0[19][2];
3463
new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3] + coeff0_10*dmats0[10][3] + coeff0_11*dmats0[11][3] + coeff0_12*dmats0[12][3] + coeff0_13*dmats0[13][3] + coeff0_14*dmats0[14][3] + coeff0_15*dmats0[15][3] + coeff0_16*dmats0[16][3] + coeff0_17*dmats0[17][3] + coeff0_18*dmats0[18][3] + coeff0_19*dmats0[19][3];
3464
new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4] + coeff0_10*dmats0[10][4] + coeff0_11*dmats0[11][4] + coeff0_12*dmats0[12][4] + coeff0_13*dmats0[13][4] + coeff0_14*dmats0[14][4] + coeff0_15*dmats0[15][4] + coeff0_16*dmats0[16][4] + coeff0_17*dmats0[17][4] + coeff0_18*dmats0[18][4] + coeff0_19*dmats0[19][4];
3465
new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5] + coeff0_10*dmats0[10][5] + coeff0_11*dmats0[11][5] + coeff0_12*dmats0[12][5] + coeff0_13*dmats0[13][5] + coeff0_14*dmats0[14][5] + coeff0_15*dmats0[15][5] + coeff0_16*dmats0[16][5] + coeff0_17*dmats0[17][5] + coeff0_18*dmats0[18][5] + coeff0_19*dmats0[19][5];
3466
new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6] + coeff0_10*dmats0[10][6] + coeff0_11*dmats0[11][6] + coeff0_12*dmats0[12][6] + coeff0_13*dmats0[13][6] + coeff0_14*dmats0[14][6] + coeff0_15*dmats0[15][6] + coeff0_16*dmats0[16][6] + coeff0_17*dmats0[17][6] + coeff0_18*dmats0[18][6] + coeff0_19*dmats0[19][6];
3467
new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7] + coeff0_10*dmats0[10][7] + coeff0_11*dmats0[11][7] + coeff0_12*dmats0[12][7] + coeff0_13*dmats0[13][7] + coeff0_14*dmats0[14][7] + coeff0_15*dmats0[15][7] + coeff0_16*dmats0[16][7] + coeff0_17*dmats0[17][7] + coeff0_18*dmats0[18][7] + coeff0_19*dmats0[19][7];
3468
new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8] + coeff0_10*dmats0[10][8] + coeff0_11*dmats0[11][8] + coeff0_12*dmats0[12][8] + coeff0_13*dmats0[13][8] + coeff0_14*dmats0[14][8] + coeff0_15*dmats0[15][8] + coeff0_16*dmats0[16][8] + coeff0_17*dmats0[17][8] + coeff0_18*dmats0[18][8] + coeff0_19*dmats0[19][8];
3469
new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9] + coeff0_10*dmats0[10][9] + coeff0_11*dmats0[11][9] + coeff0_12*dmats0[12][9] + coeff0_13*dmats0[13][9] + coeff0_14*dmats0[14][9] + coeff0_15*dmats0[15][9] + coeff0_16*dmats0[16][9] + coeff0_17*dmats0[17][9] + coeff0_18*dmats0[18][9] + coeff0_19*dmats0[19][9];
3470
new_coeff0_10 = coeff0_0*dmats0[0][10] + coeff0_1*dmats0[1][10] + coeff0_2*dmats0[2][10] + coeff0_3*dmats0[3][10] + coeff0_4*dmats0[4][10] + coeff0_5*dmats0[5][10] + coeff0_6*dmats0[6][10] + coeff0_7*dmats0[7][10] + coeff0_8*dmats0[8][10] + coeff0_9*dmats0[9][10] + coeff0_10*dmats0[10][10] + coeff0_11*dmats0[11][10] + coeff0_12*dmats0[12][10] + coeff0_13*dmats0[13][10] + coeff0_14*dmats0[14][10] + coeff0_15*dmats0[15][10] + coeff0_16*dmats0[16][10] + coeff0_17*dmats0[17][10] + coeff0_18*dmats0[18][10] + coeff0_19*dmats0[19][10];
3471
new_coeff0_11 = coeff0_0*dmats0[0][11] + coeff0_1*dmats0[1][11] + coeff0_2*dmats0[2][11] + coeff0_3*dmats0[3][11] + coeff0_4*dmats0[4][11] + coeff0_5*dmats0[5][11] + coeff0_6*dmats0[6][11] + coeff0_7*dmats0[7][11] + coeff0_8*dmats0[8][11] + coeff0_9*dmats0[9][11] + coeff0_10*dmats0[10][11] + coeff0_11*dmats0[11][11] + coeff0_12*dmats0[12][11] + coeff0_13*dmats0[13][11] + coeff0_14*dmats0[14][11] + coeff0_15*dmats0[15][11] + coeff0_16*dmats0[16][11] + coeff0_17*dmats0[17][11] + coeff0_18*dmats0[18][11] + coeff0_19*dmats0[19][11];
3472
new_coeff0_12 = coeff0_0*dmats0[0][12] + coeff0_1*dmats0[1][12] + coeff0_2*dmats0[2][12] + coeff0_3*dmats0[3][12] + coeff0_4*dmats0[4][12] + coeff0_5*dmats0[5][12] + coeff0_6*dmats0[6][12] + coeff0_7*dmats0[7][12] + coeff0_8*dmats0[8][12] + coeff0_9*dmats0[9][12] + coeff0_10*dmats0[10][12] + coeff0_11*dmats0[11][12] + coeff0_12*dmats0[12][12] + coeff0_13*dmats0[13][12] + coeff0_14*dmats0[14][12] + coeff0_15*dmats0[15][12] + coeff0_16*dmats0[16][12] + coeff0_17*dmats0[17][12] + coeff0_18*dmats0[18][12] + coeff0_19*dmats0[19][12];
3473
new_coeff0_13 = coeff0_0*dmats0[0][13] + coeff0_1*dmats0[1][13] + coeff0_2*dmats0[2][13] + coeff0_3*dmats0[3][13] + coeff0_4*dmats0[4][13] + coeff0_5*dmats0[5][13] + coeff0_6*dmats0[6][13] + coeff0_7*dmats0[7][13] + coeff0_8*dmats0[8][13] + coeff0_9*dmats0[9][13] + coeff0_10*dmats0[10][13] + coeff0_11*dmats0[11][13] + coeff0_12*dmats0[12][13] + coeff0_13*dmats0[13][13] + coeff0_14*dmats0[14][13] + coeff0_15*dmats0[15][13] + coeff0_16*dmats0[16][13] + coeff0_17*dmats0[17][13] + coeff0_18*dmats0[18][13] + coeff0_19*dmats0[19][13];
3474
new_coeff0_14 = coeff0_0*dmats0[0][14] + coeff0_1*dmats0[1][14] + coeff0_2*dmats0[2][14] + coeff0_3*dmats0[3][14] + coeff0_4*dmats0[4][14] + coeff0_5*dmats0[5][14] + coeff0_6*dmats0[6][14] + coeff0_7*dmats0[7][14] + coeff0_8*dmats0[8][14] + coeff0_9*dmats0[9][14] + coeff0_10*dmats0[10][14] + coeff0_11*dmats0[11][14] + coeff0_12*dmats0[12][14] + coeff0_13*dmats0[13][14] + coeff0_14*dmats0[14][14] + coeff0_15*dmats0[15][14] + coeff0_16*dmats0[16][14] + coeff0_17*dmats0[17][14] + coeff0_18*dmats0[18][14] + coeff0_19*dmats0[19][14];
3475
new_coeff0_15 = coeff0_0*dmats0[0][15] + coeff0_1*dmats0[1][15] + coeff0_2*dmats0[2][15] + coeff0_3*dmats0[3][15] + coeff0_4*dmats0[4][15] + coeff0_5*dmats0[5][15] + coeff0_6*dmats0[6][15] + coeff0_7*dmats0[7][15] + coeff0_8*dmats0[8][15] + coeff0_9*dmats0[9][15] + coeff0_10*dmats0[10][15] + coeff0_11*dmats0[11][15] + coeff0_12*dmats0[12][15] + coeff0_13*dmats0[13][15] + coeff0_14*dmats0[14][15] + coeff0_15*dmats0[15][15] + coeff0_16*dmats0[16][15] + coeff0_17*dmats0[17][15] + coeff0_18*dmats0[18][15] + coeff0_19*dmats0[19][15];
3476
new_coeff0_16 = coeff0_0*dmats0[0][16] + coeff0_1*dmats0[1][16] + coeff0_2*dmats0[2][16] + coeff0_3*dmats0[3][16] + coeff0_4*dmats0[4][16] + coeff0_5*dmats0[5][16] + coeff0_6*dmats0[6][16] + coeff0_7*dmats0[7][16] + coeff0_8*dmats0[8][16] + coeff0_9*dmats0[9][16] + coeff0_10*dmats0[10][16] + coeff0_11*dmats0[11][16] + coeff0_12*dmats0[12][16] + coeff0_13*dmats0[13][16] + coeff0_14*dmats0[14][16] + coeff0_15*dmats0[15][16] + coeff0_16*dmats0[16][16] + coeff0_17*dmats0[17][16] + coeff0_18*dmats0[18][16] + coeff0_19*dmats0[19][16];
3477
new_coeff0_17 = coeff0_0*dmats0[0][17] + coeff0_1*dmats0[1][17] + coeff0_2*dmats0[2][17] + coeff0_3*dmats0[3][17] + coeff0_4*dmats0[4][17] + coeff0_5*dmats0[5][17] + coeff0_6*dmats0[6][17] + coeff0_7*dmats0[7][17] + coeff0_8*dmats0[8][17] + coeff0_9*dmats0[9][17] + coeff0_10*dmats0[10][17] + coeff0_11*dmats0[11][17] + coeff0_12*dmats0[12][17] + coeff0_13*dmats0[13][17] + coeff0_14*dmats0[14][17] + coeff0_15*dmats0[15][17] + coeff0_16*dmats0[16][17] + coeff0_17*dmats0[17][17] + coeff0_18*dmats0[18][17] + coeff0_19*dmats0[19][17];
3478
new_coeff0_18 = coeff0_0*dmats0[0][18] + coeff0_1*dmats0[1][18] + coeff0_2*dmats0[2][18] + coeff0_3*dmats0[3][18] + coeff0_4*dmats0[4][18] + coeff0_5*dmats0[5][18] + coeff0_6*dmats0[6][18] + coeff0_7*dmats0[7][18] + coeff0_8*dmats0[8][18] + coeff0_9*dmats0[9][18] + coeff0_10*dmats0[10][18] + coeff0_11*dmats0[11][18] + coeff0_12*dmats0[12][18] + coeff0_13*dmats0[13][18] + coeff0_14*dmats0[14][18] + coeff0_15*dmats0[15][18] + coeff0_16*dmats0[16][18] + coeff0_17*dmats0[17][18] + coeff0_18*dmats0[18][18] + coeff0_19*dmats0[19][18];
3479
new_coeff0_19 = coeff0_0*dmats0[0][19] + coeff0_1*dmats0[1][19] + coeff0_2*dmats0[2][19] + coeff0_3*dmats0[3][19] + coeff0_4*dmats0[4][19] + coeff0_5*dmats0[5][19] + coeff0_6*dmats0[6][19] + coeff0_7*dmats0[7][19] + coeff0_8*dmats0[8][19] + coeff0_9*dmats0[9][19] + coeff0_10*dmats0[10][19] + coeff0_11*dmats0[11][19] + coeff0_12*dmats0[12][19] + coeff0_13*dmats0[13][19] + coeff0_14*dmats0[14][19] + coeff0_15*dmats0[15][19] + coeff0_16*dmats0[16][19] + coeff0_17*dmats0[17][19] + coeff0_18*dmats0[18][19] + coeff0_19*dmats0[19][19];
3481
if(combinations[deriv_num][j] == 1)
3483
new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0] + coeff0_10*dmats1[10][0] + coeff0_11*dmats1[11][0] + coeff0_12*dmats1[12][0] + coeff0_13*dmats1[13][0] + coeff0_14*dmats1[14][0] + coeff0_15*dmats1[15][0] + coeff0_16*dmats1[16][0] + coeff0_17*dmats1[17][0] + coeff0_18*dmats1[18][0] + coeff0_19*dmats1[19][0];
3484
new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1] + coeff0_10*dmats1[10][1] + coeff0_11*dmats1[11][1] + coeff0_12*dmats1[12][1] + coeff0_13*dmats1[13][1] + coeff0_14*dmats1[14][1] + coeff0_15*dmats1[15][1] + coeff0_16*dmats1[16][1] + coeff0_17*dmats1[17][1] + coeff0_18*dmats1[18][1] + coeff0_19*dmats1[19][1];
3485
new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2] + coeff0_10*dmats1[10][2] + coeff0_11*dmats1[11][2] + coeff0_12*dmats1[12][2] + coeff0_13*dmats1[13][2] + coeff0_14*dmats1[14][2] + coeff0_15*dmats1[15][2] + coeff0_16*dmats1[16][2] + coeff0_17*dmats1[17][2] + coeff0_18*dmats1[18][2] + coeff0_19*dmats1[19][2];
3486
new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3] + coeff0_10*dmats1[10][3] + coeff0_11*dmats1[11][3] + coeff0_12*dmats1[12][3] + coeff0_13*dmats1[13][3] + coeff0_14*dmats1[14][3] + coeff0_15*dmats1[15][3] + coeff0_16*dmats1[16][3] + coeff0_17*dmats1[17][3] + coeff0_18*dmats1[18][3] + coeff0_19*dmats1[19][3];
3487
new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4] + coeff0_10*dmats1[10][4] + coeff0_11*dmats1[11][4] + coeff0_12*dmats1[12][4] + coeff0_13*dmats1[13][4] + coeff0_14*dmats1[14][4] + coeff0_15*dmats1[15][4] + coeff0_16*dmats1[16][4] + coeff0_17*dmats1[17][4] + coeff0_18*dmats1[18][4] + coeff0_19*dmats1[19][4];
3488
new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5] + coeff0_10*dmats1[10][5] + coeff0_11*dmats1[11][5] + coeff0_12*dmats1[12][5] + coeff0_13*dmats1[13][5] + coeff0_14*dmats1[14][5] + coeff0_15*dmats1[15][5] + coeff0_16*dmats1[16][5] + coeff0_17*dmats1[17][5] + coeff0_18*dmats1[18][5] + coeff0_19*dmats1[19][5];
3489
new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6] + coeff0_10*dmats1[10][6] + coeff0_11*dmats1[11][6] + coeff0_12*dmats1[12][6] + coeff0_13*dmats1[13][6] + coeff0_14*dmats1[14][6] + coeff0_15*dmats1[15][6] + coeff0_16*dmats1[16][6] + coeff0_17*dmats1[17][6] + coeff0_18*dmats1[18][6] + coeff0_19*dmats1[19][6];
3490
new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7] + coeff0_10*dmats1[10][7] + coeff0_11*dmats1[11][7] + coeff0_12*dmats1[12][7] + coeff0_13*dmats1[13][7] + coeff0_14*dmats1[14][7] + coeff0_15*dmats1[15][7] + coeff0_16*dmats1[16][7] + coeff0_17*dmats1[17][7] + coeff0_18*dmats1[18][7] + coeff0_19*dmats1[19][7];
3491
new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8] + coeff0_10*dmats1[10][8] + coeff0_11*dmats1[11][8] + coeff0_12*dmats1[12][8] + coeff0_13*dmats1[13][8] + coeff0_14*dmats1[14][8] + coeff0_15*dmats1[15][8] + coeff0_16*dmats1[16][8] + coeff0_17*dmats1[17][8] + coeff0_18*dmats1[18][8] + coeff0_19*dmats1[19][8];
3492
new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9] + coeff0_10*dmats1[10][9] + coeff0_11*dmats1[11][9] + coeff0_12*dmats1[12][9] + coeff0_13*dmats1[13][9] + coeff0_14*dmats1[14][9] + coeff0_15*dmats1[15][9] + coeff0_16*dmats1[16][9] + coeff0_17*dmats1[17][9] + coeff0_18*dmats1[18][9] + coeff0_19*dmats1[19][9];
3493
new_coeff0_10 = coeff0_0*dmats1[0][10] + coeff0_1*dmats1[1][10] + coeff0_2*dmats1[2][10] + coeff0_3*dmats1[3][10] + coeff0_4*dmats1[4][10] + coeff0_5*dmats1[5][10] + coeff0_6*dmats1[6][10] + coeff0_7*dmats1[7][10] + coeff0_8*dmats1[8][10] + coeff0_9*dmats1[9][10] + coeff0_10*dmats1[10][10] + coeff0_11*dmats1[11][10] + coeff0_12*dmats1[12][10] + coeff0_13*dmats1[13][10] + coeff0_14*dmats1[14][10] + coeff0_15*dmats1[15][10] + coeff0_16*dmats1[16][10] + coeff0_17*dmats1[17][10] + coeff0_18*dmats1[18][10] + coeff0_19*dmats1[19][10];
3494
new_coeff0_11 = coeff0_0*dmats1[0][11] + coeff0_1*dmats1[1][11] + coeff0_2*dmats1[2][11] + coeff0_3*dmats1[3][11] + coeff0_4*dmats1[4][11] + coeff0_5*dmats1[5][11] + coeff0_6*dmats1[6][11] + coeff0_7*dmats1[7][11] + coeff0_8*dmats1[8][11] + coeff0_9*dmats1[9][11] + coeff0_10*dmats1[10][11] + coeff0_11*dmats1[11][11] + coeff0_12*dmats1[12][11] + coeff0_13*dmats1[13][11] + coeff0_14*dmats1[14][11] + coeff0_15*dmats1[15][11] + coeff0_16*dmats1[16][11] + coeff0_17*dmats1[17][11] + coeff0_18*dmats1[18][11] + coeff0_19*dmats1[19][11];
3495
new_coeff0_12 = coeff0_0*dmats1[0][12] + coeff0_1*dmats1[1][12] + coeff0_2*dmats1[2][12] + coeff0_3*dmats1[3][12] + coeff0_4*dmats1[4][12] + coeff0_5*dmats1[5][12] + coeff0_6*dmats1[6][12] + coeff0_7*dmats1[7][12] + coeff0_8*dmats1[8][12] + coeff0_9*dmats1[9][12] + coeff0_10*dmats1[10][12] + coeff0_11*dmats1[11][12] + coeff0_12*dmats1[12][12] + coeff0_13*dmats1[13][12] + coeff0_14*dmats1[14][12] + coeff0_15*dmats1[15][12] + coeff0_16*dmats1[16][12] + coeff0_17*dmats1[17][12] + coeff0_18*dmats1[18][12] + coeff0_19*dmats1[19][12];
3496
new_coeff0_13 = coeff0_0*dmats1[0][13] + coeff0_1*dmats1[1][13] + coeff0_2*dmats1[2][13] + coeff0_3*dmats1[3][13] + coeff0_4*dmats1[4][13] + coeff0_5*dmats1[5][13] + coeff0_6*dmats1[6][13] + coeff0_7*dmats1[7][13] + coeff0_8*dmats1[8][13] + coeff0_9*dmats1[9][13] + coeff0_10*dmats1[10][13] + coeff0_11*dmats1[11][13] + coeff0_12*dmats1[12][13] + coeff0_13*dmats1[13][13] + coeff0_14*dmats1[14][13] + coeff0_15*dmats1[15][13] + coeff0_16*dmats1[16][13] + coeff0_17*dmats1[17][13] + coeff0_18*dmats1[18][13] + coeff0_19*dmats1[19][13];
3497
new_coeff0_14 = coeff0_0*dmats1[0][14] + coeff0_1*dmats1[1][14] + coeff0_2*dmats1[2][14] + coeff0_3*dmats1[3][14] + coeff0_4*dmats1[4][14] + coeff0_5*dmats1[5][14] + coeff0_6*dmats1[6][14] + coeff0_7*dmats1[7][14] + coeff0_8*dmats1[8][14] + coeff0_9*dmats1[9][14] + coeff0_10*dmats1[10][14] + coeff0_11*dmats1[11][14] + coeff0_12*dmats1[12][14] + coeff0_13*dmats1[13][14] + coeff0_14*dmats1[14][14] + coeff0_15*dmats1[15][14] + coeff0_16*dmats1[16][14] + coeff0_17*dmats1[17][14] + coeff0_18*dmats1[18][14] + coeff0_19*dmats1[19][14];
3498
new_coeff0_15 = coeff0_0*dmats1[0][15] + coeff0_1*dmats1[1][15] + coeff0_2*dmats1[2][15] + coeff0_3*dmats1[3][15] + coeff0_4*dmats1[4][15] + coeff0_5*dmats1[5][15] + coeff0_6*dmats1[6][15] + coeff0_7*dmats1[7][15] + coeff0_8*dmats1[8][15] + coeff0_9*dmats1[9][15] + coeff0_10*dmats1[10][15] + coeff0_11*dmats1[11][15] + coeff0_12*dmats1[12][15] + coeff0_13*dmats1[13][15] + coeff0_14*dmats1[14][15] + coeff0_15*dmats1[15][15] + coeff0_16*dmats1[16][15] + coeff0_17*dmats1[17][15] + coeff0_18*dmats1[18][15] + coeff0_19*dmats1[19][15];
3499
new_coeff0_16 = coeff0_0*dmats1[0][16] + coeff0_1*dmats1[1][16] + coeff0_2*dmats1[2][16] + coeff0_3*dmats1[3][16] + coeff0_4*dmats1[4][16] + coeff0_5*dmats1[5][16] + coeff0_6*dmats1[6][16] + coeff0_7*dmats1[7][16] + coeff0_8*dmats1[8][16] + coeff0_9*dmats1[9][16] + coeff0_10*dmats1[10][16] + coeff0_11*dmats1[11][16] + coeff0_12*dmats1[12][16] + coeff0_13*dmats1[13][16] + coeff0_14*dmats1[14][16] + coeff0_15*dmats1[15][16] + coeff0_16*dmats1[16][16] + coeff0_17*dmats1[17][16] + coeff0_18*dmats1[18][16] + coeff0_19*dmats1[19][16];
3500
new_coeff0_17 = coeff0_0*dmats1[0][17] + coeff0_1*dmats1[1][17] + coeff0_2*dmats1[2][17] + coeff0_3*dmats1[3][17] + coeff0_4*dmats1[4][17] + coeff0_5*dmats1[5][17] + coeff0_6*dmats1[6][17] + coeff0_7*dmats1[7][17] + coeff0_8*dmats1[8][17] + coeff0_9*dmats1[9][17] + coeff0_10*dmats1[10][17] + coeff0_11*dmats1[11][17] + coeff0_12*dmats1[12][17] + coeff0_13*dmats1[13][17] + coeff0_14*dmats1[14][17] + coeff0_15*dmats1[15][17] + coeff0_16*dmats1[16][17] + coeff0_17*dmats1[17][17] + coeff0_18*dmats1[18][17] + coeff0_19*dmats1[19][17];
3501
new_coeff0_18 = coeff0_0*dmats1[0][18] + coeff0_1*dmats1[1][18] + coeff0_2*dmats1[2][18] + coeff0_3*dmats1[3][18] + coeff0_4*dmats1[4][18] + coeff0_5*dmats1[5][18] + coeff0_6*dmats1[6][18] + coeff0_7*dmats1[7][18] + coeff0_8*dmats1[8][18] + coeff0_9*dmats1[9][18] + coeff0_10*dmats1[10][18] + coeff0_11*dmats1[11][18] + coeff0_12*dmats1[12][18] + coeff0_13*dmats1[13][18] + coeff0_14*dmats1[14][18] + coeff0_15*dmats1[15][18] + coeff0_16*dmats1[16][18] + coeff0_17*dmats1[17][18] + coeff0_18*dmats1[18][18] + coeff0_19*dmats1[19][18];
3502
new_coeff0_19 = coeff0_0*dmats1[0][19] + coeff0_1*dmats1[1][19] + coeff0_2*dmats1[2][19] + coeff0_3*dmats1[3][19] + coeff0_4*dmats1[4][19] + coeff0_5*dmats1[5][19] + coeff0_6*dmats1[6][19] + coeff0_7*dmats1[7][19] + coeff0_8*dmats1[8][19] + coeff0_9*dmats1[9][19] + coeff0_10*dmats1[10][19] + coeff0_11*dmats1[11][19] + coeff0_12*dmats1[12][19] + coeff0_13*dmats1[13][19] + coeff0_14*dmats1[14][19] + coeff0_15*dmats1[15][19] + coeff0_16*dmats1[16][19] + coeff0_17*dmats1[17][19] + coeff0_18*dmats1[18][19] + coeff0_19*dmats1[19][19];
3504
if(combinations[deriv_num][j] == 2)
3506
new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0] + coeff0_10*dmats2[10][0] + coeff0_11*dmats2[11][0] + coeff0_12*dmats2[12][0] + coeff0_13*dmats2[13][0] + coeff0_14*dmats2[14][0] + coeff0_15*dmats2[15][0] + coeff0_16*dmats2[16][0] + coeff0_17*dmats2[17][0] + coeff0_18*dmats2[18][0] + coeff0_19*dmats2[19][0];
3507
new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1] + coeff0_10*dmats2[10][1] + coeff0_11*dmats2[11][1] + coeff0_12*dmats2[12][1] + coeff0_13*dmats2[13][1] + coeff0_14*dmats2[14][1] + coeff0_15*dmats2[15][1] + coeff0_16*dmats2[16][1] + coeff0_17*dmats2[17][1] + coeff0_18*dmats2[18][1] + coeff0_19*dmats2[19][1];
3508
new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2] + coeff0_10*dmats2[10][2] + coeff0_11*dmats2[11][2] + coeff0_12*dmats2[12][2] + coeff0_13*dmats2[13][2] + coeff0_14*dmats2[14][2] + coeff0_15*dmats2[15][2] + coeff0_16*dmats2[16][2] + coeff0_17*dmats2[17][2] + coeff0_18*dmats2[18][2] + coeff0_19*dmats2[19][2];
3509
new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3] + coeff0_10*dmats2[10][3] + coeff0_11*dmats2[11][3] + coeff0_12*dmats2[12][3] + coeff0_13*dmats2[13][3] + coeff0_14*dmats2[14][3] + coeff0_15*dmats2[15][3] + coeff0_16*dmats2[16][3] + coeff0_17*dmats2[17][3] + coeff0_18*dmats2[18][3] + coeff0_19*dmats2[19][3];
3510
new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4] + coeff0_10*dmats2[10][4] + coeff0_11*dmats2[11][4] + coeff0_12*dmats2[12][4] + coeff0_13*dmats2[13][4] + coeff0_14*dmats2[14][4] + coeff0_15*dmats2[15][4] + coeff0_16*dmats2[16][4] + coeff0_17*dmats2[17][4] + coeff0_18*dmats2[18][4] + coeff0_19*dmats2[19][4];
3511
new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5] + coeff0_10*dmats2[10][5] + coeff0_11*dmats2[11][5] + coeff0_12*dmats2[12][5] + coeff0_13*dmats2[13][5] + coeff0_14*dmats2[14][5] + coeff0_15*dmats2[15][5] + coeff0_16*dmats2[16][5] + coeff0_17*dmats2[17][5] + coeff0_18*dmats2[18][5] + coeff0_19*dmats2[19][5];
3512
new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6] + coeff0_10*dmats2[10][6] + coeff0_11*dmats2[11][6] + coeff0_12*dmats2[12][6] + coeff0_13*dmats2[13][6] + coeff0_14*dmats2[14][6] + coeff0_15*dmats2[15][6] + coeff0_16*dmats2[16][6] + coeff0_17*dmats2[17][6] + coeff0_18*dmats2[18][6] + coeff0_19*dmats2[19][6];
3513
new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7] + coeff0_10*dmats2[10][7] + coeff0_11*dmats2[11][7] + coeff0_12*dmats2[12][7] + coeff0_13*dmats2[13][7] + coeff0_14*dmats2[14][7] + coeff0_15*dmats2[15][7] + coeff0_16*dmats2[16][7] + coeff0_17*dmats2[17][7] + coeff0_18*dmats2[18][7] + coeff0_19*dmats2[19][7];
3514
new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8] + coeff0_10*dmats2[10][8] + coeff0_11*dmats2[11][8] + coeff0_12*dmats2[12][8] + coeff0_13*dmats2[13][8] + coeff0_14*dmats2[14][8] + coeff0_15*dmats2[15][8] + coeff0_16*dmats2[16][8] + coeff0_17*dmats2[17][8] + coeff0_18*dmats2[18][8] + coeff0_19*dmats2[19][8];
3515
new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9] + coeff0_10*dmats2[10][9] + coeff0_11*dmats2[11][9] + coeff0_12*dmats2[12][9] + coeff0_13*dmats2[13][9] + coeff0_14*dmats2[14][9] + coeff0_15*dmats2[15][9] + coeff0_16*dmats2[16][9] + coeff0_17*dmats2[17][9] + coeff0_18*dmats2[18][9] + coeff0_19*dmats2[19][9];
3516
new_coeff0_10 = coeff0_0*dmats2[0][10] + coeff0_1*dmats2[1][10] + coeff0_2*dmats2[2][10] + coeff0_3*dmats2[3][10] + coeff0_4*dmats2[4][10] + coeff0_5*dmats2[5][10] + coeff0_6*dmats2[6][10] + coeff0_7*dmats2[7][10] + coeff0_8*dmats2[8][10] + coeff0_9*dmats2[9][10] + coeff0_10*dmats2[10][10] + coeff0_11*dmats2[11][10] + coeff0_12*dmats2[12][10] + coeff0_13*dmats2[13][10] + coeff0_14*dmats2[14][10] + coeff0_15*dmats2[15][10] + coeff0_16*dmats2[16][10] + coeff0_17*dmats2[17][10] + coeff0_18*dmats2[18][10] + coeff0_19*dmats2[19][10];
3517
new_coeff0_11 = coeff0_0*dmats2[0][11] + coeff0_1*dmats2[1][11] + coeff0_2*dmats2[2][11] + coeff0_3*dmats2[3][11] + coeff0_4*dmats2[4][11] + coeff0_5*dmats2[5][11] + coeff0_6*dmats2[6][11] + coeff0_7*dmats2[7][11] + coeff0_8*dmats2[8][11] + coeff0_9*dmats2[9][11] + coeff0_10*dmats2[10][11] + coeff0_11*dmats2[11][11] + coeff0_12*dmats2[12][11] + coeff0_13*dmats2[13][11] + coeff0_14*dmats2[14][11] + coeff0_15*dmats2[15][11] + coeff0_16*dmats2[16][11] + coeff0_17*dmats2[17][11] + coeff0_18*dmats2[18][11] + coeff0_19*dmats2[19][11];
3518
new_coeff0_12 = coeff0_0*dmats2[0][12] + coeff0_1*dmats2[1][12] + coeff0_2*dmats2[2][12] + coeff0_3*dmats2[3][12] + coeff0_4*dmats2[4][12] + coeff0_5*dmats2[5][12] + coeff0_6*dmats2[6][12] + coeff0_7*dmats2[7][12] + coeff0_8*dmats2[8][12] + coeff0_9*dmats2[9][12] + coeff0_10*dmats2[10][12] + coeff0_11*dmats2[11][12] + coeff0_12*dmats2[12][12] + coeff0_13*dmats2[13][12] + coeff0_14*dmats2[14][12] + coeff0_15*dmats2[15][12] + coeff0_16*dmats2[16][12] + coeff0_17*dmats2[17][12] + coeff0_18*dmats2[18][12] + coeff0_19*dmats2[19][12];
3519
new_coeff0_13 = coeff0_0*dmats2[0][13] + coeff0_1*dmats2[1][13] + coeff0_2*dmats2[2][13] + coeff0_3*dmats2[3][13] + coeff0_4*dmats2[4][13] + coeff0_5*dmats2[5][13] + coeff0_6*dmats2[6][13] + coeff0_7*dmats2[7][13] + coeff0_8*dmats2[8][13] + coeff0_9*dmats2[9][13] + coeff0_10*dmats2[10][13] + coeff0_11*dmats2[11][13] + coeff0_12*dmats2[12][13] + coeff0_13*dmats2[13][13] + coeff0_14*dmats2[14][13] + coeff0_15*dmats2[15][13] + coeff0_16*dmats2[16][13] + coeff0_17*dmats2[17][13] + coeff0_18*dmats2[18][13] + coeff0_19*dmats2[19][13];
3520
new_coeff0_14 = coeff0_0*dmats2[0][14] + coeff0_1*dmats2[1][14] + coeff0_2*dmats2[2][14] + coeff0_3*dmats2[3][14] + coeff0_4*dmats2[4][14] + coeff0_5*dmats2[5][14] + coeff0_6*dmats2[6][14] + coeff0_7*dmats2[7][14] + coeff0_8*dmats2[8][14] + coeff0_9*dmats2[9][14] + coeff0_10*dmats2[10][14] + coeff0_11*dmats2[11][14] + coeff0_12*dmats2[12][14] + coeff0_13*dmats2[13][14] + coeff0_14*dmats2[14][14] + coeff0_15*dmats2[15][14] + coeff0_16*dmats2[16][14] + coeff0_17*dmats2[17][14] + coeff0_18*dmats2[18][14] + coeff0_19*dmats2[19][14];
3521
new_coeff0_15 = coeff0_0*dmats2[0][15] + coeff0_1*dmats2[1][15] + coeff0_2*dmats2[2][15] + coeff0_3*dmats2[3][15] + coeff0_4*dmats2[4][15] + coeff0_5*dmats2[5][15] + coeff0_6*dmats2[6][15] + coeff0_7*dmats2[7][15] + coeff0_8*dmats2[8][15] + coeff0_9*dmats2[9][15] + coeff0_10*dmats2[10][15] + coeff0_11*dmats2[11][15] + coeff0_12*dmats2[12][15] + coeff0_13*dmats2[13][15] + coeff0_14*dmats2[14][15] + coeff0_15*dmats2[15][15] + coeff0_16*dmats2[16][15] + coeff0_17*dmats2[17][15] + coeff0_18*dmats2[18][15] + coeff0_19*dmats2[19][15];
3522
new_coeff0_16 = coeff0_0*dmats2[0][16] + coeff0_1*dmats2[1][16] + coeff0_2*dmats2[2][16] + coeff0_3*dmats2[3][16] + coeff0_4*dmats2[4][16] + coeff0_5*dmats2[5][16] + coeff0_6*dmats2[6][16] + coeff0_7*dmats2[7][16] + coeff0_8*dmats2[8][16] + coeff0_9*dmats2[9][16] + coeff0_10*dmats2[10][16] + coeff0_11*dmats2[11][16] + coeff0_12*dmats2[12][16] + coeff0_13*dmats2[13][16] + coeff0_14*dmats2[14][16] + coeff0_15*dmats2[15][16] + coeff0_16*dmats2[16][16] + coeff0_17*dmats2[17][16] + coeff0_18*dmats2[18][16] + coeff0_19*dmats2[19][16];
3523
new_coeff0_17 = coeff0_0*dmats2[0][17] + coeff0_1*dmats2[1][17] + coeff0_2*dmats2[2][17] + coeff0_3*dmats2[3][17] + coeff0_4*dmats2[4][17] + coeff0_5*dmats2[5][17] + coeff0_6*dmats2[6][17] + coeff0_7*dmats2[7][17] + coeff0_8*dmats2[8][17] + coeff0_9*dmats2[9][17] + coeff0_10*dmats2[10][17] + coeff0_11*dmats2[11][17] + coeff0_12*dmats2[12][17] + coeff0_13*dmats2[13][17] + coeff0_14*dmats2[14][17] + coeff0_15*dmats2[15][17] + coeff0_16*dmats2[16][17] + coeff0_17*dmats2[17][17] + coeff0_18*dmats2[18][17] + coeff0_19*dmats2[19][17];
3524
new_coeff0_18 = coeff0_0*dmats2[0][18] + coeff0_1*dmats2[1][18] + coeff0_2*dmats2[2][18] + coeff0_3*dmats2[3][18] + coeff0_4*dmats2[4][18] + coeff0_5*dmats2[5][18] + coeff0_6*dmats2[6][18] + coeff0_7*dmats2[7][18] + coeff0_8*dmats2[8][18] + coeff0_9*dmats2[9][18] + coeff0_10*dmats2[10][18] + coeff0_11*dmats2[11][18] + coeff0_12*dmats2[12][18] + coeff0_13*dmats2[13][18] + coeff0_14*dmats2[14][18] + coeff0_15*dmats2[15][18] + coeff0_16*dmats2[16][18] + coeff0_17*dmats2[17][18] + coeff0_18*dmats2[18][18] + coeff0_19*dmats2[19][18];
3525
new_coeff0_19 = coeff0_0*dmats2[0][19] + coeff0_1*dmats2[1][19] + coeff0_2*dmats2[2][19] + coeff0_3*dmats2[3][19] + coeff0_4*dmats2[4][19] + coeff0_5*dmats2[5][19] + coeff0_6*dmats2[6][19] + coeff0_7*dmats2[7][19] + coeff0_8*dmats2[8][19] + coeff0_9*dmats2[9][19] + coeff0_10*dmats2[10][19] + coeff0_11*dmats2[11][19] + coeff0_12*dmats2[12][19] + coeff0_13*dmats2[13][19] + coeff0_14*dmats2[14][19] + coeff0_15*dmats2[15][19] + coeff0_16*dmats2[16][19] + coeff0_17*dmats2[17][19] + coeff0_18*dmats2[18][19] + coeff0_19*dmats2[19][19];
3529
// Compute derivatives on reference element as dot product of coefficients and basisvalues
3530
derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9 + new_coeff0_10*basisvalue10 + new_coeff0_11*basisvalue11 + new_coeff0_12*basisvalue12 + new_coeff0_13*basisvalue13 + new_coeff0_14*basisvalue14 + new_coeff0_15*basisvalue15 + new_coeff0_16*basisvalue16 + new_coeff0_17*basisvalue17 + new_coeff0_18*basisvalue18 + new_coeff0_19*basisvalue19;
3533
// Transform derivatives back to physical element
3534
for (unsigned int row = 0; row < num_derivatives; row++)
3536
for (unsigned int col = 0; col < num_derivatives; col++)
3538
values[row] += transform[row][col]*derivatives[col];
3541
// Delete pointer to array of derivatives on FIAT element
3542
delete [] derivatives;
3544
// Delete pointer to array of combinations of derivatives and transform
3545
for (unsigned int row = 0; row < num_derivatives; row++)
3547
delete [] combinations[row];
3548
delete [] transform[row];
3551
delete [] combinations;
3552
delete [] transform;
3555
/// Evaluate order n derivatives of all basis functions at given point in cell
3556
virtual void evaluate_basis_derivatives_all(unsigned int n,
3558
const double* coordinates,
3559
const ufc::cell& c) const
3561
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
3564
/// Evaluate linear functional for dof i on the function f
3565
virtual double evaluate_dof(unsigned int i,
3566
const ufc::function& f,
3567
const ufc::cell& c) const
3569
// The reference points, direction and weights:
3570
static const double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.666666666666667, 0.333333333333333}}, {{0, 0.333333333333333, 0.666666666666667}}, {{0.666666666666667, 0, 0.333333333333333}}, {{0.333333333333333, 0, 0.666666666666667}}, {{0.666666666666667, 0.333333333333333, 0}}, {{0.333333333333333, 0.666666666666667, 0}}, {{0, 0, 0.333333333333333}}, {{0, 0, 0.666666666666667}}, {{0, 0.333333333333333, 0}}, {{0, 0.666666666666667, 0}}, {{0.333333333333333, 0, 0}}, {{0.666666666666667, 0, 0}}, {{0.333333333333333, 0.333333333333333, 0.333333333333333}}, {{0, 0.333333333333333, 0.333333333333333}}, {{0.333333333333333, 0, 0.333333333333333}}, {{0.333333333333333, 0.333333333333333, 0}}};
3571
static const double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
3572
static const double D[20][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
3574
const double * const * x = c.coordinates;
3575
double result = 0.0;
3576
// Iterate over the points:
3577
// Evaluate basis functions for affine mapping
3578
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
3579
const double w1 = X[i][0][0];
3580
const double w2 = X[i][0][1];
3581
const double w3 = X[i][0][2];
3583
// Compute affine mapping y = F(X)
3585
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
3586
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
3587
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
3589
// Evaluate function at physical points
3591
f.evaluate(values, y, c);
3593
// Map function values using appropriate mapping
3594
// Affine map: Do nothing
3596
// Note that we do not map the weights (yet).
3598
// Take directional components
3599
for(int k = 0; k < 1; k++)
3600
result += values[k]*D[i][0][k];
3601
// Multiply by weights
3607
/// Evaluate linear functionals for all dofs on the function f
3608
virtual void evaluate_dofs(double* values,
3609
const ufc::function& f,
3610
const ufc::cell& c) const
3612
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
3615
/// Interpolate vertex values from dof values
3616
virtual void interpolate_vertex_values(double* vertex_values,
3617
const double* dof_values,
3618
const ufc::cell& c) const
3620
// Evaluate at vertices and use affine mapping
3621
vertex_values[0] = dof_values[0];
3622
vertex_values[1] = dof_values[1];
3623
vertex_values[2] = dof_values[2];
3624
vertex_values[3] = dof_values[3];
3627
/// Return the number of sub elements (for a mixed element)
3628
virtual unsigned int num_sub_elements() const
3633
/// Create a new finite element for sub element i (for a mixed element)
3634
virtual ufc::finite_element* create_sub_element(unsigned int i) const
3636
return new poisson3dp3_1_finite_element_0();
3641
/// This class defines the interface for a finite element.
3643
class poisson3dp3_1_finite_element_1: public ufc::finite_element
3648
poisson3dp3_1_finite_element_1() : ufc::finite_element()
3654
virtual ~poisson3dp3_1_finite_element_1()
3659
/// Return a string identifying the finite element
3660
virtual const char* signature() const
3662
return "FiniteElement('Lagrange', 'tetrahedron', 3)";
3665
/// Return the cell shape
3666
virtual ufc::shape cell_shape() const
3668
return ufc::tetrahedron;
3671
/// Return the dimension of the finite element function space
3672
virtual unsigned int space_dimension() const
3677
/// Return the rank of the value space
3678
virtual unsigned int value_rank() const
3683
/// Return the dimension of the value space for axis i
3684
virtual unsigned int value_dimension(unsigned int i) const
3689
/// Evaluate basis function i at given point in cell
3690
virtual void evaluate_basis(unsigned int i,
3692
const double* coordinates,
3693
const ufc::cell& c) const
3695
// Extract vertex coordinates
3696
const double * const * element_coordinates = c.coordinates;
3698
// Compute Jacobian of affine map from reference cell
3699
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3700
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3701
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
3702
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3703
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3704
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
3705
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
3706
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
3707
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
3709
// Compute sub determinants
3710
const double d00 = J_11*J_22 - J_12*J_21;
3711
const double d01 = J_12*J_20 - J_10*J_22;
3712
const double d02 = J_10*J_21 - J_11*J_20;
3714
const double d10 = J_02*J_21 - J_01*J_22;
3715
const double d11 = J_00*J_22 - J_02*J_20;
3716
const double d12 = J_01*J_20 - J_00*J_21;
3718
const double d20 = J_01*J_12 - J_02*J_11;
3719
const double d21 = J_02*J_10 - J_00*J_12;
3720
const double d22 = J_00*J_11 - J_01*J_10;
3722
// Compute determinant of Jacobian
3723
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
3725
// Compute inverse of Jacobian
3727
// Compute constants
3728
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
3729
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
3730
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
3732
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
3733
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
3734
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
3736
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
3737
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
3738
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
3740
// Get coordinates and map to the UFC reference element
3741
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
3742
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
3743
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
3745
// Map coordinates to the reference cube
3746
if (std::abs(y + z - 1.0) < 1e-14)
3749
x = -2.0 * x/(y + z - 1.0) - 1.0;
3750
if (std::abs(z - 1.0) < 1e-14)
3753
y = 2.0 * y/(1.0 - z) - 1.0;
3759
// Map degree of freedom to element degree of freedom
3760
const unsigned int dof = i;
3762
// Generate scalings
3763
const double scalings_y_0 = 1;
3764
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
3765
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
3766
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
3767
const double scalings_z_0 = 1;
3768
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
3769
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
3770
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
3772
// Compute psitilde_a
3773
const double psitilde_a_0 = 1;
3774
const double psitilde_a_1 = x;
3775
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
3776
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
3778
// Compute psitilde_bs
3779
const double psitilde_bs_0_0 = 1;
3780
const double psitilde_bs_0_1 = 1.5*y + 0.5;
3781
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
3782
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
3783
const double psitilde_bs_1_0 = 1;
3784
const double psitilde_bs_1_1 = 2.5*y + 1.5;
3785
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
3786
const double psitilde_bs_2_0 = 1;
3787
const double psitilde_bs_2_1 = 3.5*y + 2.5;
3788
const double psitilde_bs_3_0 = 1;
3790
// Compute psitilde_cs
3791
const double psitilde_cs_00_0 = 1;
3792
const double psitilde_cs_00_1 = 2*z + 1;
3793
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
3794
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
3795
const double psitilde_cs_01_0 = 1;
3796
const double psitilde_cs_01_1 = 3*z + 2;
3797
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
3798
const double psitilde_cs_02_0 = 1;
3799
const double psitilde_cs_02_1 = 4*z + 3;
3800
const double psitilde_cs_03_0 = 1;
3801
const double psitilde_cs_10_0 = 1;
3802
const double psitilde_cs_10_1 = 3*z + 2;
3803
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
3804
const double psitilde_cs_11_0 = 1;
3805
const double psitilde_cs_11_1 = 4*z + 3;
3806
const double psitilde_cs_12_0 = 1;
3807
const double psitilde_cs_20_0 = 1;
3808
const double psitilde_cs_20_1 = 4*z + 3;
3809
const double psitilde_cs_21_0 = 1;
3810
const double psitilde_cs_30_0 = 1;
3812
// Compute basisvalues
3813
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
3814
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
3815
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
3816
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
3817
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
3818
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
3819
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
3820
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
3821
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
3822
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
3823
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
3824
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
3825
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
3826
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
3827
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
3828
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
3829
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
3830
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
3831
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
3832
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
3834
// Table(s) of coefficients
3835
static const double coefficients0[20][20] = \
3836
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
3837
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
3838
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
3839
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
3840
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
3841
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
3842
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
3843
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
3844
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
3845
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
3846
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
3847
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
3848
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
3849
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
3850
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
3851
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
3852
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
3853
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
3854
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
3855
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
3857
// Extract relevant coefficients
3858
const double coeff0_0 = coefficients0[dof][0];
3859
const double coeff0_1 = coefficients0[dof][1];
3860
const double coeff0_2 = coefficients0[dof][2];
3861
const double coeff0_3 = coefficients0[dof][3];
3862
const double coeff0_4 = coefficients0[dof][4];
3863
const double coeff0_5 = coefficients0[dof][5];
3864
const double coeff0_6 = coefficients0[dof][6];
3865
const double coeff0_7 = coefficients0[dof][7];
3866
const double coeff0_8 = coefficients0[dof][8];
3867
const double coeff0_9 = coefficients0[dof][9];
3868
const double coeff0_10 = coefficients0[dof][10];
3869
const double coeff0_11 = coefficients0[dof][11];
3870
const double coeff0_12 = coefficients0[dof][12];
3871
const double coeff0_13 = coefficients0[dof][13];
3872
const double coeff0_14 = coefficients0[dof][14];
3873
const double coeff0_15 = coefficients0[dof][15];
3874
const double coeff0_16 = coefficients0[dof][16];
3875
const double coeff0_17 = coefficients0[dof][17];
3876
const double coeff0_18 = coefficients0[dof][18];
3877
const double coeff0_19 = coefficients0[dof][19];
3880
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5 + coeff0_6*basisvalue6 + coeff0_7*basisvalue7 + coeff0_8*basisvalue8 + coeff0_9*basisvalue9 + coeff0_10*basisvalue10 + coeff0_11*basisvalue11 + coeff0_12*basisvalue12 + coeff0_13*basisvalue13 + coeff0_14*basisvalue14 + coeff0_15*basisvalue15 + coeff0_16*basisvalue16 + coeff0_17*basisvalue17 + coeff0_18*basisvalue18 + coeff0_19*basisvalue19;
3883
/// Evaluate all basis functions at given point in cell
3884
virtual void evaluate_basis_all(double* values,
3885
const double* coordinates,
3886
const ufc::cell& c) const
3888
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
3891
/// Evaluate order n derivatives of basis function i at given point in cell
3892
virtual void evaluate_basis_derivatives(unsigned int i,
3895
const double* coordinates,
3896
const ufc::cell& c) const
3898
// Extract vertex coordinates
3899
const double * const * element_coordinates = c.coordinates;
3901
// Compute Jacobian of affine map from reference cell
3902
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3903
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3904
const double J_02 = element_coordinates[3][0] - element_coordinates[0][0];
3905
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3906
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3907
const double J_12 = element_coordinates[3][1] - element_coordinates[0][1];
3908
const double J_20 = element_coordinates[1][2] - element_coordinates[0][2];
3909
const double J_21 = element_coordinates[2][2] - element_coordinates[0][2];
3910
const double J_22 = element_coordinates[3][2] - element_coordinates[0][2];
3912
// Compute sub determinants
3913
const double d00 = J_11*J_22 - J_12*J_21;
3914
const double d01 = J_12*J_20 - J_10*J_22;
3915
const double d02 = J_10*J_21 - J_11*J_20;
3917
const double d10 = J_02*J_21 - J_01*J_22;
3918
const double d11 = J_00*J_22 - J_02*J_20;
3919
const double d12 = J_01*J_20 - J_00*J_21;
3921
const double d20 = J_01*J_12 - J_02*J_11;
3922
const double d21 = J_02*J_10 - J_00*J_12;
3923
const double d22 = J_00*J_11 - J_01*J_10;
3925
// Compute determinant of Jacobian
3926
double detJ = J_00*d00 + J_10*d10 + J_20*d20;
3928
// Compute inverse of Jacobian
3930
// Compute constants
3931
const double C0 = d00*(element_coordinates[0][0] - element_coordinates[2][0] - element_coordinates[3][0]) \
3932
+ d10*(element_coordinates[0][1] - element_coordinates[2][1] - element_coordinates[3][1]) \
3933
+ d20*(element_coordinates[0][2] - element_coordinates[2][2] - element_coordinates[3][2]);
3935
const double C1 = d01*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[3][0]) \
3936
+ d11*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[3][1]) \
3937
+ d21*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[3][2]);
3939
const double C2 = d02*(element_coordinates[0][0] - element_coordinates[1][0] - element_coordinates[2][0]) \
3940
+ d12*(element_coordinates[0][1] - element_coordinates[1][1] - element_coordinates[2][1]) \
3941
+ d22*(element_coordinates[0][2] - element_coordinates[1][2] - element_coordinates[2][2]);
3943
// Get coordinates and map to the UFC reference element
3944
double x = (C0 + d00*coordinates[0] + d10*coordinates[1] + d20*coordinates[2]) / detJ;
3945
double y = (C1 + d01*coordinates[0] + d11*coordinates[1] + d21*coordinates[2]) / detJ;
3946
double z = (C2 + d02*coordinates[0] + d12*coordinates[1] + d22*coordinates[2]) / detJ;
3948
// Map coordinates to the reference cube
3949
if (std::abs(y + z - 1.0) < 1e-14)
3952
x = -2.0 * x/(y + z - 1.0) - 1.0;
3953
if (std::abs(z - 1.0) < 1e-14)
3956
y = 2.0 * y/(1.0 - z) - 1.0;
3959
// Compute number of derivatives
3960
unsigned int num_derivatives = 1;
3962
for (unsigned int j = 0; j < n; j++)
3963
num_derivatives *= 3;
3966
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
3967
unsigned int **combinations = new unsigned int *[num_derivatives];
3969
for (unsigned int j = 0; j < num_derivatives; j++)
3971
combinations[j] = new unsigned int [n];
3972
for (unsigned int k = 0; k < n; k++)
3973
combinations[j][k] = 0;
3976
// Generate combinations of derivatives
3977
for (unsigned int row = 1; row < num_derivatives; row++)
3979
for (unsigned int num = 0; num < row; num++)
3981
for (unsigned int col = n-1; col+1 > 0; col--)
3983
if (combinations[row][col] + 1 > 2)
3984
combinations[row][col] = 0;
3987
combinations[row][col] += 1;
3994
// Compute inverse of Jacobian
3995
const double Jinv[3][3] ={{d00 / detJ, d10 / detJ, d20 / detJ}, {d01 / detJ, d11 / detJ, d21 / detJ}, {d02 / detJ, d12 / detJ, d22 / detJ}};
3997
// Declare transformation matrix
3998
// Declare pointer to two dimensional array and initialise
3999
double **transform = new double *[num_derivatives];
4001
for (unsigned int j = 0; j < num_derivatives; j++)
4003
transform[j] = new double [num_derivatives];
4004
for (unsigned int k = 0; k < num_derivatives; k++)
4005
transform[j][k] = 1;
4008
// Construct transformation matrix
4009
for (unsigned int row = 0; row < num_derivatives; row++)
4011
for (unsigned int col = 0; col < num_derivatives; col++)
4013
for (unsigned int k = 0; k < n; k++)
4014
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
4019
for (unsigned int j = 0; j < 1*num_derivatives; j++)
4022
// Map degree of freedom to element degree of freedom
4023
const unsigned int dof = i;
4025
// Generate scalings
4026
const double scalings_y_0 = 1;
4027
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
4028
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
4029
const double scalings_y_3 = scalings_y_2*(0.5 - 0.5*y);
4030
const double scalings_z_0 = 1;
4031
const double scalings_z_1 = scalings_z_0*(0.5 - 0.5*z);
4032
const double scalings_z_2 = scalings_z_1*(0.5 - 0.5*z);
4033
const double scalings_z_3 = scalings_z_2*(0.5 - 0.5*z);
4035
// Compute psitilde_a
4036
const double psitilde_a_0 = 1;
4037
const double psitilde_a_1 = x;
4038
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
4039
const double psitilde_a_3 = 1.66666666666667*x*psitilde_a_2 - 0.666666666666667*psitilde_a_1;
4041
// Compute psitilde_bs
4042
const double psitilde_bs_0_0 = 1;
4043
const double psitilde_bs_0_1 = 1.5*y + 0.5;
4044
const double psitilde_bs_0_2 = 0.111111111111111*psitilde_bs_0_1 + 1.66666666666667*y*psitilde_bs_0_1 - 0.555555555555556*psitilde_bs_0_0;
4045
const double psitilde_bs_0_3 = 0.05*psitilde_bs_0_2 + 1.75*y*psitilde_bs_0_2 - 0.7*psitilde_bs_0_1;
4046
const double psitilde_bs_1_0 = 1;
4047
const double psitilde_bs_1_1 = 2.5*y + 1.5;
4048
const double psitilde_bs_1_2 = 0.54*psitilde_bs_1_1 + 2.1*y*psitilde_bs_1_1 - 0.56*psitilde_bs_1_0;
4049
const double psitilde_bs_2_0 = 1;
4050
const double psitilde_bs_2_1 = 3.5*y + 2.5;
4051
const double psitilde_bs_3_0 = 1;
4053
// Compute psitilde_cs
4054
const double psitilde_cs_00_0 = 1;
4055
const double psitilde_cs_00_1 = 2*z + 1;
4056
const double psitilde_cs_00_2 = 0.3125*psitilde_cs_00_1 + 1.875*z*psitilde_cs_00_1 - 0.5625*psitilde_cs_00_0;
4057
const double psitilde_cs_00_3 = 0.155555555555556*psitilde_cs_00_2 + 1.86666666666667*z*psitilde_cs_00_2 - 0.711111111111111*psitilde_cs_00_1;
4058
const double psitilde_cs_01_0 = 1;
4059
const double psitilde_cs_01_1 = 3*z + 2;
4060
const double psitilde_cs_01_2 = 0.777777777777778*psitilde_cs_01_1 + 2.33333333333333*z*psitilde_cs_01_1 - 0.555555555555556*psitilde_cs_01_0;
4061
const double psitilde_cs_02_0 = 1;
4062
const double psitilde_cs_02_1 = 4*z + 3;
4063
const double psitilde_cs_03_0 = 1;
4064
const double psitilde_cs_10_0 = 1;
4065
const double psitilde_cs_10_1 = 3*z + 2;
4066
const double psitilde_cs_10_2 = 0.777777777777778*psitilde_cs_10_1 + 2.33333333333333*z*psitilde_cs_10_1 - 0.555555555555556*psitilde_cs_10_0;
4067
const double psitilde_cs_11_0 = 1;
4068
const double psitilde_cs_11_1 = 4*z + 3;
4069
const double psitilde_cs_12_0 = 1;
4070
const double psitilde_cs_20_0 = 1;
4071
const double psitilde_cs_20_1 = 4*z + 3;
4072
const double psitilde_cs_21_0 = 1;
4073
const double psitilde_cs_30_0 = 1;
4075
// Compute basisvalues
4076
const double basisvalue0 = 0.866025403784439*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_0;
4077
const double basisvalue1 = 2.73861278752583*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_0;
4078
const double basisvalue2 = 1.58113883008419*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_0;
4079
const double basisvalue3 = 1.11803398874989*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_1;
4080
const double basisvalue4 = 5.1234753829798*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_0;
4081
const double basisvalue5 = 3.96862696659689*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_0;
4082
const double basisvalue6 = 2.29128784747792*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_0;
4083
const double basisvalue7 = 3.24037034920393*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_1;
4084
const double basisvalue8 = 1.87082869338697*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_1;
4085
const double basisvalue9 = 1.3228756555323*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_2;
4086
const double basisvalue10 = 7.93725393319377*psitilde_a_3*scalings_y_3*psitilde_bs_3_0*scalings_z_3*psitilde_cs_30_0;
4087
const double basisvalue11 = 6.70820393249937*psitilde_a_2*scalings_y_2*psitilde_bs_2_1*scalings_z_3*psitilde_cs_21_0;
4088
const double basisvalue12 = 5.19615242270663*psitilde_a_1*scalings_y_1*psitilde_bs_1_2*scalings_z_3*psitilde_cs_12_0;
4089
const double basisvalue13 = 3*psitilde_a_0*scalings_y_0*psitilde_bs_0_3*scalings_z_3*psitilde_cs_03_0;
4090
const double basisvalue14 = 5.80947501931113*psitilde_a_2*scalings_y_2*psitilde_bs_2_0*scalings_z_2*psitilde_cs_20_1;
4091
const double basisvalue15 = 4.5*psitilde_a_1*scalings_y_1*psitilde_bs_1_1*scalings_z_2*psitilde_cs_11_1;
4092
const double basisvalue16 = 2.59807621135332*psitilde_a_0*scalings_y_0*psitilde_bs_0_2*scalings_z_2*psitilde_cs_02_1;
4093
const double basisvalue17 = 3.67423461417477*psitilde_a_1*scalings_y_1*psitilde_bs_1_0*scalings_z_1*psitilde_cs_10_2;
4094
const double basisvalue18 = 2.12132034355964*psitilde_a_0*scalings_y_0*psitilde_bs_0_1*scalings_z_1*psitilde_cs_01_2;
4095
const double basisvalue19 = 1.5*psitilde_a_0*scalings_y_0*psitilde_bs_0_0*scalings_z_0*psitilde_cs_00_3;
4097
// Table(s) of coefficients
4098
static const double coefficients0[20][20] = \
4099
{{0.0288675134594814, 0.0130410132739325, 0.00752923252421041, 0.00532397137499948, 0.018298126367785, 0.014173667737846, 0.00818317088384972, 0.0115727512471569, 0.00668153104781059, 0.00472455591261533, -0.028347335475692, -0.0239578711874978, -0.0185576872239523, -0.0107142857142857, -0.0207481250689683, -0.0160714285714286, -0.00927884361197612, -0.0131222664791956, -0.00757614408414158, -0.00535714285714285},
4100
{0.0288675134594813, -0.0130410132739325, 0.00752923252421044, 0.0053239713749995, 0.018298126367785, -0.014173667737846, 0.00818317088384972, -0.0115727512471569, 0.0066815310478106, 0.00472455591261534, 0.028347335475692, -0.0239578711874977, 0.0185576872239523, -0.0107142857142857, -0.0207481250689683, 0.0160714285714286, -0.00927884361197613, 0.0131222664791956, -0.00757614408414158, -0.00535714285714286},
4101
{0.0288675134594813, 0, -0.0150584650484208, 0.0053239713749995, 0, 0, 0.0245495126515492, 0, -0.0133630620956212, 0.00472455591261535, 0, 0, 0, 0.0428571428571429, 0, 0, -0.0278365308359284, 0, 0.0151522881682832, -0.00535714285714286},
4102
{0.0288675134594813, 0, 0, -0.0159719141249985, 0, 0, 0, 0, 0, 0.0283473354756921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0535714285714286},
4103
{0, 0, 0.112938487863156, -0.063887656499994, 0, 0, 0.0736485379546474, 0, 0.0267261241912424, -0.0236227795630767, 0, 0, 0, 0, 0, 0, 0.0649519052838329, 0, -0.0606091526731326, 0.0267857142857143},
4104
{0, 0, -0.0225876975726313, 0.127775312999988, 0, 0, 0, 0, 0.0668153104781061, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0, 0.0757614408414158, -0.0535714285714286},
4105
{0, 0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, -0.0425210032135381, 0.0245495126515492, 0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, -0.0375, 0.021650635094611, -0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
4106
{0, -0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, 0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, 0.065611332395978, -0.0378807204207079, -0.0535714285714286},
4107
{0, 0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, 0.014173667737846, -0.0245495126515492, -0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, -0.0618589574131742, 0.0428571428571429, -0.0069160416896561, -0.0160714285714286, 0.0154647393532935, 0.00874817765279705, 0, -0.00535714285714285},
4108
{0, -0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, 0.0566946709513841, 0.0245495126515492, -0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, 0.0618589574131742, -0.0642857142857143, 0, -0.0214285714285714, 0.00927884361197614, 0.00437408882639853, 0.00757614408414158, -0.00535714285714286},
4109
{0, -0.0978075995544939, -0.0564692439315782, -0.063887656499994, 0.054894379103355, 0.0425210032135381, 0.0245495126515491, -0.0231455024943138, -0.0133630620956212, -0.0236227795630767, 0, 0, 0, 0, 0.0484122918275927, 0.0375, 0.021650635094611, 0.0524890659167824, 0.0303045763365663, 0.0267857142857143},
4110
{0, 0.0195615199108988, 0.0112938487863156, 0.127775312999988, 0, 0, 0, -0.0578637562357845, -0.0334076552390531, 0.0472455591261534, 0, 0, 0, 0, 0, 0, 0, -0.065611332395978, -0.0378807204207079, -0.0535714285714286},
4111
{0, -0.0978075995544939, -0.0790569415042095, -0.031943828249997, 0.054894379103355, -0.014173667737846, -0.0245495126515491, 0.0462910049886276, 0.0133630620956212, 0.0236227795630767, 0, 0.0479157423749955, 0.0618589574131742, 0.0428571428571429, -0.0069160416896561, 0.0160714285714286, 0.0154647393532936, -0.00874817765279707, 0, -0.00535714285714285},
4112
{0, 0.0195615199108988, 0.124232336649472, -0.031943828249997, 0, -0.0566946709513841, 0.0245495126515492, 0.0115727512471569, -0.0467707173346743, 0.0236227795630767, 0, 0, -0.0618589574131742, -0.0642857142857143, 0, 0.0214285714285714, 0.00927884361197613, -0.00437408882639853, 0.00757614408414158, -0.00535714285714285},
4113
{0, -0.117369119465393, -0.0451753951452625, -0.031943828249997, -0.018298126367785, 0.0425210032135381, 0.0409158544192486, 0.0347182537414707, 0.0334076552390531, 0.0236227795630767, 0.0850420064270761, 0.0239578711874977, -0.00618589574131741, -0.0107142857142857, 0.0207481250689683, -0.00535714285714286, -0.00927884361197613, -0.00437408882639852, -0.00757614408414158, -0.00535714285714286},
4114
{0, 0.117369119465393, -0.0451753951452626, -0.031943828249997, -0.018298126367785, -0.0425210032135381, 0.0409158544192486, -0.0347182537414707, 0.033407655239053, 0.0236227795630767, -0.0850420064270761, 0.0239578711874978, 0.00618589574131741, -0.0107142857142857, 0.0207481250689683, 0.00535714285714285, -0.00927884361197613, 0.00437408882639853, -0.00757614408414158, -0.00535714285714285},
4115
{0.259807621135332, 0.117369119465393, 0.0677630927178939, 0.0479157423749955, 0, 0.0850420064270761, -0.0736485379546474, 0.0694365074829413, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, 0.075, -0.0649519052838329, -0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
4116
{0.259807621135332, -0.117369119465393, 0.0677630927178938, 0.0479157423749955, 0, -0.0850420064270761, -0.0736485379546474, -0.0694365074829414, 0.0400891862868637, -0.0992156741649221, 0, 0, 0, 0, 0, -0.075, -0.0649519052838329, 0.0262445329583912, -0.0151522881682832, 0.0267857142857143},
4117
{0.259807621135332, 0, -0.135526185435788, 0.0479157423749955, -0.10978875820671, 0, 0.0245495126515491, 0, -0.0801783725737273, -0.0992156741649221, 0, 0, 0, 0, -0.0968245836551854, 0, 0.021650635094611, 0, 0.0303045763365663, 0.0267857142857143},
4118
{0.259807621135332, 0, 0, -0.143747227124986, -0.10978875820671, 0, -0.122747563257746, 0, 0, 0.0425210032135381, 0, -0.095831484749991, 0, 0.0428571428571429, 0.0138320833793122, 0, 0.0154647393532936, 0, 0, -0.00535714285714285}};
4120
// Interesting (new) part
4121
// Tables of derivatives of the polynomial base (transpose)
4122
static const double dmats0[20][20] = \
4123
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4124
{6.32455532033676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4125
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4126
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4127
{0, 11.2249721603218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4128
{4.58257569495584, 0, 8.36660026534076, -1.18321595661992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4129
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4130
{3.74165738677394, 0, 0, 8.69482604771367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4131
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4132
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4133
{5.49909083394701, 0, -3.3466401061363, -2.36643191323985, 15.4919333848297, 0, 0.69282032302755, 0, 0.565685424949241, 0.400000000000001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4134
{0, 4.89897948556636, 0, 0, 0, 14.1985914794391, 0, -0.82807867121083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4135
{3.6, 0, 8.76356092008267, -1.54919333848297, 0, 0, 9.52470471983253, 0, -1.48131215963609, 0.261861468283192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4136
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4137
{0, 4.24264068711928, 0, 0, 0, 0, 0, 14.3427433120127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4138
{3.11769145362398, 0, 3.16227766016838, 4.91934955049954, 0, 0, 0, 0, 10.690449676497, -2.41897262725906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4139
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4140
{2.54558441227157, 0, 0, 7.66811580507233, 0, 0, 0, 0, 0, 10.3691851174526, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4141
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4142
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
4144
static const double dmats1[20][20] = \
4145
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4146
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4147
{5.47722557505166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4148
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4149
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4150
{2.29128784747792, 7.24568837309472, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4151
{-2.64575131106459, 0, 9.66091783079296, 0.683130051063971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4152
{1.87082869338697, 0, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4153
{3.24037034920393, 0, 0, 7.52994023880668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4154
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4155
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4156
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 9.16515138991168, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4157
{1.8, -5.69209978830308, 4.38178046004133, -0.774596669241485, 0, 10.998181667894, 4.76235235991626, 0.962140470884725, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4158
{5.19615242270664, 0, -3.16227766016838, -2.23606797749979, 0, 0, 13.7477270848675, 0, 0.534522483824851, 0.377964473009229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4159
{2.01246117974981, 2.12132034355964, -0.408248290463861, 3.17542648054294, 0, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4160
{1.55884572681199, 2.73861278752583, 1.58113883008419, 2.45967477524977, 0, 0, 0, 9.25820099772552, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4161
{-1.8, 0, 3.65148371670111, -2.84018778721878, 0, 0, 0, 0, 12.3442679969674, 1.39659449751035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4162
{1.27279220613579, 0, 0, 3.83405790253617, 0, 0, 0, 0, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4163
{2.20454076850486, 0, 0, 6.6407830863536, 0, 0, 0, 0, 0, 8.97997772825746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4164
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
4166
static const double dmats2[20][20] = \
4167
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4168
{3.16227766016838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4169
{1.82574185835055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4170
{5.16397779494322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4171
{2.95803989154981, 5.61248608016091, -1.08012344973464, -0.763762615825973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4172
{2.29128784747792, 1.44913767461894, 4.18330013267038, -0.591607978309961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4173
{1.32287565553229, 0, 3.86436713231719, -0.341565025531988, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4174
{1.87082869338697, 7.09929573971954, 0, 4.34741302385683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4175
{1.08012344973464, 0, 7.09929573971954, 2.50998007960222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4176
{-3.81881307912986, 0, 0, 8.87411967464942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4177
{2.74954541697351, 5.79655069847577, -1.67332005306815, -1.18321595661992, 7.74596669241483, -1.2, 0.346410161513776, -0.97979589711327, 0.282842712474621, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4178
{2.32379000772445, 2.44948974278318, 2.82842712474619, -1, 1.30930734141595, 7.09929573971954, -2.04939015319192, -0.414039335605415, -0.478091443733757, 0.169030850945704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4179
{1.8, 0.632455532033674, 4.38178046004133, -0.774596669241485, 0, 3.14233761939829, 4.76235235991626, -0.10690449676497, -0.740656079818042, 0.130930734141596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4180
{1.03923048454133, 0, 3.16227766016838, -0.44721359549996, 0, 0, 5.8918830363718, 0, -0.53452248382485, 0.0755928946018458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4181
{2.01246117974981, 2.12132034355964, -0.408248290463862, 3.17542648054295, 9.07114735222145, 0, 0, 7.17137165600636, -1.38013111868471, -1.56144011671765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4182
{1.55884572681199, 0.547722557505165, 1.58113883008419, 2.45967477524977, 0, 9.07114735222145, 0, 1.8516401995451, 5.34522483824849, -1.20948631362953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4183
{0.900000000000001, 0, 1.46059348668044, 1.42009389360939, 0, 0, 9.07114735222145, 0, 4.93770719878694, -0.698297248755176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4184
{1.27279220613578, -6.26099033699941, 0, 3.83405790253617, 0, 0, 0, 10.5830052442584, 0, 5.18459255872629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4185
{0.734846922834953, 0, -6.26099033699942, 2.21359436211787, 0, 0, 0, 0, 10.5830052442584, 2.99332590941915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
4186
{5.71576766497729, 0, 0, -4.69574275274956, 0, 0, 0, 0, 0, 12.69960629311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
4188
// Compute reference derivatives
4189
// Declare pointer to array of derivatives on FIAT element
4190
double *derivatives = new double [num_derivatives];
4192
// Declare coefficients
4193
double coeff0_0 = 0;
4194
double coeff0_1 = 0;
4195
double coeff0_2 = 0;
4196
double coeff0_3 = 0;
4197
double coeff0_4 = 0;
4198
double coeff0_5 = 0;
4199
double coeff0_6 = 0;
4200
double coeff0_7 = 0;
4201
double coeff0_8 = 0;
4202
double coeff0_9 = 0;
4203
double coeff0_10 = 0;
4204
double coeff0_11 = 0;
4205
double coeff0_12 = 0;
4206
double coeff0_13 = 0;
4207
double coeff0_14 = 0;
4208
double coeff0_15 = 0;
4209
double coeff0_16 = 0;
4210
double coeff0_17 = 0;
4211
double coeff0_18 = 0;
4212
double coeff0_19 = 0;
4214
// Declare new coefficients
4215
double new_coeff0_0 = 0;
4216
double new_coeff0_1 = 0;
4217
double new_coeff0_2 = 0;
4218
double new_coeff0_3 = 0;
4219
double new_coeff0_4 = 0;
4220
double new_coeff0_5 = 0;
4221
double new_coeff0_6 = 0;
4222
double new_coeff0_7 = 0;
4223
double new_coeff0_8 = 0;
4224
double new_coeff0_9 = 0;
4225
double new_coeff0_10 = 0;
4226
double new_coeff0_11 = 0;
4227
double new_coeff0_12 = 0;
4228
double new_coeff0_13 = 0;
4229
double new_coeff0_14 = 0;
4230
double new_coeff0_15 = 0;
4231
double new_coeff0_16 = 0;
4232
double new_coeff0_17 = 0;
4233
double new_coeff0_18 = 0;
4234
double new_coeff0_19 = 0;
4236
// Loop possible derivatives
4237
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
4239
// Get values from coefficients array
4240
new_coeff0_0 = coefficients0[dof][0];
4241
new_coeff0_1 = coefficients0[dof][1];
4242
new_coeff0_2 = coefficients0[dof][2];
4243
new_coeff0_3 = coefficients0[dof][3];
4244
new_coeff0_4 = coefficients0[dof][4];
4245
new_coeff0_5 = coefficients0[dof][5];
4246
new_coeff0_6 = coefficients0[dof][6];
4247
new_coeff0_7 = coefficients0[dof][7];
4248
new_coeff0_8 = coefficients0[dof][8];
4249
new_coeff0_9 = coefficients0[dof][9];
4250
new_coeff0_10 = coefficients0[dof][10];
4251
new_coeff0_11 = coefficients0[dof][11];
4252
new_coeff0_12 = coefficients0[dof][12];
4253
new_coeff0_13 = coefficients0[dof][13];
4254
new_coeff0_14 = coefficients0[dof][14];
4255
new_coeff0_15 = coefficients0[dof][15];
4256
new_coeff0_16 = coefficients0[dof][16];
4257
new_coeff0_17 = coefficients0[dof][17];
4258
new_coeff0_18 = coefficients0[dof][18];
4259
new_coeff0_19 = coefficients0[dof][19];
4261
// Loop derivative order
4262
for (unsigned int j = 0; j < n; j++)
4264
// Update old coefficients
4265
coeff0_0 = new_coeff0_0;
4266
coeff0_1 = new_coeff0_1;
4267
coeff0_2 = new_coeff0_2;
4268
coeff0_3 = new_coeff0_3;
4269
coeff0_4 = new_coeff0_4;
4270
coeff0_5 = new_coeff0_5;
4271
coeff0_6 = new_coeff0_6;
4272
coeff0_7 = new_coeff0_7;
4273
coeff0_8 = new_coeff0_8;
4274
coeff0_9 = new_coeff0_9;
4275
coeff0_10 = new_coeff0_10;
4276
coeff0_11 = new_coeff0_11;
4277
coeff0_12 = new_coeff0_12;
4278
coeff0_13 = new_coeff0_13;
4279
coeff0_14 = new_coeff0_14;
4280
coeff0_15 = new_coeff0_15;
4281
coeff0_16 = new_coeff0_16;
4282
coeff0_17 = new_coeff0_17;
4283
coeff0_18 = new_coeff0_18;
4284
coeff0_19 = new_coeff0_19;
4286
if(combinations[deriv_num][j] == 0)
4288
new_coeff0_0 = coeff0_0*dmats0[0][0] + coeff0_1*dmats0[1][0] + coeff0_2*dmats0[2][0] + coeff0_3*dmats0[3][0] + coeff0_4*dmats0[4][0] + coeff0_5*dmats0[5][0] + coeff0_6*dmats0[6][0] + coeff0_7*dmats0[7][0] + coeff0_8*dmats0[8][0] + coeff0_9*dmats0[9][0] + coeff0_10*dmats0[10][0] + coeff0_11*dmats0[11][0] + coeff0_12*dmats0[12][0] + coeff0_13*dmats0[13][0] + coeff0_14*dmats0[14][0] + coeff0_15*dmats0[15][0] + coeff0_16*dmats0[16][0] + coeff0_17*dmats0[17][0] + coeff0_18*dmats0[18][0] + coeff0_19*dmats0[19][0];
4289
new_coeff0_1 = coeff0_0*dmats0[0][1] + coeff0_1*dmats0[1][1] + coeff0_2*dmats0[2][1] + coeff0_3*dmats0[3][1] + coeff0_4*dmats0[4][1] + coeff0_5*dmats0[5][1] + coeff0_6*dmats0[6][1] + coeff0_7*dmats0[7][1] + coeff0_8*dmats0[8][1] + coeff0_9*dmats0[9][1] + coeff0_10*dmats0[10][1] + coeff0_11*dmats0[11][1] + coeff0_12*dmats0[12][1] + coeff0_13*dmats0[13][1] + coeff0_14*dmats0[14][1] + coeff0_15*dmats0[15][1] + coeff0_16*dmats0[16][1] + coeff0_17*dmats0[17][1] + coeff0_18*dmats0[18][1] + coeff0_19*dmats0[19][1];
4290
new_coeff0_2 = coeff0_0*dmats0[0][2] + coeff0_1*dmats0[1][2] + coeff0_2*dmats0[2][2] + coeff0_3*dmats0[3][2] + coeff0_4*dmats0[4][2] + coeff0_5*dmats0[5][2] + coeff0_6*dmats0[6][2] + coeff0_7*dmats0[7][2] + coeff0_8*dmats0[8][2] + coeff0_9*dmats0[9][2] + coeff0_10*dmats0[10][2] + coeff0_11*dmats0[11][2] + coeff0_12*dmats0[12][2] + coeff0_13*dmats0[13][2] + coeff0_14*dmats0[14][2] + coeff0_15*dmats0[15][2] + coeff0_16*dmats0[16][2] + coeff0_17*dmats0[17][2] + coeff0_18*dmats0[18][2] + coeff0_19*dmats0[19][2];
4291
new_coeff0_3 = coeff0_0*dmats0[0][3] + coeff0_1*dmats0[1][3] + coeff0_2*dmats0[2][3] + coeff0_3*dmats0[3][3] + coeff0_4*dmats0[4][3] + coeff0_5*dmats0[5][3] + coeff0_6*dmats0[6][3] + coeff0_7*dmats0[7][3] + coeff0_8*dmats0[8][3] + coeff0_9*dmats0[9][3] + coeff0_10*dmats0[10][3] + coeff0_11*dmats0[11][3] + coeff0_12*dmats0[12][3] + coeff0_13*dmats0[13][3] + coeff0_14*dmats0[14][3] + coeff0_15*dmats0[15][3] + coeff0_16*dmats0[16][3] + coeff0_17*dmats0[17][3] + coeff0_18*dmats0[18][3] + coeff0_19*dmats0[19][3];
4292
new_coeff0_4 = coeff0_0*dmats0[0][4] + coeff0_1*dmats0[1][4] + coeff0_2*dmats0[2][4] + coeff0_3*dmats0[3][4] + coeff0_4*dmats0[4][4] + coeff0_5*dmats0[5][4] + coeff0_6*dmats0[6][4] + coeff0_7*dmats0[7][4] + coeff0_8*dmats0[8][4] + coeff0_9*dmats0[9][4] + coeff0_10*dmats0[10][4] + coeff0_11*dmats0[11][4] + coeff0_12*dmats0[12][4] + coeff0_13*dmats0[13][4] + coeff0_14*dmats0[14][4] + coeff0_15*dmats0[15][4] + coeff0_16*dmats0[16][4] + coeff0_17*dmats0[17][4] + coeff0_18*dmats0[18][4] + coeff0_19*dmats0[19][4];
4293
new_coeff0_5 = coeff0_0*dmats0[0][5] + coeff0_1*dmats0[1][5] + coeff0_2*dmats0[2][5] + coeff0_3*dmats0[3][5] + coeff0_4*dmats0[4][5] + coeff0_5*dmats0[5][5] + coeff0_6*dmats0[6][5] + coeff0_7*dmats0[7][5] + coeff0_8*dmats0[8][5] + coeff0_9*dmats0[9][5] + coeff0_10*dmats0[10][5] + coeff0_11*dmats0[11][5] + coeff0_12*dmats0[12][5] + coeff0_13*dmats0[13][5] + coeff0_14*dmats0[14][5] + coeff0_15*dmats0[15][5] + coeff0_16*dmats0[16][5] + coeff0_17*dmats0[17][5] + coeff0_18*dmats0[18][5] + coeff0_19*dmats0[19][5];
4294
new_coeff0_6 = coeff0_0*dmats0[0][6] + coeff0_1*dmats0[1][6] + coeff0_2*dmats0[2][6] + coeff0_3*dmats0[3][6] + coeff0_4*dmats0[4][6] + coeff0_5*dmats0[5][6] + coeff0_6*dmats0[6][6] + coeff0_7*dmats0[7][6] + coeff0_8*dmats0[8][6] + coeff0_9*dmats0[9][6] + coeff0_10*dmats0[10][6] + coeff0_11*dmats0[11][6] + coeff0_12*dmats0[12][6] + coeff0_13*dmats0[13][6] + coeff0_14*dmats0[14][6] + coeff0_15*dmats0[15][6] + coeff0_16*dmats0[16][6] + coeff0_17*dmats0[17][6] + coeff0_18*dmats0[18][6] + coeff0_19*dmats0[19][6];
4295
new_coeff0_7 = coeff0_0*dmats0[0][7] + coeff0_1*dmats0[1][7] + coeff0_2*dmats0[2][7] + coeff0_3*dmats0[3][7] + coeff0_4*dmats0[4][7] + coeff0_5*dmats0[5][7] + coeff0_6*dmats0[6][7] + coeff0_7*dmats0[7][7] + coeff0_8*dmats0[8][7] + coeff0_9*dmats0[9][7] + coeff0_10*dmats0[10][7] + coeff0_11*dmats0[11][7] + coeff0_12*dmats0[12][7] + coeff0_13*dmats0[13][7] + coeff0_14*dmats0[14][7] + coeff0_15*dmats0[15][7] + coeff0_16*dmats0[16][7] + coeff0_17*dmats0[17][7] + coeff0_18*dmats0[18][7] + coeff0_19*dmats0[19][7];
4296
new_coeff0_8 = coeff0_0*dmats0[0][8] + coeff0_1*dmats0[1][8] + coeff0_2*dmats0[2][8] + coeff0_3*dmats0[3][8] + coeff0_4*dmats0[4][8] + coeff0_5*dmats0[5][8] + coeff0_6*dmats0[6][8] + coeff0_7*dmats0[7][8] + coeff0_8*dmats0[8][8] + coeff0_9*dmats0[9][8] + coeff0_10*dmats0[10][8] + coeff0_11*dmats0[11][8] + coeff0_12*dmats0[12][8] + coeff0_13*dmats0[13][8] + coeff0_14*dmats0[14][8] + coeff0_15*dmats0[15][8] + coeff0_16*dmats0[16][8] + coeff0_17*dmats0[17][8] + coeff0_18*dmats0[18][8] + coeff0_19*dmats0[19][8];
4297
new_coeff0_9 = coeff0_0*dmats0[0][9] + coeff0_1*dmats0[1][9] + coeff0_2*dmats0[2][9] + coeff0_3*dmats0[3][9] + coeff0_4*dmats0[4][9] + coeff0_5*dmats0[5][9] + coeff0_6*dmats0[6][9] + coeff0_7*dmats0[7][9] + coeff0_8*dmats0[8][9] + coeff0_9*dmats0[9][9] + coeff0_10*dmats0[10][9] + coeff0_11*dmats0[11][9] + coeff0_12*dmats0[12][9] + coeff0_13*dmats0[13][9] + coeff0_14*dmats0[14][9] + coeff0_15*dmats0[15][9] + coeff0_16*dmats0[16][9] + coeff0_17*dmats0[17][9] + coeff0_18*dmats0[18][9] + coeff0_19*dmats0[19][9];
4298
new_coeff0_10 = coeff0_0*dmats0[0][10] + coeff0_1*dmats0[1][10] + coeff0_2*dmats0[2][10] + coeff0_3*dmats0[3][10] + coeff0_4*dmats0[4][10] + coeff0_5*dmats0[5][10] + coeff0_6*dmats0[6][10] + coeff0_7*dmats0[7][10] + coeff0_8*dmats0[8][10] + coeff0_9*dmats0[9][10] + coeff0_10*dmats0[10][10] + coeff0_11*dmats0[11][10] + coeff0_12*dmats0[12][10] + coeff0_13*dmats0[13][10] + coeff0_14*dmats0[14][10] + coeff0_15*dmats0[15][10] + coeff0_16*dmats0[16][10] + coeff0_17*dmats0[17][10] + coeff0_18*dmats0[18][10] + coeff0_19*dmats0[19][10];
4299
new_coeff0_11 = coeff0_0*dmats0[0][11] + coeff0_1*dmats0[1][11] + coeff0_2*dmats0[2][11] + coeff0_3*dmats0[3][11] + coeff0_4*dmats0[4][11] + coeff0_5*dmats0[5][11] + coeff0_6*dmats0[6][11] + coeff0_7*dmats0[7][11] + coeff0_8*dmats0[8][11] + coeff0_9*dmats0[9][11] + coeff0_10*dmats0[10][11] + coeff0_11*dmats0[11][11] + coeff0_12*dmats0[12][11] + coeff0_13*dmats0[13][11] + coeff0_14*dmats0[14][11] + coeff0_15*dmats0[15][11] + coeff0_16*dmats0[16][11] + coeff0_17*dmats0[17][11] + coeff0_18*dmats0[18][11] + coeff0_19*dmats0[19][11];
4300
new_coeff0_12 = coeff0_0*dmats0[0][12] + coeff0_1*dmats0[1][12] + coeff0_2*dmats0[2][12] + coeff0_3*dmats0[3][12] + coeff0_4*dmats0[4][12] + coeff0_5*dmats0[5][12] + coeff0_6*dmats0[6][12] + coeff0_7*dmats0[7][12] + coeff0_8*dmats0[8][12] + coeff0_9*dmats0[9][12] + coeff0_10*dmats0[10][12] + coeff0_11*dmats0[11][12] + coeff0_12*dmats0[12][12] + coeff0_13*dmats0[13][12] + coeff0_14*dmats0[14][12] + coeff0_15*dmats0[15][12] + coeff0_16*dmats0[16][12] + coeff0_17*dmats0[17][12] + coeff0_18*dmats0[18][12] + coeff0_19*dmats0[19][12];
4301
new_coeff0_13 = coeff0_0*dmats0[0][13] + coeff0_1*dmats0[1][13] + coeff0_2*dmats0[2][13] + coeff0_3*dmats0[3][13] + coeff0_4*dmats0[4][13] + coeff0_5*dmats0[5][13] + coeff0_6*dmats0[6][13] + coeff0_7*dmats0[7][13] + coeff0_8*dmats0[8][13] + coeff0_9*dmats0[9][13] + coeff0_10*dmats0[10][13] + coeff0_11*dmats0[11][13] + coeff0_12*dmats0[12][13] + coeff0_13*dmats0[13][13] + coeff0_14*dmats0[14][13] + coeff0_15*dmats0[15][13] + coeff0_16*dmats0[16][13] + coeff0_17*dmats0[17][13] + coeff0_18*dmats0[18][13] + coeff0_19*dmats0[19][13];
4302
new_coeff0_14 = coeff0_0*dmats0[0][14] + coeff0_1*dmats0[1][14] + coeff0_2*dmats0[2][14] + coeff0_3*dmats0[3][14] + coeff0_4*dmats0[4][14] + coeff0_5*dmats0[5][14] + coeff0_6*dmats0[6][14] + coeff0_7*dmats0[7][14] + coeff0_8*dmats0[8][14] + coeff0_9*dmats0[9][14] + coeff0_10*dmats0[10][14] + coeff0_11*dmats0[11][14] + coeff0_12*dmats0[12][14] + coeff0_13*dmats0[13][14] + coeff0_14*dmats0[14][14] + coeff0_15*dmats0[15][14] + coeff0_16*dmats0[16][14] + coeff0_17*dmats0[17][14] + coeff0_18*dmats0[18][14] + coeff0_19*dmats0[19][14];
4303
new_coeff0_15 = coeff0_0*dmats0[0][15] + coeff0_1*dmats0[1][15] + coeff0_2*dmats0[2][15] + coeff0_3*dmats0[3][15] + coeff0_4*dmats0[4][15] + coeff0_5*dmats0[5][15] + coeff0_6*dmats0[6][15] + coeff0_7*dmats0[7][15] + coeff0_8*dmats0[8][15] + coeff0_9*dmats0[9][15] + coeff0_10*dmats0[10][15] + coeff0_11*dmats0[11][15] + coeff0_12*dmats0[12][15] + coeff0_13*dmats0[13][15] + coeff0_14*dmats0[14][15] + coeff0_15*dmats0[15][15] + coeff0_16*dmats0[16][15] + coeff0_17*dmats0[17][15] + coeff0_18*dmats0[18][15] + coeff0_19*dmats0[19][15];
4304
new_coeff0_16 = coeff0_0*dmats0[0][16] + coeff0_1*dmats0[1][16] + coeff0_2*dmats0[2][16] + coeff0_3*dmats0[3][16] + coeff0_4*dmats0[4][16] + coeff0_5*dmats0[5][16] + coeff0_6*dmats0[6][16] + coeff0_7*dmats0[7][16] + coeff0_8*dmats0[8][16] + coeff0_9*dmats0[9][16] + coeff0_10*dmats0[10][16] + coeff0_11*dmats0[11][16] + coeff0_12*dmats0[12][16] + coeff0_13*dmats0[13][16] + coeff0_14*dmats0[14][16] + coeff0_15*dmats0[15][16] + coeff0_16*dmats0[16][16] + coeff0_17*dmats0[17][16] + coeff0_18*dmats0[18][16] + coeff0_19*dmats0[19][16];
4305
new_coeff0_17 = coeff0_0*dmats0[0][17] + coeff0_1*dmats0[1][17] + coeff0_2*dmats0[2][17] + coeff0_3*dmats0[3][17] + coeff0_4*dmats0[4][17] + coeff0_5*dmats0[5][17] + coeff0_6*dmats0[6][17] + coeff0_7*dmats0[7][17] + coeff0_8*dmats0[8][17] + coeff0_9*dmats0[9][17] + coeff0_10*dmats0[10][17] + coeff0_11*dmats0[11][17] + coeff0_12*dmats0[12][17] + coeff0_13*dmats0[13][17] + coeff0_14*dmats0[14][17] + coeff0_15*dmats0[15][17] + coeff0_16*dmats0[16][17] + coeff0_17*dmats0[17][17] + coeff0_18*dmats0[18][17] + coeff0_19*dmats0[19][17];
4306
new_coeff0_18 = coeff0_0*dmats0[0][18] + coeff0_1*dmats0[1][18] + coeff0_2*dmats0[2][18] + coeff0_3*dmats0[3][18] + coeff0_4*dmats0[4][18] + coeff0_5*dmats0[5][18] + coeff0_6*dmats0[6][18] + coeff0_7*dmats0[7][18] + coeff0_8*dmats0[8][18] + coeff0_9*dmats0[9][18] + coeff0_10*dmats0[10][18] + coeff0_11*dmats0[11][18] + coeff0_12*dmats0[12][18] + coeff0_13*dmats0[13][18] + coeff0_14*dmats0[14][18] + coeff0_15*dmats0[15][18] + coeff0_16*dmats0[16][18] + coeff0_17*dmats0[17][18] + coeff0_18*dmats0[18][18] + coeff0_19*dmats0[19][18];
4307
new_coeff0_19 = coeff0_0*dmats0[0][19] + coeff0_1*dmats0[1][19] + coeff0_2*dmats0[2][19] + coeff0_3*dmats0[3][19] + coeff0_4*dmats0[4][19] + coeff0_5*dmats0[5][19] + coeff0_6*dmats0[6][19] + coeff0_7*dmats0[7][19] + coeff0_8*dmats0[8][19] + coeff0_9*dmats0[9][19] + coeff0_10*dmats0[10][19] + coeff0_11*dmats0[11][19] + coeff0_12*dmats0[12][19] + coeff0_13*dmats0[13][19] + coeff0_14*dmats0[14][19] + coeff0_15*dmats0[15][19] + coeff0_16*dmats0[16][19] + coeff0_17*dmats0[17][19] + coeff0_18*dmats0[18][19] + coeff0_19*dmats0[19][19];
4309
if(combinations[deriv_num][j] == 1)
4311
new_coeff0_0 = coeff0_0*dmats1[0][0] + coeff0_1*dmats1[1][0] + coeff0_2*dmats1[2][0] + coeff0_3*dmats1[3][0] + coeff0_4*dmats1[4][0] + coeff0_5*dmats1[5][0] + coeff0_6*dmats1[6][0] + coeff0_7*dmats1[7][0] + coeff0_8*dmats1[8][0] + coeff0_9*dmats1[9][0] + coeff0_10*dmats1[10][0] + coeff0_11*dmats1[11][0] + coeff0_12*dmats1[12][0] + coeff0_13*dmats1[13][0] + coeff0_14*dmats1[14][0] + coeff0_15*dmats1[15][0] + coeff0_16*dmats1[16][0] + coeff0_17*dmats1[17][0] + coeff0_18*dmats1[18][0] + coeff0_19*dmats1[19][0];
4312
new_coeff0_1 = coeff0_0*dmats1[0][1] + coeff0_1*dmats1[1][1] + coeff0_2*dmats1[2][1] + coeff0_3*dmats1[3][1] + coeff0_4*dmats1[4][1] + coeff0_5*dmats1[5][1] + coeff0_6*dmats1[6][1] + coeff0_7*dmats1[7][1] + coeff0_8*dmats1[8][1] + coeff0_9*dmats1[9][1] + coeff0_10*dmats1[10][1] + coeff0_11*dmats1[11][1] + coeff0_12*dmats1[12][1] + coeff0_13*dmats1[13][1] + coeff0_14*dmats1[14][1] + coeff0_15*dmats1[15][1] + coeff0_16*dmats1[16][1] + coeff0_17*dmats1[17][1] + coeff0_18*dmats1[18][1] + coeff0_19*dmats1[19][1];
4313
new_coeff0_2 = coeff0_0*dmats1[0][2] + coeff0_1*dmats1[1][2] + coeff0_2*dmats1[2][2] + coeff0_3*dmats1[3][2] + coeff0_4*dmats1[4][2] + coeff0_5*dmats1[5][2] + coeff0_6*dmats1[6][2] + coeff0_7*dmats1[7][2] + coeff0_8*dmats1[8][2] + coeff0_9*dmats1[9][2] + coeff0_10*dmats1[10][2] + coeff0_11*dmats1[11][2] + coeff0_12*dmats1[12][2] + coeff0_13*dmats1[13][2] + coeff0_14*dmats1[14][2] + coeff0_15*dmats1[15][2] + coeff0_16*dmats1[16][2] + coeff0_17*dmats1[17][2] + coeff0_18*dmats1[18][2] + coeff0_19*dmats1[19][2];
4314
new_coeff0_3 = coeff0_0*dmats1[0][3] + coeff0_1*dmats1[1][3] + coeff0_2*dmats1[2][3] + coeff0_3*dmats1[3][3] + coeff0_4*dmats1[4][3] + coeff0_5*dmats1[5][3] + coeff0_6*dmats1[6][3] + coeff0_7*dmats1[7][3] + coeff0_8*dmats1[8][3] + coeff0_9*dmats1[9][3] + coeff0_10*dmats1[10][3] + coeff0_11*dmats1[11][3] + coeff0_12*dmats1[12][3] + coeff0_13*dmats1[13][3] + coeff0_14*dmats1[14][3] + coeff0_15*dmats1[15][3] + coeff0_16*dmats1[16][3] + coeff0_17*dmats1[17][3] + coeff0_18*dmats1[18][3] + coeff0_19*dmats1[19][3];
4315
new_coeff0_4 = coeff0_0*dmats1[0][4] + coeff0_1*dmats1[1][4] + coeff0_2*dmats1[2][4] + coeff0_3*dmats1[3][4] + coeff0_4*dmats1[4][4] + coeff0_5*dmats1[5][4] + coeff0_6*dmats1[6][4] + coeff0_7*dmats1[7][4] + coeff0_8*dmats1[8][4] + coeff0_9*dmats1[9][4] + coeff0_10*dmats1[10][4] + coeff0_11*dmats1[11][4] + coeff0_12*dmats1[12][4] + coeff0_13*dmats1[13][4] + coeff0_14*dmats1[14][4] + coeff0_15*dmats1[15][4] + coeff0_16*dmats1[16][4] + coeff0_17*dmats1[17][4] + coeff0_18*dmats1[18][4] + coeff0_19*dmats1[19][4];
4316
new_coeff0_5 = coeff0_0*dmats1[0][5] + coeff0_1*dmats1[1][5] + coeff0_2*dmats1[2][5] + coeff0_3*dmats1[3][5] + coeff0_4*dmats1[4][5] + coeff0_5*dmats1[5][5] + coeff0_6*dmats1[6][5] + coeff0_7*dmats1[7][5] + coeff0_8*dmats1[8][5] + coeff0_9*dmats1[9][5] + coeff0_10*dmats1[10][5] + coeff0_11*dmats1[11][5] + coeff0_12*dmats1[12][5] + coeff0_13*dmats1[13][5] + coeff0_14*dmats1[14][5] + coeff0_15*dmats1[15][5] + coeff0_16*dmats1[16][5] + coeff0_17*dmats1[17][5] + coeff0_18*dmats1[18][5] + coeff0_19*dmats1[19][5];
4317
new_coeff0_6 = coeff0_0*dmats1[0][6] + coeff0_1*dmats1[1][6] + coeff0_2*dmats1[2][6] + coeff0_3*dmats1[3][6] + coeff0_4*dmats1[4][6] + coeff0_5*dmats1[5][6] + coeff0_6*dmats1[6][6] + coeff0_7*dmats1[7][6] + coeff0_8*dmats1[8][6] + coeff0_9*dmats1[9][6] + coeff0_10*dmats1[10][6] + coeff0_11*dmats1[11][6] + coeff0_12*dmats1[12][6] + coeff0_13*dmats1[13][6] + coeff0_14*dmats1[14][6] + coeff0_15*dmats1[15][6] + coeff0_16*dmats1[16][6] + coeff0_17*dmats1[17][6] + coeff0_18*dmats1[18][6] + coeff0_19*dmats1[19][6];
4318
new_coeff0_7 = coeff0_0*dmats1[0][7] + coeff0_1*dmats1[1][7] + coeff0_2*dmats1[2][7] + coeff0_3*dmats1[3][7] + coeff0_4*dmats1[4][7] + coeff0_5*dmats1[5][7] + coeff0_6*dmats1[6][7] + coeff0_7*dmats1[7][7] + coeff0_8*dmats1[8][7] + coeff0_9*dmats1[9][7] + coeff0_10*dmats1[10][7] + coeff0_11*dmats1[11][7] + coeff0_12*dmats1[12][7] + coeff0_13*dmats1[13][7] + coeff0_14*dmats1[14][7] + coeff0_15*dmats1[15][7] + coeff0_16*dmats1[16][7] + coeff0_17*dmats1[17][7] + coeff0_18*dmats1[18][7] + coeff0_19*dmats1[19][7];
4319
new_coeff0_8 = coeff0_0*dmats1[0][8] + coeff0_1*dmats1[1][8] + coeff0_2*dmats1[2][8] + coeff0_3*dmats1[3][8] + coeff0_4*dmats1[4][8] + coeff0_5*dmats1[5][8] + coeff0_6*dmats1[6][8] + coeff0_7*dmats1[7][8] + coeff0_8*dmats1[8][8] + coeff0_9*dmats1[9][8] + coeff0_10*dmats1[10][8] + coeff0_11*dmats1[11][8] + coeff0_12*dmats1[12][8] + coeff0_13*dmats1[13][8] + coeff0_14*dmats1[14][8] + coeff0_15*dmats1[15][8] + coeff0_16*dmats1[16][8] + coeff0_17*dmats1[17][8] + coeff0_18*dmats1[18][8] + coeff0_19*dmats1[19][8];
4320
new_coeff0_9 = coeff0_0*dmats1[0][9] + coeff0_1*dmats1[1][9] + coeff0_2*dmats1[2][9] + coeff0_3*dmats1[3][9] + coeff0_4*dmats1[4][9] + coeff0_5*dmats1[5][9] + coeff0_6*dmats1[6][9] + coeff0_7*dmats1[7][9] + coeff0_8*dmats1[8][9] + coeff0_9*dmats1[9][9] + coeff0_10*dmats1[10][9] + coeff0_11*dmats1[11][9] + coeff0_12*dmats1[12][9] + coeff0_13*dmats1[13][9] + coeff0_14*dmats1[14][9] + coeff0_15*dmats1[15][9] + coeff0_16*dmats1[16][9] + coeff0_17*dmats1[17][9] + coeff0_18*dmats1[18][9] + coeff0_19*dmats1[19][9];
4321
new_coeff0_10 = coeff0_0*dmats1[0][10] + coeff0_1*dmats1[1][10] + coeff0_2*dmats1[2][10] + coeff0_3*dmats1[3][10] + coeff0_4*dmats1[4][10] + coeff0_5*dmats1[5][10] + coeff0_6*dmats1[6][10] + coeff0_7*dmats1[7][10] + coeff0_8*dmats1[8][10] + coeff0_9*dmats1[9][10] + coeff0_10*dmats1[10][10] + coeff0_11*dmats1[11][10] + coeff0_12*dmats1[12][10] + coeff0_13*dmats1[13][10] + coeff0_14*dmats1[14][10] + coeff0_15*dmats1[15][10] + coeff0_16*dmats1[16][10] + coeff0_17*dmats1[17][10] + coeff0_18*dmats1[18][10] + coeff0_19*dmats1[19][10];
4322
new_coeff0_11 = coeff0_0*dmats1[0][11] + coeff0_1*dmats1[1][11] + coeff0_2*dmats1[2][11] + coeff0_3*dmats1[3][11] + coeff0_4*dmats1[4][11] + coeff0_5*dmats1[5][11] + coeff0_6*dmats1[6][11] + coeff0_7*dmats1[7][11] + coeff0_8*dmats1[8][11] + coeff0_9*dmats1[9][11] + coeff0_10*dmats1[10][11] + coeff0_11*dmats1[11][11] + coeff0_12*dmats1[12][11] + coeff0_13*dmats1[13][11] + coeff0_14*dmats1[14][11] + coeff0_15*dmats1[15][11] + coeff0_16*dmats1[16][11] + coeff0_17*dmats1[17][11] + coeff0_18*dmats1[18][11] + coeff0_19*dmats1[19][11];
4323
new_coeff0_12 = coeff0_0*dmats1[0][12] + coeff0_1*dmats1[1][12] + coeff0_2*dmats1[2][12] + coeff0_3*dmats1[3][12] + coeff0_4*dmats1[4][12] + coeff0_5*dmats1[5][12] + coeff0_6*dmats1[6][12] + coeff0_7*dmats1[7][12] + coeff0_8*dmats1[8][12] + coeff0_9*dmats1[9][12] + coeff0_10*dmats1[10][12] + coeff0_11*dmats1[11][12] + coeff0_12*dmats1[12][12] + coeff0_13*dmats1[13][12] + coeff0_14*dmats1[14][12] + coeff0_15*dmats1[15][12] + coeff0_16*dmats1[16][12] + coeff0_17*dmats1[17][12] + coeff0_18*dmats1[18][12] + coeff0_19*dmats1[19][12];
4324
new_coeff0_13 = coeff0_0*dmats1[0][13] + coeff0_1*dmats1[1][13] + coeff0_2*dmats1[2][13] + coeff0_3*dmats1[3][13] + coeff0_4*dmats1[4][13] + coeff0_5*dmats1[5][13] + coeff0_6*dmats1[6][13] + coeff0_7*dmats1[7][13] + coeff0_8*dmats1[8][13] + coeff0_9*dmats1[9][13] + coeff0_10*dmats1[10][13] + coeff0_11*dmats1[11][13] + coeff0_12*dmats1[12][13] + coeff0_13*dmats1[13][13] + coeff0_14*dmats1[14][13] + coeff0_15*dmats1[15][13] + coeff0_16*dmats1[16][13] + coeff0_17*dmats1[17][13] + coeff0_18*dmats1[18][13] + coeff0_19*dmats1[19][13];
4325
new_coeff0_14 = coeff0_0*dmats1[0][14] + coeff0_1*dmats1[1][14] + coeff0_2*dmats1[2][14] + coeff0_3*dmats1[3][14] + coeff0_4*dmats1[4][14] + coeff0_5*dmats1[5][14] + coeff0_6*dmats1[6][14] + coeff0_7*dmats1[7][14] + coeff0_8*dmats1[8][14] + coeff0_9*dmats1[9][14] + coeff0_10*dmats1[10][14] + coeff0_11*dmats1[11][14] + coeff0_12*dmats1[12][14] + coeff0_13*dmats1[13][14] + coeff0_14*dmats1[14][14] + coeff0_15*dmats1[15][14] + coeff0_16*dmats1[16][14] + coeff0_17*dmats1[17][14] + coeff0_18*dmats1[18][14] + coeff0_19*dmats1[19][14];
4326
new_coeff0_15 = coeff0_0*dmats1[0][15] + coeff0_1*dmats1[1][15] + coeff0_2*dmats1[2][15] + coeff0_3*dmats1[3][15] + coeff0_4*dmats1[4][15] + coeff0_5*dmats1[5][15] + coeff0_6*dmats1[6][15] + coeff0_7*dmats1[7][15] + coeff0_8*dmats1[8][15] + coeff0_9*dmats1[9][15] + coeff0_10*dmats1[10][15] + coeff0_11*dmats1[11][15] + coeff0_12*dmats1[12][15] + coeff0_13*dmats1[13][15] + coeff0_14*dmats1[14][15] + coeff0_15*dmats1[15][15] + coeff0_16*dmats1[16][15] + coeff0_17*dmats1[17][15] + coeff0_18*dmats1[18][15] + coeff0_19*dmats1[19][15];
4327
new_coeff0_16 = coeff0_0*dmats1[0][16] + coeff0_1*dmats1[1][16] + coeff0_2*dmats1[2][16] + coeff0_3*dmats1[3][16] + coeff0_4*dmats1[4][16] + coeff0_5*dmats1[5][16] + coeff0_6*dmats1[6][16] + coeff0_7*dmats1[7][16] + coeff0_8*dmats1[8][16] + coeff0_9*dmats1[9][16] + coeff0_10*dmats1[10][16] + coeff0_11*dmats1[11][16] + coeff0_12*dmats1[12][16] + coeff0_13*dmats1[13][16] + coeff0_14*dmats1[14][16] + coeff0_15*dmats1[15][16] + coeff0_16*dmats1[16][16] + coeff0_17*dmats1[17][16] + coeff0_18*dmats1[18][16] + coeff0_19*dmats1[19][16];
4328
new_coeff0_17 = coeff0_0*dmats1[0][17] + coeff0_1*dmats1[1][17] + coeff0_2*dmats1[2][17] + coeff0_3*dmats1[3][17] + coeff0_4*dmats1[4][17] + coeff0_5*dmats1[5][17] + coeff0_6*dmats1[6][17] + coeff0_7*dmats1[7][17] + coeff0_8*dmats1[8][17] + coeff0_9*dmats1[9][17] + coeff0_10*dmats1[10][17] + coeff0_11*dmats1[11][17] + coeff0_12*dmats1[12][17] + coeff0_13*dmats1[13][17] + coeff0_14*dmats1[14][17] + coeff0_15*dmats1[15][17] + coeff0_16*dmats1[16][17] + coeff0_17*dmats1[17][17] + coeff0_18*dmats1[18][17] + coeff0_19*dmats1[19][17];
4329
new_coeff0_18 = coeff0_0*dmats1[0][18] + coeff0_1*dmats1[1][18] + coeff0_2*dmats1[2][18] + coeff0_3*dmats1[3][18] + coeff0_4*dmats1[4][18] + coeff0_5*dmats1[5][18] + coeff0_6*dmats1[6][18] + coeff0_7*dmats1[7][18] + coeff0_8*dmats1[8][18] + coeff0_9*dmats1[9][18] + coeff0_10*dmats1[10][18] + coeff0_11*dmats1[11][18] + coeff0_12*dmats1[12][18] + coeff0_13*dmats1[13][18] + coeff0_14*dmats1[14][18] + coeff0_15*dmats1[15][18] + coeff0_16*dmats1[16][18] + coeff0_17*dmats1[17][18] + coeff0_18*dmats1[18][18] + coeff0_19*dmats1[19][18];
4330
new_coeff0_19 = coeff0_0*dmats1[0][19] + coeff0_1*dmats1[1][19] + coeff0_2*dmats1[2][19] + coeff0_3*dmats1[3][19] + coeff0_4*dmats1[4][19] + coeff0_5*dmats1[5][19] + coeff0_6*dmats1[6][19] + coeff0_7*dmats1[7][19] + coeff0_8*dmats1[8][19] + coeff0_9*dmats1[9][19] + coeff0_10*dmats1[10][19] + coeff0_11*dmats1[11][19] + coeff0_12*dmats1[12][19] + coeff0_13*dmats1[13][19] + coeff0_14*dmats1[14][19] + coeff0_15*dmats1[15][19] + coeff0_16*dmats1[16][19] + coeff0_17*dmats1[17][19] + coeff0_18*dmats1[18][19] + coeff0_19*dmats1[19][19];
4332
if(combinations[deriv_num][j] == 2)
4334
new_coeff0_0 = coeff0_0*dmats2[0][0] + coeff0_1*dmats2[1][0] + coeff0_2*dmats2[2][0] + coeff0_3*dmats2[3][0] + coeff0_4*dmats2[4][0] + coeff0_5*dmats2[5][0] + coeff0_6*dmats2[6][0] + coeff0_7*dmats2[7][0] + coeff0_8*dmats2[8][0] + coeff0_9*dmats2[9][0] + coeff0_10*dmats2[10][0] + coeff0_11*dmats2[11][0] + coeff0_12*dmats2[12][0] + coeff0_13*dmats2[13][0] + coeff0_14*dmats2[14][0] + coeff0_15*dmats2[15][0] + coeff0_16*dmats2[16][0] + coeff0_17*dmats2[17][0] + coeff0_18*dmats2[18][0] + coeff0_19*dmats2[19][0];
4335
new_coeff0_1 = coeff0_0*dmats2[0][1] + coeff0_1*dmats2[1][1] + coeff0_2*dmats2[2][1] + coeff0_3*dmats2[3][1] + coeff0_4*dmats2[4][1] + coeff0_5*dmats2[5][1] + coeff0_6*dmats2[6][1] + coeff0_7*dmats2[7][1] + coeff0_8*dmats2[8][1] + coeff0_9*dmats2[9][1] + coeff0_10*dmats2[10][1] + coeff0_11*dmats2[11][1] + coeff0_12*dmats2[12][1] + coeff0_13*dmats2[13][1] + coeff0_14*dmats2[14][1] + coeff0_15*dmats2[15][1] + coeff0_16*dmats2[16][1] + coeff0_17*dmats2[17][1] + coeff0_18*dmats2[18][1] + coeff0_19*dmats2[19][1];
4336
new_coeff0_2 = coeff0_0*dmats2[0][2] + coeff0_1*dmats2[1][2] + coeff0_2*dmats2[2][2] + coeff0_3*dmats2[3][2] + coeff0_4*dmats2[4][2] + coeff0_5*dmats2[5][2] + coeff0_6*dmats2[6][2] + coeff0_7*dmats2[7][2] + coeff0_8*dmats2[8][2] + coeff0_9*dmats2[9][2] + coeff0_10*dmats2[10][2] + coeff0_11*dmats2[11][2] + coeff0_12*dmats2[12][2] + coeff0_13*dmats2[13][2] + coeff0_14*dmats2[14][2] + coeff0_15*dmats2[15][2] + coeff0_16*dmats2[16][2] + coeff0_17*dmats2[17][2] + coeff0_18*dmats2[18][2] + coeff0_19*dmats2[19][2];
4337
new_coeff0_3 = coeff0_0*dmats2[0][3] + coeff0_1*dmats2[1][3] + coeff0_2*dmats2[2][3] + coeff0_3*dmats2[3][3] + coeff0_4*dmats2[4][3] + coeff0_5*dmats2[5][3] + coeff0_6*dmats2[6][3] + coeff0_7*dmats2[7][3] + coeff0_8*dmats2[8][3] + coeff0_9*dmats2[9][3] + coeff0_10*dmats2[10][3] + coeff0_11*dmats2[11][3] + coeff0_12*dmats2[12][3] + coeff0_13*dmats2[13][3] + coeff0_14*dmats2[14][3] + coeff0_15*dmats2[15][3] + coeff0_16*dmats2[16][3] + coeff0_17*dmats2[17][3] + coeff0_18*dmats2[18][3] + coeff0_19*dmats2[19][3];
4338
new_coeff0_4 = coeff0_0*dmats2[0][4] + coeff0_1*dmats2[1][4] + coeff0_2*dmats2[2][4] + coeff0_3*dmats2[3][4] + coeff0_4*dmats2[4][4] + coeff0_5*dmats2[5][4] + coeff0_6*dmats2[6][4] + coeff0_7*dmats2[7][4] + coeff0_8*dmats2[8][4] + coeff0_9*dmats2[9][4] + coeff0_10*dmats2[10][4] + coeff0_11*dmats2[11][4] + coeff0_12*dmats2[12][4] + coeff0_13*dmats2[13][4] + coeff0_14*dmats2[14][4] + coeff0_15*dmats2[15][4] + coeff0_16*dmats2[16][4] + coeff0_17*dmats2[17][4] + coeff0_18*dmats2[18][4] + coeff0_19*dmats2[19][4];
4339
new_coeff0_5 = coeff0_0*dmats2[0][5] + coeff0_1*dmats2[1][5] + coeff0_2*dmats2[2][5] + coeff0_3*dmats2[3][5] + coeff0_4*dmats2[4][5] + coeff0_5*dmats2[5][5] + coeff0_6*dmats2[6][5] + coeff0_7*dmats2[7][5] + coeff0_8*dmats2[8][5] + coeff0_9*dmats2[9][5] + coeff0_10*dmats2[10][5] + coeff0_11*dmats2[11][5] + coeff0_12*dmats2[12][5] + coeff0_13*dmats2[13][5] + coeff0_14*dmats2[14][5] + coeff0_15*dmats2[15][5] + coeff0_16*dmats2[16][5] + coeff0_17*dmats2[17][5] + coeff0_18*dmats2[18][5] + coeff0_19*dmats2[19][5];
4340
new_coeff0_6 = coeff0_0*dmats2[0][6] + coeff0_1*dmats2[1][6] + coeff0_2*dmats2[2][6] + coeff0_3*dmats2[3][6] + coeff0_4*dmats2[4][6] + coeff0_5*dmats2[5][6] + coeff0_6*dmats2[6][6] + coeff0_7*dmats2[7][6] + coeff0_8*dmats2[8][6] + coeff0_9*dmats2[9][6] + coeff0_10*dmats2[10][6] + coeff0_11*dmats2[11][6] + coeff0_12*dmats2[12][6] + coeff0_13*dmats2[13][6] + coeff0_14*dmats2[14][6] + coeff0_15*dmats2[15][6] + coeff0_16*dmats2[16][6] + coeff0_17*dmats2[17][6] + coeff0_18*dmats2[18][6] + coeff0_19*dmats2[19][6];
4341
new_coeff0_7 = coeff0_0*dmats2[0][7] + coeff0_1*dmats2[1][7] + coeff0_2*dmats2[2][7] + coeff0_3*dmats2[3][7] + coeff0_4*dmats2[4][7] + coeff0_5*dmats2[5][7] + coeff0_6*dmats2[6][7] + coeff0_7*dmats2[7][7] + coeff0_8*dmats2[8][7] + coeff0_9*dmats2[9][7] + coeff0_10*dmats2[10][7] + coeff0_11*dmats2[11][7] + coeff0_12*dmats2[12][7] + coeff0_13*dmats2[13][7] + coeff0_14*dmats2[14][7] + coeff0_15*dmats2[15][7] + coeff0_16*dmats2[16][7] + coeff0_17*dmats2[17][7] + coeff0_18*dmats2[18][7] + coeff0_19*dmats2[19][7];
4342
new_coeff0_8 = coeff0_0*dmats2[0][8] + coeff0_1*dmats2[1][8] + coeff0_2*dmats2[2][8] + coeff0_3*dmats2[3][8] + coeff0_4*dmats2[4][8] + coeff0_5*dmats2[5][8] + coeff0_6*dmats2[6][8] + coeff0_7*dmats2[7][8] + coeff0_8*dmats2[8][8] + coeff0_9*dmats2[9][8] + coeff0_10*dmats2[10][8] + coeff0_11*dmats2[11][8] + coeff0_12*dmats2[12][8] + coeff0_13*dmats2[13][8] + coeff0_14*dmats2[14][8] + coeff0_15*dmats2[15][8] + coeff0_16*dmats2[16][8] + coeff0_17*dmats2[17][8] + coeff0_18*dmats2[18][8] + coeff0_19*dmats2[19][8];
4343
new_coeff0_9 = coeff0_0*dmats2[0][9] + coeff0_1*dmats2[1][9] + coeff0_2*dmats2[2][9] + coeff0_3*dmats2[3][9] + coeff0_4*dmats2[4][9] + coeff0_5*dmats2[5][9] + coeff0_6*dmats2[6][9] + coeff0_7*dmats2[7][9] + coeff0_8*dmats2[8][9] + coeff0_9*dmats2[9][9] + coeff0_10*dmats2[10][9] + coeff0_11*dmats2[11][9] + coeff0_12*dmats2[12][9] + coeff0_13*dmats2[13][9] + coeff0_14*dmats2[14][9] + coeff0_15*dmats2[15][9] + coeff0_16*dmats2[16][9] + coeff0_17*dmats2[17][9] + coeff0_18*dmats2[18][9] + coeff0_19*dmats2[19][9];
4344
new_coeff0_10 = coeff0_0*dmats2[0][10] + coeff0_1*dmats2[1][10] + coeff0_2*dmats2[2][10] + coeff0_3*dmats2[3][10] + coeff0_4*dmats2[4][10] + coeff0_5*dmats2[5][10] + coeff0_6*dmats2[6][10] + coeff0_7*dmats2[7][10] + coeff0_8*dmats2[8][10] + coeff0_9*dmats2[9][10] + coeff0_10*dmats2[10][10] + coeff0_11*dmats2[11][10] + coeff0_12*dmats2[12][10] + coeff0_13*dmats2[13][10] + coeff0_14*dmats2[14][10] + coeff0_15*dmats2[15][10] + coeff0_16*dmats2[16][10] + coeff0_17*dmats2[17][10] + coeff0_18*dmats2[18][10] + coeff0_19*dmats2[19][10];
4345
new_coeff0_11 = coeff0_0*dmats2[0][11] + coeff0_1*dmats2[1][11] + coeff0_2*dmats2[2][11] + coeff0_3*dmats2[3][11] + coeff0_4*dmats2[4][11] + coeff0_5*dmats2[5][11] + coeff0_6*dmats2[6][11] + coeff0_7*dmats2[7][11] + coeff0_8*dmats2[8][11] + coeff0_9*dmats2[9][11] + coeff0_10*dmats2[10][11] + coeff0_11*dmats2[11][11] + coeff0_12*dmats2[12][11] + coeff0_13*dmats2[13][11] + coeff0_14*dmats2[14][11] + coeff0_15*dmats2[15][11] + coeff0_16*dmats2[16][11] + coeff0_17*dmats2[17][11] + coeff0_18*dmats2[18][11] + coeff0_19*dmats2[19][11];
4346
new_coeff0_12 = coeff0_0*dmats2[0][12] + coeff0_1*dmats2[1][12] + coeff0_2*dmats2[2][12] + coeff0_3*dmats2[3][12] + coeff0_4*dmats2[4][12] + coeff0_5*dmats2[5][12] + coeff0_6*dmats2[6][12] + coeff0_7*dmats2[7][12] + coeff0_8*dmats2[8][12] + coeff0_9*dmats2[9][12] + coeff0_10*dmats2[10][12] + coeff0_11*dmats2[11][12] + coeff0_12*dmats2[12][12] + coeff0_13*dmats2[13][12] + coeff0_14*dmats2[14][12] + coeff0_15*dmats2[15][12] + coeff0_16*dmats2[16][12] + coeff0_17*dmats2[17][12] + coeff0_18*dmats2[18][12] + coeff0_19*dmats2[19][12];
4347
new_coeff0_13 = coeff0_0*dmats2[0][13] + coeff0_1*dmats2[1][13] + coeff0_2*dmats2[2][13] + coeff0_3*dmats2[3][13] + coeff0_4*dmats2[4][13] + coeff0_5*dmats2[5][13] + coeff0_6*dmats2[6][13] + coeff0_7*dmats2[7][13] + coeff0_8*dmats2[8][13] + coeff0_9*dmats2[9][13] + coeff0_10*dmats2[10][13] + coeff0_11*dmats2[11][13] + coeff0_12*dmats2[12][13] + coeff0_13*dmats2[13][13] + coeff0_14*dmats2[14][13] + coeff0_15*dmats2[15][13] + coeff0_16*dmats2[16][13] + coeff0_17*dmats2[17][13] + coeff0_18*dmats2[18][13] + coeff0_19*dmats2[19][13];
4348
new_coeff0_14 = coeff0_0*dmats2[0][14] + coeff0_1*dmats2[1][14] + coeff0_2*dmats2[2][14] + coeff0_3*dmats2[3][14] + coeff0_4*dmats2[4][14] + coeff0_5*dmats2[5][14] + coeff0_6*dmats2[6][14] + coeff0_7*dmats2[7][14] + coeff0_8*dmats2[8][14] + coeff0_9*dmats2[9][14] + coeff0_10*dmats2[10][14] + coeff0_11*dmats2[11][14] + coeff0_12*dmats2[12][14] + coeff0_13*dmats2[13][14] + coeff0_14*dmats2[14][14] + coeff0_15*dmats2[15][14] + coeff0_16*dmats2[16][14] + coeff0_17*dmats2[17][14] + coeff0_18*dmats2[18][14] + coeff0_19*dmats2[19][14];
4349
new_coeff0_15 = coeff0_0*dmats2[0][15] + coeff0_1*dmats2[1][15] + coeff0_2*dmats2[2][15] + coeff0_3*dmats2[3][15] + coeff0_4*dmats2[4][15] + coeff0_5*dmats2[5][15] + coeff0_6*dmats2[6][15] + coeff0_7*dmats2[7][15] + coeff0_8*dmats2[8][15] + coeff0_9*dmats2[9][15] + coeff0_10*dmats2[10][15] + coeff0_11*dmats2[11][15] + coeff0_12*dmats2[12][15] + coeff0_13*dmats2[13][15] + coeff0_14*dmats2[14][15] + coeff0_15*dmats2[15][15] + coeff0_16*dmats2[16][15] + coeff0_17*dmats2[17][15] + coeff0_18*dmats2[18][15] + coeff0_19*dmats2[19][15];
4350
new_coeff0_16 = coeff0_0*dmats2[0][16] + coeff0_1*dmats2[1][16] + coeff0_2*dmats2[2][16] + coeff0_3*dmats2[3][16] + coeff0_4*dmats2[4][16] + coeff0_5*dmats2[5][16] + coeff0_6*dmats2[6][16] + coeff0_7*dmats2[7][16] + coeff0_8*dmats2[8][16] + coeff0_9*dmats2[9][16] + coeff0_10*dmats2[10][16] + coeff0_11*dmats2[11][16] + coeff0_12*dmats2[12][16] + coeff0_13*dmats2[13][16] + coeff0_14*dmats2[14][16] + coeff0_15*dmats2[15][16] + coeff0_16*dmats2[16][16] + coeff0_17*dmats2[17][16] + coeff0_18*dmats2[18][16] + coeff0_19*dmats2[19][16];
4351
new_coeff0_17 = coeff0_0*dmats2[0][17] + coeff0_1*dmats2[1][17] + coeff0_2*dmats2[2][17] + coeff0_3*dmats2[3][17] + coeff0_4*dmats2[4][17] + coeff0_5*dmats2[5][17] + coeff0_6*dmats2[6][17] + coeff0_7*dmats2[7][17] + coeff0_8*dmats2[8][17] + coeff0_9*dmats2[9][17] + coeff0_10*dmats2[10][17] + coeff0_11*dmats2[11][17] + coeff0_12*dmats2[12][17] + coeff0_13*dmats2[13][17] + coeff0_14*dmats2[14][17] + coeff0_15*dmats2[15][17] + coeff0_16*dmats2[16][17] + coeff0_17*dmats2[17][17] + coeff0_18*dmats2[18][17] + coeff0_19*dmats2[19][17];
4352
new_coeff0_18 = coeff0_0*dmats2[0][18] + coeff0_1*dmats2[1][18] + coeff0_2*dmats2[2][18] + coeff0_3*dmats2[3][18] + coeff0_4*dmats2[4][18] + coeff0_5*dmats2[5][18] + coeff0_6*dmats2[6][18] + coeff0_7*dmats2[7][18] + coeff0_8*dmats2[8][18] + coeff0_9*dmats2[9][18] + coeff0_10*dmats2[10][18] + coeff0_11*dmats2[11][18] + coeff0_12*dmats2[12][18] + coeff0_13*dmats2[13][18] + coeff0_14*dmats2[14][18] + coeff0_15*dmats2[15][18] + coeff0_16*dmats2[16][18] + coeff0_17*dmats2[17][18] + coeff0_18*dmats2[18][18] + coeff0_19*dmats2[19][18];
4353
new_coeff0_19 = coeff0_0*dmats2[0][19] + coeff0_1*dmats2[1][19] + coeff0_2*dmats2[2][19] + coeff0_3*dmats2[3][19] + coeff0_4*dmats2[4][19] + coeff0_5*dmats2[5][19] + coeff0_6*dmats2[6][19] + coeff0_7*dmats2[7][19] + coeff0_8*dmats2[8][19] + coeff0_9*dmats2[9][19] + coeff0_10*dmats2[10][19] + coeff0_11*dmats2[11][19] + coeff0_12*dmats2[12][19] + coeff0_13*dmats2[13][19] + coeff0_14*dmats2[14][19] + coeff0_15*dmats2[15][19] + coeff0_16*dmats2[16][19] + coeff0_17*dmats2[17][19] + coeff0_18*dmats2[18][19] + coeff0_19*dmats2[19][19];
4357
// Compute derivatives on reference element as dot product of coefficients and basisvalues
4358
derivatives[deriv_num] = new_coeff0_0*basisvalue0 + new_coeff0_1*basisvalue1 + new_coeff0_2*basisvalue2 + new_coeff0_3*basisvalue3 + new_coeff0_4*basisvalue4 + new_coeff0_5*basisvalue5 + new_coeff0_6*basisvalue6 + new_coeff0_7*basisvalue7 + new_coeff0_8*basisvalue8 + new_coeff0_9*basisvalue9 + new_coeff0_10*basisvalue10 + new_coeff0_11*basisvalue11 + new_coeff0_12*basisvalue12 + new_coeff0_13*basisvalue13 + new_coeff0_14*basisvalue14 + new_coeff0_15*basisvalue15 + new_coeff0_16*basisvalue16 + new_coeff0_17*basisvalue17 + new_coeff0_18*basisvalue18 + new_coeff0_19*basisvalue19;
4361
// Transform derivatives back to physical element
4362
for (unsigned int row = 0; row < num_derivatives; row++)
4364
for (unsigned int col = 0; col < num_derivatives; col++)
4366
values[row] += transform[row][col]*derivatives[col];
4369
// Delete pointer to array of derivatives on FIAT element
4370
delete [] derivatives;
4372
// Delete pointer to array of combinations of derivatives and transform
4373
for (unsigned int row = 0; row < num_derivatives; row++)
4375
delete [] combinations[row];
4376
delete [] transform[row];
4379
delete [] combinations;
4380
delete [] transform;
4383
/// Evaluate order n derivatives of all basis functions at given point in cell
4384
virtual void evaluate_basis_derivatives_all(unsigned int n,
4386
const double* coordinates,
4387
const ufc::cell& c) const
4389
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
4392
/// Evaluate linear functional for dof i on the function f
4393
virtual double evaluate_dof(unsigned int i,
4394
const ufc::function& f,
4395
const ufc::cell& c) const
4397
// The reference points, direction and weights:
4398
static const double X[20][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.666666666666667, 0.333333333333333}}, {{0, 0.333333333333333, 0.666666666666667}}, {{0.666666666666667, 0, 0.333333333333333}}, {{0.333333333333333, 0, 0.666666666666667}}, {{0.666666666666667, 0.333333333333333, 0}}, {{0.333333333333333, 0.666666666666667, 0}}, {{0, 0, 0.333333333333333}}, {{0, 0, 0.666666666666667}}, {{0, 0.333333333333333, 0}}, {{0, 0.666666666666667, 0}}, {{0.333333333333333, 0, 0}}, {{0.666666666666667, 0, 0}}, {{0.333333333333333, 0.333333333333333, 0.333333333333333}}, {{0, 0.333333333333333, 0.333333333333333}}, {{0.333333333333333, 0, 0.333333333333333}}, {{0.333333333333333, 0.333333333333333, 0}}};
4399
static const double W[20][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
4400
static const double D[20][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
4402
const double * const * x = c.coordinates;
4403
double result = 0.0;
4404
// Iterate over the points:
4405
// Evaluate basis functions for affine mapping
4406
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
4407
const double w1 = X[i][0][0];
4408
const double w2 = X[i][0][1];
4409
const double w3 = X[i][0][2];
4411
// Compute affine mapping y = F(X)
4413
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
4414
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
4415
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
4417
// Evaluate function at physical points
4419
f.evaluate(values, y, c);
4421
// Map function values using appropriate mapping
4422
// Affine map: Do nothing
4424
// Note that we do not map the weights (yet).
4426
// Take directional components
4427
for(int k = 0; k < 1; k++)
4428
result += values[k]*D[i][0][k];
4429
// Multiply by weights
4435
/// Evaluate linear functionals for all dofs on the function f
4436
virtual void evaluate_dofs(double* values,
4437
const ufc::function& f,
4438
const ufc::cell& c) const
4440
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4443
/// Interpolate vertex values from dof values
4444
virtual void interpolate_vertex_values(double* vertex_values,
4445
const double* dof_values,
4446
const ufc::cell& c) const
4448
// Evaluate at vertices and use affine mapping
4449
vertex_values[0] = dof_values[0];
4450
vertex_values[1] = dof_values[1];
4451
vertex_values[2] = dof_values[2];
4452
vertex_values[3] = dof_values[3];
4455
/// Return the number of sub elements (for a mixed element)
4456
virtual unsigned int num_sub_elements() const
4461
/// Create a new finite element for sub element i (for a mixed element)
4462
virtual ufc::finite_element* create_sub_element(unsigned int i) const
4464
return new poisson3dp3_1_finite_element_1();
4469
/// This class defines the interface for a local-to-global mapping of
4470
/// degrees of freedom (dofs).
4472
class poisson3dp3_1_dof_map_0: public ufc::dof_map
4476
unsigned int __global_dimension;
4481
poisson3dp3_1_dof_map_0() : ufc::dof_map()
4483
__global_dimension = 0;
4487
virtual ~poisson3dp3_1_dof_map_0()
4492
/// Return a string identifying the dof map
4493
virtual const char* signature() const
4495
return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 3)";
4498
/// Return true iff mesh entities of topological dimension d are needed
4499
virtual bool needs_mesh_entities(unsigned int d) const
4519
/// Initialize dof map for mesh (return true iff init_cell() is needed)
4520
virtual bool init_mesh(const ufc::mesh& m)
4522
__global_dimension = m.num_entities[0] + 2*m.num_entities[1] + m.num_entities[2];
4526
/// Initialize dof map for given cell
4527
virtual void init_cell(const ufc::mesh& m,
4533
/// Finish initialization of dof map for cells
4534
virtual void init_cell_finalize()
4539
/// Return the dimension of the global finite element function space
4540
virtual unsigned int global_dimension() const
4542
return __global_dimension;
4545
/// Return the dimension of the local finite element function space for a cell
4546
virtual unsigned int local_dimension(const ufc::cell& c) const
4551
/// Return the maximum dimension of the local finite element function space
4552
virtual unsigned int max_local_dimension() const
4557
// Return the geometric dimension of the coordinates this dof map provides
4558
virtual unsigned int geometric_dimension() const
4563
/// Return the number of dofs on each cell facet
4564
virtual unsigned int num_facet_dofs() const
4569
/// Return the number of dofs associated with each cell entity of dimension d
4570
virtual unsigned int num_entity_dofs(unsigned int d) const
4572
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4575
/// Tabulate the local-to-global mapping of dofs on a cell
4576
virtual void tabulate_dofs(unsigned int* dofs,
4578
const ufc::cell& c) const
4580
dofs[0] = c.entity_indices[0][0];
4581
dofs[1] = c.entity_indices[0][1];
4582
dofs[2] = c.entity_indices[0][2];
4583
dofs[3] = c.entity_indices[0][3];
4584
unsigned int offset = m.num_entities[0];
4585
dofs[4] = offset + 2*c.entity_indices[1][0];
4586
dofs[5] = offset + 2*c.entity_indices[1][0] + 1;
4587
dofs[6] = offset + 2*c.entity_indices[1][1];
4588
dofs[7] = offset + 2*c.entity_indices[1][1] + 1;
4589
dofs[8] = offset + 2*c.entity_indices[1][2];
4590
dofs[9] = offset + 2*c.entity_indices[1][2] + 1;
4591
dofs[10] = offset + 2*c.entity_indices[1][3];
4592
dofs[11] = offset + 2*c.entity_indices[1][3] + 1;
4593
dofs[12] = offset + 2*c.entity_indices[1][4];
4594
dofs[13] = offset + 2*c.entity_indices[1][4] + 1;
4595
dofs[14] = offset + 2*c.entity_indices[1][5];
4596
dofs[15] = offset + 2*c.entity_indices[1][5] + 1;
4597
offset = offset + 2*m.num_entities[1];
4598
dofs[16] = offset + c.entity_indices[2][0];
4599
dofs[17] = offset + c.entity_indices[2][1];
4600
dofs[18] = offset + c.entity_indices[2][2];
4601
dofs[19] = offset + c.entity_indices[2][3];
4604
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
4605
virtual void tabulate_facet_dofs(unsigned int* dofs,
4606
unsigned int facet) const
4661
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
4662
virtual void tabulate_entity_dofs(unsigned int* dofs,
4663
unsigned int d, unsigned int i) const
4665
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4668
/// Tabulate the coordinates of all dofs on a cell
4669
virtual void tabulate_coordinates(double** coordinates,
4670
const ufc::cell& c) const
4672
const double * const * x = c.coordinates;
4673
coordinates[0][0] = x[0][0];
4674
coordinates[0][1] = x[0][1];
4675
coordinates[0][2] = x[0][2];
4676
coordinates[1][0] = x[1][0];
4677
coordinates[1][1] = x[1][1];
4678
coordinates[1][2] = x[1][2];
4679
coordinates[2][0] = x[2][0];
4680
coordinates[2][1] = x[2][1];
4681
coordinates[2][2] = x[2][2];
4682
coordinates[3][0] = x[3][0];
4683
coordinates[3][1] = x[3][1];
4684
coordinates[3][2] = x[3][2];
4685
coordinates[4][0] = 0.666666666666667*x[2][0] + 0.333333333333333*x[3][0];
4686
coordinates[4][1] = 0.666666666666667*x[2][1] + 0.333333333333333*x[3][1];
4687
coordinates[4][2] = 0.666666666666667*x[2][2] + 0.333333333333333*x[3][2];
4688
coordinates[5][0] = 0.333333333333333*x[2][0] + 0.666666666666667*x[3][0];
4689
coordinates[5][1] = 0.333333333333333*x[2][1] + 0.666666666666667*x[3][1];
4690
coordinates[5][2] = 0.333333333333333*x[2][2] + 0.666666666666667*x[3][2];
4691
coordinates[6][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[3][0];
4692
coordinates[6][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[3][1];
4693
coordinates[6][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[3][2];
4694
coordinates[7][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[3][0];
4695
coordinates[7][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[3][1];
4696
coordinates[7][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[3][2];
4697
coordinates[8][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[2][0];
4698
coordinates[8][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[2][1];
4699
coordinates[8][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[2][2];
4700
coordinates[9][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[2][0];
4701
coordinates[9][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[2][1];
4702
coordinates[9][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[2][2];
4703
coordinates[10][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[3][0];
4704
coordinates[10][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[3][1];
4705
coordinates[10][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[3][2];
4706
coordinates[11][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[3][0];
4707
coordinates[11][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[3][1];
4708
coordinates[11][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[3][2];
4709
coordinates[12][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[2][0];
4710
coordinates[12][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[2][1];
4711
coordinates[12][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[2][2];
4712
coordinates[13][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[2][0];
4713
coordinates[13][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[2][1];
4714
coordinates[13][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[2][2];
4715
coordinates[14][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[1][0];
4716
coordinates[14][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[1][1];
4717
coordinates[14][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[1][2];
4718
coordinates[15][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[1][0];
4719
coordinates[15][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[1][1];
4720
coordinates[15][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[1][2];
4721
coordinates[16][0] = 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
4722
coordinates[16][1] = 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
4723
coordinates[16][2] = 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
4724
coordinates[17][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
4725
coordinates[17][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
4726
coordinates[17][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
4727
coordinates[18][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[3][0];
4728
coordinates[18][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[3][1];
4729
coordinates[18][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[3][2];
4730
coordinates[19][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0];
4731
coordinates[19][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1];
4732
coordinates[19][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2];
4735
/// Return the number of sub dof maps (for a mixed element)
4736
virtual unsigned int num_sub_dof_maps() const
4741
/// Create a new dof_map for sub dof map i (for a mixed element)
4742
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
4744
return new poisson3dp3_1_dof_map_0();
4749
/// This class defines the interface for a local-to-global mapping of
4750
/// degrees of freedom (dofs).
4752
class poisson3dp3_1_dof_map_1: public ufc::dof_map
4756
unsigned int __global_dimension;
4761
poisson3dp3_1_dof_map_1() : ufc::dof_map()
4763
__global_dimension = 0;
4767
virtual ~poisson3dp3_1_dof_map_1()
4772
/// Return a string identifying the dof map
4773
virtual const char* signature() const
4775
return "FFC dof map for FiniteElement('Lagrange', 'tetrahedron', 3)";
4778
/// Return true iff mesh entities of topological dimension d are needed
4779
virtual bool needs_mesh_entities(unsigned int d) const
4799
/// Initialize dof map for mesh (return true iff init_cell() is needed)
4800
virtual bool init_mesh(const ufc::mesh& m)
4802
__global_dimension = m.num_entities[0] + 2*m.num_entities[1] + m.num_entities[2];
4806
/// Initialize dof map for given cell
4807
virtual void init_cell(const ufc::mesh& m,
4813
/// Finish initialization of dof map for cells
4814
virtual void init_cell_finalize()
4819
/// Return the dimension of the global finite element function space
4820
virtual unsigned int global_dimension() const
4822
return __global_dimension;
4825
/// Return the dimension of the local finite element function space for a cell
4826
virtual unsigned int local_dimension(const ufc::cell& c) const
4831
/// Return the maximum dimension of the local finite element function space
4832
virtual unsigned int max_local_dimension() const
4837
// Return the geometric dimension of the coordinates this dof map provides
4838
virtual unsigned int geometric_dimension() const
4843
/// Return the number of dofs on each cell facet
4844
virtual unsigned int num_facet_dofs() const
4849
/// Return the number of dofs associated with each cell entity of dimension d
4850
virtual unsigned int num_entity_dofs(unsigned int d) const
4852
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4855
/// Tabulate the local-to-global mapping of dofs on a cell
4856
virtual void tabulate_dofs(unsigned int* dofs,
4858
const ufc::cell& c) const
4860
dofs[0] = c.entity_indices[0][0];
4861
dofs[1] = c.entity_indices[0][1];
4862
dofs[2] = c.entity_indices[0][2];
4863
dofs[3] = c.entity_indices[0][3];
4864
unsigned int offset = m.num_entities[0];
4865
dofs[4] = offset + 2*c.entity_indices[1][0];
4866
dofs[5] = offset + 2*c.entity_indices[1][0] + 1;
4867
dofs[6] = offset + 2*c.entity_indices[1][1];
4868
dofs[7] = offset + 2*c.entity_indices[1][1] + 1;
4869
dofs[8] = offset + 2*c.entity_indices[1][2];
4870
dofs[9] = offset + 2*c.entity_indices[1][2] + 1;
4871
dofs[10] = offset + 2*c.entity_indices[1][3];
4872
dofs[11] = offset + 2*c.entity_indices[1][3] + 1;
4873
dofs[12] = offset + 2*c.entity_indices[1][4];
4874
dofs[13] = offset + 2*c.entity_indices[1][4] + 1;
4875
dofs[14] = offset + 2*c.entity_indices[1][5];
4876
dofs[15] = offset + 2*c.entity_indices[1][5] + 1;
4877
offset = offset + 2*m.num_entities[1];
4878
dofs[16] = offset + c.entity_indices[2][0];
4879
dofs[17] = offset + c.entity_indices[2][1];
4880
dofs[18] = offset + c.entity_indices[2][2];
4881
dofs[19] = offset + c.entity_indices[2][3];
4884
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
4885
virtual void tabulate_facet_dofs(unsigned int* dofs,
4886
unsigned int facet) const
4941
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
4942
virtual void tabulate_entity_dofs(unsigned int* dofs,
4943
unsigned int d, unsigned int i) const
4945
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4948
/// Tabulate the coordinates of all dofs on a cell
4949
virtual void tabulate_coordinates(double** coordinates,
4950
const ufc::cell& c) const
4952
const double * const * x = c.coordinates;
4953
coordinates[0][0] = x[0][0];
4954
coordinates[0][1] = x[0][1];
4955
coordinates[0][2] = x[0][2];
4956
coordinates[1][0] = x[1][0];
4957
coordinates[1][1] = x[1][1];
4958
coordinates[1][2] = x[1][2];
4959
coordinates[2][0] = x[2][0];
4960
coordinates[2][1] = x[2][1];
4961
coordinates[2][2] = x[2][2];
4962
coordinates[3][0] = x[3][0];
4963
coordinates[3][1] = x[3][1];
4964
coordinates[3][2] = x[3][2];
4965
coordinates[4][0] = 0.666666666666667*x[2][0] + 0.333333333333333*x[3][0];
4966
coordinates[4][1] = 0.666666666666667*x[2][1] + 0.333333333333333*x[3][1];
4967
coordinates[4][2] = 0.666666666666667*x[2][2] + 0.333333333333333*x[3][2];
4968
coordinates[5][0] = 0.333333333333333*x[2][0] + 0.666666666666667*x[3][0];
4969
coordinates[5][1] = 0.333333333333333*x[2][1] + 0.666666666666667*x[3][1];
4970
coordinates[5][2] = 0.333333333333333*x[2][2] + 0.666666666666667*x[3][2];
4971
coordinates[6][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[3][0];
4972
coordinates[6][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[3][1];
4973
coordinates[6][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[3][2];
4974
coordinates[7][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[3][0];
4975
coordinates[7][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[3][1];
4976
coordinates[7][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[3][2];
4977
coordinates[8][0] = 0.666666666666667*x[1][0] + 0.333333333333333*x[2][0];
4978
coordinates[8][1] = 0.666666666666667*x[1][1] + 0.333333333333333*x[2][1];
4979
coordinates[8][2] = 0.666666666666667*x[1][2] + 0.333333333333333*x[2][2];
4980
coordinates[9][0] = 0.333333333333333*x[1][0] + 0.666666666666667*x[2][0];
4981
coordinates[9][1] = 0.333333333333333*x[1][1] + 0.666666666666667*x[2][1];
4982
coordinates[9][2] = 0.333333333333333*x[1][2] + 0.666666666666667*x[2][2];
4983
coordinates[10][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[3][0];
4984
coordinates[10][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[3][1];
4985
coordinates[10][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[3][2];
4986
coordinates[11][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[3][0];
4987
coordinates[11][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[3][1];
4988
coordinates[11][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[3][2];
4989
coordinates[12][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[2][0];
4990
coordinates[12][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[2][1];
4991
coordinates[12][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[2][2];
4992
coordinates[13][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[2][0];
4993
coordinates[13][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[2][1];
4994
coordinates[13][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[2][2];
4995
coordinates[14][0] = 0.666666666666667*x[0][0] + 0.333333333333333*x[1][0];
4996
coordinates[14][1] = 0.666666666666667*x[0][1] + 0.333333333333333*x[1][1];
4997
coordinates[14][2] = 0.666666666666667*x[0][2] + 0.333333333333333*x[1][2];
4998
coordinates[15][0] = 0.333333333333333*x[0][0] + 0.666666666666667*x[1][0];
4999
coordinates[15][1] = 0.333333333333333*x[0][1] + 0.666666666666667*x[1][1];
5000
coordinates[15][2] = 0.333333333333333*x[0][2] + 0.666666666666667*x[1][2];
5001
coordinates[16][0] = 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
5002
coordinates[16][1] = 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
5003
coordinates[16][2] = 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
5004
coordinates[17][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[2][0] + 0.333333333333333*x[3][0];
5005
coordinates[17][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[2][1] + 0.333333333333333*x[3][1];
5006
coordinates[17][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[2][2] + 0.333333333333333*x[3][2];
5007
coordinates[18][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[3][0];
5008
coordinates[18][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[3][1];
5009
coordinates[18][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[3][2];
5010
coordinates[19][0] = 0.333333333333333*x[0][0] + 0.333333333333333*x[1][0] + 0.333333333333333*x[2][0];
5011
coordinates[19][1] = 0.333333333333333*x[0][1] + 0.333333333333333*x[1][1] + 0.333333333333333*x[2][1];
5012
coordinates[19][2] = 0.333333333333333*x[0][2] + 0.333333333333333*x[1][2] + 0.333333333333333*x[2][2];
5015
/// Return the number of sub dof maps (for a mixed element)
5016
virtual unsigned int num_sub_dof_maps() const
5021
/// Create a new dof_map for sub dof map i (for a mixed element)
5022
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
5024
return new poisson3dp3_1_dof_map_1();
5029
/// This class defines the interface for the tabulation of the cell
5030
/// tensor corresponding to the local contribution to a form from
5031
/// the integral over a cell.
5033
class poisson3dp3_1_cell_integral_0_quadrature: public ufc::cell_integral
5038
poisson3dp3_1_cell_integral_0_quadrature() : ufc::cell_integral()
5044
virtual ~poisson3dp3_1_cell_integral_0_quadrature()
5049
/// Tabulate the tensor for the contribution from a local cell
5050
virtual void tabulate_tensor(double* A,
5051
const double * const * w,
5052
const ufc::cell& c) const
5054
// Extract vertex coordinates
5055
const double * const * x = c.coordinates;
5057
// Compute Jacobian of affine map from reference cell
5058
const double J_00 = x[1][0] - x[0][0];
5059
const double J_01 = x[2][0] - x[0][0];
5060
const double J_02 = x[3][0] - x[0][0];
5061
const double J_10 = x[1][1] - x[0][1];
5062
const double J_11 = x[2][1] - x[0][1];
5063
const double J_12 = x[3][1] - x[0][1];
5064
const double J_20 = x[1][2] - x[0][2];
5065
const double J_21 = x[2][2] - x[0][2];
5066
const double J_22 = x[3][2] - x[0][2];
5068
// Compute sub determinants
5069
const double d_00 = J_11*J_22 - J_12*J_21;
5071
const double d_10 = J_02*J_21 - J_01*J_22;
5073
const double d_20 = J_01*J_12 - J_02*J_11;
5075
// Compute determinant of Jacobian
5076
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
5078
// Compute inverse of Jacobian
5081
const double det = std::abs(detJ);
5084
// Array of quadrature weights
5085
static const double W64[64] = {0.0026134590075074, 0.00338108957856492, 0.00161758872343451, 0.000243985421620605, 0.00392412678076307, 0.00507672939399183, 0.00242882065938497, 0.000366345798555432, 0.00250430944300902, 0.0032398803788146, 0.00155003109035391, 0.000233795515279108, 0.000601372928720174, 0.000778009425931694, 0.000372217075256263, 5.6142540266951e-05, 0.00489961445988875, 0.00633873932658916, 0.00303259438036939, 0.00045741467393993, 0.00735680500908296, 0.00951766095289489, 0.00455346144286727, 0.000686811297504771, 0.00469498496963441, 0.00607400564032183, 0.00290593987575818, 0.000438311021534327, 0.00112743130421366, 0.00145858275269461, 0.000697818545806259, 0.000105253918778391, 0.00489961445988875, 0.00633873932658916, 0.00303259438036939, 0.00045741467393993, 0.00735680500908296, 0.00951766095289489, 0.00455346144286727, 0.000686811297504771, 0.00469498496963441, 0.00607400564032183, 0.00290593987575818, 0.000438311021534327, 0.00112743130421366, 0.00145858275269461, 0.000697818545806259, 0.000105253918778391, 0.0026134590075074, 0.00338108957856492, 0.00161758872343451, 0.000243985421620605, 0.00392412678076307, 0.00507672939399183, 0.00242882065938497, 0.000366345798555432, 0.00250430944300902, 0.0032398803788146, 0.00155003109035391, 0.000233795515279108, 0.000601372928720174, 0.000778009425931694, 0.000372217075256263, 5.6142540266951e-05};
5086
// Quadrature points on the UFC reference element: (0.0622918093484527, 0.0543346112272345, 0.0485005494469973), (0.0498465213688842, 0.0434790928042876, 0.238600737551862), (0.0316174621017319, 0.027578625974397, 0.517047295104368), (0.0133649941129659, 0.0116577406689234, 0.795851417896773), (0.0477749046478169, 0.263415975366112, 0.0485005494469973), (0.0382299507805671, 0.210788066397987, 0.238600737551862), (0.024249114818074, 0.13370208226799, 0.517047295104368), (0.0102503254608295, 0.0565171086994073, 0.795851417896773), (0.0275098322538483, 0.555285975747014, 0.0485005494469973), (0.0220136396042882, 0.444345324777483, 0.238600737551862), (0.013963169280339, 0.28184657786378, 0.517047295104368), (0.00590236100005809, 0.119139159297124, 0.795851417896773), (0.00923314621657362, 0.818518016420533, 0.0485005494469973), (0.007388454838612, 0.654986204816931, 0.238600737551862), (0.00468646927478461, 0.415455300374957, 0.517047295104368), (0.00198101397470041, 0.175616803962505, 0.795851417896773), (0.296072900492077, 0.0543346112272345, 0.0485005494469973), (0.236920460578858, 0.0434790928042876, 0.238600737551862), (0.150277762174051, 0.027578625974397, 0.517047295104368), (0.063523802141471, 0.0116577406689234, 0.795851417896773), (0.227074068609678, 0.263415975366112, 0.0485005494469973), (0.181706913503757, 0.210788066397987, 0.238600737551862), (0.115256015737018, 0.13370208226799, 0.517047295104368), (0.0487197855050096, 0.0565171086994073, 0.795851417896773), (0.130754202079533, 0.555285975747014, 0.0485005494469973), (0.104630804534349, 0.444345324777483, 0.238600737551862), (0.0663669280461273, 0.28184657786378, 0.517047295104368), (0.0280539152629691, 0.119139159297124, 0.795851417896773), (0.0438851336893508, 0.818518016420533, 0.0485005494469973), (0.0351173176233467, 0.654986204816931, 0.238600737551862), (0.0222747832462335, 0.415455300374957, 0.517047295104368), (0.00941575721655391, 0.175616803962505, 0.795851417896773), (0.601091938833691, 0.0543346112272345, 0.0485005494469973), (0.480999709064992, 0.0434790928042876, 0.238600737551862), (0.305096316747185, 0.027578625974397, 0.517047295104368), (0.128967039292833, 0.0116577406689234, 0.795851417896773), (0.461009406577212, 0.263415975366112, 0.0485005494469973), (0.368904282546393, 0.210788066397987, 0.238600737551862), (0.233994606890624, 0.13370208226799, 0.517047295104368), (0.0989116878988102, 0.0565171086994073, 0.795851417896773), (0.265459272726456, 0.555285975747014, 0.0485005494469973), (0.212423133136306, 0.444345324777483, 0.238600737551862), (0.134739198985725, 0.28184657786378, 0.517047295104368), (0.0569555075431344, 0.119139159297124, 0.795851417896773), (0.0890963004431186, 0.818518016420533, 0.0485005494469973), (0.0712957400078597, 0.654986204816931, 0.238600737551862), (0.045222621274442, 0.415455300374957, 0.517047295104368), (0.0191160209241683, 0.175616803962505, 0.795851417896773), (0.834873029977315, 0.0543346112272345, 0.0485005494469973), (0.668073648274966, 0.0434790928042876, 0.238600737551862), (0.423756616819504, 0.027578625974397, 0.517047295104368), (0.179125847321338, 0.0116577406689234, 0.795851417896773), (0.640308570539073, 0.263415975366112, 0.0485005494469973), (0.512381245269583, 0.210788066397987, 0.238600737551862), (0.325001507809568, 0.13370208226799, 0.517047295104368), (0.13738114794299, 0.0565171086994073, 0.795851417896773), (0.368703642552141, 0.555285975747014, 0.0485005494469973), (0.295040298066366, 0.444345324777483, 0.238600737551862), (0.187142957751513, 0.28184657786378, 0.517047295104368), (0.0791070618060454, 0.119139159297124, 0.795851417896773), (0.123748287915896, 0.818518016420533, 0.0485005494469973), (0.0990246027925943, 0.654986204816931, 0.238600737551862), (0.0628109352458909, 0.415455300374957, 0.517047295104368), (0.0265507641660218, 0.175616803962505, 0.795851417896773)
5088
// Value of basis functions at quadrature points.
5089
static const double FE0[64][20] = \
5090
{{0.316942646270776, 0.0459182870838374, 0.0417713284261773, 0.0384285806226176, -0.00992565567229708, -0.0101332081942744, -0.011054706162562, -0.0116171968229622, -0.0123844609684378, -0.0127480421943013, 0.274161313248215, -0.155700796186139, 0.307139785811479, -0.170857079355319, 0.352119809987772, -0.190292195339624, 0.00443218553927298, 0.0594028686804588, 0.0681023032468036, 0.0762942319785079},
5091
{0.00141590232956291, 0.0392228167323023, 0.0353420251164078, 0.0435405986330707, -0.0405943584870655, -0.0132673889695188, -0.0455169618203899, -0.0152103722760564, -0.00829434237070535, -0.00848064250992449, 0.720340631623725, -0.203858737160113, 0.131264293205546, -0.113662771758787, 0.150487693606995, -0.127445887442534, 0.0139621042223731, 0.187128683191496, 0.214533314837614, 0.0390933992960042},
5092
{-0.0418846376623705, 0.0272612052688519, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, -0.066586962132492, 0.0405446175758774, -0.00355166140662748, -0.00359920474050181, 0.267461209901129, 0.543403829153424, 0.0142660308648051, -0.0482387491813342, 0.0163552633343248, -0.0545726978261391, 0.0121728891219892, 0.163148525161687, 0.187041309311128, 0.00997653862633952},
5093
{0.0606020354974101, 0.0125719331417011, 0.0110533069845138, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.0459453476251609, 0.0664145528584789, -0.000673013750447416, -0.000676604746500828, -0.296776478794994, 0.890128566813322, -0.004347222545097, -0.00906827174738708, -0.00498386483050322, -0.0103411254145656, 0.00334794966816241, 0.0448712746170981, 0.051442585500075, 0.000753538044429993},
5094
{-0.0233141297875962, 0.0379946132499842, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, -0.00893254555193575, -0.00890984667642714, -0.048514402947884, -0.0118784757749483, 0.128698381601996, -0.119415229212101, 0.698986096122026, -0.159202616932648, 0.126772850606219, -0.117928261408372, 0.0164798161265746, 0.220872602144184, 0.0400589504569247, 0.21756799927154},
5095
{-0.0636942004447079, 0.0319045035068057, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, -0.0363398789831187, -0.0116656442114479, -0.0321038941563349, -0.0133315323091856, 0.295507178830004, -0.156350117797481, 0.261061166329218, -0.178677371706281, 0.047347820538567, -0.0780377824367332, 0.0519140970715157, 0.695784565803582, 0.12619219939295, 0.111482512491259},
5096
{0.00416331000853175, 0.0216671920487514, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.0523162684880416, 0.031095825581728, -0.0135283446980038, -0.00873768447279163, -0.0189012088835133, 0.41676532427948, -0.00488762055045249, -0.117107805778746, -0.00088645195276417, -0.0328845471247492, 0.0452614117080655, 0.606621196735265, 0.110020927132805, 0.0284500609325142},
5097
{0.0641179720678825, 0.00978236065603381, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.0355809496645704, 0.0509368561168636, -0.00252676863369168, -0.00216492522558782, -0.289229785310999, 0.682686983226322, -0.0205395515393154, -0.0290156555358705, -0.0037251921222161, -0.00614204058684542, 0.0124483946900372, 0.166841019741274, 0.0302594168725173, 0.00214886185298791},
5098
{-0.0174860280987736, 0.0241979596905522, -0.0617731070981597, 0.0384285806226176, 0.0806970115889355, -0.103558823234662, -0.00550857447170805, -0.00513048407491109, -0.0630680308857183, 0.0457718784119034, 0.00853879745270195, -0.0687618938938031, 0.0977612527959359, 0.613462784549029, 0.00484326235994765, -0.0418764631771457, 0.0200039182057664, 0.268104779401166, 0.0132823767030295, 0.152070803153297},
5099
{0.018893837039617, 0.019880943301904, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.022075166962345, -0.00671733241030492, -0.0411105067572066, 0.0146593977712432, -0.036392063376584, -0.0900298084357277, -0.0677728132205631, 0.196474238955856, -0.00335758294734683, -0.0272969141137687, 0.0630155909245982, 0.844573594527272, 0.0418416436327583, 0.0779215476028461},
5100
{0.0590357207055018, 0.0130980546488276, 0.0251291929007073, -0.0639547452440238, -0.101291343114797, 0.361425647567417, -0.0311273668109228, 0.017905654691607, -0.0169677743151103, -0.00273543287806844, -0.190966113694605, 0.239982565002839, -0.10409714187153, -0.0366619489640695, -0.00515715331570966, -0.0112664113073766, 0.0549402718289831, 0.736343215735788, 0.0364797225770018, 0.0198853858575406},
5101
{0.0531740973437773, 0.00574651592133119, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.0207640128472617, 0.0293305528842609, -0.00310837799446912, -0.00203339486296362, -0.216073469396172, 0.393106057016485, -0.0323462532218693, -0.0272528049536403, -0.00160248959822373, -0.0020639280281623, 0.0151104033722227, 0.202518892603982, 0.0100331378912924, 0.00150196328937836},
5102
{0.0633645780899607, 0.00885305887263062, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.00195933827339019, -0.00172194832699612, -0.0330667115180807, 0.0495015510214934, -0.0169816512377693, -0.0230786074808287, -0.286590309701014, 0.663450144122639, -0.00323283077542309, -0.00499921670052643, 0.00989665381744753, 0.132641023685632, 0.00149623336497993, 0.0252511359143224},
5103
{0.0592677805711995, 0.00714461813298492, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.00775717045765738, -0.00225454345767591, -0.0212943165654494, 0.0210139153012293, -0.0747372528781831, -0.0302167740416122, -0.20516227285544, 0.281641379865613, -0.0023142963568264, -0.00321939794170585, 0.031176066711914, 0.417840765114924, 0.00471337808350592, 0.0129387597643602},
5104
{0.0461725856048027, 0.00458809898063897, -0.0385687396087239, -0.0639547452440238, 0.238148410057832, 0.532758645187123, -0.0107507634380464, 0.00600968869404698, -0.00863840057902656, 0.002158555352948, -0.118604871591271, 0.0805455333806928, -0.095300803271659, 0.0289302825963627, -0.0010750236812283, -0.00130600336283494, 0.0271809175250065, 0.364295325645881, 0.0041093683220464, 0.00330193942943354},
5105
{0.0234627458142642, 0.00196338908550111, 0.0612042229600472, 0.213985565988335, -0.297583634515968, 0.872691107158041, -0.00705250360640731, 0.00984423608600662, -0.00155624293107926, -0.000740737938466248, -0.0875131805869247, 0.131938489103154, -0.0193111235761632, -0.00992782411644321, -0.000217835678638736, -0.000235281807411492, 0.00747565700272528, 0.10019333967366, 0.00113021306382384, 0.000249398821943359},
5106
{-0.0474934098882189, 0.0183974307728652, 0.0417713284261773, 0.0384285806226176, -0.00992565567229708, -0.0101332081942744, -0.00722315577599345, -0.0552165235676718, -0.0080920188615854, -0.0605914303588281, 0.105381595203438, -0.11210146944143, 0.118057796688303, -0.123013691190792, 0.643304764711186, -0.0895202375930712, 0.0210661729344058, 0.0427688812853259, 0.233050470905012, 0.261083778994831},
5107
{-0.0593435556758836, 0.044173535162678, 0.0353420251164078, 0.0435405986330707, -0.0405943584870655, -0.0132673889695188, -0.0735771805831919, -0.0722948824964278, -0.013407624367293, -0.0403084844093089, 0.228787335174519, -0.146774226939742, 0.0416908425370495, -0.081834929859403, 0.227176166261325, -0.148325620521794, 0.0663618658268005, 0.134728921587068, 0.734146830049622, 0.133780131961088},
5108
{0.0140171944147558, 0.0639244626451169, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, -0.19201789705842, 0.192708522205259, -0.0102419833030854, -0.0171070161250932, -0.060133961139641, 0.391239924524043, -0.00320746677979297, -0.0347309377967427, -0.0174776992284671, -0.113304824716739, 0.0578577284463695, 0.117463685837307, 0.640067415277826, 0.0341403581673955},
5109
{0.0637734994386082, 0.0465185832699072, 0.0110533069845138, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.184144831837059, 0.315668295805934, -0.00269737874030822, -0.00321590160694518, -0.283174252139672, 0.640874823865867, -0.00414797526438382, -0.00652897488694274, -0.0226025923432014, -0.0298405119712716, 0.0159128010459527, 0.0323064232393078, 0.176039843056651, 0.00257865575357758},
5110
{-0.0544723188739935, 0.0477306372652925, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, -0.0157984607319655, -0.0423484913349203, -0.0858045319165257, -0.056458382135615, 0.0385389369754062, -0.085976584553608, 0.209312508594235, -0.114622710571981, 0.180434929473551, -0.150168175204615, 0.0783285477048384, 0.15902387056592, 0.137084310263545, 0.744531715767973},
5111
{-0.0175829401694107, 0.0601263089173645, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, -0.0887466324394246, -0.0554467939512141, -0.0784018156992205, -0.0633647582253519, 0.0422682922674722, -0.112568968057714, 0.0373412575686983, -0.128644145790115, 0.0321895104172831, -0.137212538001305, 0.24674764559191, 0.500951017283187, 0.431837839411788, 0.381500342794664},
5112
{0.0452580461211559, 0.0623679922432538, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.175443845541055, 0.14779842437514, -0.0453676243779744, -0.041530204572686, -0.162251408196532, 0.300062725486067, -0.0419562220558782, -0.0843152856788516, -0.0361677762044535, -0.0793987591801865, 0.215127439464974, 0.436755168978356, 0.376498703498837, 0.0973579421179106},
5113
{0.0592405099224476, 0.0385588963661094, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.14897956417135, 0.24210282042228, -0.0105797313831695, -0.0102898871872979, -0.24912142868932, 0.491521018920905, -0.0176912706919524, -0.0208906935741604, -0.0152505132208227, -0.0185157930528795, 0.0591672061046181, 0.120122208326693, 0.103549674757618, 0.00735354375510282},
5114
{0.0325299333929531, 0.0638787973684188, -0.0617731070981597, 0.0384285806226176, 0.0806970115889355, -0.103558823234662, -0.017343262053637, -0.0243851850969721, -0.198564146218889, 0.217553687140082, -0.0117972873894808, -0.0495071928717421, -0.135067918073687, 0.44168097582085, -0.0318046891613103, -0.0949253108254811, 0.095078600964327, 0.193030096642605, 0.0454531491271413, 0.52039608935609},
5115
{0.0525008116745778, 0.0605211362317534, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.0770790017967222, -0.0319274734686737, -0.143543957316746, 0.0696761012883771, -0.0827313861152967, -0.0648196673773589, -0.15407037300001, 0.141457535438722, -0.0362792319013842, -0.0686224327245416, 0.299513033517807, 0.608076151934063, 0.143184801205848, 0.266652557941832},
5116
{0.0640509106927241, 0.0478617966777029, 0.0251291929007073, -0.0639547452440238, -0.101291343114797, 0.361425647567417, -0.123672280290719, 0.0851055568172439, -0.0674147400181512, -0.0130015094244684, -0.186777439414966, 0.172782662877202, -0.101813862328864, -0.0263958724176695, -0.0239742959680134, -0.0322282006711705, 0.261131050845518, 0.530152436719253, 0.124835961777158, 0.0680490720179158},
5117
{0.043189241782395, 0.0246116712744907, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.0920146055848045, 0.139408085209121, -0.0137746098152355, -0.00966472352016017, -0.169123783267225, 0.283028524691626, -0.0253178732895335, -0.0196214762964438, -0.00596164582739594, -0.00658507159076729, 0.0718197304077884, 0.145809565568416, 0.0343340444998879, 0.005139815177809},
5118
{0.0565572914460857, 0.0355988950588367, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.00831703837687065, -0.00818441848139808, -0.140362239858113, 0.235280816901719, -0.0142479247765323, -0.0166161373264268, -0.240454659981553, 0.477670878242413, -0.0128920618579228, -0.0152785351603579, 0.0470387845777104, 0.0954988929253688, 0.00512020700722334, 0.0864110145348937},
5119
{0.0500526781546474, 0.0297626847872616, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.0337332239476843, -0.0107158425446525, -0.0926015424614136, 0.0998791160347683, -0.060177304883694, -0.0217554749546356, -0.165193557012014, 0.202776179132074, -0.00885691113531576, -0.010079747400941, 0.148179810377592, 0.300837021449246, 0.0161294835790437, 0.0442772698168982},
5120
{0.0364359152038298, 0.0200917703395614, -0.0385687396087239, -0.0639547452440238, 0.238148410057832, 0.532758645187123, -0.0483637167469586, 0.0285640436730253, -0.0388609758886781, 0.0102596111897318, -0.090945073207204, 0.0579911784017145, -0.0730757380701406, 0.020829226759579, -0.00391798160861545, -0.00423004639339736, 0.129190870739485, 0.262285372431402, 0.0140625232468916, 0.0112994495375666},
5121
{0.0175030551599998, 0.00902055949440797, 0.0612042229600472, 0.213985565988335, -0.297583634515968, 0.872691107158041, -0.0327684220468545, 0.0467896431585221, -0.00723085417875007, -0.00352072659696577, -0.0645347110293076, 0.094993082030638, -0.014240572348997, -0.00714783545794369, -0.000763513336067467, -0.000787083904625167, 0.0355317894123066, 0.0721372072640786, 0.00386766194665403, 0.000853458842447994},
5122
{0.0183974307728653, -0.0474934098882189, 0.0417713284261773, 0.0384285806226176, -0.00992565567229708, -0.0101332081942744, 0.105381595203438, -0.11210146944143, 0.118057796688303, -0.123013691190792, -0.00722315577599343, -0.0552165235676718, -0.00809201886158539, -0.0605914303588281, -0.0895202375930713, 0.643304764711186, 0.0427688812853259, 0.0210661729344057, 0.233050470905012, 0.261083778994831},
5123
{0.0441735351626781, -0.0593435556758837, 0.0353420251164078, 0.0435405986330707, -0.0405943584870655, -0.0132673889695188, 0.228787335174519, -0.146774226939742, 0.0416908425370495, -0.081834929859403, -0.0735771805831919, -0.0722948824964278, -0.0134076243672929, -0.0403084844093089, -0.148325620521794, 0.227176166261325, 0.134728921587068, 0.0663618658268004, 0.734146830049622, 0.133780131961088},
5124
{0.0639244626451169, 0.0140171944147557, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, -0.0601339611396408, 0.391239924524043, -0.003207466779793, -0.0347309377967427, -0.19201789705842, 0.192708522205259, -0.0102419833030854, -0.0171070161250932, -0.113304824716739, -0.017477699228467, 0.117463685837307, 0.0578577284463694, 0.640067415277826, 0.0341403581673955},
5125
{0.0465185832699073, 0.0637734994386082, 0.0110533069845138, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.283174252139672, 0.640874823865867, -0.00414797526438386, -0.00652897488694274, -0.184144831837059, 0.315668295805934, -0.00269737874030822, -0.00321590160694519, -0.0298405119712715, -0.0226025923432015, 0.0323064232393079, 0.0159128010459527, 0.176039843056651, 0.00257865575357758},
5126
{0.0477306372652926, -0.0544723188739936, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, 0.0385389369754061, -0.085976584553608, 0.209312508594235, -0.114622710571981, -0.0157984607319655, -0.0423484913349203, -0.0858045319165257, -0.0564583821356151, -0.150168175204615, 0.180434929473551, 0.15902387056592, 0.0783285477048383, 0.137084310263545, 0.744531715767973},
5127
{0.0601263089173645, -0.0175829401694107, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, 0.0422682922674721, -0.112568968057714, 0.0373412575686983, -0.128644145790115, -0.0887466324394246, -0.0554467939512141, -0.0784018156992205, -0.0633647582253519, -0.137212538001305, 0.0321895104172831, 0.500951017283187, 0.24674764559191, 0.431837839411788, 0.381500342794665},
5128
{0.0623679922432539, 0.0452580461211558, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.162251408196532, 0.300062725486068, -0.0419562220558782, -0.0843152856788516, -0.175443845541054, 0.14779842437514, -0.0453676243779745, -0.041530204572686, -0.0793987591801864, -0.0361677762044535, 0.436755168978356, 0.215127439464974, 0.376498703498837, 0.0973579421179105},
5129
{0.0385588963661094, 0.0592405099224476, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.24912142868932, 0.491521018920905, -0.0176912706919524, -0.0208906935741604, -0.14897956417135, 0.24210282042228, -0.0105797313831696, -0.0102898871872979, -0.0185157930528794, -0.0152505132208228, 0.120122208326693, 0.0591672061046181, 0.103549674757618, 0.00735354375510283},
5130
{0.0638787973684189, 0.032529933392953, -0.0617731070981597, 0.0384285806226176, 0.0806970115889354, -0.103558823234662, -0.0117972873894808, -0.0495071928717421, -0.135067918073687, 0.441680975820851, -0.017343262053637, -0.0243851850969721, -0.198564146218889, 0.217553687140082, -0.0949253108254811, -0.0318046891613103, 0.193030096642606, 0.0950786009643269, 0.0454531491271413, 0.52039608935609},
5131
{0.0605211362317534, 0.0525008116745777, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.0827313861152966, -0.0648196673773589, -0.15407037300001, 0.141457535438722, -0.0770790017967222, -0.0319274734686737, -0.143543957316746, 0.0696761012883772, -0.0686224327245416, -0.0362792319013842, 0.608076151934063, 0.299513033517807, 0.143184801205848, 0.266652557941832},
5132
{0.0478617966777029, 0.0640509106927241, 0.0251291929007073, -0.0639547452440238, -0.101291343114797, 0.361425647567417, -0.186777439414966, 0.172782662877202, -0.101813862328864, -0.0263958724176695, -0.123672280290718, 0.0851055568172437, -0.0674147400181511, -0.0130015094244684, -0.0322282006711705, -0.0239742959680135, 0.530152436719253, 0.261131050845517, 0.124835961777158, 0.0680490720179158},
5133
{0.0246116712744908, 0.0431892417823949, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.169123783267225, 0.283028524691625, -0.0253178732895335, -0.0196214762964438, -0.0920146055848049, 0.139408085209121, -0.0137746098152356, -0.00966472352016021, -0.00658507159076722, -0.00596164582739604, 0.145809565568416, 0.0718197304077886, 0.034334044499888, 0.00513981517780901},
5134
{0.0355988950588367, 0.0565572914460857, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.0142479247765322, -0.0166161373264268, -0.240454659981553, 0.477670878242413, -0.00831703837687066, -0.00818441848139806, -0.140362239858113, 0.235280816901719, -0.0152785351603578, -0.0128920618579229, 0.0954988929253689, 0.0470387845777103, 0.00512020700722334, 0.0864110145348937},
5135
{0.0297626847872616, 0.0500526781546473, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.060177304883694, -0.0217554749546356, -0.165193557012014, 0.202776179132074, -0.0337332239476842, -0.0107158425446524, -0.0926015424614135, 0.0998791160347682, -0.010079747400941, -0.00885691113531579, 0.300837021449246, 0.148179810377592, 0.0161294835790437, 0.0442772698168982},
5136
{0.0200917703395613, 0.0364359152038299, -0.0385687396087239, -0.0639547452440238, 0.238148410057832, 0.532758645187123, -0.0909450732072041, 0.0579911784017145, -0.0730757380701406, 0.020829226759579, -0.0483637167469585, 0.0285640436730253, -0.038860975888678, 0.0102596111897318, -0.00423004639339731, -0.00391798160861551, 0.262285372431403, 0.129190870739485, 0.0140625232468916, 0.0112994495375666},
5137
{0.00902055949440803, 0.0175030551599997, 0.0612042229600472, 0.213985565988335, -0.297583634515968, 0.872691107158041, -0.0645347110293074, 0.0949930820306377, -0.0142405723489969, -0.00714783545794368, -0.0327684220468547, 0.0467896431585224, -0.00723085417875015, -0.00352072659696579, -0.000787083904625099, -0.000763513336067545, 0.0721372072640785, 0.0355317894123067, 0.00386766194665405, 0.000853458842447997},
5138
{0.0459182870838375, 0.316942646270776, 0.0417713284261773, 0.0384285806226176, -0.00992565567229708, -0.0101332081942744, 0.274161313248215, -0.155700796186139, 0.307139785811479, -0.170857079355319, -0.0110547061625619, -0.0116171968229622, -0.0123844609684377, -0.0127480421943014, -0.190292195339624, 0.352119809987772, 0.0594028686804588, 0.0044321855392728, 0.0681023032468037, 0.076294231978508},
5139
{0.0392228167323025, 0.00141590232956263, 0.0353420251164078, 0.0435405986330707, -0.0405943584870655, -0.0132673889695188, 0.720340631623725, -0.203858737160113, 0.131264293205545, -0.113662771758787, -0.0455169618203899, -0.0152103722760563, -0.00829434237070526, -0.00848064250992448, -0.127445887442534, 0.150487693606995, 0.187128683191495, 0.0139621042223729, 0.214533314837614, 0.0390933992960043},
5140
{0.027261205268852, -0.0418846376623705, 0.0242504041833649, -0.0639547452440238, -0.0588585848419934, 0.0353654205325618, 0.267461209901129, 0.543403829153424, 0.014266030864805, -0.0482387491813341, -0.0665869621324919, 0.0405446175758773, -0.00355166140662741, -0.0035992047405018, -0.0545726978261391, 0.0163552633343248, 0.163148525161687, 0.012172889121989, 0.187041309311128, 0.00997653862633951},
5141
{0.0125719331417013, 0.0606020354974101, 0.0110533069845138, 0.213985565988335, -0.0402900923342712, 0.057930712675401, -0.296776478794994, 0.890128566813322, -0.00434722254509708, -0.0090682717473871, -0.045945347625161, 0.0664145528584791, -0.000673013750447433, -0.000676604746500851, -0.0103411254145655, -0.00498386483050332, 0.0448712746170982, 0.00334794966816239, 0.0514425855000752, 0.000753538044429996},
5142
{0.0379946132499844, -0.0233141297875965, 0.033420639302547, 0.0384285806226176, -0.0120588958978522, -0.0491261253148477, 0.128698381601996, -0.119415229212101, 0.698986096122025, -0.159202616932648, -0.00893254555193567, -0.00890984667642716, -0.0485144029478841, -0.0118784757749484, -0.117928261408373, 0.126772850606219, 0.220872602144184, 0.0164798161265745, 0.0400589504569248, 0.21756799927154},
5143
{0.0319045035068058, -0.063694200444708, 0.0529912643922588, 0.0435405986330707, -0.0832047485471804, -0.06432073639676, 0.295507178830004, -0.156350117797481, 0.261061166329218, -0.178677371706281, -0.0363398789831187, -0.0116656442114479, -0.032103894156335, -0.0133315323091857, -0.0780377824367335, 0.0473478205385671, 0.695784565803581, 0.0519140970715158, 0.12619219939295, 0.11148251249126},
5144
{0.0216671920487514, 0.0041633100085317, 0.064014383048423, -0.0639547452440238, -0.186307671683133, 0.171452717400655, -0.0189012088835131, 0.41676532427948, -0.00488762055045244, -0.117107805778746, -0.0523162684880414, 0.0310958255817279, -0.0135283446980038, -0.00873768447279161, -0.0328845471247491, -0.00088645195276425, 0.606621196735265, 0.0452614117080653, 0.110020927132805, 0.0284500609325141},
5145
{0.00978236065603392, 0.0641179720678825, 0.0429556497001765, 0.213985565988335, -0.168088205297349, 0.280849993004016, -0.289229785310999, 0.682686983226322, -0.0205395515393154, -0.0290156555358705, -0.0355809496645705, 0.0509368561168639, -0.0025267686336917, -0.00216492522558785, -0.00614204058684537, -0.00372519212221623, 0.166841019741274, 0.0124483946900372, 0.0302594168725175, 0.00214886185298792},
5146
{0.0241979596905522, -0.0174860280987737, -0.0617731070981597, 0.0384285806226176, 0.0806970115889354, -0.103558823234662, 0.00853879745270195, -0.0687618938938031, 0.097761252795936, 0.613462784549029, -0.00550857447170798, -0.00513048407491105, -0.0630680308857182, 0.0457718784119034, -0.0418764631771457, 0.00484326235994761, 0.268104779401166, 0.0200039182057662, 0.0132823767030295, 0.152070803153297},
5147
{0.019880943301904, 0.018893837039617, -0.0493496614277152, 0.0435405986330707, 0.158889814822053, -0.135589357559656, -0.0363920633765839, -0.0900298084357277, -0.0677728132205631, 0.196474238955856, -0.0220751669623449, -0.0067173324103049, -0.0411105067572067, 0.0146593977712433, -0.0272969141137687, -0.00335758294734693, 0.844573594527272, 0.0630155909245983, 0.0418416436327583, 0.0779215476028461},
5148
{0.0130980546488274, 0.0590357207055018, 0.0251291929007073, -0.0639547452440238, -0.101291343114797, 0.361425647567417, -0.190966113694605, 0.239982565002839, -0.10409714187153, -0.0366619489640696, -0.0311273668109224, 0.0179056546916068, -0.0169677743151102, -0.00273543287806839, -0.0112664113073766, -0.00515715331570975, 0.736343215735788, 0.0549402718289825, 0.0364797225770015, 0.0198853858575404},
5149
{0.00574651592133132, 0.0531740973437773, 0.0628753827383954, 0.213985565988335, -0.274175060593153, 0.592037222446455, -0.216073469396172, 0.393106057016485, -0.0323462532218692, -0.0272528049536403, -0.020764012847262, 0.0293305528842615, -0.00310837799446921, -0.00203339486296367, -0.00206392802816227, -0.00160248959822386, 0.202518892603981, 0.0151104033722229, 0.0100331378912926, 0.00150196328937839},
5150
{0.00885305887263062, 0.0633645780899607, 0.271372912374866, 0.0384285806226176, 0.260025387522992, -0.152650645395551, -0.0169816512377693, -0.0230786074808287, -0.286590309701014, 0.663450144122639, -0.00195933827339019, -0.0017219483269961, -0.0330667115180805, 0.0495015510214933, -0.00499921670052642, -0.00323283077542312, 0.132641023685632, 0.00989665381744741, 0.00149623336497992, 0.0252511359143223},
5151
{0.00714461813298495, 0.0592677805711995, -0.0110736837110986, 0.0435405986330707, 0.678617626993249, -0.199865180906401, -0.074737252878183, -0.0302167740416122, -0.20516227285544, 0.281641379865613, -0.00775717045765736, -0.00225454345767588, -0.0212943165654494, 0.0210139153012294, -0.00321939794170587, -0.00231429635682646, 0.417840765114924, 0.0311760667119139, 0.00471337808350592, 0.0129387597643602},
5152
{0.00458809898063892, 0.0461725856048027, -0.0385687396087239, -0.0639547452440238, 0.238148410057832, 0.532758645187123, -0.118604871591271, 0.0805455333806928, -0.0953008032716591, 0.0289302825963627, -0.0107507634380462, 0.00600968869404693, -0.00863840057902648, 0.002158555352948, -0.00130600336283489, -0.00107502368122838, 0.364295325645881, 0.0271809175250061, 0.00410936832204634, 0.0033019394294335},
5153
{0.00196338908550119, 0.0234627458142642, 0.0612042229600472, 0.213985565988335, -0.297583634515968, 0.872691107158041, -0.0875131805869245, 0.131938489103153, -0.0193111235761631, -0.0099278241164432, -0.00705250360640749, 0.00984423608600691, -0.00155624293107934, -0.00074073793846627, -0.000235281807411435, -0.000217835678638819, 0.10019333967366, 0.00747565700272542, 0.00113021306382387, 0.000249398821943366}};
5156
// Compute element tensor using UFL quadrature representation
5157
// Optimisations: ('simplify expressions', True), ('ignore zero tables', True), ('non zero columns', True), ('remove zero terms', True), ('ignore ones', True)
5158
// Total number of operations to compute element tensor: 5248
5160
// Loop quadrature points for integral
5161
// Number of operations to compute element tensor for following IP loop = 5248
5162
for (unsigned int ip = 0; ip < 64; ip++)
5165
// Function declarations
5168
// Total number of operations to compute function values = 40
5169
for (unsigned int r = 0; r < 20; r++)
5171
F0 += FE0[ip][r]*w[0][r];
5172
}// end loop over 'r'
5174
// Number of operations to compute ip constants: 2
5175
// Number of operations: 2
5176
const double Gip0 = F0*W64[ip]*det;
5179
// Number of operations for primary indices = 40
5180
for (unsigned int j = 0; j < 20; j++)
5182
// Number of operations to compute entry = 2
5183
A[j] += FE0[ip][j]*Gip0;
5184
}// end loop over 'j'
5185
}// end loop over 'ip'
5190
/// This class defines the interface for the tabulation of the cell
5191
/// tensor corresponding to the local contribution to a form from
5192
/// the integral over a cell.
5194
class poisson3dp3_1_cell_integral_0: public ufc::cell_integral
5198
poisson3dp3_1_cell_integral_0_quadrature integral_0_quadrature;
5203
poisson3dp3_1_cell_integral_0() : ufc::cell_integral()
5209
virtual ~poisson3dp3_1_cell_integral_0()
5214
/// Tabulate the tensor for the contribution from a local cell
5215
virtual void tabulate_tensor(double* A,
5216
const double * const * w,
5217
const ufc::cell& c) const
5219
// Reset values of the element tensor block
5220
for (unsigned int j = 0; j < 20; j++)
5223
// Add all contributions to element tensor
5224
integral_0_quadrature.tabulate_tensor(A, w, c);
5229
/// This class defines the interface for the assembly of the global
5230
/// tensor corresponding to a form with r + n arguments, that is, a
5233
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
5235
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
5236
/// global tensor A is defined by
5238
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
5240
/// where each argument Vj represents the application to the
5241
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
5242
/// fixed functions (coefficients).
5244
class poisson3dp3_form_1: public ufc::form
5249
poisson3dp3_form_1() : ufc::form()
5255
virtual ~poisson3dp3_form_1()
5260
/// Return a string identifying the form
5261
virtual const char* signature() const
5263
return "Form([Integral(Product(BasisFunction(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 3), 0), Function(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 3), 0)), Measure('cell', 0, None))])";
5266
/// Return the rank of the global tensor (r)
5267
virtual unsigned int rank() const
5272
/// Return the number of coefficients (n)
5273
virtual unsigned int num_coefficients() const
5278
/// Return the number of cell integrals
5279
virtual unsigned int num_cell_integrals() const
5284
/// Return the number of exterior facet integrals
5285
virtual unsigned int num_exterior_facet_integrals() const
5290
/// Return the number of interior facet integrals
5291
virtual unsigned int num_interior_facet_integrals() const
5296
/// Create a new finite element for argument function i
5297
virtual ufc::finite_element* create_finite_element(unsigned int i) const
5302
return new poisson3dp3_1_finite_element_0();
5305
return new poisson3dp3_1_finite_element_1();
5311
/// Create a new dof map for argument function i
5312
virtual ufc::dof_map* create_dof_map(unsigned int i) const
5317
return new poisson3dp3_1_dof_map_0();
5320
return new poisson3dp3_1_dof_map_1();
5326
/// Create a new cell integral on sub domain i
5327
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
5329
return new poisson3dp3_1_cell_integral_0();
5332
/// Create a new exterior facet integral on sub domain i
5333
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
5338
/// Create a new interior facet integral on sub domain i
5339
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
5348
// Standard library includes
5352
#include <dolfin/common/NoDeleter.h>
5353
#include <dolfin/fem/FiniteElement.h>
5354
#include <dolfin/fem/DofMap.h>
5355
#include <dolfin/fem/Form.h>
5356
#include <dolfin/function/FunctionSpace.h>
5357
#include <dolfin/function/GenericFunction.h>
5358
#include <dolfin/function/CoefficientAssigner.h>
5360
namespace Poisson3DP3
5363
class CoefficientSpace_f: public dolfin::FunctionSpace
5367
CoefficientSpace_f(const dolfin::Mesh& mesh):
5368
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5369
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_1()))),
5370
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_1()), dolfin::reference_to_no_delete_pointer(mesh))))
5375
CoefficientSpace_f(dolfin::Mesh& mesh):
5376
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5377
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_1()))),
5378
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_1()), dolfin::reference_to_no_delete_pointer(mesh))))
5383
CoefficientSpace_f(boost::shared_ptr<dolfin::Mesh> mesh):
5384
dolfin::FunctionSpace(mesh,
5385
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_1()))),
5386
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_1()), mesh)))
5391
CoefficientSpace_f(boost::shared_ptr<const dolfin::Mesh> mesh):
5392
dolfin::FunctionSpace(mesh,
5393
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_1()))),
5394
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_1()), mesh)))
5400
~CoefficientSpace_f()
5406
class Form_0_FunctionSpace_0: public dolfin::FunctionSpace
5410
Form_0_FunctionSpace_0(const dolfin::Mesh& mesh):
5411
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5412
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_0()))),
5413
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_0()), dolfin::reference_to_no_delete_pointer(mesh))))
5418
Form_0_FunctionSpace_0(dolfin::Mesh& mesh):
5419
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5420
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_0()))),
5421
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_0()), dolfin::reference_to_no_delete_pointer(mesh))))
5426
Form_0_FunctionSpace_0(boost::shared_ptr<dolfin::Mesh> mesh):
5427
dolfin::FunctionSpace(mesh,
5428
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_0()))),
5429
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_0()), mesh)))
5434
Form_0_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
5435
dolfin::FunctionSpace(mesh,
5436
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_0()))),
5437
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_0()), mesh)))
5443
~Form_0_FunctionSpace_0()
5449
class Form_0_FunctionSpace_1: public dolfin::FunctionSpace
5453
Form_0_FunctionSpace_1(const dolfin::Mesh& mesh):
5454
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5455
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_1()))),
5456
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_1()), dolfin::reference_to_no_delete_pointer(mesh))))
5461
Form_0_FunctionSpace_1(dolfin::Mesh& mesh):
5462
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5463
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_1()))),
5464
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_1()), dolfin::reference_to_no_delete_pointer(mesh))))
5469
Form_0_FunctionSpace_1(boost::shared_ptr<dolfin::Mesh> mesh):
5470
dolfin::FunctionSpace(mesh,
5471
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_1()))),
5472
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_1()), mesh)))
5477
Form_0_FunctionSpace_1(boost::shared_ptr<const dolfin::Mesh> mesh):
5478
dolfin::FunctionSpace(mesh,
5479
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_0_finite_element_1()))),
5480
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_0_dof_map_1()), mesh)))
5486
~Form_0_FunctionSpace_1()
5492
class Form_0: public dolfin::Form
5497
Form_0(const dolfin::FunctionSpace& V0, const dolfin::FunctionSpace& V1):
5500
_function_spaces[0] = reference_to_no_delete_pointer(V0);
5501
_function_spaces[1] = reference_to_no_delete_pointer(V1);
5503
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_0());
5507
Form_0(boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::FunctionSpace> V1):
5510
_function_spaces[0] = V0;
5511
_function_spaces[1] = V1;
5513
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_0());
5520
/// Return the number of the coefficient with this name
5521
virtual dolfin::uint coefficient_number(const std::string& name) const
5524
dolfin::error("No coefficients.");
5528
/// Return the name of the coefficient with this number
5529
virtual std::string coefficient_name(dolfin::uint i) const
5532
dolfin::error("No coefficients.");
5537
typedef Form_0_FunctionSpace_0 TestSpace;
5538
typedef Form_0_FunctionSpace_1 TrialSpace;
5543
class Form_1_FunctionSpace_0: public dolfin::FunctionSpace
5547
Form_1_FunctionSpace_0(const dolfin::Mesh& mesh):
5548
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5549
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_0()))),
5550
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_0()), dolfin::reference_to_no_delete_pointer(mesh))))
5555
Form_1_FunctionSpace_0(dolfin::Mesh& mesh):
5556
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
5557
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_0()))),
5558
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_0()), dolfin::reference_to_no_delete_pointer(mesh))))
5563
Form_1_FunctionSpace_0(boost::shared_ptr<dolfin::Mesh> mesh):
5564
dolfin::FunctionSpace(mesh,
5565
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_0()))),
5566
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_0()), mesh)))
5571
Form_1_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
5572
dolfin::FunctionSpace(mesh,
5573
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson3dp3_1_finite_element_0()))),
5574
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dof_map>(new poisson3dp3_1_dof_map_0()), mesh)))
5580
~Form_1_FunctionSpace_0()
5586
typedef CoefficientSpace_f Form_1_FunctionSpace_1;
5588
class Form_1: public dolfin::Form
5593
Form_1(const dolfin::FunctionSpace& V0):
5594
dolfin::Form(1, 1), f(*this, 0)
5596
_function_spaces[0] = reference_to_no_delete_pointer(V0);
5598
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_1());
5602
Form_1(const dolfin::FunctionSpace& V0, const dolfin::GenericFunction& f):
5603
dolfin::Form(1, 1), f(*this, 0)
5605
_function_spaces[0] = reference_to_no_delete_pointer(V0);
5609
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_1());
5613
Form_1(const dolfin::FunctionSpace& V0, boost::shared_ptr<const dolfin::GenericFunction> f):
5614
dolfin::Form(1, 1), f(*this, 0)
5616
_function_spaces[0] = reference_to_no_delete_pointer(V0);
5620
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_1());
5624
Form_1(boost::shared_ptr<const dolfin::FunctionSpace> V0):
5625
dolfin::Form(1, 1), f(*this, 0)
5627
_function_spaces[0] = V0;
5629
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_1());
5633
Form_1(boost::shared_ptr<const dolfin::FunctionSpace> V0, const dolfin::GenericFunction& f):
5634
dolfin::Form(1, 1), f(*this, 0)
5636
_function_spaces[0] = V0;
5640
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_1());
5644
Form_1(boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::GenericFunction> f):
5645
dolfin::Form(1, 1), f(*this, 0)
5647
_function_spaces[0] = V0;
5651
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson3dp3_form_1());
5658
/// Return the number of the coefficient with this name
5659
virtual dolfin::uint coefficient_number(const std::string& name) const
5664
dolfin::error("Invalid coefficient.");
5668
/// Return the name of the coefficient with this number
5669
virtual std::string coefficient_name(dolfin::uint i) const
5677
dolfin::error("Invalid coefficient.");
5682
typedef Form_1_FunctionSpace_0 TestSpace;
5683
typedef Form_1_FunctionSpace_1 CoefficientSpace_f;
5686
dolfin::CoefficientAssigner f;
5690
typedef Form_0 BilinearForm;
5691
typedef Form_1 LinearForm;
5692
typedef Form_0::TestSpace FunctionSpace;
5694
} // namespace Poisson3DP3