1
// This code conforms with the UFC specification version 1.0
2
// and was automatically generated by FFC version 0.4.5.
4
// Warning: This code was generated with the option '-l dolfin'
5
// and contains DOLFIN-specific wrappers that depend on DOLFIN.
7
#ifndef __FFC_L2PROJ_05_H
8
#define __FFC_L2PROJ_05_H
15
/// This class defines the interface for a finite element.
17
class UFC_ffc_L2proj_05BilinearForm_finite_element_0: public ufc::finite_element
22
UFC_ffc_L2proj_05BilinearForm_finite_element_0() : ufc::finite_element()
28
virtual ~UFC_ffc_L2proj_05BilinearForm_finite_element_0()
33
/// Return a string identifying the finite element
34
virtual const char* signature() const
36
return "Lagrange finite element of degree 2 on a tetrahedron";
39
/// Return the cell shape
40
virtual ufc::shape cell_shape() const
42
return ufc::tetrahedron;
45
/// Return the dimension of the finite element function space
46
virtual unsigned int space_dimension() const
51
/// Return the rank of the value space
52
virtual unsigned int value_rank() const
57
/// Return the dimension of the value space for axis i
58
virtual unsigned int value_dimension(unsigned int i) const
63
/// Evaluate basis function i at given point in cell
64
virtual void evaluate_basis(unsigned int i,
66
const double* coordinates,
67
const ufc::cell& c) const
69
throw std::runtime_error("// Function evaluate_basis not generated (compiled with -fno-evaluate_basis)");
72
/// Evaluate all basis functions at given point in cell
73
virtual void evaluate_basis_all(double* values,
74
const double* coordinates,
75
const ufc::cell& c) const
77
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
80
/// Evaluate order n derivatives of basis function i at given point in cell
81
virtual void evaluate_basis_derivatives(unsigned int i,
84
const double* coordinates,
85
const ufc::cell& c) const
87
throw std::runtime_error("// Function evaluate_basis_derivatives not generated (compiled with -fno-evaluate_basis_derivatives)");
90
/// Evaluate order n derivatives of all basis functions at given point in cell
91
virtual void evaluate_basis_derivatives_all(unsigned int n,
93
const double* coordinates,
94
const ufc::cell& c) const
96
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
99
/// Evaluate linear functional for dof i on the function f
100
virtual double evaluate_dof(unsigned int i,
101
const ufc::function& f,
102
const ufc::cell& c) const
104
// The reference points, direction and weights:
105
const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
106
const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
107
const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
109
const double * const * x = c.coordinates;
111
// Iterate over the points:
112
// Evaluate basis functions for affine mapping
113
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
114
const double w1 = X[i][0][0];
115
const double w2 = X[i][0][1];
116
const double w3 = X[i][0][2];
118
// Compute affine mapping y = F(X)
120
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
121
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
122
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
124
// Evaluate function at physical points
126
f.evaluate(values, y, c);
128
// Map function values using appropriate mapping
129
// Affine map: Do nothing
131
// Note that we do not map the weights (yet).
133
// Take directional components
134
for(int k = 0; k < 1; k++)
135
result += values[k]*D[i][0][k];
136
// Multiply by weights
142
/// Evaluate linear functionals for all dofs on the function f
143
virtual void evaluate_dofs(double* values,
144
const ufc::function& f,
145
const ufc::cell& c) const
147
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
150
/// Interpolate vertex values from dof values
151
virtual void interpolate_vertex_values(double* vertex_values,
152
const double* dof_values,
153
const ufc::cell& c) const
155
// Evaluate at vertices and use affine mapping
156
vertex_values[0] = dof_values[0];
157
vertex_values[1] = dof_values[1];
158
vertex_values[2] = dof_values[2];
159
vertex_values[3] = dof_values[3];
162
/// Return the number of sub elements (for a mixed element)
163
virtual unsigned int num_sub_elements() const
168
/// Create a new finite element for sub element i (for a mixed element)
169
virtual ufc::finite_element* create_sub_element(unsigned int i) const
171
return new UFC_ffc_L2proj_05BilinearForm_finite_element_0();
176
/// This class defines the interface for a finite element.
178
class UFC_ffc_L2proj_05BilinearForm_finite_element_1: public ufc::finite_element
183
UFC_ffc_L2proj_05BilinearForm_finite_element_1() : ufc::finite_element()
189
virtual ~UFC_ffc_L2proj_05BilinearForm_finite_element_1()
194
/// Return a string identifying the finite element
195
virtual const char* signature() const
197
return "Lagrange finite element of degree 2 on a tetrahedron";
200
/// Return the cell shape
201
virtual ufc::shape cell_shape() const
203
return ufc::tetrahedron;
206
/// Return the dimension of the finite element function space
207
virtual unsigned int space_dimension() const
212
/// Return the rank of the value space
213
virtual unsigned int value_rank() const
218
/// Return the dimension of the value space for axis i
219
virtual unsigned int value_dimension(unsigned int i) const
224
/// Evaluate basis function i at given point in cell
225
virtual void evaluate_basis(unsigned int i,
227
const double* coordinates,
228
const ufc::cell& c) const
230
throw std::runtime_error("// Function evaluate_basis not generated (compiled with -fno-evaluate_basis)");
233
/// Evaluate all basis functions at given point in cell
234
virtual void evaluate_basis_all(double* values,
235
const double* coordinates,
236
const ufc::cell& c) const
238
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
241
/// Evaluate order n derivatives of basis function i at given point in cell
242
virtual void evaluate_basis_derivatives(unsigned int i,
245
const double* coordinates,
246
const ufc::cell& c) const
248
throw std::runtime_error("// Function evaluate_basis_derivatives not generated (compiled with -fno-evaluate_basis_derivatives)");
251
/// Evaluate order n derivatives of all basis functions at given point in cell
252
virtual void evaluate_basis_derivatives_all(unsigned int n,
254
const double* coordinates,
255
const ufc::cell& c) const
257
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
260
/// Evaluate linear functional for dof i on the function f
261
virtual double evaluate_dof(unsigned int i,
262
const ufc::function& f,
263
const ufc::cell& c) const
265
// The reference points, direction and weights:
266
const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
267
const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
268
const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
270
const double * const * x = c.coordinates;
272
// Iterate over the points:
273
// Evaluate basis functions for affine mapping
274
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
275
const double w1 = X[i][0][0];
276
const double w2 = X[i][0][1];
277
const double w3 = X[i][0][2];
279
// Compute affine mapping y = F(X)
281
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
282
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
283
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
285
// Evaluate function at physical points
287
f.evaluate(values, y, c);
289
// Map function values using appropriate mapping
290
// Affine map: Do nothing
292
// Note that we do not map the weights (yet).
294
// Take directional components
295
for(int k = 0; k < 1; k++)
296
result += values[k]*D[i][0][k];
297
// Multiply by weights
303
/// Evaluate linear functionals for all dofs on the function f
304
virtual void evaluate_dofs(double* values,
305
const ufc::function& f,
306
const ufc::cell& c) const
308
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
311
/// Interpolate vertex values from dof values
312
virtual void interpolate_vertex_values(double* vertex_values,
313
const double* dof_values,
314
const ufc::cell& c) const
316
// Evaluate at vertices and use affine mapping
317
vertex_values[0] = dof_values[0];
318
vertex_values[1] = dof_values[1];
319
vertex_values[2] = dof_values[2];
320
vertex_values[3] = dof_values[3];
323
/// Return the number of sub elements (for a mixed element)
324
virtual unsigned int num_sub_elements() const
329
/// Create a new finite element for sub element i (for a mixed element)
330
virtual ufc::finite_element* create_sub_element(unsigned int i) const
332
return new UFC_ffc_L2proj_05BilinearForm_finite_element_1();
337
/// This class defines the interface for a local-to-global mapping of
338
/// degrees of freedom (dofs).
340
class UFC_ffc_L2proj_05BilinearForm_dof_map_0: public ufc::dof_map
344
unsigned int __global_dimension;
349
UFC_ffc_L2proj_05BilinearForm_dof_map_0() : ufc::dof_map()
351
__global_dimension = 0;
355
virtual ~UFC_ffc_L2proj_05BilinearForm_dof_map_0()
360
/// Return a string identifying the dof map
361
virtual const char* signature() const
363
return "FFC dof map for Lagrange finite element of degree 2 on a tetrahedron";
366
/// Return true iff mesh entities of topological dimension d are needed
367
virtual bool needs_mesh_entities(unsigned int d) const
387
/// Initialize dof map for mesh (return true iff init_cell() is needed)
388
virtual bool init_mesh(const ufc::mesh& m)
390
__global_dimension = m.num_entities[0] + m.num_entities[1];
394
/// Initialize dof map for given cell
395
virtual void init_cell(const ufc::mesh& m,
401
/// Finish initialization of dof map for cells
402
virtual void init_cell_finalize()
407
/// Return the dimension of the global finite element function space
408
virtual unsigned int global_dimension() const
410
return __global_dimension;
413
/// Return the dimension of the local finite element function space
414
virtual unsigned int local_dimension() const
419
// Return the geometric dimension of the coordinates this dof map provides
420
virtual unsigned int geometric_dimension() const
425
/// Return the number of dofs on each cell facet
426
virtual unsigned int num_facet_dofs() const
431
/// Return the number of dofs associated with each cell entity of dimension d
432
virtual unsigned int num_entity_dofs(unsigned int d) const
434
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
437
/// Tabulate the local-to-global mapping of dofs on a cell
438
virtual void tabulate_dofs(unsigned int* dofs,
440
const ufc::cell& c) const
442
dofs[0] = c.entity_indices[0][0];
443
dofs[1] = c.entity_indices[0][1];
444
dofs[2] = c.entity_indices[0][2];
445
dofs[3] = c.entity_indices[0][3];
446
unsigned int offset = m.num_entities[0];
447
dofs[4] = offset + c.entity_indices[1][0];
448
dofs[5] = offset + c.entity_indices[1][1];
449
dofs[6] = offset + c.entity_indices[1][2];
450
dofs[7] = offset + c.entity_indices[1][3];
451
dofs[8] = offset + c.entity_indices[1][4];
452
dofs[9] = offset + c.entity_indices[1][5];
455
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
456
virtual void tabulate_facet_dofs(unsigned int* dofs,
457
unsigned int facet) const
496
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
497
virtual void tabulate_entity_dofs(unsigned int* dofs,
498
unsigned int d, unsigned int i) const
500
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
503
/// Tabulate the coordinates of all dofs on a cell
504
virtual void tabulate_coordinates(double** coordinates,
505
const ufc::cell& c) const
507
const double * const * x = c.coordinates;
508
coordinates[0][0] = x[0][0];
509
coordinates[0][1] = x[0][1];
510
coordinates[0][2] = x[0][2];
511
coordinates[1][0] = x[1][0];
512
coordinates[1][1] = x[1][1];
513
coordinates[1][2] = x[1][2];
514
coordinates[2][0] = x[2][0];
515
coordinates[2][1] = x[2][1];
516
coordinates[2][2] = x[2][2];
517
coordinates[3][0] = x[3][0];
518
coordinates[3][1] = x[3][1];
519
coordinates[3][2] = x[3][2];
520
coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
521
coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
522
coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
523
coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
524
coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
525
coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
526
coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
527
coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
528
coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
529
coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
530
coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
531
coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
532
coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
533
coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
534
coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
535
coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
536
coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
537
coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
540
/// Return the number of sub dof maps (for a mixed element)
541
virtual unsigned int num_sub_dof_maps() const
546
/// Create a new dof_map for sub dof map i (for a mixed element)
547
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
549
return new UFC_ffc_L2proj_05BilinearForm_dof_map_0();
554
/// This class defines the interface for a local-to-global mapping of
555
/// degrees of freedom (dofs).
557
class UFC_ffc_L2proj_05BilinearForm_dof_map_1: public ufc::dof_map
561
unsigned int __global_dimension;
566
UFC_ffc_L2proj_05BilinearForm_dof_map_1() : ufc::dof_map()
568
__global_dimension = 0;
572
virtual ~UFC_ffc_L2proj_05BilinearForm_dof_map_1()
577
/// Return a string identifying the dof map
578
virtual const char* signature() const
580
return "FFC dof map for Lagrange finite element of degree 2 on a tetrahedron";
583
/// Return true iff mesh entities of topological dimension d are needed
584
virtual bool needs_mesh_entities(unsigned int d) const
604
/// Initialize dof map for mesh (return true iff init_cell() is needed)
605
virtual bool init_mesh(const ufc::mesh& m)
607
__global_dimension = m.num_entities[0] + m.num_entities[1];
611
/// Initialize dof map for given cell
612
virtual void init_cell(const ufc::mesh& m,
618
/// Finish initialization of dof map for cells
619
virtual void init_cell_finalize()
624
/// Return the dimension of the global finite element function space
625
virtual unsigned int global_dimension() const
627
return __global_dimension;
630
/// Return the dimension of the local finite element function space
631
virtual unsigned int local_dimension() const
636
// Return the geometric dimension of the coordinates this dof map provides
637
virtual unsigned int geometric_dimension() const
642
/// Return the number of dofs on each cell facet
643
virtual unsigned int num_facet_dofs() const
648
/// Return the number of dofs associated with each cell entity of dimension d
649
virtual unsigned int num_entity_dofs(unsigned int d) const
651
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
654
/// Tabulate the local-to-global mapping of dofs on a cell
655
virtual void tabulate_dofs(unsigned int* dofs,
657
const ufc::cell& c) const
659
dofs[0] = c.entity_indices[0][0];
660
dofs[1] = c.entity_indices[0][1];
661
dofs[2] = c.entity_indices[0][2];
662
dofs[3] = c.entity_indices[0][3];
663
unsigned int offset = m.num_entities[0];
664
dofs[4] = offset + c.entity_indices[1][0];
665
dofs[5] = offset + c.entity_indices[1][1];
666
dofs[6] = offset + c.entity_indices[1][2];
667
dofs[7] = offset + c.entity_indices[1][3];
668
dofs[8] = offset + c.entity_indices[1][4];
669
dofs[9] = offset + c.entity_indices[1][5];
672
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
673
virtual void tabulate_facet_dofs(unsigned int* dofs,
674
unsigned int facet) const
713
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
714
virtual void tabulate_entity_dofs(unsigned int* dofs,
715
unsigned int d, unsigned int i) const
717
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
720
/// Tabulate the coordinates of all dofs on a cell
721
virtual void tabulate_coordinates(double** coordinates,
722
const ufc::cell& c) const
724
const double * const * x = c.coordinates;
725
coordinates[0][0] = x[0][0];
726
coordinates[0][1] = x[0][1];
727
coordinates[0][2] = x[0][2];
728
coordinates[1][0] = x[1][0];
729
coordinates[1][1] = x[1][1];
730
coordinates[1][2] = x[1][2];
731
coordinates[2][0] = x[2][0];
732
coordinates[2][1] = x[2][1];
733
coordinates[2][2] = x[2][2];
734
coordinates[3][0] = x[3][0];
735
coordinates[3][1] = x[3][1];
736
coordinates[3][2] = x[3][2];
737
coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
738
coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
739
coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
740
coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
741
coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
742
coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
743
coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
744
coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
745
coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
746
coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
747
coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
748
coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
749
coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
750
coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
751
coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
752
coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
753
coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
754
coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
757
/// Return the number of sub dof maps (for a mixed element)
758
virtual unsigned int num_sub_dof_maps() const
763
/// Create a new dof_map for sub dof map i (for a mixed element)
764
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
766
return new UFC_ffc_L2proj_05BilinearForm_dof_map_1();
771
/// This class defines the interface for the tabulation of the cell
772
/// tensor corresponding to the local contribution to a form from
773
/// the integral over a cell.
775
class UFC_ffc_L2proj_05BilinearForm_cell_integral_0: public ufc::cell_integral
780
UFC_ffc_L2proj_05BilinearForm_cell_integral_0() : ufc::cell_integral()
786
virtual ~UFC_ffc_L2proj_05BilinearForm_cell_integral_0()
791
/// Tabulate the tensor for the contribution from a local cell
792
virtual void tabulate_tensor(double* A,
793
const double * const * w,
794
const ufc::cell& c) const
796
// Extract vertex coordinates
797
const double * const * x = c.coordinates;
799
// Compute Jacobian of affine map from reference cell
800
const double J_00 = x[1][0] - x[0][0];
801
const double J_01 = x[2][0] - x[0][0];
802
const double J_02 = x[3][0] - x[0][0];
803
const double J_10 = x[1][1] - x[0][1];
804
const double J_11 = x[2][1] - x[0][1];
805
const double J_12 = x[3][1] - x[0][1];
806
const double J_20 = x[1][2] - x[0][2];
807
const double J_21 = x[2][2] - x[0][2];
808
const double J_22 = x[3][2] - x[0][2];
810
// Compute sub determinants
811
const double d_00 = J_11*J_22 - J_12*J_21;
813
const double d_10 = J_02*J_21 - J_01*J_22;
815
const double d_20 = J_01*J_12 - J_02*J_11;
817
// Compute determinant of Jacobian
818
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
820
// Compute inverse of Jacobian
823
const double det = std::abs(detJ);
825
// Compute geometry tensors
826
const double G0_ = det;
828
// Compute element tensor
829
A[0] = 0.00238095238095238*G0_;
830
A[1] = 0.000396825396825395*G0_;
831
A[2] = 0.000396825396825396*G0_;
832
A[3] = 0.000396825396825397*G0_;
833
A[4] = -0.00238095238095238*G0_;
834
A[5] = -0.00238095238095238*G0_;
835
A[6] = -0.00238095238095238*G0_;
836
A[7] = -0.00158730158730158*G0_;
837
A[8] = -0.00158730158730158*G0_;
838
A[9] = -0.00158730158730158*G0_;
839
A[10] = 0.000396825396825395*G0_;
840
A[11] = 0.00238095238095238*G0_;
841
A[12] = 0.000396825396825396*G0_;
842
A[13] = 0.000396825396825397*G0_;
843
A[14] = -0.00238095238095238*G0_;
844
A[15] = -0.00158730158730158*G0_;
845
A[16] = -0.00158730158730158*G0_;
846
A[17] = -0.00238095238095238*G0_;
847
A[18] = -0.00238095238095237*G0_;
848
A[19] = -0.00158730158730158*G0_;
849
A[20] = 0.000396825396825396*G0_;
850
A[21] = 0.000396825396825396*G0_;
851
A[22] = 0.00238095238095238*G0_;
852
A[23] = 0.000396825396825397*G0_;
853
A[24] = -0.00158730158730159*G0_;
854
A[25] = -0.00238095238095238*G0_;
855
A[26] = -0.00158730158730159*G0_;
856
A[27] = -0.00238095238095238*G0_;
857
A[28] = -0.00158730158730158*G0_;
858
A[29] = -0.00238095238095238*G0_;
859
A[30] = 0.000396825396825397*G0_;
860
A[31] = 0.000396825396825397*G0_;
861
A[32] = 0.000396825396825397*G0_;
862
A[33] = 0.00238095238095238*G0_;
863
A[34] = -0.00158730158730159*G0_;
864
A[35] = -0.00158730158730159*G0_;
865
A[36] = -0.00238095238095238*G0_;
866
A[37] = -0.00158730158730159*G0_;
867
A[38] = -0.00238095238095238*G0_;
868
A[39] = -0.00238095238095238*G0_;
869
A[40] = -0.00238095238095238*G0_;
870
A[41] = -0.00238095238095238*G0_;
871
A[42] = -0.00158730158730159*G0_;
872
A[43] = -0.00158730158730159*G0_;
873
A[44] = 0.0126984126984127*G0_;
874
A[45] = 0.00634920634920635*G0_;
875
A[46] = 0.00634920634920635*G0_;
876
A[47] = 0.00634920634920634*G0_;
877
A[48] = 0.00634920634920634*G0_;
878
A[49] = 0.00317460317460317*G0_;
879
A[50] = -0.00238095238095238*G0_;
880
A[51] = -0.00158730158730158*G0_;
881
A[52] = -0.00238095238095238*G0_;
882
A[53] = -0.00158730158730159*G0_;
883
A[54] = 0.00634920634920635*G0_;
884
A[55] = 0.0126984126984127*G0_;
885
A[56] = 0.00634920634920635*G0_;
886
A[57] = 0.00634920634920634*G0_;
887
A[58] = 0.00317460317460317*G0_;
888
A[59] = 0.00634920634920634*G0_;
889
A[60] = -0.00238095238095238*G0_;
890
A[61] = -0.00158730158730158*G0_;
891
A[62] = -0.00158730158730159*G0_;
892
A[63] = -0.00238095238095238*G0_;
893
A[64] = 0.00634920634920635*G0_;
894
A[65] = 0.00634920634920635*G0_;
895
A[66] = 0.0126984126984127*G0_;
896
A[67] = 0.00317460317460317*G0_;
897
A[68] = 0.00634920634920634*G0_;
898
A[69] = 0.00634920634920634*G0_;
899
A[70] = -0.00158730158730158*G0_;
900
A[71] = -0.00238095238095238*G0_;
901
A[72] = -0.00238095238095238*G0_;
902
A[73] = -0.00158730158730159*G0_;
903
A[74] = 0.00634920634920634*G0_;
904
A[75] = 0.00634920634920634*G0_;
905
A[76] = 0.00317460317460317*G0_;
906
A[77] = 0.0126984126984127*G0_;
907
A[78] = 0.00634920634920634*G0_;
908
A[79] = 0.00634920634920634*G0_;
909
A[80] = -0.00158730158730158*G0_;
910
A[81] = -0.00238095238095237*G0_;
911
A[82] = -0.00158730158730158*G0_;
912
A[83] = -0.00238095238095238*G0_;
913
A[84] = 0.00634920634920634*G0_;
914
A[85] = 0.00317460317460317*G0_;
915
A[86] = 0.00634920634920634*G0_;
916
A[87] = 0.00634920634920634*G0_;
917
A[88] = 0.0126984126984127*G0_;
918
A[89] = 0.00634920634920634*G0_;
919
A[90] = -0.00158730158730158*G0_;
920
A[91] = -0.00158730158730158*G0_;
921
A[92] = -0.00238095238095238*G0_;
922
A[93] = -0.00238095238095238*G0_;
923
A[94] = 0.00317460317460317*G0_;
924
A[95] = 0.00634920634920634*G0_;
925
A[96] = 0.00634920634920634*G0_;
926
A[97] = 0.00634920634920634*G0_;
927
A[98] = 0.00634920634920634*G0_;
928
A[99] = 0.0126984126984127*G0_;
933
/// This class defines the interface for the assembly of the global
934
/// tensor corresponding to a form with r + n arguments, that is, a
937
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
939
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
940
/// global tensor A is defined by
942
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
944
/// where each argument Vj represents the application to the
945
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
946
/// fixed functions (coefficients).
948
class UFC_ffc_L2proj_05BilinearForm: public ufc::form
953
UFC_ffc_L2proj_05BilinearForm() : ufc::form()
959
virtual ~UFC_ffc_L2proj_05BilinearForm()
964
/// Return a string identifying the form
965
virtual const char* signature() const
967
return " | vi1[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]*vi0[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]*dX(0)";
970
/// Return the rank of the global tensor (r)
971
virtual unsigned int rank() const
976
/// Return the number of coefficients (n)
977
virtual unsigned int num_coefficients() const
982
/// Return the number of cell integrals
983
virtual unsigned int num_cell_integrals() const
988
/// Return the number of exterior facet integrals
989
virtual unsigned int num_exterior_facet_integrals() const
994
/// Return the number of interior facet integrals
995
virtual unsigned int num_interior_facet_integrals() const
1000
/// Create a new finite element for argument function i
1001
virtual ufc::finite_element* create_finite_element(unsigned int i) const
1006
return new UFC_ffc_L2proj_05BilinearForm_finite_element_0();
1009
return new UFC_ffc_L2proj_05BilinearForm_finite_element_1();
1015
/// Create a new dof map for argument function i
1016
virtual ufc::dof_map* create_dof_map(unsigned int i) const
1021
return new UFC_ffc_L2proj_05BilinearForm_dof_map_0();
1024
return new UFC_ffc_L2proj_05BilinearForm_dof_map_1();
1030
/// Create a new cell integral on sub domain i
1031
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
1033
return new UFC_ffc_L2proj_05BilinearForm_cell_integral_0();
1036
/// Create a new exterior facet integral on sub domain i
1037
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
1042
/// Create a new interior facet integral on sub domain i
1043
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
1050
/// This class defines the interface for a finite element.
1052
class UFC_ffc_L2proj_05LinearForm_finite_element_0: public ufc::finite_element
1057
UFC_ffc_L2proj_05LinearForm_finite_element_0() : ufc::finite_element()
1063
virtual ~UFC_ffc_L2proj_05LinearForm_finite_element_0()
1068
/// Return a string identifying the finite element
1069
virtual const char* signature() const
1071
return "Lagrange finite element of degree 2 on a tetrahedron";
1074
/// Return the cell shape
1075
virtual ufc::shape cell_shape() const
1077
return ufc::tetrahedron;
1080
/// Return the dimension of the finite element function space
1081
virtual unsigned int space_dimension() const
1086
/// Return the rank of the value space
1087
virtual unsigned int value_rank() const
1092
/// Return the dimension of the value space for axis i
1093
virtual unsigned int value_dimension(unsigned int i) const
1098
/// Evaluate basis function i at given point in cell
1099
virtual void evaluate_basis(unsigned int i,
1101
const double* coordinates,
1102
const ufc::cell& c) const
1104
throw std::runtime_error("// Function evaluate_basis not generated (compiled with -fno-evaluate_basis)");
1107
/// Evaluate all basis functions at given point in cell
1108
virtual void evaluate_basis_all(double* values,
1109
const double* coordinates,
1110
const ufc::cell& c) const
1112
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
1115
/// Evaluate order n derivatives of basis function i at given point in cell
1116
virtual void evaluate_basis_derivatives(unsigned int i,
1119
const double* coordinates,
1120
const ufc::cell& c) const
1122
throw std::runtime_error("// Function evaluate_basis_derivatives not generated (compiled with -fno-evaluate_basis_derivatives)");
1125
/// Evaluate order n derivatives of all basis functions at given point in cell
1126
virtual void evaluate_basis_derivatives_all(unsigned int n,
1128
const double* coordinates,
1129
const ufc::cell& c) const
1131
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
1134
/// Evaluate linear functional for dof i on the function f
1135
virtual double evaluate_dof(unsigned int i,
1136
const ufc::function& f,
1137
const ufc::cell& c) const
1139
// The reference points, direction and weights:
1140
const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
1141
const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
1142
const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
1144
const double * const * x = c.coordinates;
1145
double result = 0.0;
1146
// Iterate over the points:
1147
// Evaluate basis functions for affine mapping
1148
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
1149
const double w1 = X[i][0][0];
1150
const double w2 = X[i][0][1];
1151
const double w3 = X[i][0][2];
1153
// Compute affine mapping y = F(X)
1155
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
1156
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
1157
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
1159
// Evaluate function at physical points
1161
f.evaluate(values, y, c);
1163
// Map function values using appropriate mapping
1164
// Affine map: Do nothing
1166
// Note that we do not map the weights (yet).
1168
// Take directional components
1169
for(int k = 0; k < 1; k++)
1170
result += values[k]*D[i][0][k];
1171
// Multiply by weights
1177
/// Evaluate linear functionals for all dofs on the function f
1178
virtual void evaluate_dofs(double* values,
1179
const ufc::function& f,
1180
const ufc::cell& c) const
1182
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1185
/// Interpolate vertex values from dof values
1186
virtual void interpolate_vertex_values(double* vertex_values,
1187
const double* dof_values,
1188
const ufc::cell& c) const
1190
// Evaluate at vertices and use affine mapping
1191
vertex_values[0] = dof_values[0];
1192
vertex_values[1] = dof_values[1];
1193
vertex_values[2] = dof_values[2];
1194
vertex_values[3] = dof_values[3];
1197
/// Return the number of sub elements (for a mixed element)
1198
virtual unsigned int num_sub_elements() const
1203
/// Create a new finite element for sub element i (for a mixed element)
1204
virtual ufc::finite_element* create_sub_element(unsigned int i) const
1206
return new UFC_ffc_L2proj_05LinearForm_finite_element_0();
1211
/// This class defines the interface for a finite element.
1213
class UFC_ffc_L2proj_05LinearForm_finite_element_1: public ufc::finite_element
1218
UFC_ffc_L2proj_05LinearForm_finite_element_1() : ufc::finite_element()
1224
virtual ~UFC_ffc_L2proj_05LinearForm_finite_element_1()
1229
/// Return a string identifying the finite element
1230
virtual const char* signature() const
1232
return "Lagrange finite element of degree 2 on a tetrahedron";
1235
/// Return the cell shape
1236
virtual ufc::shape cell_shape() const
1238
return ufc::tetrahedron;
1241
/// Return the dimension of the finite element function space
1242
virtual unsigned int space_dimension() const
1247
/// Return the rank of the value space
1248
virtual unsigned int value_rank() const
1253
/// Return the dimension of the value space for axis i
1254
virtual unsigned int value_dimension(unsigned int i) const
1259
/// Evaluate basis function i at given point in cell
1260
virtual void evaluate_basis(unsigned int i,
1262
const double* coordinates,
1263
const ufc::cell& c) const
1265
throw std::runtime_error("// Function evaluate_basis not generated (compiled with -fno-evaluate_basis)");
1268
/// Evaluate all basis functions at given point in cell
1269
virtual void evaluate_basis_all(double* values,
1270
const double* coordinates,
1271
const ufc::cell& c) const
1273
throw std::runtime_error("The vectorised version of evaluate_basis() is not yet implemented.");
1276
/// Evaluate order n derivatives of basis function i at given point in cell
1277
virtual void evaluate_basis_derivatives(unsigned int i,
1280
const double* coordinates,
1281
const ufc::cell& c) const
1283
throw std::runtime_error("// Function evaluate_basis_derivatives not generated (compiled with -fno-evaluate_basis_derivatives)");
1286
/// Evaluate order n derivatives of all basis functions at given point in cell
1287
virtual void evaluate_basis_derivatives_all(unsigned int n,
1289
const double* coordinates,
1290
const ufc::cell& c) const
1292
throw std::runtime_error("The vectorised version of evaluate_basis_derivatives() is not yet implemented.");
1295
/// Evaluate linear functional for dof i on the function f
1296
virtual double evaluate_dof(unsigned int i,
1297
const ufc::function& f,
1298
const ufc::cell& c) const
1300
// The reference points, direction and weights:
1301
const static double X[10][1][3] = {{{0, 0, 0}}, {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}, {{0, 0.5, 0.5}}, {{0.5, 0, 0.5}}, {{0.5, 0.5, 0}}, {{0, 0, 0.5}}, {{0, 0.5, 0}}, {{0.5, 0, 0}}};
1302
const static double W[10][1] = {{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}};
1303
const static double D[10][1][1] = {{{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}, {{1}}};
1305
const double * const * x = c.coordinates;
1306
double result = 0.0;
1307
// Iterate over the points:
1308
// Evaluate basis functions for affine mapping
1309
const double w0 = 1.0 - X[i][0][0] - X[i][0][1] - X[i][0][2];
1310
const double w1 = X[i][0][0];
1311
const double w2 = X[i][0][1];
1312
const double w3 = X[i][0][2];
1314
// Compute affine mapping y = F(X)
1316
y[0] = w0*x[0][0] + w1*x[1][0] + w2*x[2][0] + w3*x[3][0];
1317
y[1] = w0*x[0][1] + w1*x[1][1] + w2*x[2][1] + w3*x[3][1];
1318
y[2] = w0*x[0][2] + w1*x[1][2] + w2*x[2][2] + w3*x[3][2];
1320
// Evaluate function at physical points
1322
f.evaluate(values, y, c);
1324
// Map function values using appropriate mapping
1325
// Affine map: Do nothing
1327
// Note that we do not map the weights (yet).
1329
// Take directional components
1330
for(int k = 0; k < 1; k++)
1331
result += values[k]*D[i][0][k];
1332
// Multiply by weights
1338
/// Evaluate linear functionals for all dofs on the function f
1339
virtual void evaluate_dofs(double* values,
1340
const ufc::function& f,
1341
const ufc::cell& c) const
1343
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1346
/// Interpolate vertex values from dof values
1347
virtual void interpolate_vertex_values(double* vertex_values,
1348
const double* dof_values,
1349
const ufc::cell& c) const
1351
// Evaluate at vertices and use affine mapping
1352
vertex_values[0] = dof_values[0];
1353
vertex_values[1] = dof_values[1];
1354
vertex_values[2] = dof_values[2];
1355
vertex_values[3] = dof_values[3];
1358
/// Return the number of sub elements (for a mixed element)
1359
virtual unsigned int num_sub_elements() const
1364
/// Create a new finite element for sub element i (for a mixed element)
1365
virtual ufc::finite_element* create_sub_element(unsigned int i) const
1367
return new UFC_ffc_L2proj_05LinearForm_finite_element_1();
1372
/// This class defines the interface for a local-to-global mapping of
1373
/// degrees of freedom (dofs).
1375
class UFC_ffc_L2proj_05LinearForm_dof_map_0: public ufc::dof_map
1379
unsigned int __global_dimension;
1384
UFC_ffc_L2proj_05LinearForm_dof_map_0() : ufc::dof_map()
1386
__global_dimension = 0;
1390
virtual ~UFC_ffc_L2proj_05LinearForm_dof_map_0()
1395
/// Return a string identifying the dof map
1396
virtual const char* signature() const
1398
return "FFC dof map for Lagrange finite element of degree 2 on a tetrahedron";
1401
/// Return true iff mesh entities of topological dimension d are needed
1402
virtual bool needs_mesh_entities(unsigned int d) const
1422
/// Initialize dof map for mesh (return true iff init_cell() is needed)
1423
virtual bool init_mesh(const ufc::mesh& m)
1425
__global_dimension = m.num_entities[0] + m.num_entities[1];
1429
/// Initialize dof map for given cell
1430
virtual void init_cell(const ufc::mesh& m,
1436
/// Finish initialization of dof map for cells
1437
virtual void init_cell_finalize()
1442
/// Return the dimension of the global finite element function space
1443
virtual unsigned int global_dimension() const
1445
return __global_dimension;
1448
/// Return the dimension of the local finite element function space
1449
virtual unsigned int local_dimension() const
1454
// Return the geometric dimension of the coordinates this dof map provides
1455
virtual unsigned int geometric_dimension() const
1460
/// Return the number of dofs on each cell facet
1461
virtual unsigned int num_facet_dofs() const
1466
/// Return the number of dofs associated with each cell entity of dimension d
1467
virtual unsigned int num_entity_dofs(unsigned int d) const
1469
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1472
/// Tabulate the local-to-global mapping of dofs on a cell
1473
virtual void tabulate_dofs(unsigned int* dofs,
1475
const ufc::cell& c) const
1477
dofs[0] = c.entity_indices[0][0];
1478
dofs[1] = c.entity_indices[0][1];
1479
dofs[2] = c.entity_indices[0][2];
1480
dofs[3] = c.entity_indices[0][3];
1481
unsigned int offset = m.num_entities[0];
1482
dofs[4] = offset + c.entity_indices[1][0];
1483
dofs[5] = offset + c.entity_indices[1][1];
1484
dofs[6] = offset + c.entity_indices[1][2];
1485
dofs[7] = offset + c.entity_indices[1][3];
1486
dofs[8] = offset + c.entity_indices[1][4];
1487
dofs[9] = offset + c.entity_indices[1][5];
1490
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
1491
virtual void tabulate_facet_dofs(unsigned int* dofs,
1492
unsigned int facet) const
1531
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
1532
virtual void tabulate_entity_dofs(unsigned int* dofs,
1533
unsigned int d, unsigned int i) const
1535
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1538
/// Tabulate the coordinates of all dofs on a cell
1539
virtual void tabulate_coordinates(double** coordinates,
1540
const ufc::cell& c) const
1542
const double * const * x = c.coordinates;
1543
coordinates[0][0] = x[0][0];
1544
coordinates[0][1] = x[0][1];
1545
coordinates[0][2] = x[0][2];
1546
coordinates[1][0] = x[1][0];
1547
coordinates[1][1] = x[1][1];
1548
coordinates[1][2] = x[1][2];
1549
coordinates[2][0] = x[2][0];
1550
coordinates[2][1] = x[2][1];
1551
coordinates[2][2] = x[2][2];
1552
coordinates[3][0] = x[3][0];
1553
coordinates[3][1] = x[3][1];
1554
coordinates[3][2] = x[3][2];
1555
coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
1556
coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
1557
coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
1558
coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
1559
coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
1560
coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
1561
coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
1562
coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
1563
coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
1564
coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
1565
coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
1566
coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
1567
coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
1568
coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
1569
coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
1570
coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
1571
coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
1572
coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
1575
/// Return the number of sub dof maps (for a mixed element)
1576
virtual unsigned int num_sub_dof_maps() const
1581
/// Create a new dof_map for sub dof map i (for a mixed element)
1582
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
1584
return new UFC_ffc_L2proj_05LinearForm_dof_map_0();
1589
/// This class defines the interface for a local-to-global mapping of
1590
/// degrees of freedom (dofs).
1592
class UFC_ffc_L2proj_05LinearForm_dof_map_1: public ufc::dof_map
1596
unsigned int __global_dimension;
1601
UFC_ffc_L2proj_05LinearForm_dof_map_1() : ufc::dof_map()
1603
__global_dimension = 0;
1607
virtual ~UFC_ffc_L2proj_05LinearForm_dof_map_1()
1612
/// Return a string identifying the dof map
1613
virtual const char* signature() const
1615
return "FFC dof map for Lagrange finite element of degree 2 on a tetrahedron";
1618
/// Return true iff mesh entities of topological dimension d are needed
1619
virtual bool needs_mesh_entities(unsigned int d) const
1639
/// Initialize dof map for mesh (return true iff init_cell() is needed)
1640
virtual bool init_mesh(const ufc::mesh& m)
1642
__global_dimension = m.num_entities[0] + m.num_entities[1];
1646
/// Initialize dof map for given cell
1647
virtual void init_cell(const ufc::mesh& m,
1653
/// Finish initialization of dof map for cells
1654
virtual void init_cell_finalize()
1659
/// Return the dimension of the global finite element function space
1660
virtual unsigned int global_dimension() const
1662
return __global_dimension;
1665
/// Return the dimension of the local finite element function space
1666
virtual unsigned int local_dimension() const
1671
// Return the geometric dimension of the coordinates this dof map provides
1672
virtual unsigned int geometric_dimension() const
1677
/// Return the number of dofs on each cell facet
1678
virtual unsigned int num_facet_dofs() const
1683
/// Return the number of dofs associated with each cell entity of dimension d
1684
virtual unsigned int num_entity_dofs(unsigned int d) const
1686
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1689
/// Tabulate the local-to-global mapping of dofs on a cell
1690
virtual void tabulate_dofs(unsigned int* dofs,
1692
const ufc::cell& c) const
1694
dofs[0] = c.entity_indices[0][0];
1695
dofs[1] = c.entity_indices[0][1];
1696
dofs[2] = c.entity_indices[0][2];
1697
dofs[3] = c.entity_indices[0][3];
1698
unsigned int offset = m.num_entities[0];
1699
dofs[4] = offset + c.entity_indices[1][0];
1700
dofs[5] = offset + c.entity_indices[1][1];
1701
dofs[6] = offset + c.entity_indices[1][2];
1702
dofs[7] = offset + c.entity_indices[1][3];
1703
dofs[8] = offset + c.entity_indices[1][4];
1704
dofs[9] = offset + c.entity_indices[1][5];
1707
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
1708
virtual void tabulate_facet_dofs(unsigned int* dofs,
1709
unsigned int facet) const
1748
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
1749
virtual void tabulate_entity_dofs(unsigned int* dofs,
1750
unsigned int d, unsigned int i) const
1752
throw std::runtime_error("Not implemented (introduced in UFC v1.1).");
1755
/// Tabulate the coordinates of all dofs on a cell
1756
virtual void tabulate_coordinates(double** coordinates,
1757
const ufc::cell& c) const
1759
const double * const * x = c.coordinates;
1760
coordinates[0][0] = x[0][0];
1761
coordinates[0][1] = x[0][1];
1762
coordinates[0][2] = x[0][2];
1763
coordinates[1][0] = x[1][0];
1764
coordinates[1][1] = x[1][1];
1765
coordinates[1][2] = x[1][2];
1766
coordinates[2][0] = x[2][0];
1767
coordinates[2][1] = x[2][1];
1768
coordinates[2][2] = x[2][2];
1769
coordinates[3][0] = x[3][0];
1770
coordinates[3][1] = x[3][1];
1771
coordinates[3][2] = x[3][2];
1772
coordinates[4][0] = 0.5*x[2][0] + 0.5*x[3][0];
1773
coordinates[4][1] = 0.5*x[2][1] + 0.5*x[3][1];
1774
coordinates[4][2] = 0.5*x[2][2] + 0.5*x[3][2];
1775
coordinates[5][0] = 0.5*x[1][0] + 0.5*x[3][0];
1776
coordinates[5][1] = 0.5*x[1][1] + 0.5*x[3][1];
1777
coordinates[5][2] = 0.5*x[1][2] + 0.5*x[3][2];
1778
coordinates[6][0] = 0.5*x[1][0] + 0.5*x[2][0];
1779
coordinates[6][1] = 0.5*x[1][1] + 0.5*x[2][1];
1780
coordinates[6][2] = 0.5*x[1][2] + 0.5*x[2][2];
1781
coordinates[7][0] = 0.5*x[0][0] + 0.5*x[3][0];
1782
coordinates[7][1] = 0.5*x[0][1] + 0.5*x[3][1];
1783
coordinates[7][2] = 0.5*x[0][2] + 0.5*x[3][2];
1784
coordinates[8][0] = 0.5*x[0][0] + 0.5*x[2][0];
1785
coordinates[8][1] = 0.5*x[0][1] + 0.5*x[2][1];
1786
coordinates[8][2] = 0.5*x[0][2] + 0.5*x[2][2];
1787
coordinates[9][0] = 0.5*x[0][0] + 0.5*x[1][0];
1788
coordinates[9][1] = 0.5*x[0][1] + 0.5*x[1][1];
1789
coordinates[9][2] = 0.5*x[0][2] + 0.5*x[1][2];
1792
/// Return the number of sub dof maps (for a mixed element)
1793
virtual unsigned int num_sub_dof_maps() const
1798
/// Create a new dof_map for sub dof map i (for a mixed element)
1799
virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
1801
return new UFC_ffc_L2proj_05LinearForm_dof_map_1();
1806
/// This class defines the interface for the tabulation of the cell
1807
/// tensor corresponding to the local contribution to a form from
1808
/// the integral over a cell.
1810
class UFC_ffc_L2proj_05LinearForm_cell_integral_0: public ufc::cell_integral
1815
UFC_ffc_L2proj_05LinearForm_cell_integral_0() : ufc::cell_integral()
1821
virtual ~UFC_ffc_L2proj_05LinearForm_cell_integral_0()
1826
/// Tabulate the tensor for the contribution from a local cell
1827
virtual void tabulate_tensor(double* A,
1828
const double * const * w,
1829
const ufc::cell& c) const
1831
// Extract vertex coordinates
1832
const double * const * x = c.coordinates;
1834
// Compute Jacobian of affine map from reference cell
1835
const double J_00 = x[1][0] - x[0][0];
1836
const double J_01 = x[2][0] - x[0][0];
1837
const double J_02 = x[3][0] - x[0][0];
1838
const double J_10 = x[1][1] - x[0][1];
1839
const double J_11 = x[2][1] - x[0][1];
1840
const double J_12 = x[3][1] - x[0][1];
1841
const double J_20 = x[1][2] - x[0][2];
1842
const double J_21 = x[2][2] - x[0][2];
1843
const double J_22 = x[3][2] - x[0][2];
1845
// Compute sub determinants
1846
const double d_00 = J_11*J_22 - J_12*J_21;
1848
const double d_10 = J_02*J_21 - J_01*J_22;
1850
const double d_20 = J_01*J_12 - J_02*J_11;
1852
// Compute determinant of Jacobian
1853
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
1855
// Compute inverse of Jacobian
1858
const double det = std::abs(detJ);
1860
// Compute coefficients
1861
const double c0_0_0_0 = w[0][0];
1862
const double c0_0_0_1 = w[0][1];
1863
const double c0_0_0_2 = w[0][2];
1864
const double c0_0_0_3 = w[0][3];
1865
const double c0_0_0_4 = w[0][4];
1866
const double c0_0_0_5 = w[0][5];
1867
const double c0_0_0_6 = w[0][6];
1868
const double c0_0_0_7 = w[0][7];
1869
const double c0_0_0_8 = w[0][8];
1870
const double c0_0_0_9 = w[0][9];
1872
// Compute geometry tensors
1873
const double G0_0 = det*c0_0_0_0;
1874
const double G0_1 = det*c0_0_0_1;
1875
const double G0_2 = det*c0_0_0_2;
1876
const double G0_3 = det*c0_0_0_3;
1877
const double G0_4 = det*c0_0_0_4;
1878
const double G0_5 = det*c0_0_0_5;
1879
const double G0_6 = det*c0_0_0_6;
1880
const double G0_7 = det*c0_0_0_7;
1881
const double G0_8 = det*c0_0_0_8;
1882
const double G0_9 = det*c0_0_0_9;
1884
// Compute element tensor
1885
A[0] = 0.00238095238095238*G0_0 + 0.000396825396825395*G0_1 + 0.000396825396825396*G0_2 + 0.000396825396825397*G0_3 - 0.00238095238095238*G0_4 - 0.00238095238095238*G0_5 - 0.00238095238095238*G0_6 - 0.00158730158730158*G0_7 - 0.00158730158730158*G0_8 - 0.00158730158730158*G0_9;
1886
A[1] = 0.000396825396825395*G0_0 + 0.00238095238095238*G0_1 + 0.000396825396825396*G0_2 + 0.000396825396825397*G0_3 - 0.00238095238095238*G0_4 - 0.00158730158730158*G0_5 - 0.00158730158730158*G0_6 - 0.00238095238095238*G0_7 - 0.00238095238095237*G0_8 - 0.00158730158730158*G0_9;
1887
A[2] = 0.000396825396825396*G0_0 + 0.000396825396825396*G0_1 + 0.00238095238095238*G0_2 + 0.000396825396825397*G0_3 - 0.00158730158730159*G0_4 - 0.00238095238095238*G0_5 - 0.00158730158730159*G0_6 - 0.00238095238095238*G0_7 - 0.00158730158730158*G0_8 - 0.00238095238095238*G0_9;
1888
A[3] = 0.000396825396825397*G0_0 + 0.000396825396825397*G0_1 + 0.000396825396825397*G0_2 + 0.00238095238095238*G0_3 - 0.00158730158730159*G0_4 - 0.00158730158730159*G0_5 - 0.00238095238095238*G0_6 - 0.00158730158730159*G0_7 - 0.00238095238095238*G0_8 - 0.00238095238095238*G0_9;
1889
A[4] = -0.00238095238095238*G0_0 - 0.00238095238095238*G0_1 - 0.00158730158730159*G0_2 - 0.00158730158730159*G0_3 + 0.0126984126984127*G0_4 + 0.00634920634920635*G0_5 + 0.00634920634920635*G0_6 + 0.00634920634920634*G0_7 + 0.00634920634920634*G0_8 + 0.00317460317460317*G0_9;
1890
A[5] = -0.00238095238095238*G0_0 - 0.00158730158730158*G0_1 - 0.00238095238095238*G0_2 - 0.00158730158730159*G0_3 + 0.00634920634920635*G0_4 + 0.0126984126984127*G0_5 + 0.00634920634920635*G0_6 + 0.00634920634920634*G0_7 + 0.00317460317460317*G0_8 + 0.00634920634920634*G0_9;
1891
A[6] = -0.00238095238095238*G0_0 - 0.00158730158730158*G0_1 - 0.00158730158730159*G0_2 - 0.00238095238095238*G0_3 + 0.00634920634920635*G0_4 + 0.00634920634920635*G0_5 + 0.0126984126984127*G0_6 + 0.00317460317460317*G0_7 + 0.00634920634920634*G0_8 + 0.00634920634920634*G0_9;
1892
A[7] = -0.00158730158730158*G0_0 - 0.00238095238095238*G0_1 - 0.00238095238095238*G0_2 - 0.00158730158730159*G0_3 + 0.00634920634920634*G0_4 + 0.00634920634920634*G0_5 + 0.00317460317460317*G0_6 + 0.0126984126984127*G0_7 + 0.00634920634920634*G0_8 + 0.00634920634920634*G0_9;
1893
A[8] = -0.00158730158730158*G0_0 - 0.00238095238095237*G0_1 - 0.00158730158730158*G0_2 - 0.00238095238095238*G0_3 + 0.00634920634920634*G0_4 + 0.00317460317460317*G0_5 + 0.00634920634920634*G0_6 + 0.00634920634920634*G0_7 + 0.0126984126984127*G0_8 + 0.00634920634920634*G0_9;
1894
A[9] = -0.00158730158730158*G0_0 - 0.00158730158730158*G0_1 - 0.00238095238095238*G0_2 - 0.00238095238095238*G0_3 + 0.00317460317460317*G0_4 + 0.00634920634920634*G0_5 + 0.00634920634920634*G0_6 + 0.00634920634920634*G0_7 + 0.00634920634920634*G0_8 + 0.0126984126984127*G0_9;
1899
/// This class defines the interface for the assembly of the global
1900
/// tensor corresponding to a form with r + n arguments, that is, a
1903
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
1905
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
1906
/// global tensor A is defined by
1908
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
1910
/// where each argument Vj represents the application to the
1911
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
1912
/// fixed functions (coefficients).
1914
class UFC_ffc_L2proj_05LinearForm: public ufc::form
1919
UFC_ffc_L2proj_05LinearForm() : ufc::form()
1925
virtual ~UFC_ffc_L2proj_05LinearForm()
1930
/// Return a string identifying the form
1931
virtual const char* signature() const
1933
return "w0_a0[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | va0[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]*vi0[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]*dX(0)";
1936
/// Return the rank of the global tensor (r)
1937
virtual unsigned int rank() const
1942
/// Return the number of coefficients (n)
1943
virtual unsigned int num_coefficients() const
1948
/// Return the number of cell integrals
1949
virtual unsigned int num_cell_integrals() const
1954
/// Return the number of exterior facet integrals
1955
virtual unsigned int num_exterior_facet_integrals() const
1960
/// Return the number of interior facet integrals
1961
virtual unsigned int num_interior_facet_integrals() const
1966
/// Create a new finite element for argument function i
1967
virtual ufc::finite_element* create_finite_element(unsigned int i) const
1972
return new UFC_ffc_L2proj_05LinearForm_finite_element_0();
1975
return new UFC_ffc_L2proj_05LinearForm_finite_element_1();
1981
/// Create a new dof map for argument function i
1982
virtual ufc::dof_map* create_dof_map(unsigned int i) const
1987
return new UFC_ffc_L2proj_05LinearForm_dof_map_0();
1990
return new UFC_ffc_L2proj_05LinearForm_dof_map_1();
1996
/// Create a new cell integral on sub domain i
1997
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
1999
return new UFC_ffc_L2proj_05LinearForm_cell_integral_0();
2002
/// Create a new exterior facet integral on sub domain i
2003
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
2008
/// Create a new interior facet integral on sub domain i
2009
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
2018
#include <dolfin/fem/Form.h>
2020
class ffc_L2proj_05BilinearForm : public dolfin::Form
2024
ffc_L2proj_05BilinearForm() : dolfin::Form()
2030
virtual const ufc::form& form() const
2035
/// Return array of coefficients
2036
virtual const dolfin::Array<dolfin::Function*>& coefficients() const
2038
return __coefficients;
2044
UFC_ffc_L2proj_05BilinearForm __form;
2046
/// Array of coefficients
2047
dolfin::Array<dolfin::Function*> __coefficients;
2051
class ffc_L2proj_05LinearForm : public dolfin::Form
2055
ffc_L2proj_05LinearForm(dolfin::Function& w0) : dolfin::Form()
2057
__coefficients.push_back(&w0);
2061
virtual const ufc::form& form() const
2066
/// Return array of coefficients
2067
virtual const dolfin::Array<dolfin::Function*>& coefficients() const
2069
return __coefficients;
2075
UFC_ffc_L2proj_05LinearForm __form;
2077
/// Array of coefficients
2078
dolfin::Array<dolfin::Function*> __coefficients;