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
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
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
82
82
/// Return the rank of the value space
83
virtual unsigned int value_rank() const
83
virtual std::size_t value_rank() const
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
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,
97
const double* coordinates,
98
const ufc::cell& c) const
98
const double* vertex_coordinates,
99
int cell_orientation) const
100
// Extract vertex coordinates
101
const double * const * x = c.coordinates;
103
// Compute Jacobian of affine map from reference cell
104
const double J_00 = x[1][0] - x[0][0];
105
const double J_01 = x[2][0] - x[0][0];
106
const double J_02 = x[3][0] - x[0][0];
107
const double J_10 = x[1][1] - x[0][1];
108
const double J_11 = x[2][1] - x[0][1];
109
const double J_12 = x[3][1] - x[0][1];
110
const double J_20 = x[1][2] - x[0][2];
111
const double J_21 = x[2][2] - x[0][2];
112
const double J_22 = x[3][2] - x[0][2];
114
// Compute sub determinants
115
const double d_00 = J_11*J_22 - J_12*J_21;
116
const double d_01 = J_12*J_20 - J_10*J_22;
117
const double d_02 = J_10*J_21 - J_11*J_20;
118
const double d_10 = J_02*J_21 - J_01*J_22;
119
const double d_11 = J_00*J_22 - J_02*J_20;
120
const double d_12 = J_01*J_20 - J_00*J_21;
121
const double d_20 = J_01*J_12 - J_02*J_11;
122
const double d_21 = J_02*J_10 - J_00*J_12;
123
const double d_22 = J_00*J_11 - J_01*J_10;
125
// Compute determinant of Jacobian
126
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
128
// Compute inverse of Jacobian
103
compute_jacobian_tetrahedron_3d(J, vertex_coordinates);
105
// Compute Jacobian inverse and determinant
108
compute_jacobian_inverse_tetrahedron_3d(K, detJ, J);
130
111
// Compute constants
131
const double C0 = x[3][0] + x[2][0] + x[1][0] - x[0][0];
132
const double C1 = x[3][1] + x[2][1] + x[1][1] - x[0][1];
133
const double C2 = x[3][2] + x[2][2] + x[1][2] - x[0][2];
112
const double C0 = vertex_coordinates[9] + vertex_coordinates[6] + vertex_coordinates[3] - vertex_coordinates[0];
113
const double C1 = vertex_coordinates[10] + vertex_coordinates[7] + vertex_coordinates[4] - vertex_coordinates[1];
114
const double C2 = vertex_coordinates[11] + vertex_coordinates[8] + vertex_coordinates[5] - vertex_coordinates[2];
116
// Compute subdeterminants
117
const double d_00 = J[4]*J[8] - J[5]*J[7];
118
const double d_01 = J[5]*J[6] - J[3]*J[8];
119
const double d_02 = J[3]*J[7] - J[4]*J[6];
120
const double d_10 = J[2]*J[7] - J[1]*J[8];
121
const double d_11 = J[0]*J[8] - J[2]*J[6];
122
const double d_12 = J[1]*J[6] - J[0]*J[7];
123
const double d_20 = J[1]*J[5] - J[2]*J[4];
124
const double d_21 = J[2]*J[3] - J[0]*J[5];
125
const double d_22 = J[0]*J[4] - J[1]*J[3];
135
127
// Get coordinates and map to the reference (FIAT) element
136
double X = (d_00*(2.0*coordinates[0] - C0) + d_10*(2.0*coordinates[1] - C1) + d_20*(2.0*coordinates[2] - C2)) / detJ;
137
double Y = (d_01*(2.0*coordinates[0] - C0) + d_11*(2.0*coordinates[1] - C1) + d_21*(2.0*coordinates[2] - C2)) / detJ;
138
double Z = (d_02*(2.0*coordinates[0] - C0) + d_12*(2.0*coordinates[1] - C1) + d_22*(2.0*coordinates[2] - C2)) / detJ;
128
double X = (d_00*(2.0*x[0] - C0) + d_10*(2.0*x[1] - C1) + d_20*(2.0*x[2] - C2)) / detJ;
129
double Y = (d_01*(2.0*x[0] - C0) + d_11*(2.0*x[1] - C1) + d_21*(2.0*x[2] - C2)) / detJ;
130
double Z = (d_02*(2.0*x[0] - C0) + d_12*(2.0*x[1] - C1) + d_22*(2.0*x[2] - C2)) / detJ;
148
// Array of basisvalues.
140
// Array of basisvalues
149
141
double basisvalues[4] = {0.0, 0.0, 0.0, 0.0};
151
// Declare helper variables.
143
// Declare helper variables
152
144
double tmp0 = 0.5*(2.0 + Y + Z + 2.0*X);
154
// Compute basisvalues.
146
// Compute basisvalues
155
147
basisvalues[0] = 1.0;
156
148
basisvalues[1] = tmp0;
157
149
basisvalues[2] = 0.5*(2.0 + 3.0*Y + Z)*basisvalues[0];
269
/// Evaluate all basis functions at given point in cell
261
/// Evaluate all basis functions at given point x in cell
270
262
virtual void evaluate_basis_all(double* values,
271
const double* coordinates,
272
const ufc::cell& c) const
264
const double* vertex_coordinates,
265
int cell_orientation) const
274
267
// Helper variable to hold values of a single dof.
275
268
double dof_values = 0.0;
277
// Loop dofs and call evaluate_basis.
270
// Loop dofs and call evaluate_basis
278
271
for (unsigned int r = 0; r < 4; r++)
280
evaluate_basis(r, &dof_values, coordinates, c);
273
evaluate_basis(r, &dof_values, x, vertex_coordinates, cell_orientation);
281
274
values[r] = dof_values;
282
275
}// end loop over 'r'
285
/// Evaluate order n derivatives of basis function i at given point in cell
286
virtual void evaluate_basis_derivatives(unsigned int i,
278
/// Evaluate order n derivatives of basis function i at given point x in cell
279
virtual void evaluate_basis_derivatives(std::size_t i,
289
const double* coordinates,
290
const ufc::cell& c) const
283
const double* vertex_coordinates,
284
int cell_orientation) const
292
// Extract vertex coordinates
293
const double * const * x = c.coordinates;
295
// Compute Jacobian of affine map from reference cell
296
const double J_00 = x[1][0] - x[0][0];
297
const double J_01 = x[2][0] - x[0][0];
298
const double J_02 = x[3][0] - x[0][0];
299
const double J_10 = x[1][1] - x[0][1];
300
const double J_11 = x[2][1] - x[0][1];
301
const double J_12 = x[3][1] - x[0][1];
302
const double J_20 = x[1][2] - x[0][2];
303
const double J_21 = x[2][2] - x[0][2];
304
const double J_22 = x[3][2] - x[0][2];
306
// Compute sub determinants
307
const double d_00 = J_11*J_22 - J_12*J_21;
308
const double d_01 = J_12*J_20 - J_10*J_22;
309
const double d_02 = J_10*J_21 - J_11*J_20;
310
const double d_10 = J_02*J_21 - J_01*J_22;
311
const double d_11 = J_00*J_22 - J_02*J_20;
312
const double d_12 = J_01*J_20 - J_00*J_21;
313
const double d_20 = J_01*J_12 - J_02*J_11;
314
const double d_21 = J_02*J_10 - J_00*J_12;
315
const double d_22 = J_00*J_11 - J_01*J_10;
317
// Compute determinant of Jacobian
318
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
320
// Compute inverse of Jacobian
321
const double K_00 = d_00 / detJ;
322
const double K_01 = d_10 / detJ;
323
const double K_02 = d_20 / detJ;
324
const double K_10 = d_01 / detJ;
325
const double K_11 = d_11 / detJ;
326
const double K_12 = d_21 / detJ;
327
const double K_20 = d_02 / detJ;
328
const double K_21 = d_12 / detJ;
329
const double K_22 = d_22 / detJ;
288
compute_jacobian_tetrahedron_3d(J, vertex_coordinates);
290
// Compute Jacobian inverse and determinant
293
compute_jacobian_inverse_tetrahedron_3d(K, detJ, J);
331
296
// Compute constants
332
const double C0 = x[3][0] + x[2][0] + x[1][0] - x[0][0];
333
const double C1 = x[3][1] + x[2][1] + x[1][1] - x[0][1];
334
const double C2 = x[3][2] + x[2][2] + x[1][2] - x[0][2];
297
const double C0 = vertex_coordinates[9] + vertex_coordinates[6] + vertex_coordinates[3] - vertex_coordinates[0];
298
const double C1 = vertex_coordinates[10] + vertex_coordinates[7] + vertex_coordinates[4] - vertex_coordinates[1];
299
const double C2 = vertex_coordinates[11] + vertex_coordinates[8] + vertex_coordinates[5] - vertex_coordinates[2];
301
// Compute subdeterminants
302
const double d_00 = J[4]*J[8] - J[5]*J[7];
303
const double d_01 = J[5]*J[6] - J[3]*J[8];
304
const double d_02 = J[3]*J[7] - J[4]*J[6];
305
const double d_10 = J[2]*J[7] - J[1]*J[8];
306
const double d_11 = J[0]*J[8] - J[2]*J[6];
307
const double d_12 = J[1]*J[6] - J[0]*J[7];
308
const double d_20 = J[1]*J[5] - J[2]*J[4];
309
const double d_21 = J[2]*J[3] - J[0]*J[5];
310
const double d_22 = J[0]*J[4] - J[1]*J[3];
336
312
// Get coordinates and map to the reference (FIAT) element
337
double X = (d_00*(2.0*coordinates[0] - C0) + d_10*(2.0*coordinates[1] - C1) + d_20*(2.0*coordinates[2] - C2)) / detJ;
338
double Y = (d_01*(2.0*coordinates[0] - C0) + d_11*(2.0*coordinates[1] - C1) + d_21*(2.0*coordinates[2] - C2)) / detJ;
339
double Z = (d_02*(2.0*coordinates[0] - C0) + d_12*(2.0*coordinates[1] - C1) + d_22*(2.0*coordinates[2] - C2)) / detJ;
313
double X = (d_00*(2.0*x[0] - C0) + d_10*(2.0*x[1] - C1) + d_20*(2.0*x[2] - C2)) / detJ;
314
double Y = (d_01*(2.0*x[0] - C0) + d_11*(2.0*x[1] - C1) + d_21*(2.0*x[2] - C2)) / detJ;
315
double Z = (d_02*(2.0*x[0] - C0) + d_12*(2.0*x[1] - C1) + d_22*(2.0*x[2] - C2)) / detJ;
342
318
// Compute number of derivatives.
1134
1111
/// Evaluate linear functional for dof i on the function f
1135
virtual double evaluate_dof(unsigned int i,
1112
virtual double evaluate_dof(std::size_t i,
1136
1113
const ufc::function& f,
1114
const double* vertex_coordinates,
1115
int cell_orientation,
1137
1116
const ufc::cell& c) const
1139
// Declare variables for result of evaluation.
1118
// Declare variables for result of evaluation
1140
1119
double vals[1];
1142
// Declare variable for physical coordinates.
1121
// Declare variable for physical coordinates
1144
const double * const * x = c.coordinates;
1127
y[0] = vertex_coordinates[0];
1128
y[1] = vertex_coordinates[1];
1129
y[2] = vertex_coordinates[2];
1152
1130
f.evaluate(vals, y, c);
1153
1131
return vals[0];
1136
y[0] = vertex_coordinates[3];
1137
y[1] = vertex_coordinates[4];
1138
y[2] = vertex_coordinates[5];
1161
1139
f.evaluate(vals, y, c);
1162
1140
return vals[0];
1145
y[0] = vertex_coordinates[6];
1146
y[1] = vertex_coordinates[7];
1147
y[2] = vertex_coordinates[8];
1170
1148
f.evaluate(vals, y, c);
1171
1149
return vals[0];
1154
y[0] = vertex_coordinates[9];
1155
y[1] = vertex_coordinates[10];
1156
y[2] = vertex_coordinates[11];
1179
1157
f.evaluate(vals, y, c);
1180
1158
return vals[0];
1188
1166
/// Evaluate linear functionals for all dofs on the function f
1189
1167
virtual void evaluate_dofs(double* values,
1190
1168
const ufc::function& f,
1169
const double* vertex_coordinates,
1170
int cell_orientation,
1191
1171
const ufc::cell& c) const
1193
// Declare variables for result of evaluation.
1173
// Declare variables for result of evaluation
1194
1174
double vals[1];
1196
// Declare variable for physical coordinates.
1176
// Declare variable for physical coordinates
1198
const double * const * x = c.coordinates;
1178
y[0] = vertex_coordinates[0];
1179
y[1] = vertex_coordinates[1];
1180
y[2] = vertex_coordinates[2];
1202
1181
f.evaluate(vals, y, c);
1203
1182
values[0] = vals[0];
1183
y[0] = vertex_coordinates[3];
1184
y[1] = vertex_coordinates[4];
1185
y[2] = vertex_coordinates[5];
1207
1186
f.evaluate(vals, y, c);
1208
1187
values[1] = vals[0];
1188
y[0] = vertex_coordinates[6];
1189
y[1] = vertex_coordinates[7];
1190
y[2] = vertex_coordinates[8];
1212
1191
f.evaluate(vals, y, c);
1213
1192
values[2] = vals[0];
1193
y[0] = vertex_coordinates[9];
1194
y[1] = vertex_coordinates[10];
1195
y[2] = vertex_coordinates[11];
1217
1196
f.evaluate(vals, y, c);
1218
1197
values[3] = vals[0];
1299
1280
/// Return the topological dimension of the cell shape
1300
virtual unsigned int topological_dimension() const
1281
virtual std::size_t topological_dimension() const
1305
1286
/// Return the geometric dimension of the cell shape
1306
virtual unsigned int geometric_dimension() const
1287
virtual std::size_t geometric_dimension() const
1311
1292
/// Return the dimension of the finite element function space
1312
virtual unsigned int space_dimension() const
1293
virtual std::size_t space_dimension() const
1317
1298
/// Return the rank of the value space
1318
virtual unsigned int value_rank() const
1299
virtual std::size_t value_rank() const
1323
1304
/// Return the dimension of the value space for axis i
1324
virtual unsigned int value_dimension(unsigned int i) const
1305
virtual std::size_t value_dimension(std::size_t i) const
1338
/// Evaluate basis function i at given point in cell
1339
virtual void evaluate_basis(unsigned int i,
1319
/// Evaluate basis function i at given point x in cell
1320
virtual void evaluate_basis(std::size_t i,
1340
1321
double* values,
1341
const double* coordinates,
1342
const ufc::cell& c) const
1323
const double* vertex_coordinates,
1324
int cell_orientation) const
1344
// Extract vertex coordinates
1345
const double * const * x = c.coordinates;
1347
// Compute Jacobian of affine map from reference cell
1348
const double J_00 = x[1][0] - x[0][0];
1349
const double J_01 = x[2][0] - x[0][0];
1350
const double J_02 = x[3][0] - x[0][0];
1351
const double J_10 = x[1][1] - x[0][1];
1352
const double J_11 = x[2][1] - x[0][1];
1353
const double J_12 = x[3][1] - x[0][1];
1354
const double J_20 = x[1][2] - x[0][2];
1355
const double J_21 = x[2][2] - x[0][2];
1356
const double J_22 = x[3][2] - x[0][2];
1358
// Compute sub determinants
1359
const double d_00 = J_11*J_22 - J_12*J_21;
1360
const double d_01 = J_12*J_20 - J_10*J_22;
1361
const double d_02 = J_10*J_21 - J_11*J_20;
1362
const double d_10 = J_02*J_21 - J_01*J_22;
1363
const double d_11 = J_00*J_22 - J_02*J_20;
1364
const double d_12 = J_01*J_20 - J_00*J_21;
1365
const double d_20 = J_01*J_12 - J_02*J_11;
1366
const double d_21 = J_02*J_10 - J_00*J_12;
1367
const double d_22 = J_00*J_11 - J_01*J_10;
1369
// Compute determinant of Jacobian
1370
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
1372
// Compute inverse of Jacobian
1328
compute_jacobian_tetrahedron_3d(J, vertex_coordinates);
1330
// Compute Jacobian inverse and determinant
1333
compute_jacobian_inverse_tetrahedron_3d(K, detJ, J);
1374
1336
// Compute constants
1375
const double C0 = x[3][0] + x[2][0] + x[1][0] - x[0][0];
1376
const double C1 = x[3][1] + x[2][1] + x[1][1] - x[0][1];
1377
const double C2 = x[3][2] + x[2][2] + x[1][2] - x[0][2];
1337
const double C0 = vertex_coordinates[9] + vertex_coordinates[6] + vertex_coordinates[3] - vertex_coordinates[0];
1338
const double C1 = vertex_coordinates[10] + vertex_coordinates[7] + vertex_coordinates[4] - vertex_coordinates[1];
1339
const double C2 = vertex_coordinates[11] + vertex_coordinates[8] + vertex_coordinates[5] - vertex_coordinates[2];
1341
// Compute subdeterminants
1342
const double d_00 = J[4]*J[8] - J[5]*J[7];
1343
const double d_01 = J[5]*J[6] - J[3]*J[8];
1344
const double d_02 = J[3]*J[7] - J[4]*J[6];
1345
const double d_10 = J[2]*J[7] - J[1]*J[8];
1346
const double d_11 = J[0]*J[8] - J[2]*J[6];
1347
const double d_12 = J[1]*J[6] - J[0]*J[7];
1348
const double d_20 = J[1]*J[5] - J[2]*J[4];
1349
const double d_21 = J[2]*J[3] - J[0]*J[5];
1350
const double d_22 = J[0]*J[4] - J[1]*J[3];
1379
1352
// Get coordinates and map to the reference (FIAT) element
1380
double X = (d_00*(2.0*coordinates[0] - C0) + d_10*(2.0*coordinates[1] - C1) + d_20*(2.0*coordinates[2] - C2)) / detJ;
1381
double Y = (d_01*(2.0*coordinates[0] - C0) + d_11*(2.0*coordinates[1] - C1) + d_21*(2.0*coordinates[2] - C2)) / detJ;
1382
double Z = (d_02*(2.0*coordinates[0] - C0) + d_12*(2.0*coordinates[1] - C1) + d_22*(2.0*coordinates[2] - C2)) / detJ;
1353
double X = (d_00*(2.0*x[0] - C0) + d_10*(2.0*x[1] - C1) + d_20*(2.0*x[2] - C2)) / detJ;
1354
double Y = (d_01*(2.0*x[0] - C0) + d_11*(2.0*x[1] - C1) + d_21*(2.0*x[2] - C2)) / detJ;
1355
double Z = (d_02*(2.0*x[0] - C0) + d_12*(2.0*x[1] - C1) + d_22*(2.0*x[2] - C2)) / detJ;
1386
1359
values[0] = 0.0;
1387
1360
values[1] = 0.0;
1388
1361
values[2] = 0.0;
1755
/// Evaluate all basis functions at given point in cell
1728
/// Evaluate all basis functions at given point x in cell
1756
1729
virtual void evaluate_basis_all(double* values,
1757
const double* coordinates,
1758
const ufc::cell& c) const
1731
const double* vertex_coordinates,
1732
int cell_orientation) const
1760
1734
// Helper variable to hold values of a single dof.
1761
1735
double dof_values[3] = {0.0, 0.0, 0.0};
1763
// Loop dofs and call evaluate_basis.
1737
// Loop dofs and call evaluate_basis
1764
1738
for (unsigned int r = 0; r < 12; r++)
1766
evaluate_basis(r, dof_values, coordinates, c);
1740
evaluate_basis(r, dof_values, x, vertex_coordinates, cell_orientation);
1767
1741
for (unsigned int s = 0; s < 3; s++)
1769
1743
values[r*3 + s] = dof_values[s];
1771
1745
}// end loop over 'r'
1774
/// Evaluate order n derivatives of basis function i at given point in cell
1775
virtual void evaluate_basis_derivatives(unsigned int i,
1748
/// Evaluate order n derivatives of basis function i at given point x in cell
1749
virtual void evaluate_basis_derivatives(std::size_t i,
1777
1751
double* values,
1778
const double* coordinates,
1779
const ufc::cell& c) const
1753
const double* vertex_coordinates,
1754
int cell_orientation) const
1781
// Extract vertex coordinates
1782
const double * const * x = c.coordinates;
1784
// Compute Jacobian of affine map from reference cell
1785
const double J_00 = x[1][0] - x[0][0];
1786
const double J_01 = x[2][0] - x[0][0];
1787
const double J_02 = x[3][0] - x[0][0];
1788
const double J_10 = x[1][1] - x[0][1];
1789
const double J_11 = x[2][1] - x[0][1];
1790
const double J_12 = x[3][1] - x[0][1];
1791
const double J_20 = x[1][2] - x[0][2];
1792
const double J_21 = x[2][2] - x[0][2];
1793
const double J_22 = x[3][2] - x[0][2];
1795
// Compute sub determinants
1796
const double d_00 = J_11*J_22 - J_12*J_21;
1797
const double d_01 = J_12*J_20 - J_10*J_22;
1798
const double d_02 = J_10*J_21 - J_11*J_20;
1799
const double d_10 = J_02*J_21 - J_01*J_22;
1800
const double d_11 = J_00*J_22 - J_02*J_20;
1801
const double d_12 = J_01*J_20 - J_00*J_21;
1802
const double d_20 = J_01*J_12 - J_02*J_11;
1803
const double d_21 = J_02*J_10 - J_00*J_12;
1804
const double d_22 = J_00*J_11 - J_01*J_10;
1806
// Compute determinant of Jacobian
1807
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
1809
// Compute inverse of Jacobian
1810
const double K_00 = d_00 / detJ;
1811
const double K_01 = d_10 / detJ;
1812
const double K_02 = d_20 / detJ;
1813
const double K_10 = d_01 / detJ;
1814
const double K_11 = d_11 / detJ;
1815
const double K_12 = d_21 / detJ;
1816
const double K_20 = d_02 / detJ;
1817
const double K_21 = d_12 / detJ;
1818
const double K_22 = d_22 / detJ;
1758
compute_jacobian_tetrahedron_3d(J, vertex_coordinates);
1760
// Compute Jacobian inverse and determinant
1763
compute_jacobian_inverse_tetrahedron_3d(K, detJ, J);
1820
1766
// Compute constants
1821
const double C0 = x[3][0] + x[2][0] + x[1][0] - x[0][0];
1822
const double C1 = x[3][1] + x[2][1] + x[1][1] - x[0][1];
1823
const double C2 = x[3][2] + x[2][2] + x[1][2] - x[0][2];
1767
const double C0 = vertex_coordinates[9] + vertex_coordinates[6] + vertex_coordinates[3] - vertex_coordinates[0];
1768
const double C1 = vertex_coordinates[10] + vertex_coordinates[7] + vertex_coordinates[4] - vertex_coordinates[1];
1769
const double C2 = vertex_coordinates[11] + vertex_coordinates[8] + vertex_coordinates[5] - vertex_coordinates[2];
1771
// Compute subdeterminants
1772
const double d_00 = J[4]*J[8] - J[5]*J[7];
1773
const double d_01 = J[5]*J[6] - J[3]*J[8];
1774
const double d_02 = J[3]*J[7] - J[4]*J[6];
1775
const double d_10 = J[2]*J[7] - J[1]*J[8];
1776
const double d_11 = J[0]*J[8] - J[2]*J[6];
1777
const double d_12 = J[1]*J[6] - J[0]*J[7];
1778
const double d_20 = J[1]*J[5] - J[2]*J[4];
1779
const double d_21 = J[2]*J[3] - J[0]*J[5];
1780
const double d_22 = J[0]*J[4] - J[1]*J[3];
1825
1782
// Get coordinates and map to the reference (FIAT) element
1826
double X = (d_00*(2.0*coordinates[0] - C0) + d_10*(2.0*coordinates[1] - C1) + d_20*(2.0*coordinates[2] - C2)) / detJ;
1827
double Y = (d_01*(2.0*coordinates[0] - C0) + d_11*(2.0*coordinates[1] - C1) + d_21*(2.0*coordinates[2] - C2)) / detJ;
1828
double Z = (d_02*(2.0*coordinates[0] - C0) + d_12*(2.0*coordinates[1] - C1) + d_22*(2.0*coordinates[2] - C2)) / detJ;
1783
double X = (d_00*(2.0*x[0] - C0) + d_10*(2.0*x[1] - C1) + d_20*(2.0*x[2] - C2)) / detJ;
1784
double Y = (d_01*(2.0*x[0] - C0) + d_11*(2.0*x[1] - C1) + d_21*(2.0*x[2] - C2)) / detJ;
1785
double Z = (d_02*(2.0*x[0] - C0) + d_12*(2.0*x[1] - C1) + d_22*(2.0*x[2] - C2)) / detJ;
1831
1788
// Compute number of derivatives.
3999
3957
/// Evaluate linear functional for dof i on the function f
4000
virtual double evaluate_dof(unsigned int i,
3958
virtual double evaluate_dof(std::size_t i,
4001
3959
const ufc::function& f,
3960
const double* vertex_coordinates,
3961
int cell_orientation,
4002
3962
const ufc::cell& c) const
4004
// Declare variables for result of evaluation.
3964
// Declare variables for result of evaluation
4005
3965
double vals[3];
4007
// Declare variable for physical coordinates.
3967
// Declare variable for physical coordinates
4009
const double * const * x = c.coordinates;
3973
y[0] = vertex_coordinates[0];
3974
y[1] = vertex_coordinates[1];
3975
y[2] = vertex_coordinates[2];
4017
3976
f.evaluate(vals, y, c);
4018
3977
return vals[0];
3982
y[0] = vertex_coordinates[3];
3983
y[1] = vertex_coordinates[4];
3984
y[2] = vertex_coordinates[5];
4026
3985
f.evaluate(vals, y, c);
4027
3986
return vals[0];
3991
y[0] = vertex_coordinates[6];
3992
y[1] = vertex_coordinates[7];
3993
y[2] = vertex_coordinates[8];
4035
3994
f.evaluate(vals, y, c);
4036
3995
return vals[0];
4000
y[0] = vertex_coordinates[9];
4001
y[1] = vertex_coordinates[10];
4002
y[2] = vertex_coordinates[11];
4044
4003
f.evaluate(vals, y, c);
4045
4004
return vals[0];
4009
y[0] = vertex_coordinates[0];
4010
y[1] = vertex_coordinates[1];
4011
y[2] = vertex_coordinates[2];
4053
4012
f.evaluate(vals, y, c);
4054
4013
return vals[1];
4018
y[0] = vertex_coordinates[3];
4019
y[1] = vertex_coordinates[4];
4020
y[2] = vertex_coordinates[5];
4062
4021
f.evaluate(vals, y, c);
4063
4022
return vals[1];
4027
y[0] = vertex_coordinates[6];
4028
y[1] = vertex_coordinates[7];
4029
y[2] = vertex_coordinates[8];
4071
4030
f.evaluate(vals, y, c);
4072
4031
return vals[1];
4036
y[0] = vertex_coordinates[9];
4037
y[1] = vertex_coordinates[10];
4038
y[2] = vertex_coordinates[11];
4080
4039
f.evaluate(vals, y, c);
4081
4040
return vals[1];
4045
y[0] = vertex_coordinates[0];
4046
y[1] = vertex_coordinates[1];
4047
y[2] = vertex_coordinates[2];
4089
4048
f.evaluate(vals, y, c);
4090
4049
return vals[2];
4054
y[0] = vertex_coordinates[3];
4055
y[1] = vertex_coordinates[4];
4056
y[2] = vertex_coordinates[5];
4098
4057
f.evaluate(vals, y, c);
4099
4058
return vals[2];
4063
y[0] = vertex_coordinates[6];
4064
y[1] = vertex_coordinates[7];
4065
y[2] = vertex_coordinates[8];
4107
4066
f.evaluate(vals, y, c);
4108
4067
return vals[2];
4072
y[0] = vertex_coordinates[9];
4073
y[1] = vertex_coordinates[10];
4074
y[2] = vertex_coordinates[11];
4116
4075
f.evaluate(vals, y, c);
4117
4076
return vals[2];
4125
4084
/// Evaluate linear functionals for all dofs on the function f
4126
4085
virtual void evaluate_dofs(double* values,
4127
4086
const ufc::function& f,
4087
const double* vertex_coordinates,
4088
int cell_orientation,
4128
4089
const ufc::cell& c) const
4130
// Declare variables for result of evaluation.
4091
// Declare variables for result of evaluation
4131
4092
double vals[3];
4133
// Declare variable for physical coordinates.
4094
// Declare variable for physical coordinates
4135
const double * const * x = c.coordinates;
4096
y[0] = vertex_coordinates[0];
4097
y[1] = vertex_coordinates[1];
4098
y[2] = vertex_coordinates[2];
4139
4099
f.evaluate(vals, y, c);
4140
4100
values[0] = vals[0];
4101
y[0] = vertex_coordinates[3];
4102
y[1] = vertex_coordinates[4];
4103
y[2] = vertex_coordinates[5];
4144
4104
f.evaluate(vals, y, c);
4145
4105
values[1] = vals[0];
4106
y[0] = vertex_coordinates[6];
4107
y[1] = vertex_coordinates[7];
4108
y[2] = vertex_coordinates[8];
4149
4109
f.evaluate(vals, y, c);
4150
4110
values[2] = vals[0];
4111
y[0] = vertex_coordinates[9];
4112
y[1] = vertex_coordinates[10];
4113
y[2] = vertex_coordinates[11];
4154
4114
f.evaluate(vals, y, c);
4155
4115
values[3] = vals[0];
4116
y[0] = vertex_coordinates[0];
4117
y[1] = vertex_coordinates[1];
4118
y[2] = vertex_coordinates[2];
4159
4119
f.evaluate(vals, y, c);
4160
4120
values[4] = vals[1];
4121
y[0] = vertex_coordinates[3];
4122
y[1] = vertex_coordinates[4];
4123
y[2] = vertex_coordinates[5];
4164
4124
f.evaluate(vals, y, c);
4165
4125
values[5] = vals[1];
4126
y[0] = vertex_coordinates[6];
4127
y[1] = vertex_coordinates[7];
4128
y[2] = vertex_coordinates[8];
4169
4129
f.evaluate(vals, y, c);
4170
4130
values[6] = vals[1];
4131
y[0] = vertex_coordinates[9];
4132
y[1] = vertex_coordinates[10];
4133
y[2] = vertex_coordinates[11];
4174
4134
f.evaluate(vals, y, c);
4175
4135
values[7] = vals[1];
4136
y[0] = vertex_coordinates[0];
4137
y[1] = vertex_coordinates[1];
4138
y[2] = vertex_coordinates[2];
4179
4139
f.evaluate(vals, y, c);
4180
4140
values[8] = vals[2];
4141
y[0] = vertex_coordinates[3];
4142
y[1] = vertex_coordinates[4];
4143
y[2] = vertex_coordinates[5];
4184
4144
f.evaluate(vals, y, c);
4185
4145
values[9] = vals[2];
4146
y[0] = vertex_coordinates[6];
4147
y[1] = vertex_coordinates[7];
4148
y[2] = vertex_coordinates[8];
4189
4149
f.evaluate(vals, y, c);
4190
4150
values[10] = vals[2];
4151
y[0] = vertex_coordinates[9];
4152
y[1] = vertex_coordinates[10];
4153
y[2] = vertex_coordinates[11];
4194
4154
f.evaluate(vals, y, c);
4195
4155
values[11] = vals[2];
4333
/// Initialize dofmap for mesh (return true iff init_cell() is needed)
4334
virtual bool init_mesh(const ufc::mesh& m)
4336
_global_dimension = m.num_entities[0];
4340
/// Initialize dofmap for given cell
4341
virtual void init_cell(const ufc::mesh& m,
4347
/// Finish initialization of dofmap for cells
4348
virtual void init_cell_finalize()
4353
4292
/// Return the topological dimension of the associated cell shape
4354
virtual unsigned int topological_dimension() const
4293
virtual std::size_t topological_dimension() const
4359
4298
/// Return the geometric dimension of the associated cell shape
4360
virtual unsigned int geometric_dimension() const
4299
virtual std::size_t geometric_dimension() const
4365
4304
/// Return the dimension of the global finite element function space
4366
virtual unsigned int global_dimension() const
4305
virtual std::size_t global_dimension(const std::vector<std::size_t>&
4306
num_global_entities) const
4368
return _global_dimension;
4308
return num_global_entities[0];
4371
4311
/// Return the dimension of the local finite element function space for a cell
4372
virtual unsigned int local_dimension(const ufc::cell& c) const
4312
virtual std::size_t local_dimension(const ufc::cell& c) const
4377
4317
/// Return the maximum dimension of the local finite element function space
4378
virtual unsigned int max_local_dimension() const
4318
virtual std::size_t max_local_dimension() const
4383
4323
/// Return the number of dofs on each cell facet
4384
virtual unsigned int num_facet_dofs() const
4324
virtual std::size_t num_facet_dofs() const
4389
4329
/// Return the number of dofs associated with each cell entity of dimension d
4390
virtual unsigned int num_entity_dofs(unsigned int d) const
4330
virtual std::size_t num_entity_dofs(std::size_t d) const
4531
4471
/// Tabulate the coordinates of all dofs on a cell
4532
virtual void tabulate_coordinates(double** coordinates,
4533
const ufc::cell& c) const
4472
virtual void tabulate_coordinates(double** dof_coordinates,
4473
const double* vertex_coordinates) const
4535
const double * const * x = c.coordinates;
4537
coordinates[0][0] = x[0][0];
4538
coordinates[0][1] = x[0][1];
4539
coordinates[0][2] = x[0][2];
4540
coordinates[1][0] = x[1][0];
4541
coordinates[1][1] = x[1][1];
4542
coordinates[1][2] = x[1][2];
4543
coordinates[2][0] = x[2][0];
4544
coordinates[2][1] = x[2][1];
4545
coordinates[2][2] = x[2][2];
4546
coordinates[3][0] = x[3][0];
4547
coordinates[3][1] = x[3][1];
4548
coordinates[3][2] = x[3][2];
4475
dof_coordinates[0][0] = vertex_coordinates[0];
4476
dof_coordinates[0][1] = vertex_coordinates[1];
4477
dof_coordinates[0][2] = vertex_coordinates[2];
4478
dof_coordinates[1][0] = vertex_coordinates[3];
4479
dof_coordinates[1][1] = vertex_coordinates[4];
4480
dof_coordinates[1][2] = vertex_coordinates[5];
4481
dof_coordinates[2][0] = vertex_coordinates[6];
4482
dof_coordinates[2][1] = vertex_coordinates[7];
4483
dof_coordinates[2][2] = vertex_coordinates[8];
4484
dof_coordinates[3][0] = vertex_coordinates[9];
4485
dof_coordinates[3][1] = vertex_coordinates[10];
4486
dof_coordinates[3][2] = vertex_coordinates[11];
4551
4489
/// Return the number of sub dofmaps (for a mixed element)
4552
virtual unsigned int num_sub_dofmaps() const
4490
virtual std::size_t num_sub_dofmaps() const
4557
4495
/// Create a new dofmap for sub dofmap i (for a mixed element)
4558
virtual ufc::dofmap* create_sub_dofmap(unsigned int i) const
4496
virtual ufc::dofmap* create_sub_dofmap(std::size_t i) const
4629
/// Initialize dofmap for mesh (return true iff init_cell() is needed)
4630
virtual bool init_mesh(const ufc::mesh& m)
4632
_global_dimension = 3*m.num_entities[0];
4636
/// Initialize dofmap for given cell
4637
virtual void init_cell(const ufc::mesh& m,
4643
/// Finish initialization of dofmap for cells
4644
virtual void init_cell_finalize()
4649
4564
/// Return the topological dimension of the associated cell shape
4650
virtual unsigned int topological_dimension() const
4565
virtual std::size_t topological_dimension() const
4655
4570
/// Return the geometric dimension of the associated cell shape
4656
virtual unsigned int geometric_dimension() const
4571
virtual std::size_t geometric_dimension() const
4661
4576
/// Return the dimension of the global finite element function space
4662
virtual unsigned int global_dimension() const
4577
virtual std::size_t global_dimension(const std::vector<std::size_t>&
4578
num_global_entities) const
4664
return _global_dimension;
4580
return 3*num_global_entities[0];
4667
4583
/// Return the dimension of the local finite element function space for a cell
4668
virtual unsigned int local_dimension(const ufc::cell& c) const
4584
virtual std::size_t local_dimension(const ufc::cell& c) const
4673
4589
/// Return the maximum dimension of the local finite element function space
4674
virtual unsigned int max_local_dimension() const
4590
virtual std::size_t max_local_dimension() const
4679
4595
/// Return the number of dofs on each cell facet
4680
virtual unsigned int num_facet_dofs() const
4596
virtual std::size_t num_facet_dofs() const
4685
4601
/// Return the number of dofs associated with each cell entity of dimension d
4686
virtual unsigned int num_entity_dofs(unsigned int d) const
4602
virtual std::size_t num_entity_dofs(std::size_t d) const
4722
4638
dofs[1] = offset + c.entity_indices[0][1];
4723
4639
dofs[2] = offset + c.entity_indices[0][2];
4724
4640
dofs[3] = offset + c.entity_indices[0][3];
4725
offset += m.num_entities[0];
4641
offset += num_global_entities[0];
4726
4642
dofs[4] = offset + c.entity_indices[0][0];
4727
4643
dofs[5] = offset + c.entity_indices[0][1];
4728
4644
dofs[6] = offset + c.entity_indices[0][2];
4729
4645
dofs[7] = offset + c.entity_indices[0][3];
4730
offset += m.num_entities[0];
4646
offset += num_global_entities[0];
4731
4647
dofs[8] = offset + c.entity_indices[0][0];
4732
4648
dofs[9] = offset + c.entity_indices[0][1];
4733
4649
dofs[10] = offset + c.entity_indices[0][2];
4734
4650
dofs[11] = offset + c.entity_indices[0][3];
4735
offset += m.num_entities[0];
4651
offset += num_global_entities[0];
4738
4654
/// Tabulate the local-to-local mapping from facet dofs to cell dofs
4739
virtual void tabulate_facet_dofs(unsigned int* dofs,
4740
unsigned int facet) const
4655
virtual void tabulate_facet_dofs(std::size_t* dofs,
4656
std::size_t facet) const
4871
4787
/// Tabulate the coordinates of all dofs on a cell
4872
virtual void tabulate_coordinates(double** coordinates,
4873
const ufc::cell& c) const
4788
virtual void tabulate_coordinates(double** dof_coordinates,
4789
const double* vertex_coordinates) const
4875
const double * const * x = c.coordinates;
4877
coordinates[0][0] = x[0][0];
4878
coordinates[0][1] = x[0][1];
4879
coordinates[0][2] = x[0][2];
4880
coordinates[1][0] = x[1][0];
4881
coordinates[1][1] = x[1][1];
4882
coordinates[1][2] = x[1][2];
4883
coordinates[2][0] = x[2][0];
4884
coordinates[2][1] = x[2][1];
4885
coordinates[2][2] = x[2][2];
4886
coordinates[3][0] = x[3][0];
4887
coordinates[3][1] = x[3][1];
4888
coordinates[3][2] = x[3][2];
4889
coordinates[4][0] = x[0][0];
4890
coordinates[4][1] = x[0][1];
4891
coordinates[4][2] = x[0][2];
4892
coordinates[5][0] = x[1][0];
4893
coordinates[5][1] = x[1][1];
4894
coordinates[5][2] = x[1][2];
4895
coordinates[6][0] = x[2][0];
4896
coordinates[6][1] = x[2][1];
4897
coordinates[6][2] = x[2][2];
4898
coordinates[7][0] = x[3][0];
4899
coordinates[7][1] = x[3][1];
4900
coordinates[7][2] = x[3][2];
4901
coordinates[8][0] = x[0][0];
4902
coordinates[8][1] = x[0][1];
4903
coordinates[8][2] = x[0][2];
4904
coordinates[9][0] = x[1][0];
4905
coordinates[9][1] = x[1][1];
4906
coordinates[9][2] = x[1][2];
4907
coordinates[10][0] = x[2][0];
4908
coordinates[10][1] = x[2][1];
4909
coordinates[10][2] = x[2][2];
4910
coordinates[11][0] = x[3][0];
4911
coordinates[11][1] = x[3][1];
4912
coordinates[11][2] = x[3][2];
4791
dof_coordinates[0][0] = vertex_coordinates[0];
4792
dof_coordinates[0][1] = vertex_coordinates[1];
4793
dof_coordinates[0][2] = vertex_coordinates[2];
4794
dof_coordinates[1][0] = vertex_coordinates[3];
4795
dof_coordinates[1][1] = vertex_coordinates[4];
4796
dof_coordinates[1][2] = vertex_coordinates[5];
4797
dof_coordinates[2][0] = vertex_coordinates[6];
4798
dof_coordinates[2][1] = vertex_coordinates[7];
4799
dof_coordinates[2][2] = vertex_coordinates[8];
4800
dof_coordinates[3][0] = vertex_coordinates[9];
4801
dof_coordinates[3][1] = vertex_coordinates[10];
4802
dof_coordinates[3][2] = vertex_coordinates[11];
4803
dof_coordinates[4][0] = vertex_coordinates[0];
4804
dof_coordinates[4][1] = vertex_coordinates[1];
4805
dof_coordinates[4][2] = vertex_coordinates[2];
4806
dof_coordinates[5][0] = vertex_coordinates[3];
4807
dof_coordinates[5][1] = vertex_coordinates[4];
4808
dof_coordinates[5][2] = vertex_coordinates[5];
4809
dof_coordinates[6][0] = vertex_coordinates[6];
4810
dof_coordinates[6][1] = vertex_coordinates[7];
4811
dof_coordinates[6][2] = vertex_coordinates[8];
4812
dof_coordinates[7][0] = vertex_coordinates[9];
4813
dof_coordinates[7][1] = vertex_coordinates[10];
4814
dof_coordinates[7][2] = vertex_coordinates[11];
4815
dof_coordinates[8][0] = vertex_coordinates[0];
4816
dof_coordinates[8][1] = vertex_coordinates[1];
4817
dof_coordinates[8][2] = vertex_coordinates[2];
4818
dof_coordinates[9][0] = vertex_coordinates[3];
4819
dof_coordinates[9][1] = vertex_coordinates[4];
4820
dof_coordinates[9][2] = vertex_coordinates[5];
4821
dof_coordinates[10][0] = vertex_coordinates[6];
4822
dof_coordinates[10][1] = vertex_coordinates[7];
4823
dof_coordinates[10][2] = vertex_coordinates[8];
4824
dof_coordinates[11][0] = vertex_coordinates[9];
4825
dof_coordinates[11][1] = vertex_coordinates[10];
4826
dof_coordinates[11][2] = vertex_coordinates[11];
4915
4829
/// Return the number of sub dofmaps (for a mixed element)
4916
virtual unsigned int num_sub_dofmaps() const
4830
virtual std::size_t num_sub_dofmaps() const
4921
4835
/// Create a new dofmap for sub dofmap i (for a mixed element)
4922
virtual ufc::dofmap* create_sub_dofmap(unsigned int i) const
4836
virtual ufc::dofmap* create_sub_dofmap(std::size_t i) const
4974
4888
/// Tabulate the tensor for the contribution from a local cell
4975
4889
virtual void tabulate_tensor(double* A,
4976
4890
const double * const * w,
4977
const ufc::cell& c) const
4891
const double* vertex_coordinates,
4892
int cell_orientation) const
4979
// Extract vertex coordinates
4980
const double * const * x = c.coordinates;
4982
// Compute Jacobian of affine map from reference cell
4983
const double J_00 = x[1][0] - x[0][0];
4984
const double J_01 = x[2][0] - x[0][0];
4985
const double J_02 = x[3][0] - x[0][0];
4986
const double J_10 = x[1][1] - x[0][1];
4987
const double J_11 = x[2][1] - x[0][1];
4988
const double J_12 = x[3][1] - x[0][1];
4989
const double J_20 = x[1][2] - x[0][2];
4990
const double J_21 = x[2][2] - x[0][2];
4991
const double J_22 = x[3][2] - x[0][2];
4993
// Compute sub determinants
4994
const double d_00 = J_11*J_22 - J_12*J_21;
4995
const double d_01 = J_12*J_20 - J_10*J_22;
4996
const double d_02 = J_10*J_21 - J_11*J_20;
4997
const double d_10 = J_02*J_21 - J_01*J_22;
4998
const double d_11 = J_00*J_22 - J_02*J_20;
4999
const double d_12 = J_01*J_20 - J_00*J_21;
5000
const double d_20 = J_01*J_12 - J_02*J_11;
5001
const double d_21 = J_02*J_10 - J_00*J_12;
5002
const double d_22 = J_00*J_11 - J_01*J_10;
5004
// Compute determinant of Jacobian
5005
double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
5007
// Compute inverse of Jacobian
5008
const double K_00 = d_00 / detJ;
5009
const double K_01 = d_10 / detJ;
5010
const double K_02 = d_20 / detJ;
5011
const double K_10 = d_01 / detJ;
5012
const double K_11 = d_11 / detJ;
5013
const double K_12 = d_21 / detJ;
5014
const double K_20 = d_02 / detJ;
5015
const double K_21 = d_12 / detJ;
5016
const double K_22 = d_22 / detJ;
4896
compute_jacobian_tetrahedron_3d(J, vertex_coordinates);
4898
// Compute Jacobian inverse and determinant
4901
compute_jacobian_inverse_tetrahedron_3d(K, detJ, J);
5018
4903
// Set scale factor
5019
4904
const double det = std::abs(detJ);
5023
// Compute circumradius.
5026
// Facet Area (divide by two because 'det' is scaled by area of reference triangle).
4908
// Compute circumradius
4911
// Facet area (divide by two because 'det' is scaled by area of reference triangle)
5028
4913
// Array of quadrature weights.
5029
4914
static const double W4[4] = {0.041666667, 0.041666667, 0.041666667, 0.041666667};
5135
5020
for (unsigned int k = 0; k < 12; k++)
5137
5022
// Number of operations to compute entry: 68
5138
A[j*12 + k] += (((((K_01*FE0_C2_D100[ip][k] + K_11*FE0_C2_D010[ip][k] + K_21*FE0_C2_D001[ip][k]))*F1 + ((K_02*FE0_C2_D100[ip][k] + K_12*FE0_C2_D010[ip][k] + K_22*FE0_C2_D001[ip][k]))*F2 + ((K_00*FE0_C2_D100[ip][k] + K_10*FE0_C2_D010[ip][k] + K_20*FE0_C2_D001[ip][k]))*F0))*FE0_C2[ip][j] + ((((K_01*FE0_C0_D100[ip][k] + K_11*FE0_C0_D010[ip][k] + K_21*FE0_C0_D001[ip][k]))*F1 + ((K_02*FE0_C0_D100[ip][k] + K_12*FE0_C0_D010[ip][k] + K_22*FE0_C0_D001[ip][k]))*F2 + ((K_00*FE0_C0_D100[ip][k] + K_10*FE0_C0_D010[ip][k] + K_20*FE0_C0_D001[ip][k]))*F0))*FE0_C0[ip][j] + ((((K_00*FE0_C1_D100[ip][k] + K_10*FE0_C1_D010[ip][k] + K_20*FE0_C1_D001[ip][k]))*F0 + ((K_01*FE0_C1_D100[ip][k] + K_11*FE0_C1_D010[ip][k] + K_21*FE0_C1_D001[ip][k]))*F1 + ((K_02*FE0_C1_D100[ip][k] + K_12*FE0_C1_D010[ip][k] + K_22*FE0_C1_D001[ip][k]))*F2))*FE0_C1[ip][j])*W4[ip]*det;
5023
A[j*12 + k] += (((((K[0]*FE0_C0_D100[ip][k] + K[3]*FE0_C0_D010[ip][k] + K[6]*FE0_C0_D001[ip][k]))*F0 + ((K[1]*FE0_C0_D100[ip][k] + K[4]*FE0_C0_D010[ip][k] + K[7]*FE0_C0_D001[ip][k]))*F1 + ((K[2]*FE0_C0_D100[ip][k] + K[5]*FE0_C0_D010[ip][k] + K[8]*FE0_C0_D001[ip][k]))*F2))*FE0_C0[ip][j] + ((((K[1]*FE0_C2_D100[ip][k] + K[4]*FE0_C2_D010[ip][k] + K[7]*FE0_C2_D001[ip][k]))*F1 + ((K[0]*FE0_C2_D100[ip][k] + K[3]*FE0_C2_D010[ip][k] + K[6]*FE0_C2_D001[ip][k]))*F0 + ((K[2]*FE0_C2_D100[ip][k] + K[5]*FE0_C2_D010[ip][k] + K[8]*FE0_C2_D001[ip][k]))*F2))*FE0_C2[ip][j] + ((((K[0]*FE0_C1_D100[ip][k] + K[3]*FE0_C1_D010[ip][k] + K[6]*FE0_C1_D001[ip][k]))*F0 + ((K[1]*FE0_C1_D100[ip][k] + K[4]*FE0_C1_D010[ip][k] + K[7]*FE0_C1_D001[ip][k]))*F1 + ((K[2]*FE0_C1_D100[ip][k] + K[5]*FE0_C1_D010[ip][k] + K[8]*FE0_C1_D001[ip][k]))*F2))*FE0_C1[ip][j])*W4[ip]*det;
5139
5024
}// end loop over 'k'
5140
5025
}// end loop over 'j'
5141
5026
}// end loop over 'ip'
5144
/// Tabulate the tensor for the contribution from a local cell
5145
/// using the specified reference cell quadrature points/weights
5146
virtual void tabulate_tensor(double* A,
5147
const double * const * w,
5149
unsigned int num_quadrature_points,
5150
const double * const * quadrature_points,
5151
const double* quadrature_weights) const
5153
std::cerr << "*** FFC warning: " << "Quadrature version of tabulate_tensor not yet implemented (introduced in UFC 2.0)." << std::endl;
5158
5031
/// This class defines the interface for the assembly of the global
5189
5062
/// Return a string identifying the form
5190
5063
virtual const char* signature() const
5192
return "Form([Integral(IndexSum(Product(IndexSum(Product(Indexed(Coefficient(VectorElement('Lagrange', Cell('tetrahedron', Space(3)), 1, 3, None), 0), MultiIndex((Index(0),), {Index(0): 3})), Indexed(SpatialDerivative(Argument(VectorElement('Lagrange', Cell('tetrahedron', Space(3)), 1, 3, None), 1), MultiIndex((Index(0),), {Index(0): 3})), MultiIndex((Index(1),), {Index(1): 3}))), MultiIndex((Index(0),), {Index(0): 3})), Indexed(Argument(VectorElement('Lagrange', Cell('tetrahedron', Space(3)), 1, 3, None), 0), MultiIndex((Index(1),), {Index(1): 3}))), MultiIndex((Index(1),), {Index(1): 3})), Measure('cell', 0, None))])";
5065
return "562aab673b326bf1528829b2d9fd338b3aa2c324573441a5499c132135ac2cf3a28713f77266e32ebf3700a5ffdb8d4502f13c1ac5e7213db4dc525ac9602e4d";
5195
5068
/// Return the rank of the global tensor (r)
5196
virtual unsigned int rank() const
5069
virtual std::size_t rank() const
5201
5074
/// Return the number of coefficients (n)
5202
virtual unsigned int num_coefficients() const
5075
virtual std::size_t num_coefficients() const
5207
5080
/// Return the number of cell domains
5208
virtual unsigned int num_cell_domains() const
5081
virtual std::size_t num_cell_domains() const
5213
5086
/// Return the number of exterior facet domains
5214
virtual unsigned int num_exterior_facet_domains() const
5087
virtual std::size_t num_exterior_facet_domains() const
5219
5092
/// Return the number of interior facet domains
5220
virtual unsigned int num_interior_facet_domains() const
5093
virtual std::size_t num_interior_facet_domains() const
5098
/// Return the number of point domains
5099
virtual std::size_t num_point_domains() const
5104
/// Return whether the form has any cell integrals
5105
virtual bool has_cell_integrals() const
5110
/// Return whether the form has any exterior facet integrals
5111
virtual bool has_exterior_facet_integrals() const
5116
/// Return whether the form has any interior facet integrals
5117
virtual bool has_interior_facet_integrals() const
5122
/// Return whether the form has any point integrals
5123
virtual bool has_point_integrals() const
5225
5128
/// Create a new finite element for argument function i
5226
virtual ufc::finite_element* create_finite_element(unsigned int i) const
5129
virtual ufc::finite_element* create_finite_element(std::size_t i) const
5275
5178
/// Create a new cell integral on sub domain i
5276
virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
5179
virtual ufc::cell_integral* create_cell_integral(std::size_t i) const
5282
return new navierstokes_cell_integral_0_0();
5290
5184
/// Create a new exterior facet integral on sub domain i
5291
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
5185
virtual ufc::exterior_facet_integral* create_exterior_facet_integral(std::size_t i) const
5296
5190
/// Create a new interior facet integral on sub domain i
5297
virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
5191
virtual ufc::interior_facet_integral* create_interior_facet_integral(std::size_t i) const
5196
/// Create a new point integral on sub domain i
5197
virtual ufc::point_integral* create_point_integral(std::size_t i) const
5202
/// Create a new cell integral on everywhere else
5203
virtual ufc::cell_integral* create_default_cell_integral() const
5205
return new navierstokes_cell_integral_0_otherwise();
5208
/// Create a new exterior facet integral on everywhere else
5209
virtual ufc::exterior_facet_integral* create_default_exterior_facet_integral() const
5214
/// Create a new interior facet integral on everywhere else
5215
virtual ufc::interior_facet_integral* create_default_interior_facet_integral() const
5220
/// Create a new point integral on everywhere else
5221
virtual ufc::point_integral* create_default_point_integral() const