1
// This code conforms with the UFC specification version 2.0.5
2
// and was automatically generated by FFC version 1.0.0+.
4
// This code was generated with the option '-l dolfin' and
5
// contains DOLFIN-specific wrappers that depend on DOLFIN.
7
// This code was generated with the following parameters:
10
// convert_exceptions_to_warnings: False
11
// cpp_optimize: False
12
// cpp_optimize_flags: '-O2'
14
// error_control: False
23
// quadrature_degree: 'auto'
24
// quadrature_rule: 'auto'
25
// representation: 'auto'
27
// swig_binary: 'swig'
38
/// This class defines the interface for a finite element.
40
class poisson_finite_element_0: public ufc::finite_element
45
poisson_finite_element_0() : ufc::finite_element()
51
virtual ~poisson_finite_element_0()
56
/// Return a string identifying the finite element
57
virtual const char* signature() const
59
return "FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None)";
62
/// Return the cell shape
63
virtual ufc::shape cell_shape() const
68
/// Return the topological dimension of the cell shape
69
virtual unsigned int topological_dimension() const
74
/// Return the geometric dimension of the cell shape
75
virtual unsigned int geometric_dimension() const
80
/// Return the dimension of the finite element function space
81
virtual unsigned int space_dimension() const
86
/// Return the rank of the value space
87
virtual unsigned int value_rank() const
92
/// Return the dimension of the value space for axis i
93
virtual unsigned int value_dimension(unsigned int i) const
98
/// Evaluate basis function i at given point in cell
99
virtual void evaluate_basis(unsigned int i,
101
const double* coordinates,
102
const ufc::cell& c) const
104
// Extract vertex coordinates
105
const double * const * x = c.coordinates;
107
// Compute Jacobian of affine map from reference cell
108
const double J_00 = x[1][0] - x[0][0];
109
const double J_01 = x[2][0] - x[0][0];
110
const double J_10 = x[1][1] - x[0][1];
111
const double J_11 = x[2][1] - x[0][1];
113
// Compute determinant of Jacobian
114
double detJ = J_00*J_11 - J_01*J_10;
116
// Compute inverse of Jacobian
119
const double C0 = x[1][0] + x[2][0];
120
const double C1 = x[1][1] + x[2][1];
122
// Get coordinates and map to the reference (FIAT) element
123
double X = (J_01*(C1 - 2.0*coordinates[1]) + J_11*(2.0*coordinates[0] - C0)) / detJ;
124
double Y = (J_00*(2.0*coordinates[1] - C1) + J_10*(C0 - 2.0*coordinates[0])) / detJ;
133
// Array of basisvalues.
134
double basisvalues[3] = {0.0, 0.0, 0.0};
136
// Declare helper variables.
137
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
139
// Compute basisvalues.
140
basisvalues[0] = 1.0;
141
basisvalues[1] = tmp0;
142
basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
143
basisvalues[0] *= std::sqrt(0.5);
144
basisvalues[2] *= std::sqrt(1.0);
145
basisvalues[1] *= std::sqrt(3.0);
147
// Table(s) of coefficients.
148
static const double coefficients0[3] = \
149
{0.471404520791032, -0.288675134594813, -0.166666666666667};
152
for (unsigned int r = 0; r < 3; r++)
154
*values += coefficients0[r]*basisvalues[r];
155
}// end loop over 'r'
161
// Array of basisvalues.
162
double basisvalues[3] = {0.0, 0.0, 0.0};
164
// Declare helper variables.
165
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
167
// Compute basisvalues.
168
basisvalues[0] = 1.0;
169
basisvalues[1] = tmp0;
170
basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
171
basisvalues[0] *= std::sqrt(0.5);
172
basisvalues[2] *= std::sqrt(1.0);
173
basisvalues[1] *= std::sqrt(3.0);
175
// Table(s) of coefficients.
176
static const double coefficients0[3] = \
177
{0.471404520791032, 0.288675134594813, -0.166666666666667};
180
for (unsigned int r = 0; r < 3; r++)
182
*values += coefficients0[r]*basisvalues[r];
183
}// end loop over 'r'
189
// Array of basisvalues.
190
double basisvalues[3] = {0.0, 0.0, 0.0};
192
// Declare helper variables.
193
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
195
// Compute basisvalues.
196
basisvalues[0] = 1.0;
197
basisvalues[1] = tmp0;
198
basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
199
basisvalues[0] *= std::sqrt(0.5);
200
basisvalues[2] *= std::sqrt(1.0);
201
basisvalues[1] *= std::sqrt(3.0);
203
// Table(s) of coefficients.
204
static const double coefficients0[3] = \
205
{0.471404520791032, 0.0, 0.333333333333333};
208
for (unsigned int r = 0; r < 3; r++)
210
*values += coefficients0[r]*basisvalues[r];
211
}// end loop over 'r'
218
/// Evaluate all basis functions at given point in cell
219
virtual void evaluate_basis_all(double* values,
220
const double* coordinates,
221
const ufc::cell& c) const
223
// Helper variable to hold values of a single dof.
224
double dof_values = 0.0;
226
// Loop dofs and call evaluate_basis.
227
for (unsigned int r = 0; r < 3; r++)
229
evaluate_basis(r, &dof_values, coordinates, c);
230
values[r] = dof_values;
231
}// end loop over 'r'
234
/// Evaluate order n derivatives of basis function i at given point in cell
235
virtual void evaluate_basis_derivatives(unsigned int i,
238
const double* coordinates,
239
const ufc::cell& c) const
241
// Extract vertex coordinates
242
const double * const * x = c.coordinates;
244
// Compute Jacobian of affine map from reference cell
245
const double J_00 = x[1][0] - x[0][0];
246
const double J_01 = x[2][0] - x[0][0];
247
const double J_10 = x[1][1] - x[0][1];
248
const double J_11 = x[2][1] - x[0][1];
250
// Compute determinant of Jacobian
251
double detJ = J_00*J_11 - J_01*J_10;
253
// Compute inverse of Jacobian
254
const double K_00 = J_11 / detJ;
255
const double K_01 = -J_01 / detJ;
256
const double K_10 = -J_10 / detJ;
257
const double K_11 = J_00 / detJ;
260
const double C0 = x[1][0] + x[2][0];
261
const double C1 = x[1][1] + x[2][1];
263
// Get coordinates and map to the reference (FIAT) element
264
double X = (J_01*(C1 - 2.0*coordinates[1]) + J_11*(2.0*coordinates[0] - C0)) / detJ;
265
double Y = (J_00*(2.0*coordinates[1] - C1) + J_10*(C0 - 2.0*coordinates[0])) / detJ;
267
// Compute number of derivatives.
268
unsigned int num_derivatives = 1;
269
for (unsigned int r = 0; r < n; r++)
271
num_derivatives *= 2;
272
}// end loop over 'r'
274
// Declare pointer to two dimensional array that holds combinations of derivatives and initialise
275
unsigned int **combinations = new unsigned int *[num_derivatives];
276
for (unsigned int row = 0; row < num_derivatives; row++)
278
combinations[row] = new unsigned int [n];
279
for (unsigned int col = 0; col < n; col++)
280
combinations[row][col] = 0;
283
// Generate combinations of derivatives
284
for (unsigned int row = 1; row < num_derivatives; row++)
286
for (unsigned int num = 0; num < row; num++)
288
for (unsigned int col = n-1; col+1 > 0; col--)
290
if (combinations[row][col] + 1 > 1)
291
combinations[row][col] = 0;
294
combinations[row][col] += 1;
301
// Compute inverse of Jacobian
302
const double Jinv[2][2] = {{K_00, K_01}, {K_10, K_11}};
304
// Declare transformation matrix
305
// Declare pointer to two dimensional array and initialise
306
double **transform = new double *[num_derivatives];
308
for (unsigned int j = 0; j < num_derivatives; j++)
310
transform[j] = new double [num_derivatives];
311
for (unsigned int k = 0; k < num_derivatives; k++)
315
// Construct transformation matrix
316
for (unsigned int row = 0; row < num_derivatives; row++)
318
for (unsigned int col = 0; col < num_derivatives; col++)
320
for (unsigned int k = 0; k < n; k++)
321
transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
325
// Reset values. Assuming that values is always an array.
326
for (unsigned int r = 0; r < num_derivatives; r++)
329
}// end loop over 'r'
336
// Array of basisvalues.
337
double basisvalues[3] = {0.0, 0.0, 0.0};
339
// Declare helper variables.
340
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
342
// Compute basisvalues.
343
basisvalues[0] = 1.0;
344
basisvalues[1] = tmp0;
345
basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
346
basisvalues[0] *= std::sqrt(0.5);
347
basisvalues[2] *= std::sqrt(1.0);
348
basisvalues[1] *= std::sqrt(3.0);
350
// Table(s) of coefficients.
351
static const double coefficients0[3] = \
352
{0.471404520791032, -0.288675134594813, -0.166666666666667};
354
// Tables of derivatives of the polynomial base (transpose).
355
static const double dmats0[3][3] = \
357
{4.89897948556636, 0.0, 0.0},
360
static const double dmats1[3][3] = \
362
{2.44948974278318, 0.0, 0.0},
363
{4.24264068711928, 0.0, 0.0}};
365
// Compute reference derivatives.
366
// Declare pointer to array of derivatives on FIAT element.
367
double *derivatives = new double[num_derivatives];
368
for (unsigned int r = 0; r < num_derivatives; r++)
370
derivatives[r] = 0.0;
371
}// end loop over 'r'
373
// Declare derivative matrix (of polynomial basis).
374
double dmats[3][3] = \
379
// Declare (auxiliary) derivative matrix (of polynomial basis).
380
double dmats_old[3][3] = \
385
// Loop possible derivatives.
386
for (unsigned int r = 0; r < num_derivatives; r++)
388
// Resetting dmats values to compute next derivative.
389
for (unsigned int t = 0; t < 3; t++)
391
for (unsigned int u = 0; u < 3; u++)
399
}// end loop over 'u'
400
}// end loop over 't'
402
// Looping derivative order to generate dmats.
403
for (unsigned int s = 0; s < n; s++)
405
// Updating dmats_old with new values and resetting dmats.
406
for (unsigned int t = 0; t < 3; t++)
408
for (unsigned int u = 0; u < 3; u++)
410
dmats_old[t][u] = dmats[t][u];
412
}// end loop over 'u'
413
}// end loop over 't'
415
// Update dmats using an inner product.
416
if (combinations[r][s] == 0)
418
for (unsigned int t = 0; t < 3; t++)
420
for (unsigned int u = 0; u < 3; u++)
422
for (unsigned int tu = 0; tu < 3; tu++)
424
dmats[t][u] += dmats0[t][tu]*dmats_old[tu][u];
425
}// end loop over 'tu'
426
}// end loop over 'u'
427
}// end loop over 't'
430
if (combinations[r][s] == 1)
432
for (unsigned int t = 0; t < 3; t++)
434
for (unsigned int u = 0; u < 3; u++)
436
for (unsigned int tu = 0; tu < 3; tu++)
438
dmats[t][u] += dmats1[t][tu]*dmats_old[tu][u];
439
}// end loop over 'tu'
440
}// end loop over 'u'
441
}// end loop over 't'
444
}// end loop over 's'
445
for (unsigned int s = 0; s < 3; s++)
447
for (unsigned int t = 0; t < 3; t++)
449
derivatives[r] += coefficients0[s]*dmats[s][t]*basisvalues[t];
450
}// end loop over 't'
451
}// end loop over 's'
452
}// end loop over 'r'
454
// Transform derivatives back to physical element
455
for (unsigned int r = 0; r < num_derivatives; r++)
457
for (unsigned int s = 0; s < num_derivatives; s++)
459
values[r] += transform[r][s]*derivatives[s];
460
}// end loop over 's'
461
}// end loop over 'r'
463
// Delete pointer to array of derivatives on FIAT element
464
delete [] derivatives;
466
// Delete pointer to array of combinations of derivatives and transform
467
for (unsigned int r = 0; r < num_derivatives; r++)
469
delete [] combinations[r];
470
}// end loop over 'r'
471
delete [] combinations;
472
for (unsigned int r = 0; r < num_derivatives; r++)
474
delete [] transform[r];
475
}// end loop over 'r'
482
// Array of basisvalues.
483
double basisvalues[3] = {0.0, 0.0, 0.0};
485
// Declare helper variables.
486
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
488
// Compute basisvalues.
489
basisvalues[0] = 1.0;
490
basisvalues[1] = tmp0;
491
basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
492
basisvalues[0] *= std::sqrt(0.5);
493
basisvalues[2] *= std::sqrt(1.0);
494
basisvalues[1] *= std::sqrt(3.0);
496
// Table(s) of coefficients.
497
static const double coefficients0[3] = \
498
{0.471404520791032, 0.288675134594813, -0.166666666666667};
500
// Tables of derivatives of the polynomial base (transpose).
501
static const double dmats0[3][3] = \
503
{4.89897948556636, 0.0, 0.0},
506
static const double dmats1[3][3] = \
508
{2.44948974278318, 0.0, 0.0},
509
{4.24264068711928, 0.0, 0.0}};
511
// Compute reference derivatives.
512
// Declare pointer to array of derivatives on FIAT element.
513
double *derivatives = new double[num_derivatives];
514
for (unsigned int r = 0; r < num_derivatives; r++)
516
derivatives[r] = 0.0;
517
}// end loop over 'r'
519
// Declare derivative matrix (of polynomial basis).
520
double dmats[3][3] = \
525
// Declare (auxiliary) derivative matrix (of polynomial basis).
526
double dmats_old[3][3] = \
531
// Loop possible derivatives.
532
for (unsigned int r = 0; r < num_derivatives; r++)
534
// Resetting dmats values to compute next derivative.
535
for (unsigned int t = 0; t < 3; t++)
537
for (unsigned int u = 0; u < 3; u++)
545
}// end loop over 'u'
546
}// end loop over 't'
548
// Looping derivative order to generate dmats.
549
for (unsigned int s = 0; s < n; s++)
551
// Updating dmats_old with new values and resetting dmats.
552
for (unsigned int t = 0; t < 3; t++)
554
for (unsigned int u = 0; u < 3; u++)
556
dmats_old[t][u] = dmats[t][u];
558
}// end loop over 'u'
559
}// end loop over 't'
561
// Update dmats using an inner product.
562
if (combinations[r][s] == 0)
564
for (unsigned int t = 0; t < 3; t++)
566
for (unsigned int u = 0; u < 3; u++)
568
for (unsigned int tu = 0; tu < 3; tu++)
570
dmats[t][u] += dmats0[t][tu]*dmats_old[tu][u];
571
}// end loop over 'tu'
572
}// end loop over 'u'
573
}// end loop over 't'
576
if (combinations[r][s] == 1)
578
for (unsigned int t = 0; t < 3; t++)
580
for (unsigned int u = 0; u < 3; u++)
582
for (unsigned int tu = 0; tu < 3; tu++)
584
dmats[t][u] += dmats1[t][tu]*dmats_old[tu][u];
585
}// end loop over 'tu'
586
}// end loop over 'u'
587
}// end loop over 't'
590
}// end loop over 's'
591
for (unsigned int s = 0; s < 3; s++)
593
for (unsigned int t = 0; t < 3; t++)
595
derivatives[r] += coefficients0[s]*dmats[s][t]*basisvalues[t];
596
}// end loop over 't'
597
}// end loop over 's'
598
}// end loop over 'r'
600
// Transform derivatives back to physical element
601
for (unsigned int r = 0; r < num_derivatives; r++)
603
for (unsigned int s = 0; s < num_derivatives; s++)
605
values[r] += transform[r][s]*derivatives[s];
606
}// end loop over 's'
607
}// end loop over 'r'
609
// Delete pointer to array of derivatives on FIAT element
610
delete [] derivatives;
612
// Delete pointer to array of combinations of derivatives and transform
613
for (unsigned int r = 0; r < num_derivatives; r++)
615
delete [] combinations[r];
616
}// end loop over 'r'
617
delete [] combinations;
618
for (unsigned int r = 0; r < num_derivatives; r++)
620
delete [] transform[r];
621
}// end loop over 'r'
628
// Array of basisvalues.
629
double basisvalues[3] = {0.0, 0.0, 0.0};
631
// Declare helper variables.
632
double tmp0 = (1.0 + Y + 2.0*X)/2.0;
634
// Compute basisvalues.
635
basisvalues[0] = 1.0;
636
basisvalues[1] = tmp0;
637
basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
638
basisvalues[0] *= std::sqrt(0.5);
639
basisvalues[2] *= std::sqrt(1.0);
640
basisvalues[1] *= std::sqrt(3.0);
642
// Table(s) of coefficients.
643
static const double coefficients0[3] = \
644
{0.471404520791032, 0.0, 0.333333333333333};
646
// Tables of derivatives of the polynomial base (transpose).
647
static const double dmats0[3][3] = \
649
{4.89897948556636, 0.0, 0.0},
652
static const double dmats1[3][3] = \
654
{2.44948974278318, 0.0, 0.0},
655
{4.24264068711928, 0.0, 0.0}};
657
// Compute reference derivatives.
658
// Declare pointer to array of derivatives on FIAT element.
659
double *derivatives = new double[num_derivatives];
660
for (unsigned int r = 0; r < num_derivatives; r++)
662
derivatives[r] = 0.0;
663
}// end loop over 'r'
665
// Declare derivative matrix (of polynomial basis).
666
double dmats[3][3] = \
671
// Declare (auxiliary) derivative matrix (of polynomial basis).
672
double dmats_old[3][3] = \
677
// Loop possible derivatives.
678
for (unsigned int r = 0; r < num_derivatives; r++)
680
// Resetting dmats values to compute next derivative.
681
for (unsigned int t = 0; t < 3; t++)
683
for (unsigned int u = 0; u < 3; u++)
691
}// end loop over 'u'
692
}// end loop over 't'
694
// Looping derivative order to generate dmats.
695
for (unsigned int s = 0; s < n; s++)
697
// Updating dmats_old with new values and resetting dmats.
698
for (unsigned int t = 0; t < 3; t++)
700
for (unsigned int u = 0; u < 3; u++)
702
dmats_old[t][u] = dmats[t][u];
704
}// end loop over 'u'
705
}// end loop over 't'
707
// Update dmats using an inner product.
708
if (combinations[r][s] == 0)
710
for (unsigned int t = 0; t < 3; t++)
712
for (unsigned int u = 0; u < 3; u++)
714
for (unsigned int tu = 0; tu < 3; tu++)
716
dmats[t][u] += dmats0[t][tu]*dmats_old[tu][u];
717
}// end loop over 'tu'
718
}// end loop over 'u'
719
}// end loop over 't'
722
if (combinations[r][s] == 1)
724
for (unsigned int t = 0; t < 3; t++)
726
for (unsigned int u = 0; u < 3; u++)
728
for (unsigned int tu = 0; tu < 3; tu++)
730
dmats[t][u] += dmats1[t][tu]*dmats_old[tu][u];
731
}// end loop over 'tu'
732
}// end loop over 'u'
733
}// end loop over 't'
736
}// end loop over 's'
737
for (unsigned int s = 0; s < 3; s++)
739
for (unsigned int t = 0; t < 3; t++)
741
derivatives[r] += coefficients0[s]*dmats[s][t]*basisvalues[t];
742
}// end loop over 't'
743
}// end loop over 's'
744
}// end loop over 'r'
746
// Transform derivatives back to physical element
747
for (unsigned int r = 0; r < num_derivatives; r++)
749
for (unsigned int s = 0; s < num_derivatives; s++)
751
values[r] += transform[r][s]*derivatives[s];
752
}// end loop over 's'
753
}// end loop over 'r'
755
// Delete pointer to array of derivatives on FIAT element
756
delete [] derivatives;
758
// Delete pointer to array of combinations of derivatives and transform
759
for (unsigned int r = 0; r < num_derivatives; r++)
761
delete [] combinations[r];
762
}// end loop over 'r'
763
delete [] combinations;
764
for (unsigned int r = 0; r < num_derivatives; r++)
766
delete [] transform[r];
767
}// end loop over 'r'
775
/// Evaluate order n derivatives of all basis functions at given point in cell
776
virtual void evaluate_basis_derivatives_all(unsigned int n,
778
const double* coordinates,
779
const ufc::cell& c) const
781
// Compute number of derivatives.
782
unsigned int num_derivatives = 1;
783
for (unsigned int r = 0; r < n; r++)
785
num_derivatives *= 2;
786
}// end loop over 'r'
788
// Helper variable to hold values of a single dof.
789
double *dof_values = new double[num_derivatives];
790
for (unsigned int r = 0; r < num_derivatives; r++)
793
}// end loop over 'r'
795
// Loop dofs and call evaluate_basis_derivatives.
796
for (unsigned int r = 0; r < 3; r++)
798
evaluate_basis_derivatives(r, n, dof_values, coordinates, c);
799
for (unsigned int s = 0; s < num_derivatives; s++)
801
values[r*num_derivatives + s] = dof_values[s];
802
}// end loop over 's'
803
}// end loop over 'r'
806
delete [] dof_values;
809
/// Evaluate linear functional for dof i on the function f
810
virtual double evaluate_dof(unsigned int i,
811
const ufc::function& f,
812
const ufc::cell& c) const
814
// Declare variables for result of evaluation.
817
// Declare variable for physical coordinates.
819
const double * const * x = c.coordinates;
826
f.evaluate(vals, y, c);
834
f.evaluate(vals, y, c);
842
f.evaluate(vals, y, c);
851
/// Evaluate linear functionals for all dofs on the function f
852
virtual void evaluate_dofs(double* values,
853
const ufc::function& f,
854
const ufc::cell& c) const
856
// Declare variables for result of evaluation.
859
// Declare variable for physical coordinates.
861
const double * const * x = c.coordinates;
864
f.evaluate(vals, y, c);
868
f.evaluate(vals, y, c);
872
f.evaluate(vals, y, c);
876
/// Interpolate vertex values from dof values
877
virtual void interpolate_vertex_values(double* vertex_values,
878
const double* dof_values,
879
const ufc::cell& c) const
881
// Evaluate function and change variables
882
vertex_values[0] = dof_values[0];
883
vertex_values[1] = dof_values[1];
884
vertex_values[2] = dof_values[2];
887
/// Map coordinate xhat from reference cell to coordinate x in cell
888
virtual void map_from_reference_cell(double* x,
890
const ufc::cell& c) const
892
throw std::runtime_error("map_from_reference_cell not yet implemented (introduced in UFC 2.0).");
895
/// Map from coordinate x in cell to coordinate xhat in reference cell
896
virtual void map_to_reference_cell(double* xhat,
898
const ufc::cell& c) const
900
throw std::runtime_error("map_to_reference_cell not yet implemented (introduced in UFC 2.0).");
903
/// Return the number of sub elements (for a mixed element)
904
virtual unsigned int num_sub_elements() const
909
/// Create a new finite element for sub element i (for a mixed element)
910
virtual ufc::finite_element* create_sub_element(unsigned int i) const
915
/// Create a new class instance
916
virtual ufc::finite_element* create() const
918
return new poisson_finite_element_0();
923
/// This class defines the interface for a local-to-global mapping of
924
/// degrees of freedom (dofs).
926
class poisson_dofmap_0: public ufc::dofmap
930
unsigned int _global_dimension;
934
poisson_dofmap_0() : ufc::dofmap()
936
_global_dimension = 0;
940
virtual ~poisson_dofmap_0()
945
/// Return a string identifying the dofmap
946
virtual const char* signature() const
948
return "FFC dofmap for FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None)";
951
/// Return true iff mesh entities of topological dimension d are needed
952
virtual bool needs_mesh_entities(unsigned int d) const
976
/// Initialize dofmap for mesh (return true iff init_cell() is needed)
977
virtual bool init_mesh(const ufc::mesh& m)
979
_global_dimension = m.num_entities[0];
983
/// Initialize dofmap for given cell
984
virtual void init_cell(const ufc::mesh& m,
990
/// Finish initialization of dofmap for cells
991
virtual void init_cell_finalize()
996
/// Return the topological dimension of the associated cell shape
997
virtual unsigned int topological_dimension() const
1002
/// Return the geometric dimension of the associated cell shape
1003
virtual unsigned int geometric_dimension() const
1008
/// Return the dimension of the global finite element function space
1009
virtual unsigned int global_dimension() const
1011
return _global_dimension;
1014
/// Return the dimension of the local finite element function space for a cell
1015
virtual unsigned int local_dimension(const ufc::cell& c) const
1020
/// Return the maximum dimension of the local finite element function space
1021
virtual unsigned int max_local_dimension() const
1026
/// Return the number of dofs on each cell facet
1027
virtual unsigned int num_facet_dofs() const
1032
/// Return the number of dofs associated with each cell entity of dimension d
1033
virtual unsigned int num_entity_dofs(unsigned int d) const
1057
/// Tabulate the local-to-global mapping of dofs on a cell
1058
virtual void tabulate_dofs(unsigned int* dofs,
1060
const ufc::cell& c) const
1062
dofs[0] = c.entity_indices[0][0];
1063
dofs[1] = c.entity_indices[0][1];
1064
dofs[2] = c.entity_indices[0][2];
1067
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
1068
virtual void tabulate_facet_dofs(unsigned int* dofs,
1069
unsigned int facet) const
1095
/// Tabulate the local-to-local mapping of dofs on entity (d, i)
1096
virtual void tabulate_entity_dofs(unsigned int* dofs,
1097
unsigned int d, unsigned int i) const
1101
throw std::runtime_error("d is larger than dimension (2)");
1110
throw std::runtime_error("i is larger than number of entities (2)");
1148
/// Tabulate the coordinates of all dofs on a cell
1149
virtual void tabulate_coordinates(double** coordinates,
1150
const ufc::cell& c) const
1152
const double * const * x = c.coordinates;
1154
coordinates[0][0] = x[0][0];
1155
coordinates[0][1] = x[0][1];
1156
coordinates[1][0] = x[1][0];
1157
coordinates[1][1] = x[1][1];
1158
coordinates[2][0] = x[2][0];
1159
coordinates[2][1] = x[2][1];
1162
/// Return the number of sub dofmaps (for a mixed element)
1163
virtual unsigned int num_sub_dofmaps() const
1168
/// Create a new dofmap for sub dofmap i (for a mixed element)
1169
virtual ufc::dofmap* create_sub_dofmap(unsigned int i) const
1174
/// Create a new class instance
1175
virtual ufc::dofmap* create() const
1177
return new poisson_dofmap_0();
1182
/// This class defines the interface for the tabulation of the cell
1183
/// tensor corresponding to the local contribution to a form from
1184
/// the integral over a cell.
1186
class poisson_cell_integral_0_0: public ufc::cell_integral
1191
poisson_cell_integral_0_0() : ufc::cell_integral()
1197
virtual ~poisson_cell_integral_0_0()
1202
/// Tabulate the tensor for the contribution from a local cell
1203
virtual void tabulate_tensor(double* A,
1204
const double * const * w,
1205
const ufc::cell& c) const
1207
// Number of operations (multiply-add pairs) for Jacobian data: 11
1208
// Number of operations (multiply-add pairs) for geometry tensor: 8
1209
// Number of operations (multiply-add pairs) for tensor contraction: 11
1210
// Total number of operations (multiply-add pairs): 30
1212
// Extract vertex coordinates
1213
const double * const * x = c.coordinates;
1215
// Compute Jacobian of affine map from reference cell
1216
const double J_00 = x[1][0] - x[0][0];
1217
const double J_01 = x[2][0] - x[0][0];
1218
const double J_10 = x[1][1] - x[0][1];
1219
const double J_11 = x[2][1] - x[0][1];
1221
// Compute determinant of Jacobian
1222
double detJ = J_00*J_11 - J_01*J_10;
1224
// Compute inverse of Jacobian
1225
const double K_00 = J_11 / detJ;
1226
const double K_01 = -J_01 / detJ;
1227
const double K_10 = -J_10 / detJ;
1228
const double K_11 = J_00 / detJ;
1231
const double det = std::abs(detJ);
1233
// Compute geometry tensor
1234
const double G0_0_0 = det*(K_00*K_00 + K_01*K_01);
1235
const double G0_0_1 = det*(K_00*K_10 + K_01*K_11);
1236
const double G0_1_0 = det*(K_10*K_00 + K_11*K_01);
1237
const double G0_1_1 = det*(K_10*K_10 + K_11*K_11);
1239
// Compute element tensor
1240
A[0] = 0.5*G0_0_0 + 0.5*G0_0_1 + 0.5*G0_1_0 + 0.5*G0_1_1;
1241
A[1] = -0.5*G0_0_0 - 0.5*G0_1_0;
1242
A[2] = -0.5*G0_0_1 - 0.5*G0_1_1;
1243
A[3] = -0.5*G0_0_0 - 0.5*G0_0_1;
1246
A[6] = -0.5*G0_1_0 - 0.5*G0_1_1;
1251
/// Tabulate the tensor for the contribution from a local cell
1252
/// using the specified reference cell quadrature points/weights
1253
virtual void tabulate_tensor(double* A,
1254
const double * const * w,
1256
unsigned int num_quadrature_points,
1257
const double * const * quadrature_points,
1258
const double* quadrature_weights) const
1260
throw std::runtime_error("Quadrature version of tabulate_tensor not available when using the FFC tensor representation.");
1265
/// This class defines the interface for the tabulation of the cell
1266
/// tensor corresponding to the local contribution to a form from
1267
/// the integral over a cell.
1269
class poisson_cell_integral_1_0: public ufc::cell_integral
1274
poisson_cell_integral_1_0() : ufc::cell_integral()
1280
virtual ~poisson_cell_integral_1_0()
1285
/// Tabulate the tensor for the contribution from a local cell
1286
virtual void tabulate_tensor(double* A,
1287
const double * const * w,
1288
const ufc::cell& c) const
1290
// Number of operations (multiply-add pairs) for Jacobian data: 9
1291
// Number of operations (multiply-add pairs) for geometry tensor: 3
1292
// Number of operations (multiply-add pairs) for tensor contraction: 7
1293
// Total number of operations (multiply-add pairs): 19
1295
// Extract vertex coordinates
1296
const double * const * x = c.coordinates;
1298
// Compute Jacobian of affine map from reference cell
1299
const double J_00 = x[1][0] - x[0][0];
1300
const double J_01 = x[2][0] - x[0][0];
1301
const double J_10 = x[1][1] - x[0][1];
1302
const double J_11 = x[2][1] - x[0][1];
1304
// Compute determinant of Jacobian
1305
double detJ = J_00*J_11 - J_01*J_10;
1307
// Compute inverse of Jacobian
1310
const double det = std::abs(detJ);
1312
// Compute geometry tensor
1313
const double G0_0 = det*w[0][0]*(1.0);
1314
const double G0_1 = det*w[0][1]*(1.0);
1315
const double G0_2 = det*w[0][2]*(1.0);
1317
// Compute element tensor
1318
A[0] = 0.0833333333333334*G0_0 + 0.0416666666666667*G0_1 + 0.0416666666666667*G0_2;
1319
A[1] = 0.0416666666666667*G0_0 + 0.0833333333333333*G0_1 + 0.0416666666666666*G0_2;
1320
A[2] = 0.0416666666666667*G0_0 + 0.0416666666666666*G0_1 + 0.0833333333333333*G0_2;
1323
/// Tabulate the tensor for the contribution from a local cell
1324
/// using the specified reference cell quadrature points/weights
1325
virtual void tabulate_tensor(double* A,
1326
const double * const * w,
1328
unsigned int num_quadrature_points,
1329
const double * const * quadrature_points,
1330
const double* quadrature_weights) const
1332
throw std::runtime_error("Quadrature version of tabulate_tensor not available when using the FFC tensor representation.");
1337
/// This class defines the interface for the assembly of the global
1338
/// tensor corresponding to a form with r + n arguments, that is, a
1341
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
1343
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
1344
/// global tensor A is defined by
1346
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
1348
/// where each argument Vj represents the application to the
1349
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
1350
/// fixed functions (coefficients).
1352
class poisson_form_0: public ufc::form
1357
poisson_form_0() : ufc::form()
1363
virtual ~poisson_form_0()
1368
/// Return a string identifying the form
1369
virtual const char* signature() const
1371
return "e49db5933701fbea6d081d9eb8211f222d5e42bf66531164205315d004568defe6f37600db8dca4345ed48521ef3f72fca9ee8a56fae8d816614e27f43f57368";
1374
/// Return the rank of the global tensor (r)
1375
virtual unsigned int rank() const
1380
/// Return the number of coefficients (n)
1381
virtual unsigned int num_coefficients() const
1386
/// Return the number of cell domains
1387
virtual unsigned int num_cell_domains() const
1392
/// Return the number of exterior facet domains
1393
virtual unsigned int num_exterior_facet_domains() const
1398
/// Return the number of interior facet domains
1399
virtual unsigned int num_interior_facet_domains() const
1404
/// Create a new finite element for argument function i
1405
virtual ufc::finite_element* create_finite_element(unsigned int i) const
1411
return new poisson_finite_element_0();
1416
return new poisson_finite_element_0();
1424
/// Create a new dofmap for argument function i
1425
virtual ufc::dofmap* create_dofmap(unsigned int i) const
1431
return new poisson_dofmap_0();
1436
return new poisson_dofmap_0();
1444
/// Create a new cell integral on sub domain i
1445
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
1451
return new poisson_cell_integral_0_0();
1459
/// Create a new exterior facet integral on sub domain i
1460
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
1465
/// Create a new interior facet integral on sub domain i
1466
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
1473
/// This class defines the interface for the assembly of the global
1474
/// tensor corresponding to a form with r + n arguments, that is, a
1477
/// a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
1479
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
1480
/// global tensor A is defined by
1482
/// A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
1484
/// where each argument Vj represents the application to the
1485
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
1486
/// fixed functions (coefficients).
1488
class poisson_form_1: public ufc::form
1493
poisson_form_1() : ufc::form()
1499
virtual ~poisson_form_1()
1504
/// Return a string identifying the form
1505
virtual const char* signature() const
1507
return "170564c0acd384bf01de57551d4a1dcf4c82d89cae6016709e17b5ab66a13147621a3c0c59e9b51ed9fd675b977c2cc502cbb3d811581cc39376869f6a5965bd";
1510
/// Return the rank of the global tensor (r)
1511
virtual unsigned int rank() const
1516
/// Return the number of coefficients (n)
1517
virtual unsigned int num_coefficients() const
1522
/// Return the number of cell domains
1523
virtual unsigned int num_cell_domains() const
1528
/// Return the number of exterior facet domains
1529
virtual unsigned int num_exterior_facet_domains() const
1534
/// Return the number of interior facet domains
1535
virtual unsigned int num_interior_facet_domains() const
1540
/// Create a new finite element for argument function i
1541
virtual ufc::finite_element* create_finite_element(unsigned int i) const
1547
return new poisson_finite_element_0();
1552
return new poisson_finite_element_0();
1560
/// Create a new dofmap for argument function i
1561
virtual ufc::dofmap* create_dofmap(unsigned int i) const
1567
return new poisson_dofmap_0();
1572
return new poisson_dofmap_0();
1580
/// Create a new cell integral on sub domain i
1581
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
1587
return new poisson_cell_integral_1_0();
1595
/// Create a new exterior facet integral on sub domain i
1596
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
1601
/// Create a new interior facet integral on sub domain i
1602
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
1611
// Standard library includes
1615
#include <dolfin/common/NoDeleter.h>
1616
#include <dolfin/mesh/Restriction.h>
1617
#include <dolfin/fem/FiniteElement.h>
1618
#include <dolfin/fem/DofMap.h>
1619
#include <dolfin/fem/Form.h>
1620
#include <dolfin/function/FunctionSpace.h>
1621
#include <dolfin/function/GenericFunction.h>
1622
#include <dolfin/function/CoefficientAssigner.h>
1623
#include <dolfin/adaptivity/ErrorControl.h>
1624
#include <dolfin/adaptivity/GoalFunctional.h>
1629
class CoefficientSpace_f: public dolfin::FunctionSpace
1633
//--- Constructors for standard function space, 2 different versions ---
1635
// Create standard function space (reference version)
1636
CoefficientSpace_f(const dolfin::Mesh& mesh):
1637
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
1638
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1639
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), mesh)))
1644
// Create standard function space (shared pointer version)
1645
CoefficientSpace_f(boost::shared_ptr<const dolfin::Mesh> mesh):
1646
dolfin::FunctionSpace(mesh,
1647
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1648
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), *mesh)))
1653
//--- Constructors for restricted function space, 2 different versions ---
1655
// Create restricted function space (reference version)
1656
CoefficientSpace_f(const dolfin::Restriction& restriction):
1657
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
1658
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1659
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1660
reference_to_no_delete_pointer(restriction))))
1665
// Create restricted function space (shared pointer version)
1666
CoefficientSpace_f(boost::shared_ptr<const dolfin::Restriction> restriction):
1667
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
1668
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1669
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1676
~CoefficientSpace_f()
1682
class Form_a_FunctionSpace_0: public dolfin::FunctionSpace
1686
//--- Constructors for standard function space, 2 different versions ---
1688
// Create standard function space (reference version)
1689
Form_a_FunctionSpace_0(const dolfin::Mesh& mesh):
1690
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
1691
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1692
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), mesh)))
1697
// Create standard function space (shared pointer version)
1698
Form_a_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
1699
dolfin::FunctionSpace(mesh,
1700
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1701
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), *mesh)))
1706
//--- Constructors for restricted function space, 2 different versions ---
1708
// Create restricted function space (reference version)
1709
Form_a_FunctionSpace_0(const dolfin::Restriction& restriction):
1710
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
1711
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1712
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1713
reference_to_no_delete_pointer(restriction))))
1718
// Create restricted function space (shared pointer version)
1719
Form_a_FunctionSpace_0(boost::shared_ptr<const dolfin::Restriction> restriction):
1720
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
1721
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1722
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1729
~Form_a_FunctionSpace_0()
1735
class Form_a_FunctionSpace_1: public dolfin::FunctionSpace
1739
//--- Constructors for standard function space, 2 different versions ---
1741
// Create standard function space (reference version)
1742
Form_a_FunctionSpace_1(const dolfin::Mesh& mesh):
1743
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
1744
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1745
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), mesh)))
1750
// Create standard function space (shared pointer version)
1751
Form_a_FunctionSpace_1(boost::shared_ptr<const dolfin::Mesh> mesh):
1752
dolfin::FunctionSpace(mesh,
1753
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1754
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), *mesh)))
1759
//--- Constructors for restricted function space, 2 different versions ---
1761
// Create restricted function space (reference version)
1762
Form_a_FunctionSpace_1(const dolfin::Restriction& restriction):
1763
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
1764
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1765
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1766
reference_to_no_delete_pointer(restriction))))
1771
// Create restricted function space (shared pointer version)
1772
Form_a_FunctionSpace_1(boost::shared_ptr<const dolfin::Restriction> restriction):
1773
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
1774
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1775
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1782
~Form_a_FunctionSpace_1()
1788
class Form_a: public dolfin::Form
1793
Form_a(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0):
1796
_function_spaces[0] = reference_to_no_delete_pointer(V0);
1797
_function_spaces[1] = reference_to_no_delete_pointer(V1);
1799
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_0());
1803
Form_a(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0):
1806
_function_spaces[0] = V0;
1807
_function_spaces[1] = V1;
1809
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_0());
1816
/// Return the number of the coefficient with this name
1817
virtual std::size_t coefficient_number(const std::string& name) const
1820
dolfin::dolfin_error("generated code for class Form",
1821
"access coefficient data",
1822
"There are no coefficients");
1826
/// Return the name of the coefficient with this number
1827
virtual std::string coefficient_name(std::size_t i) const
1830
dolfin::dolfin_error("generated code for class Form",
1831
"access coefficient data",
1832
"There are no coefficients");
1837
typedef Form_a_FunctionSpace_0 TestSpace;
1838
typedef Form_a_FunctionSpace_1 TrialSpace;
1843
class Form_L_FunctionSpace_0: public dolfin::FunctionSpace
1847
//--- Constructors for standard function space, 2 different versions ---
1849
// Create standard function space (reference version)
1850
Form_L_FunctionSpace_0(const dolfin::Mesh& mesh):
1851
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
1852
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1853
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), mesh)))
1858
// Create standard function space (shared pointer version)
1859
Form_L_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
1860
dolfin::FunctionSpace(mesh,
1861
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1862
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()), *mesh)))
1867
//--- Constructors for restricted function space, 2 different versions ---
1869
// Create restricted function space (reference version)
1870
Form_L_FunctionSpace_0(const dolfin::Restriction& restriction):
1871
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
1872
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1873
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1874
reference_to_no_delete_pointer(restriction))))
1879
// Create restricted function space (shared pointer version)
1880
Form_L_FunctionSpace_0(boost::shared_ptr<const dolfin::Restriction> restriction):
1881
dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
1882
boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson_finite_element_0()))),
1883
boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson_dofmap_0()),
1890
~Form_L_FunctionSpace_0()
1896
typedef CoefficientSpace_f Form_L_FunctionSpace_1;
1898
class Form_L: public dolfin::Form
1903
Form_L(const dolfin::FunctionSpace& V0):
1904
dolfin::Form(1, 1), f(*this, 0)
1906
_function_spaces[0] = reference_to_no_delete_pointer(V0);
1908
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_1());
1912
Form_L(const dolfin::FunctionSpace& V0, const dolfin::GenericFunction& f):
1913
dolfin::Form(1, 1), f(*this, 0)
1915
_function_spaces[0] = reference_to_no_delete_pointer(V0);
1919
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_1());
1923
Form_L(const dolfin::FunctionSpace& V0, boost::shared_ptr<const dolfin::GenericFunction> f):
1924
dolfin::Form(1, 1), f(*this, 0)
1926
_function_spaces[0] = reference_to_no_delete_pointer(V0);
1930
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_1());
1934
Form_L(boost::shared_ptr<const dolfin::FunctionSpace> V0):
1935
dolfin::Form(1, 1), f(*this, 0)
1937
_function_spaces[0] = V0;
1939
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_1());
1943
Form_L(boost::shared_ptr<const dolfin::FunctionSpace> V0, const dolfin::GenericFunction& f):
1944
dolfin::Form(1, 1), f(*this, 0)
1946
_function_spaces[0] = V0;
1950
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_1());
1954
Form_L(boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::GenericFunction> f):
1955
dolfin::Form(1, 1), f(*this, 0)
1957
_function_spaces[0] = V0;
1961
_ufc_form = boost::shared_ptr<const ufc::form>(new poisson_form_1());
1968
/// Return the number of the coefficient with this name
1969
virtual std::size_t coefficient_number(const std::string& name) const
1974
dolfin::dolfin_error("generated code for class Form",
1975
"access coefficient data",
1976
"Invalid coefficient");
1980
/// Return the name of the coefficient with this number
1981
virtual std::string coefficient_name(std::size_t i) const
1989
dolfin::dolfin_error("generated code for class Form",
1990
"access coefficient data",
1991
"Invalid coefficient");
1996
typedef Form_L_FunctionSpace_0 TestSpace;
1997
typedef Form_L_FunctionSpace_1 CoefficientSpace_f;
2000
dolfin::CoefficientAssigner f;
2004
typedef Form_a BilinearForm;
2005
typedef Form_a JacobianForm;
2006
typedef Form_L LinearForm;
2007
typedef Form_L ResidualForm;
2008
typedef Form_a::TestSpace FunctionSpace;