~ubuntu-branches/ubuntu/wily/ffc/wily

« back to all changes in this revision

Viewing changes to test/regression/references/r_quadrature/AlgebraOperators.h

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2013-06-26 14:48:32 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130626144832-1xd8htax4s3utybz
Tags: 1.2.0-1
* New upstream release.
* debian/control:
  - Bump required version for python-ufc, python-fiat, python-instant
    and python-ufl in Depends field.
  - Bump Standards-Version to 3.9.4.
  - Remove DM-Upload-Allowed field.
  - Bump required debhelper version in Build-Depends.
  - Remove cdbs from Build-Depends.
  - Use canonical URIs for Vcs-* fields.
* debian/compat: Bump to compatibility level 9.
* debian/rules: Rewrite for debhelper (drop cdbs).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// This code conforms with the UFC specification version 2.0.5
2
 
// and was automatically generated by FFC version 1.0.0.
 
1
// This code conforms with the UFC specification version 2.2.0
 
2
// and was automatically generated by FFC version 1.2.0.
3
3
// 
4
4
// This code was generated with the following parameters:
5
5
// 
52
52
  /// Return a string identifying the finite element
53
53
  virtual const char* signature() const
54
54
  {
55
 
    return "FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None)";
 
55
    return "FiniteElement('Lagrange', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 1, None)";
56
56
  }
57
57
 
58
58
  /// Return the cell shape
62
62
  }
63
63
 
64
64
  /// Return the topological dimension of the cell shape
65
 
  virtual unsigned int topological_dimension() const
 
65
  virtual std::size_t topological_dimension() const
66
66
  {
67
67
    return 2;
68
68
  }
69
69
 
70
70
  /// Return the geometric dimension of the cell shape
71
 
  virtual unsigned int geometric_dimension() const
 
71
  virtual std::size_t geometric_dimension() const
72
72
  {
73
73
    return 2;
74
74
  }
75
75
 
76
76
  /// Return the dimension of the finite element function space
77
 
  virtual unsigned int space_dimension() const
 
77
  virtual std::size_t space_dimension() const
78
78
  {
79
79
    return 3;
80
80
  }
81
81
 
82
82
  /// Return the rank of the value space
83
 
  virtual unsigned int value_rank() const
 
83
  virtual std::size_t value_rank() const
84
84
  {
85
85
    return 0;
86
86
  }
87
87
 
88
88
  /// Return the dimension of the value space for axis i
89
 
  virtual unsigned int value_dimension(unsigned int i) const
 
89
  virtual std::size_t value_dimension(std::size_t i) const
90
90
  {
91
91
    return 1;
92
92
  }
93
93
 
94
 
  /// Evaluate basis function i at given point in cell
95
 
  virtual void evaluate_basis(unsigned int i,
 
94
  /// Evaluate basis function i at given point x in cell
 
95
  virtual void evaluate_basis(std::size_t i,
96
96
                              double* values,
97
 
                              const double* coordinates,
98
 
                              const ufc::cell& c) const
 
97
                              const double* x,
 
98
                              const double* vertex_coordinates,
 
99
                              int cell_orientation) const
