1
// This code conforms with the UFC specification version 1.0
2
// and was automatically generated by FFC version 0.7.0.
11
/// This class defines the interface for a finite element.
13
class biharmonic_0_finite_element_0: public ufc::finite_element
18
biharmonic_0_finite_element_0() : ufc::finite_element()
24
virtual ~biharmonic_0_finite_element_0()
29
/// Return a string identifying the finite element
30
virtual const char* signature() const
32
return "FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
35
/// Return the cell shape
36
virtual ufc::shape cell_shape() const
41
/// Return the dimension of the finite element function space
42
virtual unsigned int space_dimension() const
47
/// Return the rank of the value space
48
virtual unsigned int value_rank() const
53
/// Return the dimension of the value space for axis i
54
virtual unsigned int value_dimension(unsigned int i) const
59
/// Evaluate basis function i at given point in cell
60
virtual void evaluate_basis(unsigned int i,
62
const double* coordinates,
63
const ufc::cell& c) const
65
// Extract vertex coordinates
66
const double * const * element_coordinates = c.coordinates;
68
// Compute Jacobian of affine map from reference cell
69
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
70
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
71
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
72
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
74
// Compute determinant of Jacobian
75
const double detJ = J_00*J_11 - J_01*J_10;
77
// Compute inverse of Jacobian
79
// Get coordinates and map to the reference (UFC) element
80
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
81
element_coordinates[0][0]*element_coordinates[2][1] +\
82
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
83
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
84
element_coordinates[1][0]*element_coordinates[0][1] -\
85
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
87
// Map coordinates to the reference square
88
if (std::abs(y - 1.0) < 1e-08)
91
x = 2.0 *x/(1.0 - y) - 1.0;
97
// Map degree of freedom to element degree of freedom
98
const unsigned int dof = i;
101
const double scalings_y_0 = 1;
102
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
103
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
105
// Compute psitilde_a
106
const double psitilde_a_0 = 1;
107
const double psitilde_a_1 = x;
108
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
110
// Compute psitilde_bs
111
const double psitilde_bs_0_0 = 1;
112
const double psitilde_bs_0_1 = 1.5*y + 0.5;
113
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
114
const double psitilde_bs_1_0 = 1;
115
const double psitilde_bs_1_1 = 2.5*y + 1.5;
116
const double psitilde_bs_2_0 = 1;
118
// Compute basisvalues
119
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
120
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
121
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
122
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
123
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
124
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
126
// Table(s) of coefficients
127
static const double coefficients0[6][6] = \
128
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
129
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
130
{0, 0, 0.2, 0, 0, 0.163299316},
131
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
132
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
133
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
135
// Extract relevant coefficients
136
const double coeff0_0 = coefficients0[dof][0];
137
const double coeff0_1 = coefficients0[dof][1];
138
const double coeff0_2 = coefficients0[dof][2];
139
const double coeff0_3 = coefficients0[dof][3];
140
const double coeff0_4 = coefficients0[dof][4];
141
const double coeff0_5 = coefficients0[dof][5];
144
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
147
/// Evaluate all basis functions at given point in cell
148
virtual void evaluate_basis_all(double* values,
149
const double* coordinates,
150
const ufc::cell& c) const
152
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
155
/// Evaluate order n derivatives of basis function i at given point in cell
156
virtual void evaluate_basis_derivatives(unsigned int i,
159
const double* coordinates,
160
const ufc::cell& c) const
162
// Extract vertex coordinates
163
const double * const * element_coordinates = c.coordinates;
165
// Compute Jacobian of affine map from reference cell
166
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
167
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
168
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
169
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
171
// Compute determinant of Jacobian
172
const double detJ = J_00*J_11 - J_01*J_10;
174
// Compute inverse of Jacobian
176
// Get coordinates and map to the reference (UFC) element
177
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
178
element_coordinates[0][0]*element_coordinates[2][1] +\
179
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
180
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
181
element_coordinates[1][0]*element_coordinates[0][1] -\
182
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
184
// Map coordinates to the reference square
185
if (std::abs(y - 1.0) < 1e-08)
188
x = 2.0 *x/(1.0 - y) - 1.0;
191
// Compute number of derivatives
192
unsigned int num_derivatives = 1;
194
for (unsigned int j = 0; j < n; j++)
195
num_derivatives *= 2;
198
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
199
unsigned int **combinations = new unsigned int *[num_derivatives];
201
for (unsigned int j = 0; j < num_derivatives; j++)
203
combinations[j] = new unsigned int [n];
204
for (unsigned int k = 0; k < n; k++)
205
combinations[j][k] = 0;
208
// Generate combinations of derivatives
209
for (unsigned int row = 1; row < num_derivatives; row++)
211
for (unsigned int num = 0; num < row; num++)
213
for (unsigned int col = n-1; col+1 > 0; col--)
215
if (combinations[row][col] + 1 > 1)
216
combinations[row][col] = 0;
219
combinations[row][col] += 1;
226
// Compute inverse of Jacobian
227
const double Jinv[2][2] = {{J_11 / detJ, -J_01 / detJ}, {-J_10 / detJ, J_00 / detJ}};
229
// Declare transformation matrix
230
// Declare pointer to two dimensional array and initialise
231
double **transform = new double *[num_derivatives];
233
for (unsigned int j = 0; j < num_derivatives; j++)
235
transform[j] = new double [num_derivatives];
236
for (unsigned int k = 0; k < num_derivatives; k++)
240
// Construct transformation matrix
241
for (unsigned int row = 0; row < num_derivatives; row++)
243
for (unsigned int col = 0; col < num_derivatives; col++)
245
for (unsigned int k = 0; k < n; k++)
246
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
251
for (unsigned int j = 0; j < 1*num_derivatives; j++)
254
// Map degree of freedom to element degree of freedom
255
const unsigned int dof = i;
258
const double scalings_y_0 = 1;
259
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
260
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
262
// Compute psitilde_a
263
const double psitilde_a_0 = 1;
264
const double psitilde_a_1 = x;
265
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
267
// Compute psitilde_bs
268
const double psitilde_bs_0_0 = 1;
269
const double psitilde_bs_0_1 = 1.5*y + 0.5;
270
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
271
const double psitilde_bs_1_0 = 1;
272
const double psitilde_bs_1_1 = 2.5*y + 1.5;
273
const double psitilde_bs_2_0 = 1;
275
// Compute basisvalues
276
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
277
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
278
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
279
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
280
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
281
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
283
// Table(s) of coefficients
284
static const double coefficients0[6][6] = \
285
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
286
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
287
{0, 0, 0.2, 0, 0, 0.163299316},
288
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
289
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
290
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
292
// Interesting (new) part
293
// Tables of derivatives of the polynomial base (transpose)
294
static const double dmats0[6][6] = \
296
{4.89897949, 0, 0, 0, 0, 0},
298
{0, 9.48683298, 0, 0, 0, 0},
299
{4, 0, 7.07106781, 0, 0, 0},
302
static const double dmats1[6][6] = \
304
{2.44948974, 0, 0, 0, 0, 0},
305
{4.24264069, 0, 0, 0, 0, 0},
306
{2.5819889, 4.74341649, -0.912870929, 0, 0, 0},
307
{2, 6.12372436, 3.53553391, 0, 0, 0},
308
{-2.30940108, 0, 8.16496581, 0, 0, 0}};
310
// Compute reference derivatives
311
// Declare pointer to array of derivatives on FIAT element
312
double *derivatives = new double [num_derivatives];
314
// Declare coefficients
322
// Declare new coefficients
323
double new_coeff0_0 = 0;
324
double new_coeff0_1 = 0;
325
double new_coeff0_2 = 0;
326
double new_coeff0_3 = 0;
327
double new_coeff0_4 = 0;
328
double new_coeff0_5 = 0;
330
// Loop possible derivatives
331
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
333
// Get values from coefficients array
334
new_coeff0_0 = coefficients0[dof][0];
335
new_coeff0_1 = coefficients0[dof][1];
336
new_coeff0_2 = coefficients0[dof][2];
337
new_coeff0_3 = coefficients0[dof][3];
338
new_coeff0_4 = coefficients0[dof][4];
339
new_coeff0_5 = coefficients0[dof][5];
341
// Loop derivative order
342
for (unsigned int j = 0; j < n; j++)
344
// Update old coefficients
345
coeff0_0 = new_coeff0_0;
346
coeff0_1 = new_coeff0_1;
347
coeff0_2 = new_coeff0_2;
348
coeff0_3 = new_coeff0_3;
349
coeff0_4 = new_coeff0_4;
350
coeff0_5 = new_coeff0_5;
352
if(combinations[deriv_num][j] == 0)
354
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];
355
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];
356
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];
357
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];
358
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];
359
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];
361
if(combinations[deriv_num][j] == 1)
363
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];
364
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];
365
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];
366
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];
367
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];
368
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];
372
// Compute derivatives on reference element as dot product of coefficients and basisvalues
373
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;
376
// Transform derivatives back to physical element
377
for (unsigned int row = 0; row < num_derivatives; row++)
379
for (unsigned int col = 0; col < num_derivatives; col++)
381
values[row] += transform[row][col]*derivatives[col];
384
// Delete pointer to array of derivatives on FIAT element
385
delete [] derivatives;
387
// Delete pointer to array of combinations of derivatives and transform
388
for (unsigned int row = 0; row < num_derivatives; row++)
390
delete [] combinations[row];
391
delete [] transform[row];
394
delete [] combinations;
398
/// Evaluate order n derivatives of all basis functions at given point in cell
399
virtual void evaluate_basis_derivatives_all(unsigned int n,
401
const double* coordinates,
402
const ufc::cell& c) const
404
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
407
/// Evaluate linear functional for dof i on the function f
408
virtual double evaluate_dof(unsigned int i,
409
const ufc::function& f,
410
const ufc::cell& c) const
412
// The reference points, direction and weights:
413
static const double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
414
static const double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
415
static const double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
417
const double * const * x = c.coordinates;
419
// Iterate over the points:
420
// Evaluate basis functions for affine mapping
421
const double w0 = 1.0 - X[i][0][0] - X[i][0][1];
422
const double w1 = X[i][0][0];
423
const double w2 = X[i][0][1];
425
// Compute affine mapping y = F(X)
427
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0];
428
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1];
430
// Evaluate function at physical points
432
f.evaluate(values, y, c);
434
// Map function values using appropriate mapping
435
// Affine map: Do nothing
437
// Note that we do not map the weights (yet).
439
// Take directional components
440
for(int k = 0; k < 1; k++)
441
result += values[k]*D[i][0][k];
442
// Multiply by weights
448
/// Evaluate linear functionals for all dofs on the function f
449
virtual void evaluate_dofs(double* values,
450
const ufc::function& f,
451
const ufc::cell& c) const
453
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
456
/// Interpolate vertex values from dof values
457
virtual void interpolate_vertex_values(double* vertex_values,
458
const double* dof_values,
459
const ufc::cell& c) const
461
// Evaluate at vertices and use affine mapping
462
vertex_values[0] = dof_values[0];
463
vertex_values[1] = dof_values[1];
464
vertex_values[2] = dof_values[2];
467
/// Return the number of sub elements (for a mixed element)
468
virtual unsigned int num_sub_elements() const
473
/// Create a new finite element for sub element i (for a mixed element)
474
virtual ufc::finite_element* create_sub_element(unsigned int i) const
476
return new biharmonic_0_finite_element_0();
481
/// This class defines the interface for a finite element.
483
class biharmonic_0_finite_element_1: public ufc::finite_element
488
biharmonic_0_finite_element_1() : ufc::finite_element()
494
virtual ~biharmonic_0_finite_element_1()
499
/// Return a string identifying the finite element
500
virtual const char* signature() const
502
return "FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
505
/// Return the cell shape
506
virtual ufc::shape cell_shape() const
508
return ufc::triangle;
511
/// Return the dimension of the finite element function space
512
virtual unsigned int space_dimension() const
517
/// Return the rank of the value space
518
virtual unsigned int value_rank() const
523
/// Return the dimension of the value space for axis i
524
virtual unsigned int value_dimension(unsigned int i) const
529
/// Evaluate basis function i at given point in cell
530
virtual void evaluate_basis(unsigned int i,
532
const double* coordinates,
533
const ufc::cell& c) const
535
// Extract vertex coordinates
536
const double * const * element_coordinates = c.coordinates;
538
// Compute Jacobian of affine map from reference cell
539
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
540
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
541
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
542
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
544
// Compute determinant of Jacobian
545
const double detJ = J_00*J_11 - J_01*J_10;
547
// Compute inverse of Jacobian
549
// Get coordinates and map to the reference (UFC) element
550
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
551
element_coordinates[0][0]*element_coordinates[2][1] +\
552
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
553
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
554
element_coordinates[1][0]*element_coordinates[0][1] -\
555
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
557
// Map coordinates to the reference square
558
if (std::abs(y - 1.0) < 1e-08)
561
x = 2.0 *x/(1.0 - y) - 1.0;
567
// Map degree of freedom to element degree of freedom
568
const unsigned int dof = i;
571
const double scalings_y_0 = 1;
572
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
573
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
575
// Compute psitilde_a
576
const double psitilde_a_0 = 1;
577
const double psitilde_a_1 = x;
578
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
580
// Compute psitilde_bs
581
const double psitilde_bs_0_0 = 1;
582
const double psitilde_bs_0_1 = 1.5*y + 0.5;
583
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
584
const double psitilde_bs_1_0 = 1;
585
const double psitilde_bs_1_1 = 2.5*y + 1.5;
586
const double psitilde_bs_2_0 = 1;
588
// Compute basisvalues
589
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
590
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
591
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
592
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
593
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
594
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
596
// Table(s) of coefficients
597
static const double coefficients0[6][6] = \
598
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
599
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
600
{0, 0, 0.2, 0, 0, 0.163299316},
601
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
602
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
603
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
605
// Extract relevant coefficients
606
const double coeff0_0 = coefficients0[dof][0];
607
const double coeff0_1 = coefficients0[dof][1];
608
const double coeff0_2 = coefficients0[dof][2];
609
const double coeff0_3 = coefficients0[dof][3];
610
const double coeff0_4 = coefficients0[dof][4];
611
const double coeff0_5 = coefficients0[dof][5];
614
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
617
/// Evaluate all basis functions at given point in cell
618
virtual void evaluate_basis_all(double* values,
619
const double* coordinates,
620
const ufc::cell& c) const
622
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
625
/// Evaluate order n derivatives of basis function i at given point in cell
626
virtual void evaluate_basis_derivatives(unsigned int i,
629
const double* coordinates,
630
const ufc::cell& c) const
632
// Extract vertex coordinates
633
const double * const * element_coordinates = c.coordinates;
635
// Compute Jacobian of affine map from reference cell
636
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
637
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
638
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
639
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
641
// Compute determinant of Jacobian
642
const double detJ = J_00*J_11 - J_01*J_10;
644
// Compute inverse of Jacobian
646
// Get coordinates and map to the reference (UFC) element
647
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
648
element_coordinates[0][0]*element_coordinates[2][1] +\
649
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
650
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
651
element_coordinates[1][0]*element_coordinates[0][1] -\
652
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
654
// Map coordinates to the reference square
655
if (std::abs(y - 1.0) < 1e-08)
658
x = 2.0 *x/(1.0 - y) - 1.0;
661
// Compute number of derivatives
662
unsigned int num_derivatives = 1;
664
for (unsigned int j = 0; j < n; j++)
665
num_derivatives *= 2;
668
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
669
unsigned int **combinations = new unsigned int *[num_derivatives];
671
for (unsigned int j = 0; j < num_derivatives; j++)
673
combinations[j] = new unsigned int [n];
674
for (unsigned int k = 0; k < n; k++)
675
combinations[j][k] = 0;
678
// Generate combinations of derivatives
679
for (unsigned int row = 1; row < num_derivatives; row++)
681
for (unsigned int num = 0; num < row; num++)
683
for (unsigned int col = n-1; col+1 > 0; col--)
685
if (combinations[row][col] + 1 > 1)
686
combinations[row][col] = 0;
689
combinations[row][col] += 1;
696
// Compute inverse of Jacobian
697
const double Jinv[2][2] = {{J_11 / detJ, -J_01 / detJ}, {-J_10 / detJ, J_00 / detJ}};
699
// Declare transformation matrix
700
// Declare pointer to two dimensional array and initialise
701
double **transform = new double *[num_derivatives];
703
for (unsigned int j = 0; j < num_derivatives; j++)
705
transform[j] = new double [num_derivatives];
706
for (unsigned int k = 0; k < num_derivatives; k++)
710
// Construct transformation matrix
711
for (unsigned int row = 0; row < num_derivatives; row++)
713
for (unsigned int col = 0; col < num_derivatives; col++)
715
for (unsigned int k = 0; k < n; k++)
716
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
721
for (unsigned int j = 0; j < 1*num_derivatives; j++)
724
// Map degree of freedom to element degree of freedom
725
const unsigned int dof = i;
728
const double scalings_y_0 = 1;
729
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
730
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
732
// Compute psitilde_a
733
const double psitilde_a_0 = 1;
734
const double psitilde_a_1 = x;
735
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
737
// Compute psitilde_bs
738
const double psitilde_bs_0_0 = 1;
739
const double psitilde_bs_0_1 = 1.5*y + 0.5;
740
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
741
const double psitilde_bs_1_0 = 1;
742
const double psitilde_bs_1_1 = 2.5*y + 1.5;
743
const double psitilde_bs_2_0 = 1;
745
// Compute basisvalues
746
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
747
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
748
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
749
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
750
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
751
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
753
// Table(s) of coefficients
754
static const double coefficients0[6][6] = \
755
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
756
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
757
{0, 0, 0.2, 0, 0, 0.163299316},
758
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
759
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
760
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
762
// Interesting (new) part
763
// Tables of derivatives of the polynomial base (transpose)
764
static const double dmats0[6][6] = \
766
{4.89897949, 0, 0, 0, 0, 0},
768
{0, 9.48683298, 0, 0, 0, 0},
769
{4, 0, 7.07106781, 0, 0, 0},
772
static const double dmats1[6][6] = \
774
{2.44948974, 0, 0, 0, 0, 0},
775
{4.24264069, 0, 0, 0, 0, 0},
776
{2.5819889, 4.74341649, -0.912870929, 0, 0, 0},
777
{2, 6.12372436, 3.53553391, 0, 0, 0},
778
{-2.30940108, 0, 8.16496581, 0, 0, 0}};
780
// Compute reference derivatives
781
// Declare pointer to array of derivatives on FIAT element
782
double *derivatives = new double [num_derivatives];
784
// Declare coefficients
792
// Declare new coefficients
793
double new_coeff0_0 = 0;
794
double new_coeff0_1 = 0;
795
double new_coeff0_2 = 0;
796
double new_coeff0_3 = 0;
797
double new_coeff0_4 = 0;
798
double new_coeff0_5 = 0;
800
// Loop possible derivatives
801
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
803
// Get values from coefficients array
804
new_coeff0_0 = coefficients0[dof][0];
805
new_coeff0_1 = coefficients0[dof][1];
806
new_coeff0_2 = coefficients0[dof][2];
807
new_coeff0_3 = coefficients0[dof][3];
808
new_coeff0_4 = coefficients0[dof][4];
809
new_coeff0_5 = coefficients0[dof][5];
811
// Loop derivative order
812
for (unsigned int j = 0; j < n; j++)
814
// Update old coefficients
815
coeff0_0 = new_coeff0_0;
816
coeff0_1 = new_coeff0_1;
817
coeff0_2 = new_coeff0_2;
818
coeff0_3 = new_coeff0_3;
819
coeff0_4 = new_coeff0_4;
820
coeff0_5 = new_coeff0_5;
822
if(combinations[deriv_num][j] == 0)
824
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];
825
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];
826
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];
827
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];
828
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];
829
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];
831
if(combinations[deriv_num][j] == 1)
833
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];
834
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];
835
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];
836
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];
837
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];
838
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];
842
// Compute derivatives on reference element as dot product of coefficients and basisvalues
843
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;
846
// Transform derivatives back to physical element
847
for (unsigned int row = 0; row < num_derivatives; row++)
849
for (unsigned int col = 0; col < num_derivatives; col++)
851
values[row] += transform[row][col]*derivatives[col];
854
// Delete pointer to array of derivatives on FIAT element
855
delete [] derivatives;
857
// Delete pointer to array of combinations of derivatives and transform
858
for (unsigned int row = 0; row < num_derivatives; row++)
860
delete [] combinations[row];
861
delete [] transform[row];
864
delete [] combinations;
868
/// Evaluate order n derivatives of all basis functions at given point in cell
869
virtual void evaluate_basis_derivatives_all(unsigned int n,
871
const double* coordinates,
872
const ufc::cell& c) const
874
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
877
/// Evaluate linear functional for dof i on the function f
878
virtual double evaluate_dof(unsigned int i,
879
const ufc::function& f,
880
const ufc::cell& c) const
882
// The reference points, direction and weights:
883
static const double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
884
static const double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
885
static const double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
887
const double * const * x = c.coordinates;
889
// Iterate over the points:
890
// Evaluate basis functions for affine mapping
891
const double w0 = 1.0 - X[i][0][0] - X[i][0][1];
892
const double w1 = X[i][0][0];
893
const double w2 = X[i][0][1];
895
// Compute affine mapping y = F(X)
897
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0];
898
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1];
900
// Evaluate function at physical points
902
f.evaluate(values, y, c);
904
// Map function values using appropriate mapping
905
// Affine map: Do nothing
907
// Note that we do not map the weights (yet).
909
// Take directional components
910
for(int k = 0; k < 1; k++)
911
result += values[k]*D[i][0][k];
912
// Multiply by weights
918
/// Evaluate linear functionals for all dofs on the function f
919
virtual void evaluate_dofs(double* values,
920
const ufc::function& f,
921
const ufc::cell& c) const
923
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
926
/// Interpolate vertex values from dof values
927
virtual void interpolate_vertex_values(double* vertex_values,
928
const double* dof_values,
929
const ufc::cell& c) const
931
// Evaluate at vertices and use affine mapping
932
vertex_values[0] = dof_values[0];
933
vertex_values[1] = dof_values[1];
934
vertex_values[2] = dof_values[2];
937
/// Return the number of sub elements (for a mixed element)
938
virtual unsigned int num_sub_elements() const
943
/// Create a new finite element for sub element i (for a mixed element)
944
virtual ufc::finite_element* create_sub_element(unsigned int i) const
946
return new biharmonic_0_finite_element_1();
951
/// This class defines the interface for a finite element.
953
class biharmonic_0_finite_element_2: public ufc::finite_element
958
biharmonic_0_finite_element_2() : ufc::finite_element()
964
virtual ~biharmonic_0_finite_element_2()
969
/// Return a string identifying the finite element
970
virtual const char* signature() const
972
return "FiniteElement('Discontinuous Lagrange', Cell('triangle', 1, Space(2)), 0)";
975
/// Return the cell shape
976
virtual ufc::shape cell_shape() const
978
return ufc::triangle;
981
/// Return the dimension of the finite element function space
982
virtual unsigned int space_dimension() const
987
/// Return the rank of the value space
988
virtual unsigned int value_rank() const
993
/// Return the dimension of the value space for axis i
994
virtual unsigned int value_dimension(unsigned int i) const
999
/// Evaluate basis function i at given point in cell
1000
virtual void evaluate_basis(unsigned int i,
1002
const double* coordinates,
1003
const ufc::cell& c) const
1005
// Extract vertex coordinates
1006
const double * const * element_coordinates = c.coordinates;
1008
// Compute Jacobian of affine map from reference cell
1009
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
1010
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
1011
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
1012
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
1014
// Compute determinant of Jacobian
1015
const double detJ = J_00*J_11 - J_01*J_10;
1017
// Compute inverse of Jacobian
1019
// Get coordinates and map to the reference (UFC) element
1020
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
1021
element_coordinates[0][0]*element_coordinates[2][1] +\
1022
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
1023
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
1024
element_coordinates[1][0]*element_coordinates[0][1] -\
1025
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
1027
// Map coordinates to the reference square
1028
if (std::abs(y - 1.0) < 1e-08)
1031
x = 2.0 *x/(1.0 - y) - 1.0;
1037
// Map degree of freedom to element degree of freedom
1038
const unsigned int dof = i;
1040
// Generate scalings
1041
const double scalings_y_0 = 1;
1043
// Compute psitilde_a
1044
const double psitilde_a_0 = 1;
1046
// Compute psitilde_bs
1047
const double psitilde_bs_0_0 = 1;
1049
// Compute basisvalues
1050
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
1052
// Table(s) of coefficients
1053
static const double coefficients0[1][1] = \
1056
// Extract relevant coefficients
1057
const double coeff0_0 = coefficients0[dof][0];
1060
*values = coeff0_0*basisvalue0;
1063
/// Evaluate all basis functions at given point in cell
1064
virtual void evaluate_basis_all(double* values,
1065
const double* coordinates,
1066
const ufc::cell& c) const
1068
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
1071
/// Evaluate order n derivatives of basis function i at given point in cell
1072
virtual void evaluate_basis_derivatives(unsigned int i,
1075
const double* coordinates,
1076
const ufc::cell& c) const
1078
// Extract vertex coordinates
1079
const double * const * element_coordinates = c.coordinates;
1081
// Compute Jacobian of affine map from reference cell
1082
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
1083
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
1084
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
1085
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
1087
// Compute determinant of Jacobian
1088
const double detJ = J_00*J_11 - J_01*J_10;
1090
// Compute inverse of Jacobian
1092
// Get coordinates and map to the reference (UFC) element
1093
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
1094
element_coordinates[0][0]*element_coordinates[2][1] +\
1095
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
1096
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
1097
element_coordinates[1][0]*element_coordinates[0][1] -\
1098
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
1100
// Map coordinates to the reference square
1101
if (std::abs(y - 1.0) < 1e-08)
1104
x = 2.0 *x/(1.0 - y) - 1.0;
1107
// Compute number of derivatives
1108
unsigned int num_derivatives = 1;
1110
for (unsigned int j = 0; j < n; j++)
1111
num_derivatives *= 2;
1114
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
1115
unsigned int **combinations = new unsigned int *[num_derivatives];
1117
for (unsigned int j = 0; j < num_derivatives; j++)
1119
combinations[j] = new unsigned int [n];
1120
for (unsigned int k = 0; k < n; k++)
1121
combinations[j][k] = 0;
1124
// Generate combinations of derivatives
1125
for (unsigned int row = 1; row < num_derivatives; row++)
1127
for (unsigned int num = 0; num < row; num++)
1129
for (unsigned int col = n-1; col+1 > 0; col--)
1131
if (combinations[row][col] + 1 > 1)
1132
combinations[row][col] = 0;
1135
combinations[row][col] += 1;
1142
// Compute inverse of Jacobian
1143
const double Jinv[2][2] = {{J_11 / detJ, -J_01 / detJ}, {-J_10 / detJ, J_00 / detJ}};
1145
// Declare transformation matrix
1146
// Declare pointer to two dimensional array and initialise
1147
double **transform = new double *[num_derivatives];
1149
for (unsigned int j = 0; j < num_derivatives; j++)
1151
transform[j] = new double [num_derivatives];
1152
for (unsigned int k = 0; k < num_derivatives; k++)
1153
transform[j][k] = 1;
1156
// Construct transformation matrix
1157
for (unsigned int row = 0; row < num_derivatives; row++)
1159
for (unsigned int col = 0; col < num_derivatives; col++)
1161
for (unsigned int k = 0; k < n; k++)
1162
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
1167
for (unsigned int j = 0; j < 1*num_derivatives; j++)
1170
// Map degree of freedom to element degree of freedom
1171
const unsigned int dof = i;
1173
// Generate scalings
1174
const double scalings_y_0 = 1;
1176
// Compute psitilde_a
1177
const double psitilde_a_0 = 1;
1179
// Compute psitilde_bs
1180
const double psitilde_bs_0_0 = 1;
1182
// Compute basisvalues
1183
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
1185
// Table(s) of coefficients
1186
static const double coefficients0[1][1] = \
1189
// Interesting (new) part
1190
// Tables of derivatives of the polynomial base (transpose)
1191
static const double dmats0[1][1] = \
1194
static const double dmats1[1][1] = \
1197
// Compute reference derivatives
1198
// Declare pointer to array of derivatives on FIAT element
1199
double *derivatives = new double [num_derivatives];
1201
// Declare coefficients
1202
double coeff0_0 = 0;
1204
// Declare new coefficients
1205
double new_coeff0_0 = 0;
1207
// Loop possible derivatives
1208
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
1210
// Get values from coefficients array
1211
new_coeff0_0 = coefficients0[dof][0];
1213
// Loop derivative order
1214
for (unsigned int j = 0; j < n; j++)
1216
// Update old coefficients
1217
coeff0_0 = new_coeff0_0;
1219
if(combinations[deriv_num][j] == 0)
1221
new_coeff0_0 = coeff0_0*dmats0[0][0];
1223
if(combinations[deriv_num][j] == 1)
1225
new_coeff0_0 = coeff0_0*dmats1[0][0];
1229
// Compute derivatives on reference element as dot product of coefficients and basisvalues
1230
derivatives[deriv_num] = new_coeff0_0*basisvalue0;
1233
// Transform derivatives back to physical element
1234
for (unsigned int row = 0; row < num_derivatives; row++)
1236
for (unsigned int col = 0; col < num_derivatives; col++)
1238
values[row] += transform[row][col]*derivatives[col];
1241
// Delete pointer to array of derivatives on FIAT element
1242
delete [] derivatives;
1244
// Delete pointer to array of combinations of derivatives and transform
1245
for (unsigned int row = 0; row < num_derivatives; row++)
1247
delete [] combinations[row];
1248
delete [] transform[row];
1251
delete [] combinations;
1252
delete [] transform;
1255
/// Evaluate order n derivatives of all basis functions at given point in cell
1256
virtual void evaluate_basis_derivatives_all(unsigned int n,
1258
const double* coordinates,
1259
const ufc::cell& c) const
1261
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
1264
/// Evaluate linear functional for dof i on the function f
1265
virtual double evaluate_dof(unsigned int i,
1266
const ufc::function& f,
1267
const ufc::cell& c) const
1269
// The reference points, direction and weights:
1270
static const double X[1][1][2] = {{{0.333333333, 0.333333333}}};
1271
static const double W[1][1] = {{1}};
1272
static const double D[1][1][1] = {{{1}}};
1274
const double * const * x = c.coordinates;
1275
double result = 0.0;
1276
// Iterate over the points:
1277
// Evaluate basis functions for affine mapping
1278
const double w0 = 1.0 - X[i][0][0] - X[i][0][1];
1279
const double w1 = X[i][0][0];
1280
const double w2 = X[i][0][1];
1282
// Compute affine mapping y = F(X)
1284
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0];
1285
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1];
1287
// Evaluate function at physical points
1289
f.evaluate(values, y, c);
1291
// Map function values using appropriate mapping
1292
// Affine map: Do nothing
1294
// Note that we do not map the weights (yet).
1296
// Take directional components
1297
for(int k = 0; k < 1; k++)
1298
result += values[k]*D[i][0][k];
1299
// Multiply by weights
1305
/// Evaluate linear functionals for all dofs on the function f
1306
virtual void evaluate_dofs(double* values,
1307
const ufc::function& f,
1308
const ufc::cell& c) const
1310
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1313
/// Interpolate vertex values from dof values
1314
virtual void interpolate_vertex_values(double* vertex_values,
1315
const double* dof_values,
1316
const ufc::cell& c) const
1318
// Evaluate at vertices and use affine mapping
1319
vertex_values[0] = dof_values[0];
1320
vertex_values[1] = dof_values[0];
1321
vertex_values[2] = dof_values[0];
1324
/// Return the number of sub elements (for a mixed element)
1325
virtual unsigned int num_sub_elements() const
1330
/// Create a new finite element for sub element i (for a mixed element)
1331
virtual ufc::finite_element* create_sub_element(unsigned int i) const
1333
return new biharmonic_0_finite_element_2();
1338
/// This class defines the interface for a finite element.
1340
class biharmonic_0_finite_element_3: public ufc::finite_element
1345
biharmonic_0_finite_element_3() : ufc::finite_element()
1351
virtual ~biharmonic_0_finite_element_3()
1356
/// Return a string identifying the finite element
1357
virtual const char* signature() const
1359
return "FiniteElement('Discontinuous Lagrange', Cell('triangle', 1, Space(2)), 0)";
1362
/// Return the cell shape
1363
virtual ufc::shape cell_shape() const
1365
return ufc::triangle;
1368
/// Return the dimension of the finite element function space
1369
virtual unsigned int space_dimension() const
1374
/// Return the rank of the value space
1375
virtual unsigned int value_rank() const
1380
/// Return the dimension of the value space for axis i
1381
virtual unsigned int value_dimension(unsigned int i) const
1386
/// Evaluate basis function i at given point in cell
1387
virtual void evaluate_basis(unsigned int i,
1389
const double* coordinates,
1390
const ufc::cell& c) const
1392
// Extract vertex coordinates
1393
const double * const * element_coordinates = c.coordinates;
1395
// Compute Jacobian of affine map from reference cell
1396
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
1397
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
1398
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
1399
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
1401
// Compute determinant of Jacobian
1402
const double detJ = J_00*J_11 - J_01*J_10;
1404
// Compute inverse of Jacobian
1406
// Get coordinates and map to the reference (UFC) element
1407
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
1408
element_coordinates[0][0]*element_coordinates[2][1] +\
1409
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
1410
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
1411
element_coordinates[1][0]*element_coordinates[0][1] -\
1412
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
1414
// Map coordinates to the reference square
1415
if (std::abs(y - 1.0) < 1e-08)
1418
x = 2.0 *x/(1.0 - y) - 1.0;
1424
// Map degree of freedom to element degree of freedom
1425
const unsigned int dof = i;
1427
// Generate scalings
1428
const double scalings_y_0 = 1;
1430
// Compute psitilde_a
1431
const double psitilde_a_0 = 1;
1433
// Compute psitilde_bs
1434
const double psitilde_bs_0_0 = 1;
1436
// Compute basisvalues
1437
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
1439
// Table(s) of coefficients
1440
static const double coefficients0[1][1] = \
1443
// Extract relevant coefficients
1444
const double coeff0_0 = coefficients0[dof][0];
1447
*values = coeff0_0*basisvalue0;
1450
/// Evaluate all basis functions at given point in cell
1451
virtual void evaluate_basis_all(double* values,
1452
const double* coordinates,
1453
const ufc::cell& c) const
1455
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
1458
/// Evaluate order n derivatives of basis function i at given point in cell
1459
virtual void evaluate_basis_derivatives(unsigned int i,
1462
const double* coordinates,
1463
const ufc::cell& c) const
1465
// Extract vertex coordinates
1466
const double * const * element_coordinates = c.coordinates;
1468
// Compute Jacobian of affine map from reference cell
1469
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
1470
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
1471
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
1472
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
1474
// Compute determinant of Jacobian
1475
const double detJ = J_00*J_11 - J_01*J_10;
1477
// Compute inverse of Jacobian
1479
// Get coordinates and map to the reference (UFC) element
1480
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
1481
element_coordinates[0][0]*element_coordinates[2][1] +\
1482
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
1483
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
1484
element_coordinates[1][0]*element_coordinates[0][1] -\
1485
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
1487
// Map coordinates to the reference square
1488
if (std::abs(y - 1.0) < 1e-08)
1491
x = 2.0 *x/(1.0 - y) - 1.0;
1494
// Compute number of derivatives
1495
unsigned int num_derivatives = 1;
1497
for (unsigned int j = 0; j < n; j++)
1498
num_derivatives *= 2;
1501
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
1502
unsigned int **combinations = new unsigned int *[num_derivatives];
1504
for (unsigned int j = 0; j < num_derivatives; j++)
1506
combinations[j] = new unsigned int [n];
1507
for (unsigned int k = 0; k < n; k++)
1508
combinations[j][k] = 0;
1511
// Generate combinations of derivatives
1512
for (unsigned int row = 1; row < num_derivatives; row++)
1514
for (unsigned int num = 0; num < row; num++)
1516
for (unsigned int col = n-1; col+1 > 0; col--)
1518
if (combinations[row][col] + 1 > 1)
1519
combinations[row][col] = 0;
1522
combinations[row][col] += 1;
1529
// Compute inverse of Jacobian
1530
const double Jinv[2][2] = {{J_11 / detJ, -J_01 / detJ}, {-J_10 / detJ, J_00 / detJ}};
1532
// Declare transformation matrix
1533
// Declare pointer to two dimensional array and initialise
1534
double **transform = new double *[num_derivatives];
1536
for (unsigned int j = 0; j < num_derivatives; j++)
1538
transform[j] = new double [num_derivatives];
1539
for (unsigned int k = 0; k < num_derivatives; k++)
1540
transform[j][k] = 1;
1543
// Construct transformation matrix
1544
for (unsigned int row = 0; row < num_derivatives; row++)
1546
for (unsigned int col = 0; col < num_derivatives; col++)
1548
for (unsigned int k = 0; k < n; k++)
1549
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
1554
for (unsigned int j = 0; j < 1*num_derivatives; j++)
1557
// Map degree of freedom to element degree of freedom
1558
const unsigned int dof = i;
1560
// Generate scalings
1561
const double scalings_y_0 = 1;
1563
// Compute psitilde_a
1564
const double psitilde_a_0 = 1;
1566
// Compute psitilde_bs
1567
const double psitilde_bs_0_0 = 1;
1569
// Compute basisvalues
1570
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
1572
// Table(s) of coefficients
1573
static const double coefficients0[1][1] = \
1576
// Interesting (new) part
1577
// Tables of derivatives of the polynomial base (transpose)
1578
static const double dmats0[1][1] = \
1581
static const double dmats1[1][1] = \
1584
// Compute reference derivatives
1585
// Declare pointer to array of derivatives on FIAT element
1586
double *derivatives = new double [num_derivatives];
1588
// Declare coefficients
1589
double coeff0_0 = 0;
1591
// Declare new coefficients
1592
double new_coeff0_0 = 0;
1594
// Loop possible derivatives
1595
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
1597
// Get values from coefficients array
1598
new_coeff0_0 = coefficients0[dof][0];
1600
// Loop derivative order
1601
for (unsigned int j = 0; j < n; j++)
1603
// Update old coefficients
1604
coeff0_0 = new_coeff0_0;
1606
if(combinations[deriv_num][j] == 0)
1608
new_coeff0_0 = coeff0_0*dmats0[0][0];
1610
if(combinations[deriv_num][j] == 1)
1612
new_coeff0_0 = coeff0_0*dmats1[0][0];
1616
// Compute derivatives on reference element as dot product of coefficients and basisvalues
1617
derivatives[deriv_num] = new_coeff0_0*basisvalue0;
1620
// Transform derivatives back to physical element
1621
for (unsigned int row = 0; row < num_derivatives; row++)
1623
for (unsigned int col = 0; col < num_derivatives; col++)
1625
values[row] += transform[row][col]*derivatives[col];
1628
// Delete pointer to array of derivatives on FIAT element
1629
delete [] derivatives;
1631
// Delete pointer to array of combinations of derivatives and transform
1632
for (unsigned int row = 0; row < num_derivatives; row++)
1634
delete [] combinations[row];
1635
delete [] transform[row];
1638
delete [] combinations;
1639
delete [] transform;
1642
/// Evaluate order n derivatives of all basis functions at given point in cell
1643
virtual void evaluate_basis_derivatives_all(unsigned int n,
1645
const double* coordinates,
1646
const ufc::cell& c) const
1648
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
1651
/// Evaluate linear functional for dof i on the function f
1652
virtual double evaluate_dof(unsigned int i,
1653
const ufc::function& f,
1654
const ufc::cell& c) const
1656
// The reference points, direction and weights:
1657
static const double X[1][1][2] = {{{0.333333333, 0.333333333}}};
1658
static const double W[1][1] = {{1}};
1659
static const double D[1][1][1] = {{{1}}};
1661
const double * const * x = c.coordinates;
1662
double result = 0.0;
1663
// Iterate over the points:
1664
// Evaluate basis functions for affine mapping
1665
const double w0 = 1.0 - X[i][0][0] - X[i][0][1];
1666
const double w1 = X[i][0][0];
1667
const double w2 = X[i][0][1];
1669
// Compute affine mapping y = F(X)
1671
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0];
1672
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1];
1674
// Evaluate function at physical points
1676
f.evaluate(values, y, c);
1678
// Map function values using appropriate mapping
1679
// Affine map: Do nothing
1681
// Note that we do not map the weights (yet).
1683
// Take directional components
1684
for(int k = 0; k < 1; k++)
1685
result += values[k]*D[i][0][k];
1686
// Multiply by weights
1692
/// Evaluate linear functionals for all dofs on the function f
1693
virtual void evaluate_dofs(double* values,
1694
const ufc::function& f,
1695
const ufc::cell& c) const
1697
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1700
/// Interpolate vertex values from dof values
1701
virtual void interpolate_vertex_values(double* vertex_values,
1702
const double* dof_values,
1703
const ufc::cell& c) const
1705
// Evaluate at vertices and use affine mapping
1706
vertex_values[0] = dof_values[0];
1707
vertex_values[1] = dof_values[0];
1708
vertex_values[2] = dof_values[0];
1711
/// Return the number of sub elements (for a mixed element)
1712
virtual unsigned int num_sub_elements() const
1717
/// Create a new finite element for sub element i (for a mixed element)
1718
virtual ufc::finite_element* create_sub_element(unsigned int i) const
1720
return new biharmonic_0_finite_element_3();
1725
/// This class defines the interface for a local-to-global mapping of
1726
/// degrees of freedom (dofs).
1728
class biharmonic_0_dof_map_0: public ufc::dof_map
1732
unsigned int __global_dimension;
1737
biharmonic_0_dof_map_0() : ufc::dof_map()
1739
__global_dimension = 0;
1743
virtual ~biharmonic_0_dof_map_0()
1748
/// Return a string identifying the dof map
1749
virtual const char* signature() const
1751
return "FFC dof map for FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
1754
/// Return true iff mesh entities of topological dimension d are needed
1755
virtual bool needs_mesh_entities(unsigned int d) const
1772
/// Initialize dof map for mesh (return true iff init_cell() is needed)
1773
virtual bool init_mesh(const ufc::mesh& m)
1775
__global_dimension = m.num_entities[0] + m.num_entities[1];
1779
/// Initialize dof map for given cell
1780
virtual void init_cell(const ufc::mesh& m,
1786
/// Finish initialization of dof map for cells
1787
virtual void init_cell_finalize()
1792
/// Return the dimension of the global finite element function space
1793
virtual unsigned int global_dimension() const
1795
return __global_dimension;
1798
/// Return the dimension of the local finite element function space for a cell
1799
virtual unsigned int local_dimension(const ufc::cell& c) const
1804
/// Return the maximum dimension of the local finite element function space
1805
virtual unsigned int max_local_dimension() const
1810
// Return the geometric dimension of the coordinates this dof map provides
1811
virtual unsigned int geometric_dimension() const
1816
/// Return the number of dofs on each cell facet
1817
virtual unsigned int num_facet_dofs() const
1822
/// Return the number of dofs associated with each cell entity of dimension d
1823
virtual unsigned int num_entity_dofs(unsigned int d) const
1825
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1828
/// Tabulate the local-to-global mapping of dofs on a cell
1829
virtual void tabulate_dofs(unsigned int* dofs,
1831
const ufc::cell& c) const
1833
dofs[0] = c.entity_indices[0][0];
1834
dofs[1] = c.entity_indices[0][1];
1835
dofs[2] = c.entity_indices[0][2];
1836
unsigned int offset = m.num_entities[0];
1837
dofs[3] = offset + c.entity_indices[1][0];
1838
dofs[4] = offset + c.entity_indices[1][1];
1839
dofs[5] = offset + c.entity_indices[1][2];
1842
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
1843
virtual void tabulate_facet_dofs(unsigned int* dofs,
1844
unsigned int facet) const
1866
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
1867
virtual void tabulate_entity_dofs(unsigned int* dofs,
1868
unsigned int d, unsigned int i) const
1870
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1873
/// Tabulate the coordinates of all dofs on a cell
1874
virtual void tabulate_coordinates(double** coordinates,
1875
const ufc::cell& c) const
1877
const double * const * x = c.coordinates;
1878
coordinates[0][0] = x[0][0];
1879
coordinates[0][1] = x[0][1];
1880
coordinates[1][0] = x[1][0];
1881
coordinates[1][1] = x[1][1];
1882
coordinates[2][0] = x[2][0];
1883
coordinates[2][1] = x[2][1];
1884
coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
1885
coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
1886
coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
1887
coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
1888
coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
1889
coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
1892
/// Return the number of sub dof maps (for a mixed element)
1893
virtual unsigned int num_sub_dof_maps() const
1898
/// Create a new dof_map for sub dof map i (for a mixed element)
1899
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
1901
return new biharmonic_0_dof_map_0();
1906
/// This class defines the interface for a local-to-global mapping of
1907
/// degrees of freedom (dofs).
1909
class biharmonic_0_dof_map_1: public ufc::dof_map
1913
unsigned int __global_dimension;
1918
biharmonic_0_dof_map_1() : ufc::dof_map()
1920
__global_dimension = 0;
1924
virtual ~biharmonic_0_dof_map_1()
1929
/// Return a string identifying the dof map
1930
virtual const char* signature() const
1932
return "FFC dof map for FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
1935
/// Return true iff mesh entities of topological dimension d are needed
1936
virtual bool needs_mesh_entities(unsigned int d) const
1953
/// Initialize dof map for mesh (return true iff init_cell() is needed)
1954
virtual bool init_mesh(const ufc::mesh& m)
1956
__global_dimension = m.num_entities[0] + m.num_entities[1];
1960
/// Initialize dof map for given cell
1961
virtual void init_cell(const ufc::mesh& m,
1967
/// Finish initialization of dof map for cells
1968
virtual void init_cell_finalize()
1973
/// Return the dimension of the global finite element function space
1974
virtual unsigned int global_dimension() const
1976
return __global_dimension;
1979
/// Return the dimension of the local finite element function space for a cell
1980
virtual unsigned int local_dimension(const ufc::cell& c) const
1985
/// Return the maximum dimension of the local finite element function space
1986
virtual unsigned int max_local_dimension() const
1991
// Return the geometric dimension of the coordinates this dof map provides
1992
virtual unsigned int geometric_dimension() const
1997
/// Return the number of dofs on each cell facet
1998
virtual unsigned int num_facet_dofs() const
2003
/// Return the number of dofs associated with each cell entity of dimension d
2004
virtual unsigned int num_entity_dofs(unsigned int d) const
2006
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2009
/// Tabulate the local-to-global mapping of dofs on a cell
2010
virtual void tabulate_dofs(unsigned int* dofs,
2012
const ufc::cell& c) const
2014
dofs[0] = c.entity_indices[0][0];
2015
dofs[1] = c.entity_indices[0][1];
2016
dofs[2] = c.entity_indices[0][2];
2017
unsigned int offset = m.num_entities[0];
2018
dofs[3] = offset + c.entity_indices[1][0];
2019
dofs[4] = offset + c.entity_indices[1][1];
2020
dofs[5] = offset + c.entity_indices[1][2];
2023
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
2024
virtual void tabulate_facet_dofs(unsigned int* dofs,
2025
unsigned int facet) const
2047
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
2048
virtual void tabulate_entity_dofs(unsigned int* dofs,
2049
unsigned int d, unsigned int i) const
2051
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2054
/// Tabulate the coordinates of all dofs on a cell
2055
virtual void tabulate_coordinates(double** coordinates,
2056
const ufc::cell& c) const
2058
const double * const * x = c.coordinates;
2059
coordinates[0][0] = x[0][0];
2060
coordinates[0][1] = x[0][1];
2061
coordinates[1][0] = x[1][0];
2062
coordinates[1][1] = x[1][1];
2063
coordinates[2][0] = x[2][0];
2064
coordinates[2][1] = x[2][1];
2065
coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
2066
coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
2067
coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
2068
coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
2069
coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
2070
coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
2073
/// Return the number of sub dof maps (for a mixed element)
2074
virtual unsigned int num_sub_dof_maps() const
2079
/// Create a new dof_map for sub dof map i (for a mixed element)
2080
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
2082
return new biharmonic_0_dof_map_1();
2087
/// This class defines the interface for a local-to-global mapping of
2088
/// degrees of freedom (dofs).
2090
class biharmonic_0_dof_map_2: public ufc::dof_map
2094
unsigned int __global_dimension;
2099
biharmonic_0_dof_map_2() : ufc::dof_map()
2101
__global_dimension = 0;
2105
virtual ~biharmonic_0_dof_map_2()
2110
/// Return a string identifying the dof map
2111
virtual const char* signature() const
2113
return "FFC dof map for FiniteElement('Discontinuous Lagrange', Cell('triangle', 1, Space(2)), 0)";
2116
/// Return true iff mesh entities of topological dimension d are needed
2117
virtual bool needs_mesh_entities(unsigned int d) const
2134
/// Initialize dof map for mesh (return true iff init_cell() is needed)
2135
virtual bool init_mesh(const ufc::mesh& m)
2137
__global_dimension = m.num_entities[2];
2141
/// Initialize dof map for given cell
2142
virtual void init_cell(const ufc::mesh& m,
2148
/// Finish initialization of dof map for cells
2149
virtual void init_cell_finalize()
2154
/// Return the dimension of the global finite element function space
2155
virtual unsigned int global_dimension() const
2157
return __global_dimension;
2160
/// Return the dimension of the local finite element function space for a cell
2161
virtual unsigned int local_dimension(const ufc::cell& c) const
2166
/// Return the maximum dimension of the local finite element function space
2167
virtual unsigned int max_local_dimension() const
2172
// Return the geometric dimension of the coordinates this dof map provides
2173
virtual unsigned int geometric_dimension() const
2178
/// Return the number of dofs on each cell facet
2179
virtual unsigned int num_facet_dofs() const
2184
/// Return the number of dofs associated with each cell entity of dimension d
2185
virtual unsigned int num_entity_dofs(unsigned int d) const
2187
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2190
/// Tabulate the local-to-global mapping of dofs on a cell
2191
virtual void tabulate_dofs(unsigned int* dofs,
2193
const ufc::cell& c) const
2195
dofs[0] = c.entity_indices[2][0];
2198
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
2199
virtual void tabulate_facet_dofs(unsigned int* dofs,
2200
unsigned int facet) const
2216
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
2217
virtual void tabulate_entity_dofs(unsigned int* dofs,
2218
unsigned int d, unsigned int i) const
2220
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2223
/// Tabulate the coordinates of all dofs on a cell
2224
virtual void tabulate_coordinates(double** coordinates,
2225
const ufc::cell& c) const
2227
const double * const * x = c.coordinates;
2228
coordinates[0][0] = 0.333333333*x[0][0] + 0.333333333*x[1][0] + 0.333333333*x[2][0];
2229
coordinates[0][1] = 0.333333333*x[0][1] + 0.333333333*x[1][1] + 0.333333333*x[2][1];
2232
/// Return the number of sub dof maps (for a mixed element)
2233
virtual unsigned int num_sub_dof_maps() const
2238
/// Create a new dof_map for sub dof map i (for a mixed element)
2239
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
2241
return new biharmonic_0_dof_map_2();
2246
/// This class defines the interface for a local-to-global mapping of
2247
/// degrees of freedom (dofs).
2249
class biharmonic_0_dof_map_3: public ufc::dof_map
2253
unsigned int __global_dimension;
2258
biharmonic_0_dof_map_3() : ufc::dof_map()
2260
__global_dimension = 0;
2264
virtual ~biharmonic_0_dof_map_3()
2269
/// Return a string identifying the dof map
2270
virtual const char* signature() const
2272
return "FFC dof map for FiniteElement('Discontinuous Lagrange', Cell('triangle', 1, Space(2)), 0)";
2275
/// Return true iff mesh entities of topological dimension d are needed
2276
virtual bool needs_mesh_entities(unsigned int d) const
2293
/// Initialize dof map for mesh (return true iff init_cell() is needed)
2294
virtual bool init_mesh(const ufc::mesh& m)
2296
__global_dimension = m.num_entities[2];
2300
/// Initialize dof map for given cell
2301
virtual void init_cell(const ufc::mesh& m,
2307
/// Finish initialization of dof map for cells
2308
virtual void init_cell_finalize()
2313
/// Return the dimension of the global finite element function space
2314
virtual unsigned int global_dimension() const
2316
return __global_dimension;
2319
/// Return the dimension of the local finite element function space for a cell
2320
virtual unsigned int local_dimension(const ufc::cell& c) const
2325
/// Return the maximum dimension of the local finite element function space
2326
virtual unsigned int max_local_dimension() const
2331
// Return the geometric dimension of the coordinates this dof map provides
2332
virtual unsigned int geometric_dimension() const
2337
/// Return the number of dofs on each cell facet
2338
virtual unsigned int num_facet_dofs() const
2343
/// Return the number of dofs associated with each cell entity of dimension d
2344
virtual unsigned int num_entity_dofs(unsigned int d) const
2346
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2349
/// Tabulate the local-to-global mapping of dofs on a cell
2350
virtual void tabulate_dofs(unsigned int* dofs,
2352
const ufc::cell& c) const
2354
dofs[0] = c.entity_indices[2][0];
2357
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
2358
virtual void tabulate_facet_dofs(unsigned int* dofs,
2359
unsigned int facet) const
2375
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
2376
virtual void tabulate_entity_dofs(unsigned int* dofs,
2377
unsigned int d, unsigned int i) const
2379
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
2382
/// Tabulate the coordinates of all dofs on a cell
2383
virtual void tabulate_coordinates(double** coordinates,
2384
const ufc::cell& c) const
2386
const double * const * x = c.coordinates;
2387
coordinates[0][0] = 0.333333333*x[0][0] + 0.333333333*x[1][0] + 0.333333333*x[2][0];
2388
coordinates[0][1] = 0.333333333*x[0][1] + 0.333333333*x[1][1] + 0.333333333*x[2][1];
2391
/// Return the number of sub dof maps (for a mixed element)
2392
virtual unsigned int num_sub_dof_maps() const
2397
/// Create a new dof_map for sub dof map i (for a mixed element)
2398
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
2400
return new biharmonic_0_dof_map_3();
2405
/// This class defines the interface for the tabulation of the cell
2406
/// tensor corresponding to the local contribution to a form from
2407
/// the integral over a cell.
2409
class biharmonic_0_cell_integral_0_quadrature: public ufc::cell_integral
2414
biharmonic_0_cell_integral_0_quadrature() : ufc::cell_integral()
2420
virtual ~biharmonic_0_cell_integral_0_quadrature()
2425
/// Tabulate the tensor for the contribution from a local cell
2426
virtual void tabulate_tensor(double* A,
2427
const double * const * w,
2428
const ufc::cell& c) const
2430
// Extract vertex coordinates
2431
const double * const * x = c.coordinates;
2433
// Compute Jacobian of affine map from reference cell
2434
const double J_00 = x[1][0] - x[0][0];
2435
const double J_01 = x[2][0] - x[0][0];
2436
const double J_10 = x[1][1] - x[0][1];
2437
const double J_11 = x[2][1] - x[0][1];
2439
// Compute determinant of Jacobian
2440
double detJ = J_00*J_11 - J_01*J_10;
2442
// Compute inverse of Jacobian
2443
const double Jinv_00 = J_11 / detJ;
2444
const double Jinv_01 = -J_01 / detJ;
2445
const double Jinv_10 = -J_10 / detJ;
2446
const double Jinv_11 = J_00 / detJ;
2449
const double det = std::abs(detJ);
2452
// Array of quadrature weights
2453
static const double W1 = 0.5;
2454
// Quadrature points on the UFC reference element: (0.333333333, 0.333333333)
2456
// Value of basis functions at quadrature points.
2457
static const double FE0_D02[1][6] = \
2458
{{4, 0, 4, 0, -8, 0}};
2460
static const double FE0_D11[1][6] = \
2461
{{4, 0, 0, 4, -4, -4}};
2463
static const double FE0_D20[1][6] = \
2464
{{4, 4, 0, 0, 0, -8}};
2467
// Compute element tensor using UFL quadrature representation
2468
// Optimisations: ('simplify expressions', False), ('ignore zero tables', False), ('non zero columns', False), ('remove zero terms', False), ('ignore ones', False)
2469
// Total number of operations to compute element tensor: 1800
2471
// Loop quadrature points for integral
2472
// Number of operations to compute element tensor for following IP loop = 1800
2473
// Only 1 integration point, omitting IP loop.
2475
// Number of operations for primary indices: 1800
2476
for (unsigned int j = 0; j < 6; j++)
2478
for (unsigned int k = 0; k < 6; k++)
2480
// Number of operations to compute entry: 50
2481
A[j*6 + k] += ((Jinv_01*Jinv_01*FE0_D20[0][j] + Jinv_01*Jinv_11*FE0_D11[0][j] + Jinv_11*Jinv_01*FE0_D11[0][j] + Jinv_11*Jinv_11*FE0_D02[0][j]) + (Jinv_00*Jinv_00*FE0_D20[0][j] + Jinv_00*Jinv_10*FE0_D11[0][j] + Jinv_10*Jinv_00*FE0_D11[0][j] + Jinv_10*Jinv_10*FE0_D02[0][j]))*((Jinv_01*Jinv_01*FE0_D20[0][k] + Jinv_01*Jinv_11*FE0_D11[0][k] + Jinv_11*Jinv_01*FE0_D11[0][k] + Jinv_11*Jinv_11*FE0_D02[0][k]) + (Jinv_00*Jinv_00*FE0_D20[0][k] + Jinv_00*Jinv_10*FE0_D11[0][k] + Jinv_10*Jinv_00*FE0_D11[0][k] + Jinv_10*Jinv_10*FE0_D02[0][k]))*W1*det;
2482
}// end loop over 'k'
2483
}// end loop over 'j'
2488
/// This class defines the interface for the tabulation of the cell
2489
/// tensor corresponding to the local contribution to a form from
2490
/// the integral over a cell.
2492
class biharmonic_0_cell_integral_0: public ufc::cell_integral
2496
biharmonic_0_cell_integral_0_quadrature integral_0_quadrature;
2501
biharmonic_0_cell_integral_0() : ufc::cell_integral()
2507
virtual ~biharmonic_0_cell_integral_0()
2512
/// Tabulate the tensor for the contribution from a local cell
2513
virtual void tabulate_tensor(double* A,
2514
const double * const * w,
2515
const ufc::cell& c) const
2517
// Reset values of the element tensor block
2518
for (unsigned int j = 0; j < 36; j++)
2521
// Add all contributions to element tensor
2522
integral_0_quadrature.tabulate_tensor(A, w, c);
2527
/// This class defines the interface for the tabulation of the
2528
/// interior facet tensor corresponding to the local contribution to
2529
/// a form from the integral over an interior facet.
2531
class biharmonic_0_interior_facet_integral_0_quadrature: public ufc::interior_facet_integral
2536
biharmonic_0_interior_facet_integral_0_quadrature() : ufc::interior_facet_integral()
2542
virtual ~biharmonic_0_interior_facet_integral_0_quadrature()
2547
/// Tabulate the tensor for the contribution from a local interior facet
2548
virtual void tabulate_tensor(double* A,
2549
const double * const * w,
2550
const ufc::cell& c0,
2551
const ufc::cell& c1,
2552
unsigned int facet0,
2553
unsigned int facet1) const
2555
// Extract vertex coordinates
2556
const double * const * x0 = c0.coordinates;
2558
// Compute Jacobian of affine map from reference cell
2559
const double J0_00 = x0[1][0] - x0[0][0];
2560
const double J0_01 = x0[2][0] - x0[0][0];
2561
const double J0_10 = x0[1][1] - x0[0][1];
2562
const double J0_11 = x0[2][1] - x0[0][1];
2564
// Compute determinant of Jacobian
2565
double detJ0 = J0_00*J0_11 - J0_01*J0_10;
2567
// Compute inverse of Jacobian
2568
const double Jinv0_00 = J0_11 / detJ0;
2569
const double Jinv0_01 = -J0_01 / detJ0;
2570
const double Jinv0_10 = -J0_10 / detJ0;
2571
const double Jinv0_11 = J0_00 / detJ0;
2573
// Extract vertex coordinates
2574
const double * const * x1 = c1.coordinates;
2576
// Compute Jacobian of affine map from reference cell
2577
const double J1_00 = x1[1][0] - x1[0][0];
2578
const double J1_01 = x1[2][0] - x1[0][0];
2579
const double J1_10 = x1[1][1] - x1[0][1];
2580
const double J1_11 = x1[2][1] - x1[0][1];
2582
// Compute determinant of Jacobian
2583
double detJ1 = J1_00*J1_11 - J1_01*J1_10;
2585
// Compute inverse of Jacobian
2586
const double Jinv1_00 = J1_11 / detJ1;
2587
const double Jinv1_01 = -J1_01 / detJ1;
2588
const double Jinv1_10 = -J1_10 / detJ1;
2589
const double Jinv1_11 = J1_00 / detJ1;
2591
// Vertices on edges
2592
static unsigned int edge_vertices[3][2] = {{1, 2}, {0, 2}, {0, 1}};
2595
const unsigned int v0 = edge_vertices[facet0][0];
2596
const unsigned int v1 = edge_vertices[facet0][1];
2598
// Compute scale factor (length of edge scaled by length of reference interval)
2599
const double dx0 = x0[v1][0] - x0[v0][0];
2600
const double dx1 = x0[v1][1] - x0[v0][1];
2601
const double det = std::sqrt(dx0*dx0 + dx1*dx1);
2603
const bool direction = dx1*(x0[facet0][0] - x0[v0][0]) - dx0*(x0[facet0][1] - x0[v0][1]) < 0;
2605
// Compute facet normals from the facet scale factor constants
2606
const double n00 = direction ? dx1 / det : -dx1 / det;
2607
const double n01 = direction ? -dx0 / det : dx0 / det;
2609
// Compute facet normals from the facet scale factor constants
2610
const double n10 = !direction ? dx1 / det : -dx1 / det;
2611
const double n11 = !direction ? -dx0 / det : dx0 / det;
2614
// Array of quadrature weights
2615
static const double W2[2] = {0.5, 0.5};
2616
// Quadrature points on the UFC reference element: (0.211324865), (0.788675135)
2618
// Value of basis functions at quadrature points.
2619
static const double FE0_f0_D01[2][6] = \
2620
{{1, 0, -0.154700538, 3.15470054, -0.845299462, -3.15470054},
2621
{1, 0, 2.15470054, 0.845299462, -3.15470054, -0.845299462}};
2623
static const double FE0_f0_D02[2][6] = \
2624
{{4, 0, 4, 0, -8, 0},
2625
{4, 0, 4, 0, -8, 0}};
2627
static const double FE0_f0_D10[2][6] = \
2628
{{1, 2.15470054, 0, 0.845299462, -0.845299462, -3.15470054},
2629
{1, -0.154700538, 0, 3.15470054, -3.15470054, -0.845299462}};
2631
static const double FE0_f0_D11[2][6] = \
2632
{{4, 0, 0, 4, -4, -4},
2633
{4, 0, 0, 4, -4, -4}};
2635
static const double FE0_f0_D20[2][6] = \
2636
{{4, 4, 0, 0, 0, -8},
2637
{4, 4, 0, 0, 0, -8}};
2639
static const double FE0_f1_D01[2][6] = \
2640
{{-2.15470054, 0, -0.154700538, 0, 2.30940108, 0},
2641
{0.154700538, 0, 2.15470054, 0, -2.30940108, 0}};
2643
static const double FE0_f1_D10[2][6] = \
2644
{{-2.15470054, -1, 0, 0.845299462, -0.845299462, 3.15470054},
2645
{0.154700538, -1, 0, 3.15470054, -3.15470054, 0.845299462}};
2647
static const double FE0_f2_D01[2][6] = \
2648
{{-2.15470054, 0, -1, 0.845299462, 3.15470054, -0.845299462},
2649
{0.154700538, 0, -1, 3.15470054, 0.845299462, -3.15470054}};
2651
static const double FE0_f2_D10[2][6] = \
2652
{{-2.15470054, -0.154700538, 0, 0, 0, 2.30940108},
2653
{0.154700538, 2.15470054, 0, 0, 0, -2.30940108}};
2656
// Compute element tensor using UFL quadrature representation
2657
// Optimisations: ('simplify expressions', False), ('ignore zero tables', False), ('non zero columns', False), ('remove zero terms', False), ('ignore ones', False)
2665
// Total number of operations to compute element tensor (from this point): 27360
2667
// Loop quadrature points for integral
2668
// Number of operations to compute element tensor for following IP loop = 27360
2669
for (unsigned int ip = 0; ip < 2; ip++)
2672
// Number of operations for primary indices: 13680
2673
for (unsigned int j = 0; j < 6; j++)
2675
for (unsigned int k = 0; k < 6; k++)
2677
// Number of operations to compute entry: 95
2678
A[(j + 6)*12 + k] += (((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*-1))*W2[ip]*det;
2679
// Number of operations to compute entry: 95
2680
A[(j + 6)*12 + (k + 6)] += ((((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*-1) + ((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*w[1][0]/(w[0][0]))*W2[ip]*det;
2681
// Number of operations to compute entry: 95
2682
A[j*12 + (k + 6)] += (((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*-1))*W2[ip]*det;
2683
// Number of operations to compute entry: 95
2684
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*-1) + ((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2685
}// end loop over 'k'
2686
}// end loop over 'j'
2687
}// end loop over 'ip'
2692
// Total number of operations to compute element tensor (from this point): 27360
2694
// Loop quadrature points for integral
2695
// Number of operations to compute element tensor for following IP loop = 27360
2696
for (unsigned int ip = 0; ip < 2; ip++)
2699
// Number of operations for primary indices: 13680
2700
for (unsigned int j = 0; j < 6; j++)
2702
for (unsigned int k = 0; k < 6; k++)
2704
// Number of operations to compute entry: 95
2705
A[(j + 6)*12 + k] += ((((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*-1) + ((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2706
// Number of operations to compute entry: 95
2707
A[(j + 6)*12 + (k + 6)] += (((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*-1))*W2[ip]*det;
2708
// Number of operations to compute entry: 95
2709
A[j*12 + (k + 6)] += (((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*-1))*W2[ip]*det;
2710
// Number of operations to compute entry: 95
2711
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*-1) + ((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2712
}// end loop over 'k'
2713
}// end loop over 'j'
2714
}// end loop over 'ip'
2719
// Total number of operations to compute element tensor (from this point): 27360
2721
// Loop quadrature points for integral
2722
// Number of operations to compute element tensor for following IP loop = 27360
2723
for (unsigned int ip = 0; ip < 2; ip++)
2726
// Number of operations for primary indices: 13680
2727
for (unsigned int j = 0; j < 6; j++)
2729
for (unsigned int k = 0; k < 6; k++)
2731
// Number of operations to compute entry: 95
2732
A[(j + 6)*12 + k] += (((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*-1))*W2[ip]*det;
2733
// Number of operations to compute entry: 95
2734
A[(j + 6)*12 + (k + 6)] += (((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*-1 + ((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*-1))*W2[ip]*det;
2735
// Number of operations to compute entry: 95
2736
A[j*12 + (k + 6)] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*-1 + ((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*-1) + ((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*w[1][0]/(w[0][0]))*W2[ip]*det;
2737
// Number of operations to compute entry: 95
2738
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*-1) + ((Jinv0_01*FE0_f0_D10[ip][j] + Jinv0_11*FE0_f0_D01[ip][j])*n01 + (Jinv0_00*FE0_f0_D10[ip][j] + Jinv0_10*FE0_f0_D01[ip][j])*n00)*((Jinv0_01*FE0_f0_D10[ip][k] + Jinv0_11*FE0_f0_D01[ip][k])*n01 + (Jinv0_00*FE0_f0_D10[ip][k] + Jinv0_10*FE0_f0_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2739
}// end loop over 'k'
2740
}// end loop over 'j'
2741
}// end loop over 'ip'
2751
// Total number of operations to compute element tensor (from this point): 27360
2753
// Loop quadrature points for integral
2754
// Number of operations to compute element tensor for following IP loop = 27360
2755
for (unsigned int ip = 0; ip < 2; ip++)
2758
// Number of operations for primary indices: 13680
2759
for (unsigned int j = 0; j < 6; j++)
2761
for (unsigned int k = 0; k < 6; k++)
2763
// Number of operations to compute entry: 95
2764
A[(j + 6)*12 + k] += (((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*-1))*W2[ip]*det;
2765
// Number of operations to compute entry: 95
2766
A[(j + 6)*12 + (k + 6)] += ((((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*-1) + ((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*w[1][0]/(w[0][0]))*W2[ip]*det;
2767
// Number of operations to compute entry: 95
2768
A[j*12 + (k + 6)] += (((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*-1))*W2[ip]*det;
2769
// Number of operations to compute entry: 95
2770
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*-1) + ((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2771
}// end loop over 'k'
2772
}// end loop over 'j'
2773
}// end loop over 'ip'
2778
// Total number of operations to compute element tensor (from this point): 27360
2780
// Loop quadrature points for integral
2781
// Number of operations to compute element tensor for following IP loop = 27360
2782
for (unsigned int ip = 0; ip < 2; ip++)
2785
// Number of operations for primary indices: 13680
2786
for (unsigned int j = 0; j < 6; j++)
2788
for (unsigned int k = 0; k < 6; k++)
2790
// Number of operations to compute entry: 95
2791
A[(j + 6)*12 + k] += ((((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*-1) + ((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2792
// Number of operations to compute entry: 95
2793
A[(j + 6)*12 + (k + 6)] += (((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*-1))*W2[ip]*det;
2794
// Number of operations to compute entry: 95
2795
A[j*12 + (k + 6)] += (((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*-1))*W2[ip]*det;
2796
// Number of operations to compute entry: 95
2797
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*-1) + ((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2798
}// end loop over 'k'
2799
}// end loop over 'j'
2800
}// end loop over 'ip'
2805
// Total number of operations to compute element tensor (from this point): 27360
2807
// Loop quadrature points for integral
2808
// Number of operations to compute element tensor for following IP loop = 27360
2809
for (unsigned int ip = 0; ip < 2; ip++)
2812
// Number of operations for primary indices: 13680
2813
for (unsigned int j = 0; j < 6; j++)
2815
for (unsigned int k = 0; k < 6; k++)
2817
// Number of operations to compute entry: 95
2818
A[(j + 6)*12 + k] += (((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*-1))*W2[ip]*det;
2819
// Number of operations to compute entry: 95
2820
A[(j + 6)*12 + (k + 6)] += (((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*-1 + ((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*-1))*W2[ip]*det;
2821
// Number of operations to compute entry: 95
2822
A[j*12 + (k + 6)] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*-1 + ((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*-1) + ((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*w[1][0]/(w[0][0]))*W2[ip]*det;
2823
// Number of operations to compute entry: 95
2824
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*-1) + ((Jinv0_00*FE0_f1_D10[ip][j] + Jinv0_10*FE0_f1_D01[ip][j])*n00 + (Jinv0_01*FE0_f1_D10[ip][j] + Jinv0_11*FE0_f1_D01[ip][j])*n01)*((Jinv0_01*FE0_f1_D10[ip][k] + Jinv0_11*FE0_f1_D01[ip][k])*n01 + (Jinv0_00*FE0_f1_D10[ip][k] + Jinv0_10*FE0_f1_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2825
}// end loop over 'k'
2826
}// end loop over 'j'
2827
}// end loop over 'ip'
2837
// Total number of operations to compute element tensor (from this point): 27360
2839
// Loop quadrature points for integral
2840
// Number of operations to compute element tensor for following IP loop = 27360
2841
for (unsigned int ip = 0; ip < 2; ip++)
2844
// Number of operations for primary indices: 13680
2845
for (unsigned int j = 0; j < 6; j++)
2847
for (unsigned int k = 0; k < 6; k++)
2849
// Number of operations to compute entry: 95
2850
A[(j + 6)*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*-1) + ((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2851
// Number of operations to compute entry: 95
2852
A[(j + 6)*12 + (k + 6)] += ((((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*-1) + ((Jinv1_01*FE0_f0_D10[ip][j] + Jinv1_11*FE0_f0_D01[ip][j])*n11 + (Jinv1_00*FE0_f0_D10[ip][j] + Jinv1_10*FE0_f0_D01[ip][j])*n10)*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*w[1][0]/(w[0][0]))*W2[ip]*det;
2853
// Number of operations to compute entry: 95
2854
A[j*12 + (k + 6)] += ((((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*-1) + ((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*((Jinv1_00*FE0_f0_D10[ip][k] + Jinv1_10*FE0_f0_D01[ip][k])*n10 + (Jinv1_01*FE0_f0_D10[ip][k] + Jinv1_11*FE0_f0_D01[ip][k])*n11)*w[1][0]/(w[0][0]))*W2[ip]*det;
2855
// Number of operations to compute entry: 95
2856
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*-1) + ((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2857
}// end loop over 'k'
2858
}// end loop over 'j'
2859
}// end loop over 'ip'
2864
// Total number of operations to compute element tensor (from this point): 27360
2866
// Loop quadrature points for integral
2867
// Number of operations to compute element tensor for following IP loop = 27360
2868
for (unsigned int ip = 0; ip < 2; ip++)
2871
// Number of operations for primary indices: 13680
2872
for (unsigned int j = 0; j < 6; j++)
2874
for (unsigned int k = 0; k < 6; k++)
2876
// Number of operations to compute entry: 95
2877
A[(j + 6)*12 + k] += (((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*w[1][0]/(w[0][0]) + (((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*-1))*W2[ip]*det;
2878
// Number of operations to compute entry: 95
2879
A[(j + 6)*12 + (k + 6)] += (((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f1_D10[ip][j] + Jinv1_11*FE0_f1_D01[ip][j])*n11 + (Jinv1_00*FE0_f1_D10[ip][j] + Jinv1_10*FE0_f1_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*-1))*W2[ip]*det;
2880
// Number of operations to compute entry: 95
2881
A[j*12 + (k + 6)] += ((((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*-1) + ((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*((Jinv1_01*FE0_f1_D10[ip][k] + Jinv1_11*FE0_f1_D01[ip][k])*n11 + (Jinv1_00*FE0_f1_D10[ip][k] + Jinv1_10*FE0_f1_D01[ip][k])*n10)*w[1][0]/(w[0][0]))*W2[ip]*det;
2882
// Number of operations to compute entry: 95
2883
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*-1) + ((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2884
}// end loop over 'k'
2885
}// end loop over 'j'
2886
}// end loop over 'ip'
2891
// Total number of operations to compute element tensor (from this point): 27360
2893
// Loop quadrature points for integral
2894
// Number of operations to compute element tensor for following IP loop = 27360
2895
for (unsigned int ip = 0; ip < 2; ip++)
2898
// Number of operations for primary indices: 13680
2899
for (unsigned int j = 0; j < 6; j++)
2901
for (unsigned int k = 0; k < 6; k++)
2903
// Number of operations to compute entry: 95
2904
A[(j + 6)*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*-1 + ((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*-1) + ((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2905
// Number of operations to compute entry: 95
2906
A[(j + 6)*12 + (k + 6)] += (((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv1_00*Jinv1_00*FE0_f0_D20[ip][j] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][j] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][j]) + (Jinv1_01*Jinv1_01*FE0_f0_D20[ip][j] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][j] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*-1 + ((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv1_01*FE0_f2_D10[ip][j] + Jinv1_11*FE0_f2_D01[ip][j])*n11 + (Jinv1_00*FE0_f2_D10[ip][j] + Jinv1_10*FE0_f2_D01[ip][j])*n10)*-1))*W2[ip]*det;
2907
// Number of operations to compute entry: 95
2908
A[j*12 + (k + 6)] += (((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*w[1][0]/(w[0][0]) + (((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv1_01*FE0_f2_D10[ip][k] + Jinv1_11*FE0_f2_D01[ip][k])*n11 + (Jinv1_00*FE0_f2_D10[ip][k] + Jinv1_10*FE0_f2_D01[ip][k])*n10)*-1 + ((Jinv1_01*Jinv1_01*FE0_f0_D20[ip][k] + Jinv1_01*Jinv1_11*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_01*FE0_f0_D11[ip][k] + Jinv1_11*Jinv1_11*FE0_f0_D02[ip][k]) + (Jinv1_00*Jinv1_00*FE0_f0_D20[ip][k] + Jinv1_00*Jinv1_10*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_00*FE0_f0_D11[ip][k] + Jinv1_10*Jinv1_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*-1))*W2[ip]*det;
2909
// Number of operations to compute entry: 95
2910
A[j*12 + k] += ((((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][k] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][k] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][k]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][k] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][k] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][k]))*0.5*((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*-1 + ((Jinv0_01*Jinv0_01*FE0_f0_D20[ip][j] + Jinv0_01*Jinv0_11*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_01*FE0_f0_D11[ip][j] + Jinv0_11*Jinv0_11*FE0_f0_D02[ip][j]) + (Jinv0_00*Jinv0_00*FE0_f0_D20[ip][j] + Jinv0_00*Jinv0_10*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_00*FE0_f0_D11[ip][j] + Jinv0_10*Jinv0_10*FE0_f0_D02[ip][j]))*0.5*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*-1) + ((Jinv0_01*FE0_f2_D10[ip][j] + Jinv0_11*FE0_f2_D01[ip][j])*n01 + (Jinv0_00*FE0_f2_D10[ip][j] + Jinv0_10*FE0_f2_D01[ip][j])*n00)*((Jinv0_01*FE0_f2_D10[ip][k] + Jinv0_11*FE0_f2_D01[ip][k])*n01 + (Jinv0_00*FE0_f2_D10[ip][k] + Jinv0_10*FE0_f2_D01[ip][k])*n00)*w[1][0]/(w[0][0]))*W2[ip]*det;
2911
}// end loop over 'k'
2912
}// end loop over 'j'
2913
}// end loop over 'ip'
2923
/// This class defines the interface for the tabulation of the
2924
/// interior facet tensor corresponding to the local contribution to
2925
/// a form from the integral over an interior facet.
2927
class biharmonic_0_interior_facet_integral_0: public ufc::interior_facet_integral
2931
biharmonic_0_interior_facet_integral_0_quadrature integral_0_quadrature;
2936
biharmonic_0_interior_facet_integral_0() : ufc::interior_facet_integral()
2942
virtual ~biharmonic_0_interior_facet_integral_0()
2947
/// Tabulate the tensor for the contribution from a local interior facet
2948
virtual void tabulate_tensor(double* A,
2949
const double * const * w,
2950
const ufc::cell& c0,
2951
const ufc::cell& c1,
2952
unsigned int facet0,
2953
unsigned int facet1) const
2955
// Reset values of the element tensor block
2956
for (unsigned int j = 0; j < 144; j++)
2959
// Add all contributions to element tensor
2960
integral_0_quadrature.tabulate_tensor(A, w, c0, c1, facet0, facet1);
2965
/// This class defines the interface for the assembly of the global
2966
/// tensor corresponding to a form with r + n arguments, that is, a
2969
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
2971
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
2972
/// global tensor A is defined by
2974
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
2976
/// where each argument Vj represents the application to the
2977
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
2978
/// fixed functions (coefficients).
2980
class biharmonic_form_0: public ufc::form
2985
biharmonic_form_0() : ufc::form()
2991
virtual ~biharmonic_form_0()
2996
/// Return a string identifying the form
2997
virtual const char* signature() const
2999
return "Form([Integral(Product(IndexSum(Indexed(ComponentTensor(SpatialDerivative(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(0),), {Index(0): 2})), MultiIndex((Index(1),), {Index(1): 2})), MultiIndex((Index(1),), {Index(1): 2})), MultiIndex((Index(0),), {Index(0): 2})), MultiIndex((Index(0),), {Index(0): 2})), IndexSum(Indexed(ComponentTensor(SpatialDerivative(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(2),), {Index(2): 2})), MultiIndex((Index(3),), {Index(3): 2})), MultiIndex((Index(3),), {Index(3): 2})), MultiIndex((Index(2),), {Index(2): 2})), MultiIndex((Index(2),), {Index(2): 2}))), Measure('cell', 0, None)), Integral(Sum(Product(Division(PositiveRestricted(Constant(Cell('triangle', 1, Space(2)), 1)), PositiveRestricted(Constant(Cell('triangle', 1, Space(2)), 0))), Product(Sum(IndexSum(Product(Indexed(NegativeRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(4),), {Index(4): 2})), MultiIndex((Index(4),), {Index(4): 2}))), MultiIndex((Index(5),), {Index(5): 2})), Indexed(NegativeRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(5),), {Index(5): 2}))), MultiIndex((Index(5),), {Index(5): 2})), IndexSum(Product(Indexed(PositiveRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(6),), {Index(6): 2})), MultiIndex((Index(6),), {Index(6): 2}))), MultiIndex((Index(7),), {Index(7): 2})), Indexed(PositiveRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(7),), {Index(7): 2}))), MultiIndex((Index(7),), {Index(7): 2}))), Sum(IndexSum(Product(Indexed(NegativeRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(8),), {Index(8): 2})), MultiIndex((Index(8),), {Index(8): 2}))), MultiIndex((Index(9),), {Index(9): 2})), Indexed(NegativeRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(9),), {Index(9): 2}))), MultiIndex((Index(9),), {Index(9): 2})), IndexSum(Product(Indexed(PositiveRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(10),), {Index(10): 2})), MultiIndex((Index(10),), {Index(10): 2}))), MultiIndex((Index(11),), {Index(11): 2})), Indexed(PositiveRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(11),), {Index(11): 2}))), MultiIndex((Index(11),), {Index(11): 2}))))), Sum(Product(IntValue(-1, (), (), {}), Product(Product(FloatValue(0.5, (), (), {}), Sum(NegativeRestricted(IndexSum(Indexed(ComponentTensor(SpatialDerivative(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(12),), {Index(12): 2})), MultiIndex((Index(13),), {Index(13): 2})), MultiIndex((Index(13),), {Index(13): 2})), MultiIndex((Index(12),), {Index(12): 2})), MultiIndex((Index(12),), {Index(12): 2}))), PositiveRestricted(IndexSum(Indexed(ComponentTensor(SpatialDerivative(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(14),), {Index(14): 2})), MultiIndex((Index(15),), {Index(15): 2})), MultiIndex((Index(15),), {Index(15): 2})), MultiIndex((Index(14),), {Index(14): 2})), MultiIndex((Index(14),), {Index(14): 2}))))), Sum(IndexSum(Product(Indexed(NegativeRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(16),), {Index(16): 2})), MultiIndex((Index(16),), {Index(16): 2}))), MultiIndex((Index(17),), {Index(17): 2})), Indexed(NegativeRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(17),), {Index(17): 2}))), MultiIndex((Index(17),), {Index(17): 2})), IndexSum(Product(Indexed(PositiveRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(18),), {Index(18): 2})), MultiIndex((Index(18),), {Index(18): 2}))), MultiIndex((Index(19),), {Index(19): 2})), Indexed(PositiveRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(19),), {Index(19): 2}))), MultiIndex((Index(19),), {Index(19): 2}))))), Product(IntValue(-1, (), (), {}), Product(Product(FloatValue(0.5, (), (), {}), Sum(NegativeRestricted(IndexSum(Indexed(ComponentTensor(SpatialDerivative(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(20),), {Index(20): 2})), MultiIndex((Index(21),), {Index(21): 2})), MultiIndex((Index(21),), {Index(21): 2})), MultiIndex((Index(20),), {Index(20): 2})), MultiIndex((Index(20),), {Index(20): 2}))), PositiveRestricted(IndexSum(Indexed(ComponentTensor(SpatialDerivative(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 1), MultiIndex((Index(22),), {Index(22): 2})), MultiIndex((Index(23),), {Index(23): 2})), MultiIndex((Index(23),), {Index(23): 2})), MultiIndex((Index(22),), {Index(22): 2})), MultiIndex((Index(22),), {Index(22): 2}))))), Sum(IndexSum(Product(Indexed(NegativeRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(24),), {Index(24): 2})), MultiIndex((Index(24),), {Index(24): 2}))), MultiIndex((Index(25),), {Index(25): 2})), Indexed(NegativeRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(25),), {Index(25): 2}))), MultiIndex((Index(25),), {Index(25): 2})), IndexSum(Product(Indexed(PositiveRestricted(ComponentTensor(SpatialDerivative(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), MultiIndex((Index(26),), {Index(26): 2})), MultiIndex((Index(26),), {Index(26): 2}))), MultiIndex((Index(27),), {Index(27): 2})), Indexed(PositiveRestricted(FacetNormal(Cell('triangle', 1, Space(2)))), MultiIndex((Index(27),), {Index(27): 2}))), MultiIndex((Index(27),), {Index(27): 2}))))))), Measure('interior_facet', 0, None))])";
3002
/// Return the rank of the global tensor (r)
3003
virtual unsigned int rank() const
3008
/// Return the number of coefficients (n)
3009
virtual unsigned int num_coefficients() const
3014
/// Return the number of cell integrals
3015
virtual unsigned int num_cell_integrals() const
3020
/// Return the number of exterior facet integrals
3021
virtual unsigned int num_exterior_facet_integrals() const
3026
/// Return the number of interior facet integrals
3027
virtual unsigned int num_interior_facet_integrals() const
3032
/// Create a new finite element for argument function i
3033
virtual ufc::finite_element* create_finite_element(unsigned int i) const
3038
return new biharmonic_0_finite_element_0();
3041
return new biharmonic_0_finite_element_1();
3044
return new biharmonic_0_finite_element_2();
3047
return new biharmonic_0_finite_element_3();
3053
/// Create a new dof map for argument function i
3054
virtual ufc::dof_map* create_dof_map(unsigned int i) const
3059
return new biharmonic_0_dof_map_0();
3062
return new biharmonic_0_dof_map_1();
3065
return new biharmonic_0_dof_map_2();
3068
return new biharmonic_0_dof_map_3();
3074
/// Create a new cell integral on sub domain i
3075
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
3077
return new biharmonic_0_cell_integral_0();
3080
/// Create a new exterior facet integral on sub domain i
3081
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
3086
/// Create a new interior facet integral on sub domain i
3087
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
3089
return new biharmonic_0_interior_facet_integral_0();
3094
/// This class defines the interface for a finite element.
3096
class biharmonic_1_finite_element_0: public ufc::finite_element
3101
biharmonic_1_finite_element_0() : ufc::finite_element()
3107
virtual ~biharmonic_1_finite_element_0()
3112
/// Return a string identifying the finite element
3113
virtual const char* signature() const
3115
return "FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
3118
/// Return the cell shape
3119
virtual ufc::shape cell_shape() const
3121
return ufc::triangle;
3124
/// Return the dimension of the finite element function space
3125
virtual unsigned int space_dimension() const
3130
/// Return the rank of the value space
3131
virtual unsigned int value_rank() const
3136
/// Return the dimension of the value space for axis i
3137
virtual unsigned int value_dimension(unsigned int i) const
3142
/// Evaluate basis function i at given point in cell
3143
virtual void evaluate_basis(unsigned int i,
3145
const double* coordinates,
3146
const ufc::cell& c) const
3148
// Extract vertex coordinates
3149
const double * const * element_coordinates = c.coordinates;
3151
// Compute Jacobian of affine map from reference cell
3152
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3153
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3154
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3155
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3157
// Compute determinant of Jacobian
3158
const double detJ = J_00*J_11 - J_01*J_10;
3160
// Compute inverse of Jacobian
3162
// Get coordinates and map to the reference (UFC) element
3163
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
3164
element_coordinates[0][0]*element_coordinates[2][1] +\
3165
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
3166
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
3167
element_coordinates[1][0]*element_coordinates[0][1] -\
3168
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
3170
// Map coordinates to the reference square
3171
if (std::abs(y - 1.0) < 1e-08)
3174
x = 2.0 *x/(1.0 - y) - 1.0;
3180
// Map degree of freedom to element degree of freedom
3181
const unsigned int dof = i;
3183
// Generate scalings
3184
const double scalings_y_0 = 1;
3185
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
3186
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
3188
// Compute psitilde_a
3189
const double psitilde_a_0 = 1;
3190
const double psitilde_a_1 = x;
3191
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
3193
// Compute psitilde_bs
3194
const double psitilde_bs_0_0 = 1;
3195
const double psitilde_bs_0_1 = 1.5*y + 0.5;
3196
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
3197
const double psitilde_bs_1_0 = 1;
3198
const double psitilde_bs_1_1 = 2.5*y + 1.5;
3199
const double psitilde_bs_2_0 = 1;
3201
// Compute basisvalues
3202
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
3203
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
3204
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
3205
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
3206
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
3207
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
3209
// Table(s) of coefficients
3210
static const double coefficients0[6][6] = \
3211
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
3212
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
3213
{0, 0, 0.2, 0, 0, 0.163299316},
3214
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
3215
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
3216
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
3218
// Extract relevant coefficients
3219
const double coeff0_0 = coefficients0[dof][0];
3220
const double coeff0_1 = coefficients0[dof][1];
3221
const double coeff0_2 = coefficients0[dof][2];
3222
const double coeff0_3 = coefficients0[dof][3];
3223
const double coeff0_4 = coefficients0[dof][4];
3224
const double coeff0_5 = coefficients0[dof][5];
3227
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
3230
/// Evaluate all basis functions at given point in cell
3231
virtual void evaluate_basis_all(double* values,
3232
const double* coordinates,
3233
const ufc::cell& c) const
3235
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
3238
/// Evaluate order n derivatives of basis function i at given point in cell
3239
virtual void evaluate_basis_derivatives(unsigned int i,
3242
const double* coordinates,
3243
const ufc::cell& c) const
3245
// Extract vertex coordinates
3246
const double * const * element_coordinates = c.coordinates;
3248
// Compute Jacobian of affine map from reference cell
3249
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3250
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3251
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3252
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3254
// Compute determinant of Jacobian
3255
const double detJ = J_00*J_11 - J_01*J_10;
3257
// Compute inverse of Jacobian
3259
// Get coordinates and map to the reference (UFC) element
3260
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
3261
element_coordinates[0][0]*element_coordinates[2][1] +\
3262
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
3263
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
3264
element_coordinates[1][0]*element_coordinates[0][1] -\
3265
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
3267
// Map coordinates to the reference square
3268
if (std::abs(y - 1.0) < 1e-08)
3271
x = 2.0 *x/(1.0 - y) - 1.0;
3274
// Compute number of derivatives
3275
unsigned int num_derivatives = 1;
3277
for (unsigned int j = 0; j < n; j++)
3278
num_derivatives *= 2;
3281
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
3282
unsigned int **combinations = new unsigned int *[num_derivatives];
3284
for (unsigned int j = 0; j < num_derivatives; j++)
3286
combinations[j] = new unsigned int [n];
3287
for (unsigned int k = 0; k < n; k++)
3288
combinations[j][k] = 0;
3291
// Generate combinations of derivatives
3292
for (unsigned int row = 1; row < num_derivatives; row++)
3294
for (unsigned int num = 0; num < row; num++)
3296
for (unsigned int col = n-1; col+1 > 0; col--)
3298
if (combinations[row][col] + 1 > 1)
3299
combinations[row][col] = 0;
3302
combinations[row][col] += 1;
3309
// Compute inverse of Jacobian
3310
const double Jinv[2][2] = {{J_11 / detJ, -J_01 / detJ}, {-J_10 / detJ, J_00 / detJ}};
3312
// Declare transformation matrix
3313
// Declare pointer to two dimensional array and initialise
3314
double **transform = new double *[num_derivatives];
3316
for (unsigned int j = 0; j < num_derivatives; j++)
3318
transform[j] = new double [num_derivatives];
3319
for (unsigned int k = 0; k < num_derivatives; k++)
3320
transform[j][k] = 1;
3323
// Construct transformation matrix
3324
for (unsigned int row = 0; row < num_derivatives; row++)
3326
for (unsigned int col = 0; col < num_derivatives; col++)
3328
for (unsigned int k = 0; k < n; k++)
3329
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
3334
for (unsigned int j = 0; j < 1*num_derivatives; j++)
3337
// Map degree of freedom to element degree of freedom
3338
const unsigned int dof = i;
3340
// Generate scalings
3341
const double scalings_y_0 = 1;
3342
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
3343
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
3345
// Compute psitilde_a
3346
const double psitilde_a_0 = 1;
3347
const double psitilde_a_1 = x;
3348
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
3350
// Compute psitilde_bs
3351
const double psitilde_bs_0_0 = 1;
3352
const double psitilde_bs_0_1 = 1.5*y + 0.5;
3353
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
3354
const double psitilde_bs_1_0 = 1;
3355
const double psitilde_bs_1_1 = 2.5*y + 1.5;
3356
const double psitilde_bs_2_0 = 1;
3358
// Compute basisvalues
3359
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
3360
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
3361
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
3362
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
3363
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
3364
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
3366
// Table(s) of coefficients
3367
static const double coefficients0[6][6] = \
3368
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
3369
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
3370
{0, 0, 0.2, 0, 0, 0.163299316},
3371
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
3372
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
3373
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
3375
// Interesting (new) part
3376
// Tables of derivatives of the polynomial base (transpose)
3377
static const double dmats0[6][6] = \
3378
{{0, 0, 0, 0, 0, 0},
3379
{4.89897949, 0, 0, 0, 0, 0},
3381
{0, 9.48683298, 0, 0, 0, 0},
3382
{4, 0, 7.07106781, 0, 0, 0},
3383
{0, 0, 0, 0, 0, 0}};
3385
static const double dmats1[6][6] = \
3386
{{0, 0, 0, 0, 0, 0},
3387
{2.44948974, 0, 0, 0, 0, 0},
3388
{4.24264069, 0, 0, 0, 0, 0},
3389
{2.5819889, 4.74341649, -0.912870929, 0, 0, 0},
3390
{2, 6.12372436, 3.53553391, 0, 0, 0},
3391
{-2.30940108, 0, 8.16496581, 0, 0, 0}};
3393
// Compute reference derivatives
3394
// Declare pointer to array of derivatives on FIAT element
3395
double *derivatives = new double [num_derivatives];
3397
// Declare coefficients
3398
double coeff0_0 = 0;
3399
double coeff0_1 = 0;
3400
double coeff0_2 = 0;
3401
double coeff0_3 = 0;
3402
double coeff0_4 = 0;
3403
double coeff0_5 = 0;
3405
// Declare new coefficients
3406
double new_coeff0_0 = 0;
3407
double new_coeff0_1 = 0;
3408
double new_coeff0_2 = 0;
3409
double new_coeff0_3 = 0;
3410
double new_coeff0_4 = 0;
3411
double new_coeff0_5 = 0;
3413
// Loop possible derivatives
3414
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
3416
// Get values from coefficients array
3417
new_coeff0_0 = coefficients0[dof][0];
3418
new_coeff0_1 = coefficients0[dof][1];
3419
new_coeff0_2 = coefficients0[dof][2];
3420
new_coeff0_3 = coefficients0[dof][3];
3421
new_coeff0_4 = coefficients0[dof][4];
3422
new_coeff0_5 = coefficients0[dof][5];
3424
// Loop derivative order
3425
for (unsigned int j = 0; j < n; j++)
3427
// Update old coefficients
3428
coeff0_0 = new_coeff0_0;
3429
coeff0_1 = new_coeff0_1;
3430
coeff0_2 = new_coeff0_2;
3431
coeff0_3 = new_coeff0_3;
3432
coeff0_4 = new_coeff0_4;
3433
coeff0_5 = new_coeff0_5;
3435
if(combinations[deriv_num][j] == 0)
3437
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];
3438
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];
3439
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];
3440
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];
3441
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];
3442
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];
3444
if(combinations[deriv_num][j] == 1)
3446
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];
3447
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];
3448
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];
3449
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];
3450
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];
3451
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];
3455
// Compute derivatives on reference element as dot product of coefficients and basisvalues
3456
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;
3459
// Transform derivatives back to physical element
3460
for (unsigned int row = 0; row < num_derivatives; row++)
3462
for (unsigned int col = 0; col < num_derivatives; col++)
3464
values[row] += transform[row][col]*derivatives[col];
3467
// Delete pointer to array of derivatives on FIAT element
3468
delete [] derivatives;
3470
// Delete pointer to array of combinations of derivatives and transform
3471
for (unsigned int row = 0; row < num_derivatives; row++)
3473
delete [] combinations[row];
3474
delete [] transform[row];
3477
delete [] combinations;
3478
delete [] transform;
3481
/// Evaluate order n derivatives of all basis functions at given point in cell
3482
virtual void evaluate_basis_derivatives_all(unsigned int n,
3484
const double* coordinates,
3485
const ufc::cell& c) const
3487
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
3490
/// Evaluate linear functional for dof i on the function f
3491
virtual double evaluate_dof(unsigned int i,
3492
const ufc::function& f,
3493
const ufc::cell& c) const
3495
// The reference points, direction and weights:
3496
static const double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
3497
static const double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
3498
static const double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
3500
const double * const * x = c.coordinates;
3501
double result = 0.0;
3502
// Iterate over the points:
3503
// Evaluate basis functions for affine mapping
3504
const double w0 = 1.0 - X[i][0][0] - X[i][0][1];
3505
const double w1 = X[i][0][0];
3506
const double w2 = X[i][0][1];
3508
// Compute affine mapping y = F(X)
3510
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0];
3511
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1];
3513
// Evaluate function at physical points
3515
f.evaluate(values, y, c);
3517
// Map function values using appropriate mapping
3518
// Affine map: Do nothing
3520
// Note that we do not map the weights (yet).
3522
// Take directional components
3523
for(int k = 0; k < 1; k++)
3524
result += values[k]*D[i][0][k];
3525
// Multiply by weights
3531
/// Evaluate linear functionals for all dofs on the function f
3532
virtual void evaluate_dofs(double* values,
3533
const ufc::function& f,
3534
const ufc::cell& c) const
3536
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
3539
/// Interpolate vertex values from dof values
3540
virtual void interpolate_vertex_values(double* vertex_values,
3541
const double* dof_values,
3542
const ufc::cell& c) const
3544
// Evaluate at vertices and use affine mapping
3545
vertex_values[0] = dof_values[0];
3546
vertex_values[1] = dof_values[1];
3547
vertex_values[2] = dof_values[2];
3550
/// Return the number of sub elements (for a mixed element)
3551
virtual unsigned int num_sub_elements() const
3556
/// Create a new finite element for sub element i (for a mixed element)
3557
virtual ufc::finite_element* create_sub_element(unsigned int i) const
3559
return new biharmonic_1_finite_element_0();
3564
/// This class defines the interface for a finite element.
3566
class biharmonic_1_finite_element_1: public ufc::finite_element
3571
biharmonic_1_finite_element_1() : ufc::finite_element()
3577
virtual ~biharmonic_1_finite_element_1()
3582
/// Return a string identifying the finite element
3583
virtual const char* signature() const
3585
return "FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
3588
/// Return the cell shape
3589
virtual ufc::shape cell_shape() const
3591
return ufc::triangle;
3594
/// Return the dimension of the finite element function space
3595
virtual unsigned int space_dimension() const
3600
/// Return the rank of the value space
3601
virtual unsigned int value_rank() const
3606
/// Return the dimension of the value space for axis i
3607
virtual unsigned int value_dimension(unsigned int i) const
3612
/// Evaluate basis function i at given point in cell
3613
virtual void evaluate_basis(unsigned int i,
3615
const double* coordinates,
3616
const ufc::cell& c) const
3618
// Extract vertex coordinates
3619
const double * const * element_coordinates = c.coordinates;
3621
// Compute Jacobian of affine map from reference cell
3622
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3623
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3624
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3625
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3627
// Compute determinant of Jacobian
3628
const double detJ = J_00*J_11 - J_01*J_10;
3630
// Compute inverse of Jacobian
3632
// Get coordinates and map to the reference (UFC) element
3633
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
3634
element_coordinates[0][0]*element_coordinates[2][1] +\
3635
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
3636
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
3637
element_coordinates[1][0]*element_coordinates[0][1] -\
3638
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
3640
// Map coordinates to the reference square
3641
if (std::abs(y - 1.0) < 1e-08)
3644
x = 2.0 *x/(1.0 - y) - 1.0;
3650
// Map degree of freedom to element degree of freedom
3651
const unsigned int dof = i;
3653
// Generate scalings
3654
const double scalings_y_0 = 1;
3655
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
3656
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
3658
// Compute psitilde_a
3659
const double psitilde_a_0 = 1;
3660
const double psitilde_a_1 = x;
3661
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
3663
// Compute psitilde_bs
3664
const double psitilde_bs_0_0 = 1;
3665
const double psitilde_bs_0_1 = 1.5*y + 0.5;
3666
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
3667
const double psitilde_bs_1_0 = 1;
3668
const double psitilde_bs_1_1 = 2.5*y + 1.5;
3669
const double psitilde_bs_2_0 = 1;
3671
// Compute basisvalues
3672
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
3673
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
3674
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
3675
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
3676
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
3677
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
3679
// Table(s) of coefficients
3680
static const double coefficients0[6][6] = \
3681
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
3682
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
3683
{0, 0, 0.2, 0, 0, 0.163299316},
3684
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
3685
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
3686
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
3688
// Extract relevant coefficients
3689
const double coeff0_0 = coefficients0[dof][0];
3690
const double coeff0_1 = coefficients0[dof][1];
3691
const double coeff0_2 = coefficients0[dof][2];
3692
const double coeff0_3 = coefficients0[dof][3];
3693
const double coeff0_4 = coefficients0[dof][4];
3694
const double coeff0_5 = coefficients0[dof][5];
3697
*values = coeff0_0*basisvalue0 + coeff0_1*basisvalue1 + coeff0_2*basisvalue2 + coeff0_3*basisvalue3 + coeff0_4*basisvalue4 + coeff0_5*basisvalue5;
3700
/// Evaluate all basis functions at given point in cell
3701
virtual void evaluate_basis_all(double* values,
3702
const double* coordinates,
3703
const ufc::cell& c) const
3705
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
3708
/// Evaluate order n derivatives of basis function i at given point in cell
3709
virtual void evaluate_basis_derivatives(unsigned int i,
3712
const double* coordinates,
3713
const ufc::cell& c) const
3715
// Extract vertex coordinates
3716
const double * const * element_coordinates = c.coordinates;
3718
// Compute Jacobian of affine map from reference cell
3719
const double J_00 = element_coordinates[1][0] - element_coordinates[0][0];
3720
const double J_01 = element_coordinates[2][0] - element_coordinates[0][0];
3721
const double J_10 = element_coordinates[1][1] - element_coordinates[0][1];
3722
const double J_11 = element_coordinates[2][1] - element_coordinates[0][1];
3724
// Compute determinant of Jacobian
3725
const double detJ = J_00*J_11 - J_01*J_10;
3727
// Compute inverse of Jacobian
3729
// Get coordinates and map to the reference (UFC) element
3730
double x = (element_coordinates[0][1]*element_coordinates[2][0] -\
3731
element_coordinates[0][0]*element_coordinates[2][1] +\
3732
J_11*coordinates[0] - J_01*coordinates[1]) / detJ;
3733
double y = (element_coordinates[1][1]*element_coordinates[0][0] -\
3734
element_coordinates[1][0]*element_coordinates[0][1] -\
3735
J_10*coordinates[0] + J_00*coordinates[1]) / detJ;
3737
// Map coordinates to the reference square
3738
if (std::abs(y - 1.0) < 1e-08)
3741
x = 2.0 *x/(1.0 - y) - 1.0;
3744
// Compute number of derivatives
3745
unsigned int num_derivatives = 1;
3747
for (unsigned int j = 0; j < n; j++)
3748
num_derivatives *= 2;
3751
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
3752
unsigned int **combinations = new unsigned int *[num_derivatives];
3754
for (unsigned int j = 0; j < num_derivatives; j++)
3756
combinations[j] = new unsigned int [n];
3757
for (unsigned int k = 0; k < n; k++)
3758
combinations[j][k] = 0;
3761
// Generate combinations of derivatives
3762
for (unsigned int row = 1; row < num_derivatives; row++)
3764
for (unsigned int num = 0; num < row; num++)
3766
for (unsigned int col = n-1; col+1 > 0; col--)
3768
if (combinations[row][col] + 1 > 1)
3769
combinations[row][col] = 0;
3772
combinations[row][col] += 1;
3779
// Compute inverse of Jacobian
3780
const double Jinv[2][2] = {{J_11 / detJ, -J_01 / detJ}, {-J_10 / detJ, J_00 / detJ}};
3782
// Declare transformation matrix
3783
// Declare pointer to two dimensional array and initialise
3784
double **transform = new double *[num_derivatives];
3786
for (unsigned int j = 0; j < num_derivatives; j++)
3788
transform[j] = new double [num_derivatives];
3789
for (unsigned int k = 0; k < num_derivatives; k++)
3790
transform[j][k] = 1;
3793
// Construct transformation matrix
3794
for (unsigned int row = 0; row < num_derivatives; row++)
3796
for (unsigned int col = 0; col < num_derivatives; col++)
3798
for (unsigned int k = 0; k < n; k++)
3799
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
3804
for (unsigned int j = 0; j < 1*num_derivatives; j++)
3807
// Map degree of freedom to element degree of freedom
3808
const unsigned int dof = i;
3810
// Generate scalings
3811
const double scalings_y_0 = 1;
3812
const double scalings_y_1 = scalings_y_0*(0.5 - 0.5*y);
3813
const double scalings_y_2 = scalings_y_1*(0.5 - 0.5*y);
3815
// Compute psitilde_a
3816
const double psitilde_a_0 = 1;
3817
const double psitilde_a_1 = x;
3818
const double psitilde_a_2 = 1.5*x*psitilde_a_1 - 0.5*psitilde_a_0;
3820
// Compute psitilde_bs
3821
const double psitilde_bs_0_0 = 1;
3822
const double psitilde_bs_0_1 = 1.5*y + 0.5;
3823
const double psitilde_bs_0_2 = 0.111111111*psitilde_bs_0_1 + 1.66666667*y*psitilde_bs_0_1 - 0.555555556*psitilde_bs_0_0;
3824
const double psitilde_bs_1_0 = 1;
3825
const double psitilde_bs_1_1 = 2.5*y + 1.5;
3826
const double psitilde_bs_2_0 = 1;
3828
// Compute basisvalues
3829
const double basisvalue0 = 0.707106781*psitilde_a_0*scalings_y_0*psitilde_bs_0_0;
3830
const double basisvalue1 = 1.73205081*psitilde_a_1*scalings_y_1*psitilde_bs_1_0;
3831
const double basisvalue2 = psitilde_a_0*scalings_y_0*psitilde_bs_0_1;
3832
const double basisvalue3 = 2.73861279*psitilde_a_2*scalings_y_2*psitilde_bs_2_0;
3833
const double basisvalue4 = 2.12132034*psitilde_a_1*scalings_y_1*psitilde_bs_1_1;
3834
const double basisvalue5 = 1.22474487*psitilde_a_0*scalings_y_0*psitilde_bs_0_2;
3836
// Table(s) of coefficients
3837
static const double coefficients0[6][6] = \
3838
{{0, -0.173205081, -0.1, 0.121716124, 0.0942809042, 0.0544331054},
3839
{0, 0.173205081, -0.1, 0.121716124, -0.0942809042, 0.0544331054},
3840
{0, 0, 0.2, 0, 0, 0.163299316},
3841
{0.471404521, 0.230940108, 0.133333333, 0, 0.188561808, -0.163299316},
3842
{0.471404521, -0.230940108, 0.133333333, 0, -0.188561808, -0.163299316},
3843
{0.471404521, 0, -0.266666667, -0.243432248, 0, 0.0544331054}};
3845
// Interesting (new) part
3846
// Tables of derivatives of the polynomial base (transpose)
3847
static const double dmats0[6][6] = \
3848
{{0, 0, 0, 0, 0, 0},
3849
{4.89897949, 0, 0, 0, 0, 0},
3851
{0, 9.48683298, 0, 0, 0, 0},
3852
{4, 0, 7.07106781, 0, 0, 0},
3853
{0, 0, 0, 0, 0, 0}};
3855
static const double dmats1[6][6] = \
3856
{{0, 0, 0, 0, 0, 0},
3857
{2.44948974, 0, 0, 0, 0, 0},
3858
{4.24264069, 0, 0, 0, 0, 0},
3859
{2.5819889, 4.74341649, -0.912870929, 0, 0, 0},
3860
{2, 6.12372436, 3.53553391, 0, 0, 0},
3861
{-2.30940108, 0, 8.16496581, 0, 0, 0}};
3863
// Compute reference derivatives
3864
// Declare pointer to array of derivatives on FIAT element
3865
double *derivatives = new double [num_derivatives];
3867
// Declare coefficients
3868
double coeff0_0 = 0;
3869
double coeff0_1 = 0;
3870
double coeff0_2 = 0;
3871
double coeff0_3 = 0;
3872
double coeff0_4 = 0;
3873
double coeff0_5 = 0;
3875
// Declare new coefficients
3876
double new_coeff0_0 = 0;
3877
double new_coeff0_1 = 0;
3878
double new_coeff0_2 = 0;
3879
double new_coeff0_3 = 0;
3880
double new_coeff0_4 = 0;
3881
double new_coeff0_5 = 0;
3883
// Loop possible derivatives
3884
for (unsigned int deriv_num = 0; deriv_num < num_derivatives; deriv_num++)
3886
// Get values from coefficients array
3887
new_coeff0_0 = coefficients0[dof][0];
3888
new_coeff0_1 = coefficients0[dof][1];
3889
new_coeff0_2 = coefficients0[dof][2];
3890
new_coeff0_3 = coefficients0[dof][3];
3891
new_coeff0_4 = coefficients0[dof][4];
3892
new_coeff0_5 = coefficients0[dof][5];
3894
// Loop derivative order
3895
for (unsigned int j = 0; j < n; j++)
3897
// Update old coefficients
3898
coeff0_0 = new_coeff0_0;
3899
coeff0_1 = new_coeff0_1;
3900
coeff0_2 = new_coeff0_2;
3901
coeff0_3 = new_coeff0_3;
3902
coeff0_4 = new_coeff0_4;
3903
coeff0_5 = new_coeff0_5;
3905
if(combinations[deriv_num][j] == 0)
3907
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];
3908
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];
3909
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];
3910
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];
3911
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];
3912
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];
3914
if(combinations[deriv_num][j] == 1)
3916
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];
3917
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];
3918
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];
3919
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];
3920
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];
3921
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];
3925
// Compute derivatives on reference element as dot product of coefficients and basisvalues
3926
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;
3929
// Transform derivatives back to physical element
3930
for (unsigned int row = 0; row < num_derivatives; row++)
3932
for (unsigned int col = 0; col < num_derivatives; col++)
3934
values[row] += transform[row][col]*derivatives[col];
3937
// Delete pointer to array of derivatives on FIAT element
3938
delete [] derivatives;
3940
// Delete pointer to array of combinations of derivatives and transform
3941
for (unsigned int row = 0; row < num_derivatives; row++)
3943
delete [] combinations[row];
3944
delete [] transform[row];
3947
delete [] combinations;
3948
delete [] transform;
3951
/// Evaluate order n derivatives of all basis functions at given point in cell
3952
virtual void evaluate_basis_derivatives_all(unsigned int n,
3954
const double* coordinates,
3955
const ufc::cell& c) const
3957
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
3960
/// Evaluate linear functional for dof i on the function f
3961
virtual double evaluate_dof(unsigned int i,
3962
const ufc::function& f,
3963
const ufc::cell& c) const
3965
// The reference points, direction and weights:
3966
static const double X[6][1][2] = {{{0, 0}}, {{1, 0}}, {{0, 1}}, {{0.5, 0.5}}, {{0, 0.5}}, {{0.5, 0}}};
3967
static const double W[6][1] = {{1}, {1}, {1}, {1}, {1}, {1}};
3968
static const double D[6][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
3970
const double * const * x = c.coordinates;
3971
double result = 0.0;
3972
// Iterate over the points:
3973
// Evaluate basis functions for affine mapping
3974
const double w0 = 1.0 - X[i][0][0] - X[i][0][1];
3975
const double w1 = X[i][0][0];
3976
const double w2 = X[i][0][1];
3978
// Compute affine mapping y = F(X)
3980
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0];
3981
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1];
3983
// Evaluate function at physical points
3985
f.evaluate(values, y, c);
3987
// Map function values using appropriate mapping
3988
// Affine map: Do nothing
3990
// Note that we do not map the weights (yet).
3992
// Take directional components
3993
for(int k = 0; k < 1; k++)
3994
result += values[k]*D[i][0][k];
3995
// Multiply by weights
4001
/// Evaluate linear functionals for all dofs on the function f
4002
virtual void evaluate_dofs(double* values,
4003
const ufc::function& f,
4004
const ufc::cell& c) const
4006
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4009
/// Interpolate vertex values from dof values
4010
virtual void interpolate_vertex_values(double* vertex_values,
4011
const double* dof_values,
4012
const ufc::cell& c) const
4014
// Evaluate at vertices and use affine mapping
4015
vertex_values[0] = dof_values[0];
4016
vertex_values[1] = dof_values[1];
4017
vertex_values[2] = dof_values[2];
4020
/// Return the number of sub elements (for a mixed element)
4021
virtual unsigned int num_sub_elements() const
4026
/// Create a new finite element for sub element i (for a mixed element)
4027
virtual ufc::finite_element* create_sub_element(unsigned int i) const
4029
return new biharmonic_1_finite_element_1();
4034
/// This class defines the interface for a local-to-global mapping of
4035
/// degrees of freedom (dofs).
4037
class biharmonic_1_dof_map_0: public ufc::dof_map
4041
unsigned int __global_dimension;
4046
biharmonic_1_dof_map_0() : ufc::dof_map()
4048
__global_dimension = 0;
4052
virtual ~biharmonic_1_dof_map_0()
4057
/// Return a string identifying the dof map
4058
virtual const char* signature() const
4060
return "FFC dof map for FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
4063
/// Return true iff mesh entities of topological dimension d are needed
4064
virtual bool needs_mesh_entities(unsigned int d) const
4081
/// Initialize dof map for mesh (return true iff init_cell() is needed)
4082
virtual bool init_mesh(const ufc::mesh& m)
4084
__global_dimension = m.num_entities[0] + m.num_entities[1];
4088
/// Initialize dof map for given cell
4089
virtual void init_cell(const ufc::mesh& m,
4095
/// Finish initialization of dof map for cells
4096
virtual void init_cell_finalize()
4101
/// Return the dimension of the global finite element function space
4102
virtual unsigned int global_dimension() const
4104
return __global_dimension;
4107
/// Return the dimension of the local finite element function space for a cell
4108
virtual unsigned int local_dimension(const ufc::cell& c) const
4113
/// Return the maximum dimension of the local finite element function space
4114
virtual unsigned int max_local_dimension() const
4119
// Return the geometric dimension of the coordinates this dof map provides
4120
virtual unsigned int geometric_dimension() const
4125
/// Return the number of dofs on each cell facet
4126
virtual unsigned int num_facet_dofs() const
4131
/// Return the number of dofs associated with each cell entity of dimension d
4132
virtual unsigned int num_entity_dofs(unsigned int d) const
4134
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4137
/// Tabulate the local-to-global mapping of dofs on a cell
4138
virtual void tabulate_dofs(unsigned int* dofs,
4140
const ufc::cell& c) const
4142
dofs[0] = c.entity_indices[0][0];
4143
dofs[1] = c.entity_indices[0][1];
4144
dofs[2] = c.entity_indices[0][2];
4145
unsigned int offset = m.num_entities[0];
4146
dofs[3] = offset + c.entity_indices[1][0];
4147
dofs[4] = offset + c.entity_indices[1][1];
4148
dofs[5] = offset + c.entity_indices[1][2];
4151
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
4152
virtual void tabulate_facet_dofs(unsigned int* dofs,
4153
unsigned int facet) const
4175
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
4176
virtual void tabulate_entity_dofs(unsigned int* dofs,
4177
unsigned int d, unsigned int i) const
4179
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4182
/// Tabulate the coordinates of all dofs on a cell
4183
virtual void tabulate_coordinates(double** coordinates,
4184
const ufc::cell& c) const
4186
const double * const * x = c.coordinates;
4187
coordinates[0][0] = x[0][0];
4188
coordinates[0][1] = x[0][1];
4189
coordinates[1][0] = x[1][0];
4190
coordinates[1][1] = x[1][1];
4191
coordinates[2][0] = x[2][0];
4192
coordinates[2][1] = x[2][1];
4193
coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
4194
coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
4195
coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
4196
coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
4197
coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
4198
coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
4201
/// Return the number of sub dof maps (for a mixed element)
4202
virtual unsigned int num_sub_dof_maps() const
4207
/// Create a new dof_map for sub dof map i (for a mixed element)
4208
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
4210
return new biharmonic_1_dof_map_0();
4215
/// This class defines the interface for a local-to-global mapping of
4216
/// degrees of freedom (dofs).
4218
class biharmonic_1_dof_map_1: public ufc::dof_map
4222
unsigned int __global_dimension;
4227
biharmonic_1_dof_map_1() : ufc::dof_map()
4229
__global_dimension = 0;
4233
virtual ~biharmonic_1_dof_map_1()
4238
/// Return a string identifying the dof map
4239
virtual const char* signature() const
4241
return "FFC dof map for FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2)";
4244
/// Return true iff mesh entities of topological dimension d are needed
4245
virtual bool needs_mesh_entities(unsigned int d) const
4262
/// Initialize dof map for mesh (return true iff init_cell() is needed)
4263
virtual bool init_mesh(const ufc::mesh& m)
4265
__global_dimension = m.num_entities[0] + m.num_entities[1];
4269
/// Initialize dof map for given cell
4270
virtual void init_cell(const ufc::mesh& m,
4276
/// Finish initialization of dof map for cells
4277
virtual void init_cell_finalize()
4282
/// Return the dimension of the global finite element function space
4283
virtual unsigned int global_dimension() const
4285
return __global_dimension;
4288
/// Return the dimension of the local finite element function space for a cell
4289
virtual unsigned int local_dimension(const ufc::cell& c) const
4294
/// Return the maximum dimension of the local finite element function space
4295
virtual unsigned int max_local_dimension() const
4300
// Return the geometric dimension of the coordinates this dof map provides
4301
virtual unsigned int geometric_dimension() const
4306
/// Return the number of dofs on each cell facet
4307
virtual unsigned int num_facet_dofs() const
4312
/// Return the number of dofs associated with each cell entity of dimension d
4313
virtual unsigned int num_entity_dofs(unsigned int d) const
4315
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4318
/// Tabulate the local-to-global mapping of dofs on a cell
4319
virtual void tabulate_dofs(unsigned int* dofs,
4321
const ufc::cell& c) const
4323
dofs[0] = c.entity_indices[0][0];
4324
dofs[1] = c.entity_indices[0][1];
4325
dofs[2] = c.entity_indices[0][2];
4326
unsigned int offset = m.num_entities[0];
4327
dofs[3] = offset + c.entity_indices[1][0];
4328
dofs[4] = offset + c.entity_indices[1][1];
4329
dofs[5] = offset + c.entity_indices[1][2];
4332
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
4333
virtual void tabulate_facet_dofs(unsigned int* dofs,
4334
unsigned int facet) const
4356
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
4357
virtual void tabulate_entity_dofs(unsigned int* dofs,
4358
unsigned int d, unsigned int i) const
4360
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
4363
/// Tabulate the coordinates of all dofs on a cell
4364
virtual void tabulate_coordinates(double** coordinates,
4365
const ufc::cell& c) const
4367
const double * const * x = c.coordinates;
4368
coordinates[0][0] = x[0][0];
4369
coordinates[0][1] = x[0][1];
4370
coordinates[1][0] = x[1][0];
4371
coordinates[1][1] = x[1][1];
4372
coordinates[2][0] = x[2][0];
4373
coordinates[2][1] = x[2][1];
4374
coordinates[3][0] = 0.5*x[1][0] + 0.5*x[2][0];
4375
coordinates[3][1] = 0.5*x[1][1] + 0.5*x[2][1];
4376
coordinates[4][0] = 0.5*x[0][0] + 0.5*x[2][0];
4377
coordinates[4][1] = 0.5*x[0][1] + 0.5*x[2][1];
4378
coordinates[5][0] = 0.5*x[0][0] + 0.5*x[1][0];
4379
coordinates[5][1] = 0.5*x[0][1] + 0.5*x[1][1];
4382
/// Return the number of sub dof maps (for a mixed element)
4383
virtual unsigned int num_sub_dof_maps() const
4388
/// Create a new dof_map for sub dof map i (for a mixed element)
4389
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
4391
return new biharmonic_1_dof_map_1();
4396
/// This class defines the interface for the tabulation of the cell
4397
/// tensor corresponding to the local contribution to a form from
4398
/// the integral over a cell.
4400
class biharmonic_1_cell_integral_0_quadrature: public ufc::cell_integral
4405
biharmonic_1_cell_integral_0_quadrature() : ufc::cell_integral()
4411
virtual ~biharmonic_1_cell_integral_0_quadrature()
4416
/// Tabulate the tensor for the contribution from a local cell
4417
virtual void tabulate_tensor(double* A,
4418
const double * const * w,
4419
const ufc::cell& c) const
4421
// Extract vertex coordinates
4422
const double * const * x = c.coordinates;
4424
// Compute Jacobian of affine map from reference cell
4425
const double J_00 = x[1][0] - x[0][0];
4426
const double J_01 = x[2][0] - x[0][0];
4427
const double J_10 = x[1][1] - x[0][1];
4428
const double J_11 = x[2][1] - x[0][1];
4430
// Compute determinant of Jacobian
4431
double detJ = J_00*J_11 - J_01*J_10;
4433
// Compute inverse of Jacobian
4436
const double det = std::abs(detJ);
4439
// Array of quadrature weights
4440
static const double W9[9] = {0.0558144205, 0.0636780851, 0.0193963833, 0.0893030728, 0.101884936, 0.0310342133, 0.0558144205, 0.0636780851, 0.0193963833};
4441
// Quadrature points on the UFC reference element: (0.102717655, 0.0885879595), (0.0665540678, 0.409466864), (0.0239311323, 0.787659462), (0.45570602, 0.0885879595), (0.295266568, 0.409466864), (0.106170269, 0.787659462), (0.808694386, 0.0885879595), (0.523979068, 0.409466864), (0.188409406, 0.787659462)
4443
// Value of basis functions at quadrature points.
4444
static const double FE0[9][6] = \
4445
{{0.499278833, -0.0816158216, -0.0728923064, 0.0363981898, 0.286562342, 0.332268763},
4446
{0.0251290591, -0.0576951799, -0.0741406383, 0.109006742, 0.858208264, 0.139491754},
4447
{-0.117413197, -0.0227857341, 0.453155394, 0.0753983311, 0.593609805, 0.0180354017},
4448
{-0.0403700665, -0.0403700665, -0.0728923064, 0.161480266, 0.161480266, 0.830671908},
4449
{-0.120901876, -0.120901876, -0.0741406383, 0.483607503, 0.483607503, 0.348729384},
4450
{-0.083626017, -0.083626017, 0.453155394, 0.334504068, 0.334504068, 0.0450885042},
4451
{-0.0816158216, 0.499278833, -0.0728923064, 0.286562342, 0.0363981898, 0.332268763},
4452
{-0.0576951799, 0.0251290591, -0.0741406383, 0.858208264, 0.109006742, 0.139491754},
4453
{-0.0227857341, -0.117413197, 0.453155394, 0.593609805, 0.0753983311, 0.0180354017}};
4456
// Compute element tensor using UFL quadrature representation
4457
// Optimisations: ('simplify expressions', False), ('ignore zero tables', False), ('non zero columns', False), ('remove zero terms', False), ('ignore ones', False)
4458
// Total number of operations to compute element tensor: 324
4460
// Loop quadrature points for integral
4461
// Number of operations to compute element tensor for following IP loop = 324
4462
for (unsigned int ip = 0; ip < 9; ip++)
4465
// Function declarations
4468
// Total number of operations to compute function values = 12
4469
for (unsigned int r = 0; r < 6; r++)
4471
F0 += FE0[ip][r]*w[0][r];
4472
}// end loop over 'r'
4474
// Number of operations for primary indices: 24
4475
for (unsigned int j = 0; j < 6; j++)
4477
// Number of operations to compute entry: 4
4478
A[j] += FE0[ip][j]*F0*W9[ip]*det;
4479
}// end loop over 'j'
4480
}// end loop over 'ip'
4485
/// This class defines the interface for the tabulation of the cell
4486
/// tensor corresponding to the local contribution to a form from
4487
/// the integral over a cell.
4489
class biharmonic_1_cell_integral_0: public ufc::cell_integral
4493
biharmonic_1_cell_integral_0_quadrature integral_0_quadrature;
4498
biharmonic_1_cell_integral_0() : ufc::cell_integral()
4504
virtual ~biharmonic_1_cell_integral_0()
4509
/// Tabulate the tensor for the contribution from a local cell
4510
virtual void tabulate_tensor(double* A,
4511
const double * const * w,
4512
const ufc::cell& c) const
4514
// Reset values of the element tensor block
4515
for (unsigned int j = 0; j < 6; j++)
4518
// Add all contributions to element tensor
4519
integral_0_quadrature.tabulate_tensor(A, w, c);
4524
/// This class defines the interface for the assembly of the global
4525
/// tensor corresponding to a form with r + n arguments, that is, a
4528
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
4530
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
4531
/// global tensor A is defined by
4533
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
4535
/// where each argument Vj represents the application to the
4536
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
4537
/// fixed functions (coefficients).
4539
class biharmonic_form_1: public ufc::form
4544
biharmonic_form_1() : ufc::form()
4550
virtual ~biharmonic_form_1()
4555
/// Return a string identifying the form
4556
virtual const char* signature() const
4558
return "Form([Integral(Product(BasisFunction(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), Function(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0)), Measure('cell', 0, None))])";
4561
/// Return the rank of the global tensor (r)
4562
virtual unsigned int rank() const
4567
/// Return the number of coefficients (n)
4568
virtual unsigned int num_coefficients() const
4573
/// Return the number of cell integrals
4574
virtual unsigned int num_cell_integrals() const
4579
/// Return the number of exterior facet integrals
4580
virtual unsigned int num_exterior_facet_integrals() const
4585
/// Return the number of interior facet integrals
4586
virtual unsigned int num_interior_facet_integrals() const
4591
/// Create a new finite element for argument function i
4592
virtual ufc::finite_element* create_finite_element(unsigned int i) const
4597
return new biharmonic_1_finite_element_0();
4600
return new biharmonic_1_finite_element_1();
4606
/// Create a new dof map for argument function i
4607
virtual ufc::dof_map* create_dof_map(unsigned int i) const
4612
return new biharmonic_1_dof_map_0();
4615
return new biharmonic_1_dof_map_1();
4621
/// Create a new cell integral on sub domain i
4622
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
4624
return new biharmonic_1_cell_integral_0();
4627
/// Create a new exterior facet integral on sub domain i
4628
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
4633
/// Create a new interior facet integral on sub domain i
4634
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const