52
52
/// Return a string identifying the finite element
53
53
virtual const char* signature() const
55
return "FiniteElement('Lagrange', Cell('triangle', Space(2)), 2, None)";
58
/// Return the cell shape
59
virtual ufc::shape cell_shape() const
64
/// Return the topological dimension of the cell shape
65
virtual unsigned int topological_dimension() const
70
/// Return the geometric dimension of the cell shape
71
virtual unsigned int geometric_dimension() const
76
/// Return the dimension of the finite element function space
77
virtual unsigned int space_dimension() const
55
return "FiniteElement('Real', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 0, None)";
58
/// Return the cell shape
59
virtual ufc::shape cell_shape() const
64
/// Return the topological dimension of the cell shape
65
virtual std::size_t topological_dimension() const
70
/// Return the geometric dimension of the cell shape
71
virtual std::size_t geometric_dimension() const
76
/// Return the dimension of the finite element function space
77
virtual std::size_t space_dimension() const
82
/// Return the rank of the value space
83
virtual std::size_t value_rank() const
88
/// Return the dimension of the value space for axis i
89
virtual std::size_t value_dimension(std::size_t i) const
94
/// Evaluate basis function i at given point x in cell
95
virtual void evaluate_basis(std::size_t i,
98
const double* vertex_coordinates,
99
int cell_orientation) const
103
compute_jacobian_triangle_2d(J, vertex_coordinates);
105
// Compute Jacobian inverse and determinant
108
compute_jacobian_inverse_triangle_2d(K, detJ, J);
113
// Get coordinates and map to the reference (FIAT) element
118
// Array of basisvalues
119
double basisvalues[1] = {0.0};
121
// Declare helper variables
123
// Compute basisvalues
124
basisvalues[0] = 1.0;
126
// Table(s) of coefficients
127
static const double coefficients0[1] = \
131
for (unsigned int r = 0; r < 1; r++)
133
*values += coefficients0[r]*basisvalues[r];
134
}// end loop over 'r'
137
/// Evaluate all basis functions at given point x in cell
138
virtual void evaluate_basis_all(double* values,
140
const double* vertex_coordinates,
141
int cell_orientation) const
143
// Element is constant, calling evaluate_basis.
144
evaluate_basis(0, values, x, vertex_coordinates, cell_orientation);
147
/// Evaluate order n derivatives of basis function i at given point x in cell
148
virtual void evaluate_basis_derivatives(std::size_t i,
152
const double* vertex_coordinates,
153
int cell_orientation) const
157
compute_jacobian_triangle_2d(J, vertex_coordinates);
159
// Compute Jacobian inverse and determinant
162
compute_jacobian_inverse_triangle_2d(K, detJ, J);
167
// Get coordinates and map to the reference (FIAT) element
169
// Compute number of derivatives.
170
unsigned int num_derivatives = 1;
171
for (unsigned int r = 0; r < n; r++)
173
num_derivatives *= 2;
174
}// end loop over 'r'
176
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
177
unsigned int **combinations = new unsigned int *[num_derivatives];
178
for (unsigned int row = 0; row < num_derivatives; row++)
180
combinations[row] = new unsigned int [n];
181
for (unsigned int col = 0; col < n; col++)
182
combinations[row][col] = 0;
185
// Generate combinations of derivatives
186
for (unsigned int row = 1; row < num_derivatives; row++)
188
for (unsigned int num = 0; num < row; num++)
190
for (unsigned int col = n-1; col+1 > 0; col--)
192
if (combinations[row][col] + 1 > 1)
193
combinations[row][col] = 0;
196
combinations[row][col] += 1;
203
// Compute inverse of Jacobian
204
const double Jinv[2][2] = {{K[0], K[1]}, {K[2], K[3]}};
206
// Declare transformation matrix
207
// Declare pointer to two dimensional array and initialise
208
double **transform = new double *[num_derivatives];
210
for (unsigned int j = 0; j < num_derivatives; j++)
212
transform[j] = new double [num_derivatives];
213
for (unsigned int k = 0; k < num_derivatives; k++)
217
// Construct transformation matrix
218
for (unsigned int row = 0; row < num_derivatives; row++)
220
for (unsigned int col = 0; col < num_derivatives; col++)
222
for (unsigned int k = 0; k < n; k++)
223
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
227
// Reset values. Assuming that values is always an array.
228
for (unsigned int r = 0; r < num_derivatives; r++)
231
}// end loop over 'r'
234
// Array of basisvalues
235
double basisvalues[1] = {0.0};
237
// Declare helper variables
239
// Compute basisvalues
240
basisvalues[0] = 1.0;
242
// Table(s) of coefficients
243
static const double coefficients0[1] = \
246
// Tables of derivatives of the polynomial base (transpose).
247
static const double dmats0[1][1] = \
250
static const double dmats1[1][1] = \
253
// Compute reference derivatives.
254
// Declare pointer to array of derivatives on FIAT element.
255
double *derivatives = new double[num_derivatives];
256
for (unsigned int r = 0; r < num_derivatives; r++)
258
derivatives[r] = 0.0;
259
}// end loop over 'r'
261
// Declare derivative matrix (of polynomial basis).
262
double dmats[1][1] = \
265
// Declare (auxiliary) derivative matrix (of polynomial basis).
266
double dmats_old[1][1] = \
269
// Loop possible derivatives.
270
for (unsigned int r = 0; r < num_derivatives; r++)
272
// Resetting dmats values to compute next derivative.
273
for (unsigned int t = 0; t < 1; t++)
275
for (unsigned int u = 0; u < 1; u++)
283
}// end loop over 'u'
284
}// end loop over 't'
286
// Looping derivative order to generate dmats.
287
for (unsigned int s = 0; s < n; s++)
289
// Updating dmats_old with new values and resetting dmats.
290
for (unsigned int t = 0; t < 1; t++)
292
for (unsigned int u = 0; u < 1; u++)
294
dmats_old[t][u] = dmats[t][u];
296
}// end loop over 'u'
297
}// end loop over 't'
299
// Update dmats using an inner product.
300
if (combinations[r][s] == 0)
302
for (unsigned int t = 0; t < 1; t++)
304
for (unsigned int u = 0; u < 1; u++)
306
for (unsigned int tu = 0; tu < 1; tu++)
308
dmats[t][u] += dmats0[t][tu]*dmats_old[tu][u];
309
}// end loop over 'tu'
310
}// end loop over 'u'
311
}// end loop over 't'
314
if (combinations[r][s] == 1)
316
for (unsigned int t = 0; t < 1; t++)
318
for (unsigned int u = 0; u < 1; u++)
320
for (unsigned int tu = 0; tu < 1; tu++)
322
dmats[t][u] += dmats1[t][tu]*dmats_old[tu][u];
323
}// end loop over 'tu'
324
}// end loop over 'u'
325
}// end loop over 't'
328
}// end loop over 's'
329
for (unsigned int s = 0; s < 1; s++)
331
for (unsigned int t = 0; t < 1; t++)
333
derivatives[r] += coefficients0[s]*dmats[s][t]*basisvalues[t];
334
}// end loop over 't'
335
}// end loop over 's'
336
}// end loop over 'r'
338
// Transform derivatives back to physical element
339
for (unsigned int r = 0; r < num_derivatives; r++)
341
for (unsigned int s = 0; s < num_derivatives; s++)
343
values[r] += transform[r][s]*derivatives[s];
344
}// end loop over 's'
345
}// end loop over 'r'
347
// Delete pointer to array of derivatives on FIAT element
348
delete [] derivatives;
350
// Delete pointer to array of combinations of derivatives and transform
351
for (unsigned int r = 0; r < num_derivatives; r++)
353
delete [] combinations[r];
354
}// end loop over 'r'
355
delete [] combinations;
356
for (unsigned int r = 0; r < num_derivatives; r++)
358
delete [] transform[r];
359
}// end loop over 'r'
363
/// Evaluate order n derivatives of all basis functions at given point x in cell
364
virtual void evaluate_basis_derivatives_all(std::size_t n,
367
const double* vertex_coordinates,
368
int cell_orientation) const
370
// Element is constant, calling evaluate_basis_derivatives.
371
evaluate_basis_derivatives(0, n, values, x, vertex_coordinates, cell_orientation);
374
/// Evaluate linear functional for dof i on the function f
375
virtual double evaluate_dof(std::size_t i,
376
const ufc::function& f,
377
const double* vertex_coordinates,
378
int cell_orientation,
379
const ufc::cell& c) const
381
// Declare variables for result of evaluation
384
// Declare variable for physical coordinates
390
y[0] = 0.33333333*vertex_coordinates[0] + 0.33333333*vertex_coordinates[2] + 0.33333333*vertex_coordinates[4];
391
y[1] = 0.33333333*vertex_coordinates[1] + 0.33333333*vertex_coordinates[3] + 0.33333333*vertex_coordinates[5];
392
f.evaluate(vals, y, c);
401
/// Evaluate linear functionals for all dofs on the function f
402
virtual void evaluate_dofs(double* values,
403
const ufc::function& f,
404
const double* vertex_coordinates,
405
int cell_orientation,
406
const ufc::cell& c) const
408
// Declare variables for result of evaluation
411
// Declare variable for physical coordinates
413
y[0] = 0.33333333*vertex_coordinates[0] + 0.33333333*vertex_coordinates[2] + 0.33333333*vertex_coordinates[4];
414
y[1] = 0.33333333*vertex_coordinates[1] + 0.33333333*vertex_coordinates[3] + 0.33333333*vertex_coordinates[5];
415
f.evaluate(vals, y, c);
419
/// Interpolate vertex values from dof values
420
virtual void interpolate_vertex_values(double* vertex_values,
421
const double* dof_values,
422
const double* vertex_coordinates,
423
int cell_orientation,
424
const ufc::cell& c) const
426
// Evaluate function and change variables
427
vertex_values[0] = dof_values[0];
428
vertex_values[1] = dof_values[0];
429
vertex_values[2] = dof_values[0];
432
/// Map coordinate xhat from reference cell to coordinate x in cell
433
virtual void map_from_reference_cell(double* x,
435
const ufc::cell& c) const
437
std::cerr << "*** FFC warning: " << "map_from_reference_cell not yet implemented." << std::endl;
440
/// Map from coordinate x in cell to coordinate xhat in reference cell
441
virtual void map_to_reference_cell(double* xhat,
443
const ufc::cell& c) const
445
std::cerr << "*** FFC warning: " << "map_to_reference_cell not yet implemented." << std::endl;
448
/// Return the number of sub elements (for a mixed element)
449
virtual std::size_t num_sub_elements() const
454
/// Create a new finite element for sub element i (for a mixed element)
455
virtual ufc::finite_element* create_sub_element(std::size_t i) const
460
/// Create a new class instance
461
virtual ufc::finite_element* create() const
463
return new conditional_finite_element_0();
468
/// This class defines the interface for a finite element.
470
class conditional_finite_element_1: public ufc::finite_element
475
conditional_finite_element_1() : ufc::finite_element()
481
virtual ~conditional_finite_element_1()
486
/// Return a string identifying the finite element
487
virtual const char* signature() const
489
return "FiniteElement('Lagrange', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 2, None)";
492
/// Return the cell shape
493
virtual ufc::shape cell_shape() const
495
return ufc::triangle;
498
/// Return the topological dimension of the cell shape
499
virtual std::size_t topological_dimension() const
504
/// Return the geometric dimension of the cell shape
505
virtual std::size_t geometric_dimension() const
510
/// Return the dimension of the finite element function space
511
virtual std::size_t space_dimension() const
82
516
/// Return the rank of the value space
83
virtual unsigned int value_rank() const
517
virtual std::size_t value_rank() const
88
522
/// Return the dimension of the value space for axis i
89
virtual unsigned int value_dimension(unsigned int i) const
523
virtual std::size_t value_dimension(std::size_t i) const
94
/// Evaluate basis function i at given point in cell
95
virtual void evaluate_basis(unsigned int i,
528
/// Evaluate basis function i at given point x in cell
529
virtual void evaluate_basis(std::size_t i,
97
const double* coordinates,
98
const ufc::cell& c) const
532
const double* vertex_coordinates,
533
int cell_orientation) const
100
// Extract vertex coordinates
101
const double * const * x = c.coordinates;
103
// Compute Jacobian of affine map from reference cell
104
const double J_00 = x[1][0] - x[0][0];
105
const double J_01 = x[2][0] - x[0][0];
106
const double J_10 = x[1][1] - x[0][1];
107
const double J_11 = x[2][1] - x[0][1];
109
// Compute determinant of Jacobian
110
double detJ = J_00*J_11 - J_01*J_10;
112
// Compute inverse of Jacobian
537
compute_jacobian_triangle_2d(J, vertex_coordinates);
539
// Compute Jacobian inverse and determinant
542
compute_jacobian_inverse_triangle_2d(K, detJ, J);
114
545
// Compute constants
115
const double C0 = x[1][0] + x[2][0];
116
const double C1 = x[1][1] + x[2][1];
546
const double C0 = vertex_coordinates[2] + vertex_coordinates[4];
547
const double C1 = vertex_coordinates[3] + vertex_coordinates[5];
118
549
// Get coordinates and map to the reference (FIAT) element
119
double X = (J_01*(C1 - 2.0*coordinates[1]) + J_11*(2.0*coordinates[0] - C0)) / detJ;
120
double Y = (J_00*(2.0*coordinates[1] - C1) + J_10*(C0 - 2.0*coordinates[0])) / detJ;
550
double X = (J[1]*(C1 - 2.0*x[1]) + J[3]*(2.0*x[0] - C0)) / detJ;
551
double Y = (J[0]*(2.0*x[1] - C1) + J[2]*(C0 - 2.0*x[0])) / detJ;
129
// Array of basisvalues.
560
// Array of basisvalues
130
561
double basisvalues[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
132
// Declare helper variables.
563
// Declare helper variables
133
564
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
134
565
double tmp1 = (1.0 - Y)/2.0;
135
566
double tmp2 = tmp1*tmp1;
137
// Compute basisvalues.
568
// Compute basisvalues
138
569
basisvalues[0] = 1.0;
139
570
basisvalues[1] = tmp0;
140
571
basisvalues[3] = basisvalues[1]*1.5*tmp0 - basisvalues[0]*0.5*tmp2;
346
/// Evaluate all basis functions at given point in cell
777
/// Evaluate all basis functions at given point x in cell
347
778
virtual void evaluate_basis_all(double* values,
348
const double* coordinates,
349
const ufc::cell& c) const
780
const double* vertex_coordinates,
781
int cell_orientation) const
351
783
// Helper variable to hold values of a single dof.
352
784
double dof_values = 0.0;
354
// Loop dofs and call evaluate_basis.
786
// Loop dofs and call evaluate_basis
355
787
for (unsigned int r = 0; r < 6; r++)
357
evaluate_basis(r, &dof_values, coordinates, c);
789
evaluate_basis(r, &dof_values, x, vertex_coordinates, cell_orientation);
358
790
values[r] = dof_values;
359
791
}// end loop over 'r'
362
/// Evaluate order n derivatives of basis function i at given point in cell
363
virtual void evaluate_basis_derivatives(unsigned int i,
794
/// Evaluate order n derivatives of basis function i at given point x in cell
795
virtual void evaluate_basis_derivatives(std::size_t i,
366
const double* coordinates,
367
const ufc::cell& c) const
799
const double* vertex_coordinates,
800
int cell_orientation) const
369
// Extract vertex coordinates
370
const double * const * x = c.coordinates;
372
// Compute Jacobian of affine map from reference cell
373
const double J_00 = x[1][0] - x[0][0];
374
const double J_01 = x[2][0] - x[0][0];
375
const double J_10 = x[1][1] - x[0][1];
376
const double J_11 = x[2][1] - x[0][1];
378
// Compute determinant of Jacobian
379
double detJ = J_00*J_11 - J_01*J_10;
381
// Compute inverse of Jacobian
382
const double K_00 = J_11 / detJ;
383
const double K_01 = -J_01 / detJ;
384
const double K_10 = -J_10 / detJ;
385
const double K_11 = J_00 / detJ;
804
compute_jacobian_triangle_2d(J, vertex_coordinates);
806
// Compute Jacobian inverse and determinant
809
compute_jacobian_inverse_triangle_2d(K, detJ, J);
387
812
// Compute constants
388
const double C0 = x[1][0] + x[2][0];
389
const double C1 = x[1][1] + x[2][1];
813
const double C0 = vertex_coordinates[2] + vertex_coordinates[4];
814
const double C1 = vertex_coordinates[3] + vertex_coordinates[5];
391
816
// Get coordinates and map to the reference (FIAT) element
392
double X = (J_01*(C1 - 2.0*coordinates[1]) + J_11*(2.0*coordinates[0] - C0)) / detJ;
393
double Y = (J_00*(2.0*coordinates[1] - C1) + J_10*(C0 - 2.0*coordinates[0])) / detJ;
817
double X = (J[1]*(C1 - 2.0*x[1]) + J[3]*(2.0*x[0] - C0)) / detJ;
818
double Y = (J[0]*(2.0*x[1] - C1) + J[2]*(C0 - 2.0*x[0])) / detJ;
395
820
// Compute number of derivatives.
396
821
unsigned int num_derivatives = 1;
1667
2094
/// Return a string identifying the dofmap
1668
2095
virtual const char* signature() const
1670
return "FFC dofmap for FiniteElement('Lagrange', Cell('triangle', Space(2)), 2, None)";
1673
/// Return true iff mesh entities of topological dimension d are needed
1674
virtual bool needs_mesh_entities(unsigned int d) const
1698
/// Initialize dofmap for mesh (return true iff init_cell() is needed)
1699
virtual bool init_mesh(const ufc::mesh& m)
1701
_global_dimension = m.num_entities[0] + m.num_entities[1];
1705
/// Initialize dofmap for given cell
1706
virtual void init_cell(const ufc::mesh& m,
1712
/// Finish initialization of dofmap for cells
1713
virtual void init_cell_finalize()
1718
/// Return the topological dimension of the associated cell shape
1719
virtual unsigned int topological_dimension() const
1724
/// Return the geometric dimension of the associated cell shape
1725
virtual unsigned int geometric_dimension() const
1730
/// Return the dimension of the global finite element function space
1731
virtual unsigned int global_dimension() const
1733
return _global_dimension;
1736
/// Return the dimension of the local finite element function space for a cell
1737
virtual unsigned int local_dimension(const ufc::cell& c) const
1742
/// Return the maximum dimension of the local finite element function space
1743
virtual unsigned int max_local_dimension() const
1748
/// Return the number of dofs on each cell facet
1749
virtual unsigned int num_facet_dofs() const
2097
return "FFC dofmap for FiniteElement('Real', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 0, None)";
2100
/// Return true iff mesh entities of topological dimension d are needed
2101
virtual bool needs_mesh_entities(std::size_t d) const
2125
/// Return the topological dimension of the associated cell shape
2126
virtual std::size_t topological_dimension() const
2131
/// Return the geometric dimension of the associated cell shape
2132
virtual std::size_t geometric_dimension() const
2137
/// Return the dimension of the global finite element function space
2138
virtual std::size_t global_dimension(const std::vector<std::size_t>&
2139
num_global_entities) const
2144
/// Return the dimension of the local finite element function space for a cell
2145
virtual std::size_t local_dimension(const ufc::cell& c) const
2150
/// Return the maximum dimension of the local finite element function space
2151
virtual std::size_t max_local_dimension() const
2156
/// Return the number of dofs on each cell facet
2157
virtual std::size_t num_facet_dofs() const
2162
/// Return the number of dofs associated with each cell entity of dimension d
2163
virtual std::size_t num_entity_dofs(std::size_t d) const
2187
/// Tabulate the local-to-global mapping of dofs on a cell
2188
virtual void tabulate_dofs(std::size_t* dofs,
2189
const std::vector<std::size_t>& num_global_entities,
2190
const ufc::cell& c) const
2195
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
2196
virtual void tabulate_facet_dofs(std::size_t* dofs,
2197
std::size_t facet) const
2220
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
2221
virtual void tabulate_entity_dofs(std::size_t* dofs,
2222
std::size_t d, std::size_t i) const
2226
std::cerr << "*** FFC warning: " << "d is larger than dimension (2)" << std::endl;
2245
std::cerr << "*** FFC warning: " << "i is larger than number of entities (0)" << std::endl;
2255
/// Tabulate the coordinates of all dofs on a cell
2256
virtual void tabulate_coordinates(double** dof_coordinates,
2257
const double* vertex_coordinates) const
2259
dof_coordinates[0][0] = 0.33333333*vertex_coordinates[0] + 0.33333333*vertex_coordinates[2] + 0.33333333*vertex_coordinates[4];
2260
dof_coordinates[0][1] = 0.33333333*vertex_coordinates[1] + 0.33333333*vertex_coordinates[3] + 0.33333333*vertex_coordinates[5];
2263
/// Return the number of sub dofmaps (for a mixed element)
2264
virtual std::size_t num_sub_dofmaps() const
2269
/// Create a new dofmap for sub dofmap i (for a mixed element)
2270
virtual ufc::dofmap* create_sub_dofmap(std::size_t i) const
2275
/// Create a new class instance
2276
virtual ufc::dofmap* create() const
2278
return new conditional_dofmap_0();
2283
/// This class defines the interface for a local-to-global mapping of
2284
/// degrees of freedom (dofs).
2286
class conditional_dofmap_1: public ufc::dofmap
2291
conditional_dofmap_1() : ufc::dofmap()
2297
virtual ~conditional_dofmap_1()
2302
/// Return a string identifying the dofmap
2303
virtual const char* signature() const
2305
return "FFC dofmap for FiniteElement('Lagrange', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 2, None)";
2308
/// Return true iff mesh entities of topological dimension d are needed
2309
virtual bool needs_mesh_entities(std::size_t d) const
2333
/// Return the topological dimension of the associated cell shape
2334
virtual std::size_t topological_dimension() const
2339
/// Return the geometric dimension of the associated cell shape
2340
virtual std::size_t geometric_dimension() const
2345
/// Return the dimension of the global finite element function space
2346
virtual std::size_t global_dimension(const std::vector<std::size_t>&
2347
num_global_entities) const
2349
return num_global_entities[0] + num_global_entities[1];
2352
/// Return the dimension of the local finite element function space for a cell
2353
virtual std::size_t local_dimension(const ufc::cell& c) const
2358
/// Return the maximum dimension of the local finite element function space
2359
virtual std::size_t max_local_dimension() const
2364
/// Return the number of dofs on each cell facet
2365
virtual std::size_t num_facet_dofs() const
1754
2370
/// Return the number of dofs associated with each cell entity of dimension d
1755
virtual unsigned int num_entity_dofs(unsigned int d) const
2371
virtual std::size_t num_entity_dofs(std::size_t d) const
1962
2576
/// Tabulate the tensor for the contribution from a local cell
1963
2577
virtual void tabulate_tensor(double* A,
1964
2578
const double * const * w,
1965
const ufc::cell& c) const
2579
const double* vertex_coordinates,
2580
int cell_orientation) const
1967
// Extract vertex coordinates
1968
const double * const * x = c.coordinates;
1970
// Compute Jacobian of affine map from reference cell
1971
const double J_00 = x[1][0] - x[0][0];
1972
const double J_01 = x[2][0] - x[0][0];
1973
const double J_10 = x[1][1] - x[0][1];
1974
const double J_11 = x[2][1] - x[0][1];
1976
// Compute determinant of Jacobian
1977
double detJ = J_00*J_11 - J_01*J_10;
1979
// Compute inverse of Jacobian
2584
compute_jacobian_triangle_2d(J, vertex_coordinates);
2586
// Compute Jacobian inverse and determinant
2589
compute_jacobian_inverse_triangle_2d(K, detJ, J);
1981
2591
// Set scale factor
1982
2592
const double det = std::abs(detJ);
1986
// Compute circumradius, assuming triangle is embedded in 2D.
2596
// Compute circumradius of triangle in 2D
1991
2601
// Array of quadrature weights.
1992
static const double W6[6] = {0.054975872, 0.054975872, 0.054975872, 0.11169079, 0.11169079, 0.11169079};
1993
// Quadrature points on the UFC reference element: (0.81684757, 0.091576214), (0.091576214, 0.81684757), (0.091576214, 0.091576214), (0.10810302, 0.44594849), (0.44594849, 0.10810302), (0.44594849, 0.44594849)
2602
static const double W3[3] = {0.16666667, 0.16666667, 0.16666667};
2603
// Quadrature points on the UFC reference element: (0.16666667, 0.16666667), (0.16666667, 0.66666667), (0.66666667, 0.16666667)
1995
2605
// Value of basis functions at quadrature points.
1996
static const double FE0[6][6] = \
1997
{{-0.074803808, 0.51763234, -0.074803808, 0.29921523, 0.033544812, 0.29921523},
1998
{-0.074803808, -0.074803808, 0.51763234, 0.29921523, 0.29921523, 0.033544812},
1999
{0.51763234, -0.074803808, -0.074803808, 0.033544812, 0.29921523, 0.29921523},
2000
{-0.048208378, -0.084730493, -0.048208378, 0.19283351, 0.79548023, 0.19283351},
2001
{-0.048208378, -0.048208378, -0.084730493, 0.19283351, 0.19283351, 0.79548023},
2002
{-0.084730493, -0.048208378, -0.048208378, 0.79548023, 0.19283351, 0.19283351}};
2606
static const double FE0[3][6] = \
2607
{{0.22222222, -0.11111111, -0.11111111, 0.11111111, 0.44444444, 0.44444444},
2608
{-0.11111111, -0.11111111, 0.22222222, 0.44444444, 0.44444444, 0.11111111},
2609
{-0.11111111, 0.22222222, -0.11111111, 0.44444444, 0.11111111, 0.44444444}};
2004
static const double FEA6_f0[6][3] = \
2005
{{0.091576214, 0.81684757, 0.091576214},
2006
{0.091576214, 0.091576214, 0.81684757},
2007
{0.81684757, 0.091576214, 0.091576214},
2008
{0.44594849, 0.10810302, 0.44594849},
2009
{0.44594849, 0.44594849, 0.10810302},
2010
{0.10810302, 0.44594849, 0.44594849}};
2611
static const double FEA3_f0[3][3] = \
2612
{{0.66666667, 0.16666667, 0.16666667},
2613
{0.16666667, 0.16666667, 0.66666667},
2614
{0.16666667, 0.66666667, 0.16666667}};
2012
2616
// Reset values in the element tensor.
2013
2617
for (unsigned int r = 0; r < 6; r++)
2100
2694
/// Return a string identifying the form
2101
2695
virtual const char* signature() const
2103
return "Form([Integral(Product(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 2, None), 0), Sum(Conditional(AndCondition(GE(Sum(FloatValue(0.55, (), (), {}), Sum(FloatValue(-0.05, (), (), {}), Sum(Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(1),), {})), Product(IntValue(-1, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(0),), {})))))), Zero((), (), {})), AndCondition(AndCondition(GE(Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(0),), {})), FloatValue(0.55, (), (), {})), LE(Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(0),), {})), FloatValue(0.95, (), (), {}))), NotCondition(OrCondition(LT(Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(1),), {})), FloatValue(0.05, (), (), {})), GT(Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(1),), {})), FloatValue(0.45, (), (), {})))))), FloatValue(-1, (), (), {}), Zero((), (), {})), Conditional(LE(Sum(Power(Sum(FloatValue(-0.33, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(0),), {}))), IntValue(2, (), (), {})), Power(Sum(FloatValue(-0.67, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(1),), {}))), IntValue(2, (), (), {}))), FloatValue(0.025, (), (), {})), Conditional(LE(Sum(Power(Sum(FloatValue(-0.33, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(0),), {}))), IntValue(2, (), (), {})), Power(Sum(FloatValue(-0.67, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', Space(2))), MultiIndex((FixedIndex(1),), {}))), IntValue(2, (), (), {}))), FloatValue(0.015, (), (), {})), FloatValue(-1, (), (), {}), FloatValue(5, (), (), {})), Zero((), (), {})))), Measure('cell', 0, None))])";
2697
return "d58fed1bc260f7f4defd7a416ccd3bfaa17fe02fb2f4fe3afd9221e7afab62ff17ceb9ccd1ed8d48f90cf118e951b44c22a33afcde5104ad00188a048194ce7e";
2106
2700
/// Return the rank of the global tensor (r)
2107
virtual unsigned int rank() const
2701
virtual std::size_t rank() const
2112
2706
/// Return the number of coefficients (n)
2113
virtual unsigned int num_coefficients() const
2707
virtual std::size_t num_coefficients() const
2118
2712
/// Return the number of cell domains
2119
virtual unsigned int num_cell_domains() const
2713
virtual std::size_t num_cell_domains() const
2124
2718
/// Return the number of exterior facet domains
2125
virtual unsigned int num_exterior_facet_domains() const
2719
virtual std::size_t num_exterior_facet_domains() const
2130
2724
/// Return the number of interior facet domains
2131
virtual unsigned int num_interior_facet_domains() const
2725
virtual std::size_t num_interior_facet_domains() const
2730
/// Return the number of point domains
2731
virtual std::size_t num_point_domains() const
2736
/// Return whether the form has any cell integrals
2737
virtual bool has_cell_integrals() const
2742
/// Return whether the form has any exterior facet integrals
2743
virtual bool has_exterior_facet_integrals() const
2748
/// Return whether the form has any interior facet integrals
2749
virtual bool has_interior_facet_integrals() const
2754
/// Return whether the form has any point integrals
2755
virtual bool has_point_integrals() const
2136
2760
/// Create a new finite element for argument function i
2137
virtual ufc::finite_element* create_finite_element(unsigned int i) const
2761
virtual ufc::finite_element* create_finite_element(std::size_t i) const
2767
return new conditional_finite_element_1();
2143
2772
return new conditional_finite_element_0();