99
100
  {
100
 
    // Extract vertex coordinates
101
 
    const double * const * x = c.coordinates;
102
 
    
103
 
    // Compute Jacobian of affine map from reference cell
104
 
    const double J_00 = x[1][0] - x[0][0];
105
 
    const double J_01 = x[2][0] - x[0][0];
106
 
    const double J_10 = x[1][1] - x[0][1];
107
 
    const double J_11 = x[2][1] - x[0][1];
108
 
    
109
 
    // Compute determinant of Jacobian
110
 
    double detJ = J_00*J_11 - J_01*J_10;
111
 
    
112
 
    // Compute inverse of Jacobian
 
101
    // Compute Jacobian
 
102
    double J[4];
 
103
    compute_jacobian_triangle_2d(J, vertex_coordinates);
 
104
    
 
105
    // Compute Jacobian inverse and determinant
 
106
    double K[4];
 
107
    double detJ;
 
108
    compute_jacobian_inverse_triangle_2d(K, detJ, J);
 
109
    
113
110
    
114
111
    // Compute constants
115
 
    const double C0 = x[1][0] + x[2][0];
116
 
    const double C1 = x[1][1] + x[2][1];
 
112
    const double C0 = vertex_coordinates[2] + vertex_coordinates[4];
 
113
    const double C1 = vertex_coordinates[3] + vertex_coordinates[5];
117
114
    
118
115
    // Get coordinates and map to the reference (FIAT) element
119
 
    double X = (J_01*(C1 - 2.0*coordinates[1]) + J_11*(2.0*coordinates[0] - C0)) / detJ;
120
 
    double Y = (J_00*(2.0*coordinates[1] - C1) + J_10*(C0 - 2.0*coordinates[0])) / detJ;
 
116
    double X = (J[1]*(C1 - 2.0*x[1]) + J[3]*(2.0*x[0] - C0)) / detJ;
 
117
    double Y = (J[0]*(2.0*x[1] - C1) + J[2]*(C0 - 2.0*x[0])) / detJ;
121
118
    
122
 
    // Reset values.
 
119
    // Reset values
123
120
    *values = 0.0;
124
121
    switch (i)
125
122
    {
126
123
    case 0:
127
124
      {
128
125
        
129
 
      // Array of basisvalues.
 
126
      // Array of basisvalues
130
127
      double basisvalues[3] = {0.0, 0.0, 0.0};
131
128
      
132
 
      // Declare helper variables.
 
129
      // Declare helper variables
133
130
      double tmp0 = (1.0 + Y + 2.0*X)/2.0;
134
131
      
135
 
      // Compute basisvalues.
 
132
      // Compute basisvalues
136
133
      basisvalues[0] = 1.0;
137
134
      basisvalues[1] = tmp0;
138
135
      basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
140
137
      basisvalues[2] *= std::sqrt(1.0);
141
138
      basisvalues[1] *= std::sqrt(3.0);
142
139
      
143
 
      // Table(s) of coefficients.
 
140
      // Table(s) of coefficients
144
141
      static const double coefficients0[3] = \
145
142
      {0.47140452, -0.28867513, -0.16666667};
146
143
      
147
 
      // Compute value(s).
 
144
      // Compute value(s)
148
145
      for (unsigned int r = 0; r < 3; r++)
149
146
      {
150
147
        *values += coefficients0[r]*basisvalues[r];
154
151
    case 1:
155
152
      {
156
153
        
157
 
      // Array of basisvalues.
 
154
      // Array of basisvalues
158
155
      double basisvalues[3] = {0.0, 0.0, 0.0};
159
156
      
160
 
      // Declare helper variables.
 
157
      // Declare helper variables
161
158
      double tmp0 = (1.0 + Y + 2.0*X)/2.0;
162
159
      
163
 
      // Compute basisvalues.
 
160
      // Compute basisvalues
164
161
      basisvalues[0] = 1.0;
165
162
      basisvalues[1] = tmp0;
166
163
      basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
168
165
      basisvalues[2] *= std::sqrt(1.0);
169
166
      basisvalues[1] *= std::sqrt(3.0);
170
167
      
171
 
      // Table(s) of coefficients.
 
168
      // Table(s) of coefficients
172
169
      static const double coefficients0[3] = \
173
170
      {0.47140452, 0.28867513, -0.16666667};
174
171
      
175
 
      // Compute value(s).
 
172
      // Compute value(s)
176
173
      for (unsigned int r = 0; r < 3; r++)
177
174
      {
178
175
        *values += coefficients0[r]*basisvalues[r];
182
179
    case 2:
183
180
      {
184
181
        
185
 
      // Array of basisvalues.
 
182
      // Array of basisvalues
186
183
      double basisvalues[3] = {0.0, 0.0, 0.0};
187
184
      
188
 
      // Declare helper variables.
 
185
      // Declare helper variables
189
186
      double tmp0 = (1.0 + Y + 2.0*X)/2.0;
190
187
      
191
 
      // Compute basisvalues.
 
188
      // Compute basisvalues
192
189
      basisvalues[0] = 1.0;
193
190
      basisvalues[1] = tmp0;
194
191
      basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
196
193
      basisvalues[2] *= std::sqrt(1.0);
197
194
      basisvalues[1] *= std::sqrt(3.0);
198
195
      
199
 
      // Table(s) of coefficients.
 
196
      // Table(s) of coefficients
200
197
      static const double coefficients0[3] = \
201
198
      {0.47140452, 0.0, 0.33333333};
202
199
      
203
 
      // Compute value(s).
 
200
      // Compute value(s)
204
201
      for (unsigned int r = 0; r < 3; r++)
205
202
      {
206
203
        *values += coefficients0[r]*basisvalues[r];
211
208
    
212
209
  }
213
210
 
214
 
  /// Evaluate all basis functions at given point in cell
 
211
  /// Evaluate all basis functions at given point x in cell
215
212
  virtual void evaluate_basis_all(double* values,
216
 
                                  const double* coordinates,
217
 
                                  const ufc::cell& c) const
 
213
                                  const double* x,
 
214
                                  const double* vertex_coordinates,
 
215
                                  int cell_orientation) const
218
216
  {
219
217
    // Helper variable to hold values of a single dof.
220
218
    double dof_values = 0.0;
221
219
    
222
 
    // Loop dofs and call evaluate_basis.
 
220
    // Loop dofs and call evaluate_basis
223
221
    for (unsigned int r = 0; r < 3; r++)
224
222
    {
225
 
      evaluate_basis(r, &dof_values, coordinates, c);
 
223
      evaluate_basis(r, &dof_values, x, vertex_coordinates, cell_orientation);
226
224
      values[r] = dof_values;
227
225
    }// end loop over 'r'
228
226
  }
229
227
 
230
 
  /// Evaluate order n derivatives of basis function i at given point in cell
231
 
  virtual void evaluate_basis_derivatives(unsigned int i,
232
 
                                          unsigned int n,
 
228
  /// Evaluate order n derivatives of basis function i at given point x in cell
 
229
  virtual void evaluate_basis_derivatives(std::size_t i,
 
230
                                          std::size_t n,
233
231
                                          double* values,
234
 
                                          const double* coordinates,
235
 
                                          const ufc::cell& c) const
 
232
                                          const double* x,
 
233
                                          const double* vertex_coordinates,
 
234
                                          int cell_orientation) const
236
235
  {
237
 
    // Extract vertex coordinates
238
 
    const double * const * x = c.coordinates;
239
 
    
240
 
    // Compute Jacobian of affine map from reference cell
241
 
    const double J_00 = x[1][0] - x[0][0];
242
 
    const double J_01 = x[2][0] - x[0][0];
243
 
    const double J_10 = x[1][1] - x[0][1];
244
 
    const double J_11 = x[2][1] - x[0][1];
245
 
    
246
 
    // Compute determinant of Jacobian
247
 
    double detJ = J_00*J_11 - J_01*J_10;
248
 
    
249
 
    // Compute inverse of Jacobian
250
 
    const double K_00 =  J_11 / detJ;
251
 
    const double K_01 = -J_01 / detJ;
252
 
    const double K_10 = -J_10 / detJ;
253
 
    const double K_11 =  J_00 / detJ;
 
236
    // Compute Jacobian
 
237
    double J[4];
 
238
    compute_jacobian_triangle_2d(J, vertex_coordinates);
 
239
    
 
240
    // Compute Jacobian inverse and determinant
 
241
    double K[4];
 
242
    double detJ;
 
243
    compute_jacobian_inverse_triangle_2d(K, detJ, J);
 
244
    
254
245
    
255
246
    // Compute constants
256
 
    const double C0 = x[1][0] + x[2][0];
257
 
    const double C1 = x[1][1] + x[2][1];
 
247
    const double C0 = vertex_coordinates[2] + vertex_coordinates[4];
 
248
    const double C1 = vertex_coordinates[3] + vertex_coordinates[5];
258
249
    
259
250
    // Get coordinates and map to the reference (FIAT) element
260
 
    double X = (J_01*(C1 - 2.0*coordinates[1]) + J_11*(2.0*coordinates[0] - C0)) / detJ;
261
 
    double Y = (J_00*(2.0*coordinates[1] - C1) + J_10*(C0 - 2.0*coordinates[0])) / detJ;
 
251
    double X = (J[1]*(C1 - 2.0*x[1]) + J[3]*(2.0*x[0] - C0)) / detJ;
 
252
    double Y = (J[0]*(2.0*x[1] - C1) + J[2]*(C0 - 2.0*x[0])) / detJ;
262
253
    
263
254
    // Compute number of derivatives.
264
255
    unsigned int num_derivatives = 1;
295
286
    }
296
287
    
297
288
    // Compute inverse of Jacobian
298
 
    const double Jinv[2][2] = {{K_00, K_01}, {K_10, K_11}};
 
289
    const double Jinv[2][2] = {{K[0], K[1]}, {K[2], K[3]}};
299
290
    
300
291
    // Declare transformation matrix
301
292
    // Declare pointer to two dimensional array and initialise
329
320
    case 0:
330
321
      {
331
322
        
332
 
      // Array of basisvalues.
 
323
      // Array of basisvalues
333
324
      double basisvalues[3] = {0.0, 0.0, 0.0};
334
325
      
335
 
      // Declare helper variables.
 
326
      // Declare helper variables
336
327
      double tmp0 = (1.0 + Y + 2.0*X)/2.0;
337
328
      
338
 
      // Compute basisvalues.
 
329
      // Compute basisvalues
339
330
      basisvalues[0] = 1.0;
340
331
      basisvalues[1] = tmp0;
341
332
      basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
343
334
      basisvalues[2] *= std::sqrt(1.0);
344
335
      basisvalues[1] *= std::sqrt(3.0);
345
336
      
346
 
      // Table(s) of coefficients.
 
337
      // Table(s) of coefficients
347
338
      static const double coefficients0[3] = \
348
339
      {0.47140452, -0.28867513, -0.16666667};
349
340
      
475
466
    case 1:
476
467
      {
477
468
        
478
 
      // Array of basisvalues.
 
469
      // Array of basisvalues
479
470
      double basisvalues[3] = {0.0, 0.0, 0.0};
480
471
      
481
 
      // Declare helper variables.
 
472
      // Declare helper variables
482
473
      double tmp0 = (1.0 + Y + 2.0*X)/2.0;
483
474
      
484
 
      // Compute basisvalues.
 
475
      // Compute basisvalues
485
476
      basisvalues[0] = 1.0;
486
477
      basisvalues[1] = tmp0;
487
478
      basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
489
480
      basisvalues[2] *= std::sqrt(1.0);
490
481
      basisvalues[1] *= std::sqrt(3.0);
491
482
      
492
 
      // Table(s) of coefficients.
 
483
      // Table(s) of coefficients
493
484
      static const double coefficients0[3] = \
494
485
      {0.47140452, 0.28867513, -0.16666667};
495
486
      
621
612
    case 2:
622
613
      {
623
614
        
624
 
      // Array of basisvalues.
 
615
      // Array of basisvalues
625
616
      double basisvalues[3] = {0.0, 0.0, 0.0};
626
617
      
627
 
      // Declare helper variables.
 
618
      // Declare helper variables
628
619
      double tmp0 = (1.0 + Y + 2.0*X)/2.0;
629
620
      
630
 
      // Compute basisvalues.
 
621
      // Compute basisvalues
631
622
      basisvalues[0] = 1.0;
632
623
      basisvalues[1] = tmp0;
633
624
      basisvalues[2] = basisvalues[0]*(0.5 + 1.5*Y);
635
626
      basisvalues[2] *= std::sqrt(1.0);
636
627
      basisvalues[1] *= std::sqrt(3.0);
637
628
      
638
 
      // Table(s) of coefficients.
 
629
      // Table(s) of coefficients
639
630
      static const double coefficients0[3] = \
640
631
      {0.47140452, 0.0, 0.33333333};
641
632
      
768
759
    
769
760
  }
770
761
 
771
 
  /// Evaluate order n derivatives of all basis functions at given point in cell
772
 
  virtual void evaluate_basis_derivatives_all(unsigned int n,
 
762
  /// Evaluate order n derivatives of all basis functions at given point x in cell
 
763
  virtual void evaluate_basis_derivatives_all(std::size_t n,
773
764
                                              double* values,
774
 
                                              const double* coordinates,
775
 
                                              const ufc::cell& c) const
 
765
                                              const double* x,
 
766
                                              const double* vertex_coordinates,
 
767
                                              int cell_orientation) const
776
768
  {
777
769
    // Compute number of derivatives.
778
770
    unsigned int num_derivatives = 1;
791
783
    // Loop dofs and call evaluate_basis_derivatives.
792
784
    for (unsigned int r = 0; r < 3; r++)
793
785
    {
794
 
      evaluate_basis_derivatives(r, n, dof_values, coordinates, c);
 
786
      evaluate_basis_derivatives(r, n, dof_values, x, vertex_coordinates, cell_orientation);
795
787
      for (unsigned int s = 0; s < num_derivatives; s++)
796
788
      {
797
789
        values[r*num_derivatives + s] = dof_values[s];
803
795
  }
804
796
 
805
797
  /// Evaluate linear functional for dof i on the function f
806
 
  virtual double evaluate_dof(unsigned int i,
 
798
  virtual double evaluate_dof(std::size_t i,
807
799
                              const ufc::function& f,
 
800
                              const double* vertex_coordinates,
 
801
                              int cell_orientation,
808
802
                              const ufc::cell& c) const
809
803
  {
810
 
    // Declare variables for result of evaluation.
 
804
    // Declare variables for result of evaluation
811
805
    double vals[1];
812
806
    
813
 
    // Declare variable for physical coordinates.
 
807
    // Declare variable for physical coordinates
814
808
    double y[2];
815
 
    const double * const * x = c.coordinates;
816
809
    switch (i)
817
810
    {
818
811
    case 0:
819
812
      {
820
 
        y[0] = x[0][0];
821
 
      y[1] = x[0][1];
 
813
        y[0] = vertex_coordinates[0];
 
814
      y[1] = vertex_coordinates[1];
822
815
      f.evaluate(vals, y, c);
823
816
      return vals[0];
824
817
        break;
825
818
      }
826
819
    case 1:
827
820
      {
828
 
        y[0] = x[1][0];
829
 
      y[1] = x[1][1];
 
821
        y[0] = vertex_coordinates[2];
 
822
      y[1] = vertex_coordinates[3];
830
823
      f.evaluate(vals, y, c);
831
824
      return vals[0];
832
825
        break;
833
826
      }
834
827
    case 2:
835
828
      {
836
 
        y[0] = x[2][0];
837
 
      y[1] = x[2][1];
 
829
        y[0] = vertex_coordinates[4];
 
830
      y[1] = vertex_coordinates[5];
838
831
      f.evaluate(vals, y, c);
839
832
      return vals[0];
840
833
        break;
847
840
  /// Evaluate linear functionals for all dofs on the function f
848
841
  virtual void evaluate_dofs(double* values,
849
842
                             const ufc::function& f,
 
843
                             const double* vertex_coordinates,
 
844
                             int cell_orientation,
850
845
                             const ufc::cell& c) const
851
846
  {
852
 
    // Declare variables for result of evaluation.
 
847
    // Declare variables for result of evaluation
853
848
    double vals[1];
854
849
    
855
 
    // Declare variable for physical coordinates.
 
850
    // Declare variable for physical coordinates
856
851
    double y[2];
857
 
    const double * const * x = c.coordinates;
858
 
    y[0] = x[0][0];
859
 
    y[1] = x[0][1];
 
852
    y[0] = vertex_coordinates[0];
 
853
    y[1] = vertex_coordinates[1];
860
854
    f.evaluate(vals, y, c);
861
855
    values[0] = vals[0];
862
 
    y[0] = x[1][0];
863
 
    y[1] = x[1][1];
 
856
    y[0] = vertex_coordinates[2];
 
857
    y[1] = vertex_coordinates[3];
864
858
    f.evaluate(vals, y, c);
865
859
    values[1] = vals[0];
866
 
    y[0] = x[2][0];
867
 
    y[1] = x[2][1];
 
860
    y[0] = vertex_coordinates[4];
 
861
    y[1] = vertex_coordinates[5];
868
862
    f.evaluate(vals, y, c);
869
863
    values[2] = vals[0];
870
864
  }
872
866
  /// Interpolate vertex values from dof values
873
867
  virtual void interpolate_vertex_values(double* vertex_values,
874
868
                                         const double* dof_values,
 
869
                                         const double* vertex_coordinates,
 
870
                                         int cell_orientation,
875
871
                                         const ufc::cell& c) const
876
872
  {
877
873
    // Evaluate function and change variables
885
881
                                       const double* xhat,
886
882
                                       const ufc::cell& c) const
887
883
  {
888
 
    std::cerr << "*** FFC warning: " << "map_from_reference_cell not yet implemented (introduced in UFC 2.0)." << std::endl;
 
884
    std::cerr << "*** FFC warning: " << "map_from_reference_cell not yet implemented." << std::endl;
889
885
  }
890
886
 
891
887
  /// Map from coordinate x in cell to coordinate xhat in reference cell
893
889
                                     const double* x,
894
890
                                     const ufc::cell& c) const
895
891
  {
896
 
    std::cerr << "*** FFC warning: " << "map_to_reference_cell not yet implemented (introduced in UFC 2.0)." << std::endl;
 
892
    std::cerr << "*** FFC warning: " << "map_to_reference_cell not yet implemented." << std::endl;
897
893
  }
898
894
 
899
895
  /// Return the number of sub elements (for a mixed element)
900
 
  virtual unsigned int num_sub_elements() const
 
896
  virtual std::size_t num_sub_elements() const
901
897
  {
902
898
    return 0;
903
899
  }
904
900
 
905
901
  /// Create a new finite element for sub element i (for a mixed element)
906
 
  virtual ufc::finite_element* create_sub_element(unsigned int i) const
 
902
  virtual ufc::finite_element* create_sub_element(std::size_t i) const
907
903
  {
908
904
    return 0;
909
905
  }
921
917
 
922
918
class algebraoperators_dofmap_0: public ufc::dofmap
923
919
{
924
 
private:
925
 
 
926
 
  unsigned int _global_dimension;
927
920
public:
928
921
 
929
922
  /// Constructor
930
923
  algebraoperators_dofmap_0() : ufc::dofmap()
931
924
  {
932
 
    _global_dimension = 0;
 
925
    // Do nothing
933
926
  }
934
927
 
935
928
  /// Destructor
941
934
  /// Return a string identifying the dofmap
942
935
  virtual const char* signature() const
943
936
  {
944
 
    return "FFC dofmap for FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None)";
 
937
    return "FFC dofmap for FiniteElement('Lagrange', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 1, None)";
945
938
  }
946
939
 
947
940
  /// Return true iff mesh entities of topological dimension d are needed
948
 
  virtual bool needs_mesh_entities(unsigned int d) const
 
941
  virtual bool needs_mesh_entities(std::size_t d) const
949
942
  {
950
943
    switch (d)
951
944
    {
969
962
    return false;
970
963
  }
971
964
 
972
 
  /// Initialize dofmap for mesh (return true iff init_cell() is needed)
973
 
  virtual bool init_mesh(const ufc::mesh& m)
974
 
  {
975
 
    _global_dimension = m.num_entities[0];
976
 
    return false;
977
 
  }
978
 
 
979
 
  /// Initialize dofmap for given cell
980
 
  virtual void init_cell(const ufc::mesh& m,
981
 
                         const ufc::cell& c)
982
 
  {
983
 
    // Do nothing
984
 
  }
985
 
 
986
 
  /// Finish initialization of dofmap for cells
987
 
  virtual void init_cell_finalize()
988
 
  {
989
 
    // Do nothing
990
 
  }
991
 
 
992
965
  /// Return the topological dimension of the associated cell shape
993
 
  virtual unsigned int topological_dimension() const
 
966
  virtual std::size_t topological_dimension() const
994
967
  {
995
968
    return 2;
996
969
  }
997
970
 
998
971
  /// Return the geometric dimension of the associated cell shape
999
 
  virtual unsigned int geometric_dimension() const
 
972
  virtual std::size_t geometric_dimension() const
1000
973
  {
1001
974
    return 2;
1002
975
  }
1003
976
 
1004
977
  /// Return the dimension of the global finite element function space
1005
 
  virtual unsigned int global_dimension() const
 
978
  virtual std::size_t global_dimension(const std::vector<std::size_t>&
 
979
                                       num_global_entities) const
1006
980
  {
1007
 
    return _global_dimension;
 
981
    return num_global_entities[0];
1008
982
  }
1009
983
 
1010
984
  /// Return the dimension of the local finite element function space for a cell
1011
 
  virtual unsigned int local_dimension(const ufc::cell& c) const
 
985
  virtual std::size_t local_dimension(const ufc::cell& c) const
1012
986
  {
1013
987
    return 3;
1014
988
  }
1015
989
 
1016
990
  /// Return the maximum dimension of the local finite element function space
1017
 
  virtual unsigned int max_local_dimension() const
 
991
  virtual std::size_t max_local_dimension() const
1018
992
  {
1019
993
    return 3;
1020
994
  }
1021
995
 
1022
996
  /// Return the number of dofs on each cell facet
1023
 
  virtual unsigned int num_facet_dofs() const
 
997
  virtual std::size_t num_facet_dofs() const
1024
998
  {
1025
999
    return 2;
1026
1000
  }
1027
1001
 
1028
1002
  /// Return the number of dofs associated with each cell entity of dimension d
1029
 
  virtual unsigned int num_entity_dofs(unsigned int d) const
 
1003
  virtual std::size_t num_entity_dofs(std::size_t d) const
1030
1004
  {
1031
1005
    switch (d)
1032
1006
    {
1051
1025
  }
1052
1026
 
1053
1027
  /// Tabulate the local-to-global mapping of dofs on a cell
1054
 
  virtual void tabulate_dofs(unsigned int* dofs,
1055
 
                             const ufc::mesh& m,
 
1028
  virtual void tabulate_dofs(std::size_t* dofs,
 
1029
                             const std::vector<std::size_t>& num_global_entities,
1056
1030
                             const ufc::cell& c) const
1057
1031
  {
1058
1032
    dofs[0] = c.entity_indices[0][0];
1061
1035
  }
1062
1036
 
1063
1037
  /// Tabulate the local-to-local mapping from facet dofs to cell dofs
1064
 
  virtual void tabulate_facet_dofs(unsigned int* dofs,
1065
 
                                   unsigned int facet) const
 
1038
  virtual void tabulate_facet_dofs(std::size_t* dofs,
 
1039
                                   std::size_t facet) const
1066
1040
  {
1067
1041
    switch (facet)
1068
1042
    {
1089
1063
  }
1090
1064
 
1091
1065
  /// Tabulate the local-to-local mapping of dofs on entity (d, i)
1092
 
  virtual void tabulate_entity_dofs(unsigned int* dofs,
1093
 
                                    unsigned int d, unsigned int i) const
 
1066
  virtual void tabulate_entity_dofs(std::size_t* dofs,
 
1067
                                    std::size_t d, std::size_t i) const
1094
1068
  {
1095
1069
    if (d > 2)
1096
1070
    {
1142
1116
  }
1143
1117
 
1144
1118
  /// Tabulate the coordinates of all dofs on a cell
1145
 
  virtual void tabulate_coordinates(double** coordinates,
1146
 
                                    const ufc::cell& c) const
 
1119
  virtual void tabulate_coordinates(double** dof_coordinates,
 
1120
                                    const double* vertex_coordinates) const
1147
1121
  {
1148
 
    const double * const * x = c.coordinates;
1149
 
    
1150
 
    coordinates[0][0] = x[0][0];
1151
 
    coordinates[0][1] = x[0][1];
1152
 
    coordinates[1][0] = x[1][0];
1153
 
    coordinates[1][1] = x[1][1];
1154
 
    coordinates[2][0] = x[2][0];
1155
 
    coordinates[2][1] = x[2][1];
 
1122
    dof_coordinates[0][0] = vertex_coordinates[0];
 
1123
    dof_coordinates[0][1] = vertex_coordinates[1];
 
1124
    dof_coordinates[1][0] = vertex_coordinates[2];
 
1125
    dof_coordinates[1][1] = vertex_coordinates[3];
 
1126
    dof_coordinates[2][0] = vertex_coordinates[4];
 
1127
    dof_coordinates[2][1] = vertex_coordinates[5];
1156
1128
  }
1157
1129
 
1158
1130
  /// Return the number of sub dofmaps (for a mixed element)
1159
 
  virtual unsigned int num_sub_dofmaps() const
 
1131
  virtual std::size_t num_sub_dofmaps() const
1160
1132
  {
1161
1133
    return 0;
1162
1134
  }
1163
1135
 
1164
1136
  /// Create a new dofmap for sub dofmap i (for a mixed element)
1165
 
  virtual ufc::dofmap* create_sub_dofmap(unsigned int i) const
 
1137
  virtual ufc::dofmap* create_sub_dofmap(std::size_t i) const
1166
1138
  {
1167
1139
    return 0;
1168
1140
  }
1179
1151
/// tensor corresponding to the local contribution to a form from
1180
1152
/// the integral over a cell.
1181
1153
 
1182
 
class algebraoperators_cell_integral_0_0: public ufc::cell_integral
 
1154
class algebraoperators_cell_integral_0_otherwise: public ufc::cell_integral
1183
1155
{
1184
1156
public:
1185
1157
 
1186
1158
  /// Constructor
1187
 
  algebraoperators_cell_integral_0_0() : ufc::cell_integral()
 
1159
  algebraoperators_cell_integral_0_otherwise() : ufc::cell_integral()
1188
1160
  {
1189
1161
    // Do nothing
1190
1162
  }
1191
1163
 
1192
1164
  /// Destructor
1193
 
  virtual ~algebraoperators_cell_integral_0_0()
 
1165
  virtual ~algebraoperators_cell_integral_0_otherwise()
1194
1166
  {
1195
1167
    // Do nothing
1196
1168
  }
1198
1170
  /// Tabulate the tensor for the contribution from a local cell
1199
1171
  virtual void tabulate_tensor(double* A,
1200
1172
                               const double * const * w,
1201
 
                               const ufc::cell& c) const
 
1173
                               const double* vertex_coordinates,
 
1174
                               int cell_orientation) const
1202
1175
  {
1203
 
    // Extract vertex coordinates
1204
 
    const double * const * x = c.coordinates;
1205
 
    
1206
 
    // Compute Jacobian of affine map from reference cell
1207
 
    const double J_00 = x[1][0] - x[0][0];
1208
 
    const double J_01 = x[2][0] - x[0][0];
1209
 
    const double J_10 = x[1][1] - x[0][1];
1210
 
    const double J_11 = x[2][1] - x[0][1];
1211
 
    
1212
 
    // Compute determinant of Jacobian
1213
 
    double detJ = J_00*J_11 - J_01*J_10;
1214
 
    
1215
 
    // Compute inverse of Jacobian
 
1176
    // Compute Jacobian
 
1177
    double J[4];
 
1178
    compute_jacobian_triangle_2d(J, vertex_coordinates);
 
1179
    
 
1180
    // Compute Jacobian inverse and determinant
 
1181
    double K[4];
 
1182
    double detJ;
 
1183
    compute_jacobian_inverse_triangle_2d(K, detJ, J);
1216
1184
    
1217
1185
    // Set scale factor
1218
1186
    const double det = std::abs(detJ);
1219
1187
    
1220
 
    // Cell Volume.
1221
 
    
1222
 
    // Compute circumradius, assuming triangle is embedded in 2D.
1223
 
    
1224
 
    
1225
 
    // Facet Area.
 
1188
    // Cell volume
 
1189
    
 
1190
    // Compute circumradius of triangle in 2D
 
1191
    
 
1192
    
 
1193
    // Facet area
1226
1194
    
1227
1195
    // Array of quadrature weights.
1228
1196
    static const double W6[6] = {0.054975872, 0.054975872, 0.054975872, 0.11169079, 0.11169079, 0.11169079};
1265
1233
    }// end loop over 'ip'
1266
1234
  }
1267
1235
 
1268
 
  /// Tabulate the tensor for the contribution from a local cell
1269
 
  /// using the specified reference cell quadrature points/weights
1270
 
  virtual void tabulate_tensor(double* A,
1271
 
                               const double * const * w,
1272
 
                               const ufc::cell& c,
1273
 
                               unsigned int num_quadrature_points,
1274
 
                               const double * const * quadrature_points,
1275
 
                               const double* quadrature_weights) const
1276
 
  {
1277
 
    std::cerr << "*** FFC warning: " << "Quadrature version of tabulate_tensor not yet implemented (introduced in UFC 2.0)." << std::endl;
1278
 
  }
1279
 
 
1280
1236
};
1281
1237
 
1282
1238
/// This class defines the interface for the assembly of the global
1313
1269
  /// Return a string identifying the form
1314
1270
  virtual const char* signature() const
1315
1271
  {
1316
 
    return "Form([Integral(Sum(Abs(Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Abs(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Abs(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)))), Sum(Abs(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Sum(Power(Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Power(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Power(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Power(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)))), Sum(Power(Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Sum(Power(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Sum(Power(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Sum(Power(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Sum(Power(Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), FloatValue(2.2, (), (), {})), Sum(Power(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), FloatValue(2.2, (), (), {})), Sum(Power(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), FloatValue(2.2, (), (), {})), Sum(Power(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1), FloatValue(2.2, (), (), {})), Sum(Power(Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), IntValue(2, (), (), {})), Sum(Power(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), IntValue(2, (), (), {})), Sum(Power(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), IntValue(2, (), (), {})), Sum(Power(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), IntValue(2, (), (), {})), Sum(Division(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), IntValue(5, (), (), {})), Sum(Division(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), IntValue(5, (), (), {})), Sum(Division(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), IntValue(5, (), (), {})), Sum(Division(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Division(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Division(Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Sum(Division(IntValue(5, (), (), {}), Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Division(IntValue(5, (), (), {}), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Division(IntValue(5, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Sum(Product(Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)))), Sum(Product(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)))), Sum(Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Sum(Product(IntValue(3, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(-1, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)))), Sum(Product(IntValue(5, (), (), {}), Division(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))), Sum(Product(IntValue(5, (), (), {}), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(IntValue(5, (), (), {}), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1))))))))))))))))))))))))))))))))))))), Measure('cell', 0, None))])";
 
1272
    return "e10aed8ecfcea6f706c230fed6d61cf263f9a21542cd7d4516af92ef69e130edb093a3f5948c0482f2510c1e3938085b4f6c1ee6cd5a1f2f618b2081e5567499";
1317
1273
  }
1318
1274
 
1319
1275
  /// Return the rank of the global tensor (r)
1320
 
  virtual unsigned int rank() const
 
1276
  virtual std::size_t rank() const
1321
1277
  {
1322
1278
    return 0;
1323
1279
  }
1324
1280
 
1325
1281
  /// Return the number of coefficients (n)
1326
 
  virtual unsigned int num_coefficients() const
 
1282
  virtual std::size_t num_coefficients() const
1327
1283
  {
1328
1284
    return 2;
1329
1285
  }
1330
1286
 
1331
1287
  /// Return the number of cell domains
1332
 
  virtual unsigned int num_cell_domains() const
 
1288
  virtual std::size_t num_cell_domains() const
1333
1289
  {
1334
 
    return 1;
 
1290
    return 0;
1335
1291
  }
1336
1292
 
1337
1293
  /// Return the number of exterior facet domains
1338
 
  virtual unsigned int num_exterior_facet_domains() const
 
1294
  virtual std::size_t num_exterior_facet_domains() const
1339
1295
  {
1340
1296
    return 0;
1341
1297
  }
1342
1298
 
1343
1299
  /// Return the number of interior facet domains
1344
 
  virtual unsigned int num_interior_facet_domains() const
1345
 
  {
1346
 
    return 0;
 
1300
  virtual std::size_t num_interior_facet_domains() const
 
1301
  {
 
1302
    return 0;
 
1303
  }
 
1304
 
 
1305
  /// Return the number of point domains
 
1306
  virtual std::size_t num_point_domains() const
 
1307
  {
 
1308
    return 0;
 
1309
  }
 
1310
 
 
1311
  /// Return whether the form has any cell integrals
 
1312
  virtual bool has_cell_integrals() const
 
1313
  {
 
1314
    return true;
 
1315
  }
 
1316
 
 
1317
  /// Return whether the form has any exterior facet integrals
 
1318
  virtual bool has_exterior_facet_integrals() const
 
1319
  {
 
1320
    return false;
 
1321
  }
 
1322
 
 
1323
  /// Return whether the form has any interior facet integrals
 
1324
  virtual bool has_interior_facet_integrals() const
 
1325
  {
 
1326
    return false;
 
1327
  }
 
1328
 
 
1329
  /// Return whether the form has any point integrals
 
1330
  virtual bool has_point_integrals() const
 
1331
  {
 
1332
    return false;
1347
1333
  }
1348
1334
 
1349
1335
  /// Create a new finite element for argument function i
1350
 
  virtual ufc::finite_element* create_finite_element(unsigned int i) const
 
1336
  virtual ufc::finite_element* create_finite_element(std::size_t i) const
1351
1337
  {
1352
1338
    switch (i)
1353
1339
    {
1367
1353
  }
1368
1354
 
1369
1355
  /// Create a new dofmap for argument function i
1370
 
  virtual ufc::dofmap* create_dofmap(unsigned int i) const
 
1356
  virtual ufc::dofmap* create_dofmap(std::size_t i) const
1371
1357
  {
1372
1358
    switch (i)
1373
1359
    {
1387
1373
  }
1388
1374
 
1389
1375
  /// Create a new cell integral on sub domain i
1390
 
  virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
 
1376
  virtual ufc::cell_integral* create_cell_integral(std::size_t i) const
1391
1377
  {
1392
 
    switch (i)
1393
 
    {
1394
 
    case 0:
1395
 
      {
1396
 
        return new algebraoperators_cell_integral_0_0();
1397
 
        break;
1398
 
      }
1399
 
    }
1400
 
    
1401
1378
    return 0;
1402
1379
  }
1403
1380
 
1404
1381
  /// Create a new exterior facet integral on sub domain i
1405
 
  virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
 
1382
  virtual ufc::exterior_facet_integral* create_exterior_facet_integral(std::size_t i) const
1406
1383
  {
1407
1384
    return 0;
1408
1385
  }
1409
1386
 
1410
1387
  /// Create a new interior facet integral on sub domain i
1411
 
  virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
 
1388
  virtual ufc::interior_facet_integral* create_interior_facet_integral(std::size_t i) const
 
1389
  {
 
1390
    return 0;
 
1391
  }
 
1392
 
 
1393
  /// Create a new point integral on sub domain i
 
1394
  virtual ufc::point_integral* create_point_integral(std::size_t i) const
 
1395
  {
 
1396
    return 0;
 
1397
  }
 
1398
 
 
1399
  /// Create a new cell integral on everywhere else
 
1400
  virtual ufc::cell_integral* create_default_cell_integral() const
 
1401
  {
 
1402
    return new algebraoperators_cell_integral_0_otherwise();
 
1403
  }
 
1404
 
 
1405
  /// Create a new exterior facet integral on everywhere else
 
1406
  virtual ufc::exterior_facet_integral* create_default_exterior_facet_integral() const
 
1407
  {
 
1408
    return 0;
 
1409
  }
 
1410
 
 
1411
  /// Create a new interior facet integral on everywhere else
 
1412
  virtual ufc::interior_facet_integral* create_default_interior_facet_integral() const
 
1413
  {
 
1414
    return 0;
 
1415
  }
 
1416
 
 
1417
  /// Create a new point integral on everywhere else
 
1418
  virtual ufc::point_integral* create_default_point_integral() const
1412
1419
  {
1413
1420
    return 0;
1414
1421
  }