~ubuntu-branches/ubuntu/raring/ffc/raring

« back to all changes in this revision

Viewing changes to test/regression/references/SubDomains.h

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2010-02-03 20:22:35 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100203202235-fe8d0kajuvgy2sqn
Tags: 0.9.0-1
* New upstream release.
* debian/control: Bump Standards-Version (no changes needed).
* Update debian/copyright and debian/copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This code conforms with the UFC specification version 1.4
 
2
// and was automatically generated by FFC version 0.9.0.
 
3
 
 
4
#ifndef __SUBDOMAINS_H
 
5
#define __SUBDOMAINS_H
 
6
 
 
7
#include <cmath>
 
8
#include <stdexcept>
 
9
#include <fstream>
 
10
#include <ufc.h>
 
11
 
 
12
/// This class defines the interface for a finite element.
 
13
 
 
14
class subdomains_finite_element_0: public ufc::finite_element
 
15
{
 
16
public:
 
17
 
 
18
  /// Constructor
 
19
  subdomains_finite_element_0() : ufc::finite_element()
 
20
  {
 
21
    // Do nothing
 
22
  }
 
23
 
 
24
  /// Destructor
 
25
  virtual ~subdomains_finite_element_0()
 
26
  {
 
27
    // Do nothing
 
28
  }
 
29
 
 
30
  /// Return a string identifying the finite element
 
31
  virtual const char* signature() const
 
32
  {
 
33
    return "FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1)";
 
34
  }
 
35
 
 
36
  /// Return the cell shape
 
37
  virtual ufc::shape cell_shape() const
 
38
  {
 
39
    return ufc::tetrahedron;
 
40
  }
 
41
 
 
42
  /// Return the dimension of the finite element function space
 
43
  virtual unsigned int space_dimension() const
 
44
  {
 
45
    return 4;
 
46
  }
 
47
 
 
48
  /// Return the rank of the value space
 
49
  virtual unsigned int value_rank() const
 
50
  {
 
51
    return 0;
 
52
  }
 
53
 
 
54
  /// Return the dimension of the value space for axis i
 
55
  virtual unsigned int value_dimension(unsigned int i) const
 
56
  {
 
57
    return 1;
 
58
  }
 
59
 
 
60
  /// Evaluate basis function i at given point in cell
 
61
  virtual void evaluate_basis(unsigned int i,
 
62
                              double* values,
 
63
                              const double* coordinates,
 
64
                              const ufc::cell& c) const
 
65
  {
 
66
    // Extract vertex coordinates
 
67
    const double * const * x = c.coordinates;
 
68
    
 
69
    // Compute Jacobian of affine map from reference cell
 
70
    const double J_00 = x[1][0] - x[0][0];
 
71
    const double J_01 = x[2][0] - x[0][0];
 
72
    const double J_02 = x[3][0] - x[0][0];
 
73
    const double J_10 = x[1][1] - x[0][1];
 
74
    const double J_11 = x[2][1] - x[0][1];
 
75
    const double J_12 = x[3][1] - x[0][1];
 
76
    const double J_20 = x[1][2] - x[0][2];
 
77
    const double J_21 = x[2][2] - x[0][2];
 
78
    const double J_22 = x[3][2] - x[0][2];
 
79
    
 
80
    // Compute sub determinants
 
81
    const double d_00 = J_11*J_22 - J_12*J_21;
 
82
    const double d_01 = J_12*J_20 - J_10*J_22;
 
83
    const double d_02 = J_10*J_21 - J_11*J_20;
 
84
    const double d_10 = J_02*J_21 - J_01*J_22;
 
85
    const double d_11 = J_00*J_22 - J_02*J_20;
 
86
    const double d_12 = J_01*J_20 - J_00*J_21;
 
87
    const double d_20 = J_01*J_12 - J_02*J_11;
 
88
    const double d_21 = J_02*J_10 - J_00*J_12;
 
89
    const double d_22 = J_00*J_11 - J_01*J_10;
 
90
    
 
91
    // Compute determinant of Jacobian
 
92
    double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
 
93
    
 
94
    // Compute inverse of Jacobian
 
95
    
 
96
    // Compute constants
 
97
    const double C0 = x[3][0] + x[2][0] + x[1][0] - x[0][0];
 
98
    const double C1 = x[3][1] + x[2][1] + x[1][1] - x[0][1];
 
99
    const double C2 = x[3][2] + x[2][2] + x[1][2] - x[0][2];
 
100
    
 
101
    // Get coordinates and map to the reference (FIAT) element
 
102
    double X = (d_00*(2.0*coordinates[0] - C0) + d_10*(2.0*coordinates[1] - C1) + d_20*(2.0*coordinates[2] - C2)) / detJ;
 
103
    double Y = (d_01*(2.0*coordinates[0] - C0) + d_11*(2.0*coordinates[1] - C1) + d_21*(2.0*coordinates[2] - C2)) / detJ;
 
104
    double Z = (d_02*(2.0*coordinates[0] - C0) + d_12*(2.0*coordinates[1] - C1) + d_22*(2.0*coordinates[2] - C2)) / detJ;
 
105
    
 
106
    
 
107
    // Reset values
 
108
    *values = 0.00000000;
 
109
    
 
110
    // Map degree of freedom to element degree of freedom
 
111
    const unsigned int dof = i;
 
112
    
 
113
    // Array of basisvalues
 
114
    double basisvalues[4] = {0.00000000, 0.00000000, 0.00000000, 0.00000000};
 
115
    
 
116
    // Declare helper variables
 
117
    unsigned int rr = 0;
 
118
    unsigned int ss = 0;
 
119
    double tmp0 = 0.50000000*(2.00000000 + Y + Z + 2.00000000*X);
 
120
    
 
121
    // Compute basisvalues
 
122
    basisvalues[0] = 1.00000000;
 
123
    basisvalues[1] = tmp0;
 
124
    for (unsigned int r = 0; r < 1; r++)
 
125
    {
 
126
      rr = (r + 1)*(r + 1 + 1)*(r + 1 + 2)/6 + 1*(1 + 1)/2;
 
127
      ss = r*(r + 1)*(r + 2)/6;
 
128
      basisvalues[rr] = basisvalues[ss]*(r*(1.00000000 + Y) + (2.00000000 + Z + 3.00000000*Y)/2.00000000);
 
129
    }// end loop over 'r'
 
130
    for (unsigned int r = 0; r < 1; r++)
 
131
    {
 
132
      for (unsigned int s = 0; s < 1 - r; s++)
 
133
      {
 
134
        rr = (r + s + 1)*(r + s + 1 + 1)*(r + s + 1 + 2)/6 + (s + 1)*(s + 1 + 1)/2 + 1;
 
135
        ss = (r + s)*(r + s + 1)*(r + s + 2)/6 + s*(s + 1)/2;
 
136
        basisvalues[rr] = basisvalues[ss]*(1.00000000 + r + s + Z*(2.00000000 + r + s));
 
137
      }// end loop over 's'
 
138
    }// end loop over 'r'
 
139
    for (unsigned int r = 0; r < 2; r++)
 
140
    {
 
141
      for (unsigned int s = 0; s < 2 - r; s++)
 
142
      {
 
143
        for (unsigned int t = 0; t < 2 - r - s; t++)
 
144
        {
 
145
          rr = (r + s + t)*(r + s + t + 1)*(r + s + t + 2)/6 + (s + t)*(s + t + 1)/2 + t;
 
146
          basisvalues[rr] *= std::sqrt((0.50000000 + r)*(1.00000000 + r + s)*(1.50000000 + r + s + t));
 
147
        }// end loop over 't'
 
148
      }// end loop over 's'
 
149
    }// end loop over 'r'
 
150
    
 
151
    // Table(s) of coefficients
 
152
    static const double coefficients0[4][4] = \
 
153
    {{0.28867513, -0.18257419, -0.10540926, -0.07453560},
 
154
    {0.28867513, 0.18257419, -0.10540926, -0.07453560},
 
155
    {0.28867513, 0.00000000, 0.21081851, -0.07453560},
 
156
    {0.28867513, 0.00000000, 0.00000000, 0.22360680}};
 
157
    
 
158
    // Compute value(s).
 
159
    for (unsigned int r = 0; r < 4; r++)
 
160
    {
 
161
      *values += coefficients0[dof][r]*basisvalues[r];
 
162
    }// end loop over 'r'
 
163
  }
 
164
 
 
165
  /// Evaluate all basis functions at given point in cell
 
166
  virtual void evaluate_basis_all(double* values,
 
167
                                  const double* coordinates,
 
168
                                  const ufc::cell& c) const
 
169
  {
 
170
    // Helper variable to hold values of a single dof.
 
171
    double dof_values = 0.00000000;
 
172
    
 
173
    // Loop dofs and call evaluate_basis.
 
174
    for (unsigned int r = 0; r < 4; r++)
 
175
    {
 
176
      evaluate_basis(r, &dof_values, coordinates, c);
 
177
      values[r] = dof_values;
 
178
    }// end loop over 'r'
 
179
  }
 
180
 
 
181
  /// Evaluate order n derivatives of basis function i at given point in cell
 
182
  virtual void evaluate_basis_derivatives(unsigned int i,
 
183
                                          unsigned int n,
 
184
                                          double* values,
 
185
                                          const double* coordinates,
 
186
                                          const ufc::cell& c) const
 
187
  {
 
188
    // Extract vertex coordinates
 
189
    const double * const * x = c.coordinates;
 
190
    
 
191
    // Compute Jacobian of affine map from reference cell
 
192
    const double J_00 = x[1][0] - x[0][0];
 
193
    const double J_01 = x[2][0] - x[0][0];
 
194
    const double J_02 = x[3][0] - x[0][0];
 
195
    const double J_10 = x[1][1] - x[0][1];
 
196
    const double J_11 = x[2][1] - x[0][1];
 
197
    const double J_12 = x[3][1] - x[0][1];
 
198
    const double J_20 = x[1][2] - x[0][2];
 
199
    const double J_21 = x[2][2] - x[0][2];
 
200
    const double J_22 = x[3][2] - x[0][2];
 
201
    
 
202
    // Compute sub determinants
 
203
    const double d_00 = J_11*J_22 - J_12*J_21;
 
204
    const double d_01 = J_12*J_20 - J_10*J_22;
 
205
    const double d_02 = J_10*J_21 - J_11*J_20;
 
206
    const double d_10 = J_02*J_21 - J_01*J_22;
 
207
    const double d_11 = J_00*J_22 - J_02*J_20;
 
208
    const double d_12 = J_01*J_20 - J_00*J_21;
 
209
    const double d_20 = J_01*J_12 - J_02*J_11;
 
210
    const double d_21 = J_02*J_10 - J_00*J_12;
 
211
    const double d_22 = J_00*J_11 - J_01*J_10;
 
212
    
 
213
    // Compute determinant of Jacobian
 
214
    double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
 
215
    
 
216
    // Compute inverse of Jacobian
 
217
    const double K_00 = d_00 / detJ;
 
218
    const double K_01 = d_10 / detJ;
 
219
    const double K_02 = d_20 / detJ;
 
220
    const double K_10 = d_01 / detJ;
 
221
    const double K_11 = d_11 / detJ;
 
222
    const double K_12 = d_21 / detJ;
 
223
    const double K_20 = d_02 / detJ;
 
224
    const double K_21 = d_12 / detJ;
 
225
    const double K_22 = d_22 / detJ;
 
226
    
 
227
    // Compute constants
 
228
    const double C0 = x[3][0] + x[2][0] + x[1][0] - x[0][0];
 
229
    const double C1 = x[3][1] + x[2][1] + x[1][1] - x[0][1];
 
230
    const double C2 = x[3][2] + x[2][2] + x[1][2] - x[0][2];
 
231
    
 
232
    // Get coordinates and map to the reference (FIAT) element
 
233
    double X = (d_00*(2.0*coordinates[0] - C0) + d_10*(2.0*coordinates[1] - C1) + d_20*(2.0*coordinates[2] - C2)) / detJ;
 
234
    double Y = (d_01*(2.0*coordinates[0] - C0) + d_11*(2.0*coordinates[1] - C1) + d_21*(2.0*coordinates[2] - C2)) / detJ;
 
235
    double Z = (d_02*(2.0*coordinates[0] - C0) + d_12*(2.0*coordinates[1] - C1) + d_22*(2.0*coordinates[2] - C2)) / detJ;
 
236
    
 
237
    
 
238
    // Compute number of derivatives.
 
239
    unsigned int  num_derivatives = 1;
 
240
    
 
241
    for (unsigned int r = 0; r < n; r++)
 
242
    {
 
243
      num_derivatives *= 3;
 
244
    }// end loop over 'r'
 
245
    
 
246
    // Declare pointer to two dimensional array that holds combinations of derivatives and initialise
 
247
    unsigned int **combinations = new unsigned int *[num_derivatives];
 
248
    for (unsigned int row = 0; row < num_derivatives; row++)
 
249
    {
 
250
      combinations[row] = new unsigned int [n];
 
251
      for (unsigned int col = 0; col < n; col++)
 
252
        combinations[row][col] = 0;
 
253
    }
 
254
    
 
255
    // Generate combinations of derivatives
 
256
    for (unsigned int row = 1; row < num_derivatives; row++)
 
257
    {
 
258
      for (unsigned int num = 0; num < row; num++)
 
259
      {
 
260
        for (unsigned int col = n-1; col+1 > 0; col--)
 
261
        {
 
262
          if (combinations[row][col] + 1 > 2)
 
263
            combinations[row][col] = 0;
 
264
          else
 
265
          {
 
266
            combinations[row][col] += 1;
 
267
            break;
 
268
          }
 
269
        }
 
270
      }
 
271
    }
 
272
    
 
273
    // Compute inverse of Jacobian
 
274
    const double Jinv[3][3] = {{K_00, K_01, K_02}, {K_10, K_11, K_12}, {K_20, K_21, K_22}};
 
275
    
 
276
    // Declare transformation matrix
 
277
    // Declare pointer to two dimensional array and initialise
 
278
    double **transform = new double *[num_derivatives];
 
279
    
 
280
    for (unsigned int j = 0; j < num_derivatives; j++)
 
281
    {
 
282
      transform[j] = new double [num_derivatives];
 
283
      for (unsigned int k = 0; k < num_derivatives; k++)
 
284
        transform[j][k] = 1;
 
285
    }
 
286
    
 
287
    // Construct transformation matrix
 
288
    for (unsigned int row = 0; row < num_derivatives; row++)
 
289
    {
 
290
      for (unsigned int col = 0; col < num_derivatives; col++)
 
291
      {
 
292
        for (unsigned int k = 0; k < n; k++)
 
293
          transform[row][col] *= Jinv[combinations[col][k]][combinations[row][k]];
 
294
      }
 
295
    }
 
296
    
 
297
    // Reset values. Assuming that values is always an array.
 
298
    for (unsigned int r = 0; r < num_derivatives; r++)
 
299
    {
 
300
      values[r] = 0.00000000;
 
301
    }// end loop over 'r'
 
302
    
 
303
    // Map degree of freedom to element degree of freedom
 
304
    const unsigned int dof = i;
 
305
    
 
306
    // Array of basisvalues
 
307
    double basisvalues[4] = {0.00000000, 0.00000000, 0.00000000, 0.00000000};
 
308
    
 
309
    // Declare helper variables
 
310
    unsigned int rr = 0;
 
311
    unsigned int ss = 0;
 
312
    double tmp0 = 0.50000000*(2.00000000 + Y + Z + 2.00000000*X);
 
313
    
 
314
    // Compute basisvalues
 
315
    basisvalues[0] = 1.00000000;
 
316
    basisvalues[1] = tmp0;
 
317
    for (unsigned int r = 0; r < 1; r++)
 
318
    {
 
319
      rr = (r + 1)*(r + 1 + 1)*(r + 1 + 2)/6 + 1*(1 + 1)/2;
 
320
      ss = r*(r + 1)*(r + 2)/6;
 
321
      basisvalues[rr] = basisvalues[ss]*(r*(1.00000000 + Y) + (2.00000000 + Z + 3.00000000*Y)/2.00000000);
 
322
    }// end loop over 'r'
 
323
    for (unsigned int r = 0; r < 1; r++)
 
324
    {
 
325
      for (unsigned int s = 0; s < 1 - r; s++)
 
326
      {
 
327
        rr = (r + s + 1)*(r + s + 1 + 1)*(r + s + 1 + 2)/6 + (s + 1)*(s + 1 + 1)/2 + 1;
 
328
        ss = (r + s)*(r + s + 1)*(r + s + 2)/6 + s*(s + 1)/2;
 
329
        basisvalues[rr] = basisvalues[ss]*(1.00000000 + r + s + Z*(2.00000000 + r + s));
 
330
      }// end loop over 's'
 
331
    }// end loop over 'r'
 
332
    for (unsigned int r = 0; r < 2; r++)
 
333
    {
 
334
      for (unsigned int s = 0; s < 2 - r; s++)
 
335
      {
 
336
        for (unsigned int t = 0; t < 2 - r - s; t++)
 
337
        {
 
338
          rr = (r + s + t)*(r + s + t + 1)*(r + s + t + 2)/6 + (s + t)*(s + t + 1)/2 + t;
 
339
          basisvalues[rr] *= std::sqrt((0.50000000 + r)*(1.00000000 + r + s)*(1.50000000 + r + s + t));
 
340
        }// end loop over 't'
 
341
      }// end loop over 's'
 
342
    }// end loop over 'r'
 
343
    
 
344
    // Table(s) of coefficients
 
345
    static const double coefficients0[4][4] = \
 
346
    {{0.28867513, -0.18257419, -0.10540926, -0.07453560},
 
347
    {0.28867513, 0.18257419, -0.10540926, -0.07453560},
 
348
    {0.28867513, 0.00000000, 0.21081851, -0.07453560},
 
349
    {0.28867513, 0.00000000, 0.00000000, 0.22360680}};
 
350
    
 
351
    // Tables of derivatives of the polynomial base (transpose).
 
352
    static const double dmats0[4][4] = \
 
353
    {{0.00000000, 0.00000000, 0.00000000, 0.00000000},
 
354
    {6.32455532, 0.00000000, 0.00000000, 0.00000000},
 
355
    {0.00000000, 0.00000000, 0.00000000, 0.00000000},
 
356
    {0.00000000, 0.00000000, 0.00000000, 0.00000000}};
 
357
    
 
358
    static const double dmats1[4][4] = \
 
359
    {{0.00000000, 0.00000000, 0.00000000, 0.00000000},
 
360
    {3.16227766, 0.00000000, 0.00000000, 0.00000000},
 
361
    {5.47722558, 0.00000000, 0.00000000, 0.00000000},
 
362
    {0.00000000, 0.00000000, 0.00000000, 0.00000000}};
 
363
    
 
364
    static const double dmats2[4][4] = \
 
365
    {{0.00000000, 0.00000000, 0.00000000, 0.00000000},
 
366
    {3.16227766, 0.00000000, 0.00000000, 0.00000000},
 
367
    {1.82574186, 0.00000000, 0.00000000, 0.00000000},
 
368
    {5.16397779, 0.00000000, 0.00000000, 0.00000000}};
 
369
    
 
370
    // Compute reference derivatives
 
371
    // Declare pointer to array of derivatives on FIAT element
 
372
    double *derivatives = new double [num_derivatives];
 
373
    for (unsigned int r = 0; r < num_derivatives; r++)
 
374
    {
 
375
      derivatives[r] = 0.00000000;
 
376
    }// end loop over 'r'
 
377
    
 
378
    // Declare derivative matrix (of polynomial basis).
 
379
    double dmats[4][4] = \
 
380
    {{1.00000000, 0.00000000, 0.00000000, 0.00000000},
 
381
    {0.00000000, 1.00000000, 0.00000000, 0.00000000},
 
382
    {0.00000000, 0.00000000, 1.00000000, 0.00000000},
 
383
    {0.00000000, 0.00000000, 0.00000000, 1.00000000}};
 
384
    
 
385
    // Declare (auxiliary) derivative matrix (of polynomial basis).
 
386
    double dmats_old[4][4] = \
 
387
    {{1.00000000, 0.00000000, 0.00000000, 0.00000000},
 
388
    {0.00000000, 1.00000000, 0.00000000, 0.00000000},
 
389
    {0.00000000, 0.00000000, 1.00000000, 0.00000000},
 
390
    {0.00000000, 0.00000000, 0.00000000, 1.00000000}};
 
391
    
 
392
    // Loop possible derivatives.
 
393
    for (unsigned int r = 0; r < num_derivatives; r++)
 
394
    {
 
395
      // Resetting dmats values to compute next derivative.
 
396
      for (unsigned int t = 0; t < 4; t++)
 
397
      {
 
398
        for (unsigned int u = 0; u < 4; u++)
 
399
        {
 
400
          dmats[t][u] = 0.00000000;
 
401
          if (t == u)
 
402
          {
 
403
          dmats[t][u] = 1.00000000;
 
404
          }
 
405
          
 
406
        }// end loop over 'u'
 
407
      }// end loop over 't'
 
408
      
 
409
      // Looping derivative order to generate dmats.
 
410
      for (unsigned int s = 0; s < n; s++)
 
411
      {
 
412
        // Updating dmats_old with new values and resetting dmats.
 
413
        for (unsigned int t = 0; t < 4; t++)
 
414
        {
 
415
          for (unsigned int u = 0; u < 4; u++)
 
416
          {
 
417
            dmats_old[t][u] = dmats[t][u];
 
418
            dmats[t][u] = 0.00000000;
 
419
          }// end loop over 'u'
 
420
        }// end loop over 't'
 
421
        
 
422
        // Update dmats using an inner product.
 
423
        if (combinations[r][s] == 0)
 
424
        {
 
425
        for (unsigned int t = 0; t < 4; t++)
 
426
        {
 
427
          for (unsigned int u = 0; u < 4; u++)
 
428
          {
 
429
            for (unsigned int tu = 0; tu < 4; tu++)
 
430
            {
 
431
              dmats[t][u] += dmats0[t][tu]*dmats_old[tu][u];
 
432
            }// end loop over 'tu'
 
433
          }// end loop over 'u'
 
434
        }// end loop over 't'
 
435
        }
 
436
        
 
437
        if (combinations[r][s] == 1)
 
438
        {
 
439
        for (unsigned int t = 0; t < 4; t++)
 
440
        {
 
441
          for (unsigned int u = 0; u < 4; u++)
 
442
          {
 
443
            for (unsigned int tu = 0; tu < 4; tu++)
 
444
            {
 
445
              dmats[t][u] += dmats1[t][tu]*dmats_old[tu][u];
 
446
            }// end loop over 'tu'
 
447
          }// end loop over 'u'
 
448
        }// end loop over 't'
 
449
        }
 
450
        
 
451
        if (combinations[r][s] == 2)
 
452
        {
 
453
        for (unsigned int t = 0; t < 4; t++)
 
454
        {
 
455
          for (unsigned int u = 0; u < 4; u++)
 
456
          {
 
457
            for (unsigned int tu = 0; tu < 4; tu++)
 
458
            {
 
459
              dmats[t][u] += dmats2[t][tu]*dmats_old[tu][u];
 
460
            }// end loop over 'tu'
 
461
          }// end loop over 'u'
 
462
        }// end loop over 't'
 
463
        }
 
464
        
 
465
      }// end loop over 's'
 
466
      for (unsigned int s = 0; s < 4; s++)
 
467
      {
 
468
        for (unsigned int t = 0; t < 4; t++)
 
469
        {
 
470
          derivatives[r] += coefficients0[dof][s]*dmats[s][t]*basisvalues[t];
 
471
        }// end loop over 't'
 
472
      }// end loop over 's'
 
473
    }// end loop over 'r'
 
474
    
 
475
    // Transform derivatives back to physical element
 
476
    for (unsigned int row = 0; row < num_derivatives; row++)
 
477
    {
 
478
      for (unsigned int col = 0; col < num_derivatives; col++)
 
479
      {
 
480
        values[row] += transform[row][col]*derivatives[col];
 
481
      }
 
482
    }
 
483
    
 
484
    // Delete pointer to array of derivatives on FIAT element
 
485
    delete [] derivatives;
 
486
    
 
487
    // Delete pointer to array of combinations of derivatives and transform
 
488
    for (unsigned int r = 0; r < num_derivatives; r++)
 
489
    {
 
490
      delete [] combinations[r];
 
491
      delete [] transform[r];
 
492
    }// end loop over 'r'
 
493
    delete [] combinations;
 
494
    delete [] transform;
 
495
  }
 
496
 
 
497
  /// Evaluate order n derivatives of all basis functions at given point in cell
 
498
  virtual void evaluate_basis_derivatives_all(unsigned int n,
 
499
                                              double* values,
 
500
                                              const double* coordinates,
 
501
                                              const ufc::cell& c) const
 
502
  {
 
503
    // Compute number of derivatives.
 
504
    unsigned int  num_derivatives = 1;
 
505
    
 
506
    for (unsigned int r = 0; r < n; r++)
 
507
    {
 
508
      num_derivatives *= 3;
 
509
    }// end loop over 'r'
 
510
    
 
511
    // Helper variable to hold values of a single dof.
 
512
    double *dof_values = new double [num_derivatives];
 
513
    for (unsigned int r = 0; r < num_derivatives; r++)
 
514
    {
 
515
      dof_values[r] = 0.00000000;
 
516
    }// end loop over 'r'
 
517
    
 
518
    // Loop dofs and call evaluate_basis_derivatives.
 
519
    for (unsigned int r = 0; r < 4; r++)
 
520
    {
 
521
      evaluate_basis_derivatives(r, n, dof_values, coordinates, c);
 
522
      for (unsigned int s = 0; s < num_derivatives; s++)
 
523
      {
 
524
        values[r*num_derivatives + s] = dof_values[s];
 
525
      }// end loop over 's'
 
526
    }// end loop over 'r'
 
527
    
 
528
    // Delete pointer.
 
529
    delete [] dof_values;
 
530
  }
 
531
 
 
532
  /// Evaluate linear functional for dof i on the function f
 
533
  virtual double evaluate_dof(unsigned int i,
 
534
                              const ufc::function& f,
 
535
                              const ufc::cell& c) const
 
536
  {
 
537
    // Declare variables for result of evaluation
 
538
    double vals[1];
 
539
    
 
540
    // Declare variable for physical coordinates
 
541
    double y[3];
 
542
    
 
543
    const double * const * x = c.coordinates;
 
544
    switch (i)
 
545
    {
 
546
    case 0:
 
547
      {
 
548
        y[0] = x[0][0];
 
549
      y[1] = x[0][1];
 
550
      y[2] = x[0][2];
 
551
      f.evaluate(vals, y, c);
 
552
      return vals[0];
 
553
        break;
 
554
      }
 
555
    case 1:
 
556
      {
 
557
        y[0] = x[1][0];
 
558
      y[1] = x[1][1];
 
559
      y[2] = x[1][2];
 
560
      f.evaluate(vals, y, c);
 
561
      return vals[0];
 
562
        break;
 
563
      }
 
564
    case 2:
 
565
      {
 
566
        y[0] = x[2][0];
 
567
      y[1] = x[2][1];
 
568
      y[2] = x[2][2];
 
569
      f.evaluate(vals, y, c);
 
570
      return vals[0];
 
571
        break;
 
572
      }
 
573
    case 3:
 
574
      {
 
575
        y[0] = x[3][0];
 
576
      y[1] = x[3][1];
 
577
      y[2] = x[3][2];
 
578
      f.evaluate(vals, y, c);
 
579
      return vals[0];
 
580
        break;
 
581
      }
 
582
    }
 
583
    
 
584
    return 0.0;
 
585
  }
 
586
 
 
587
  /// Evaluate linear functionals for all dofs on the function f
 
588
  virtual void evaluate_dofs(double* values,
 
589
                             const ufc::function& f,
 
590
                             const ufc::cell& c) const
 
591
  {
 
592
    // Declare variables for result of evaluation
 
593
    double vals[1];
 
594
    
 
595
    // Declare variable for physical coordinates
 
596
    double y[3];
 
597
    
 
598
    const double * const * x = c.coordinates;
 
599
    y[0] = x[0][0];
 
600
    y[1] = x[0][1];
 
601
    y[2] = x[0][2];
 
602
    f.evaluate(vals, y, c);
 
603
    values[0] = vals[0];
 
604
    y[0] = x[1][0];
 
605
    y[1] = x[1][1];
 
606
    y[2] = x[1][2];
 
607
    f.evaluate(vals, y, c);
 
608
    values[1] = vals[0];
 
609
    y[0] = x[2][0];
 
610
    y[1] = x[2][1];
 
611
    y[2] = x[2][2];
 
612
    f.evaluate(vals, y, c);
 
613
    values[2] = vals[0];
 
614
    y[0] = x[3][0];
 
615
    y[1] = x[3][1];
 
616
    y[2] = x[3][2];
 
617
    f.evaluate(vals, y, c);
 
618
    values[3] = vals[0];
 
619
  }
 
620
 
 
621
  /// Interpolate vertex values from dof values
 
622
  virtual void interpolate_vertex_values(double* vertex_values,
 
623
                                         const double* dof_values,
 
624
                                         const ufc::cell& c) const
 
625
  {
 
626
    // Evaluate function and change variables
 
627
    vertex_values[0] = dof_values[0];
 
628
    vertex_values[1] = dof_values[1];
 
629
    vertex_values[2] = dof_values[2];
 
630
    vertex_values[3] = dof_values[3];
 
631
  }
 
632
 
 
633
  /// Return the number of sub elements (for a mixed element)
 
634
  virtual unsigned int num_sub_elements() const
 
635
  {
 
636
    return 0;
 
637
  }
 
638
 
 
639
  /// Create a new finite element for sub element i (for a mixed element)
 
640
  virtual ufc::finite_element* create_sub_element(unsigned int i) const
 
641
  {
 
642
    return 0;
 
643
  }
 
644
 
 
645
};
 
646
 
 
647
/// This class defines the interface for a local-to-global mapping of
 
648
/// degrees of freedom (dofs).
 
649
 
 
650
class subdomains_dof_map_0: public ufc::dof_map
 
651
{
 
652
private:
 
653
 
 
654
  unsigned int _global_dimension;
 
655
 
 
656
public:
 
657
 
 
658
  /// Constructor
 
659
  subdomains_dof_map_0() : ufc::dof_map()
 
660
  {
 
661
    _global_dimension = 0;
 
662
  }
 
663
 
 
664
  /// Destructor
 
665
  virtual ~subdomains_dof_map_0()
 
666
  {
 
667
    // Do nothing
 
668
  }
 
669
 
 
670
  /// Return a string identifying the dof map
 
671
  virtual const char* signature() const
 
672
  {
 
673
    return "FFC dofmap for FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1)";
 
674
  }
 
675
 
 
676
  /// Return true iff mesh entities of topological dimension d are needed
 
677
  virtual bool needs_mesh_entities(unsigned int d) const
 
678
  {
 
679
    switch (d)
 
680
    {
 
681
    case 0:
 
682
      {
 
683
        return true;
 
684
        break;
 
685
      }
 
686
    case 1:
 
687
      {
 
688
        return false;
 
689
        break;
 
690
      }
 
691
    case 2:
 
692
      {
 
693
        return false;
 
694
        break;
 
695
      }
 
696
    case 3:
 
697
      {
 
698
        return false;
 
699
        break;
 
700
      }
 
701
    }
 
702
    
 
703
    return false;
 
704
  }
 
705
 
 
706
  /// Initialize dof map for mesh (return true iff init_cell() is needed)
 
707
  virtual bool init_mesh(const ufc::mesh& m)
 
708
  {
 
709
    _global_dimension = m.num_entities[0];
 
710
    return false;
 
711
  }
 
712
 
 
713
  /// Initialize dof map for given cell
 
714
  virtual void init_cell(const ufc::mesh& m,
 
715
                         const ufc::cell& c)
 
716
  {
 
717
    // Do nothing
 
718
  }
 
719
 
 
720
  /// Finish initialization of dof map for cells
 
721
  virtual void init_cell_finalize()
 
722
  {
 
723
    // Do nothing
 
724
  }
 
725
 
 
726
  /// Return the dimension of the global finite element function space
 
727
  virtual unsigned int global_dimension() const
 
728
  {
 
729
    return _global_dimension;
 
730
  }
 
731
 
 
732
  /// Return the dimension of the local finite element function space for a cell
 
733
  virtual unsigned int local_dimension(const ufc::cell& c) const
 
734
  {
 
735
    return 4;
 
736
  }
 
737
 
 
738
  /// Return the maximum dimension of the local finite element function space
 
739
  virtual unsigned int max_local_dimension() const
 
740
  {
 
741
    return 4;
 
742
  }
 
743
 
 
744
  // Return the geometric dimension of the coordinates this dof map provides
 
745
  virtual unsigned int geometric_dimension() const
 
746
  {
 
747
    return 3;
 
748
  }
 
749
 
 
750
  /// Return the number of dofs on each cell facet
 
751
  virtual unsigned int num_facet_dofs() const
 
752
  {
 
753
    return 3;
 
754
  }
 
755
 
 
756
  /// Return the number of dofs associated with each cell entity of dimension d
 
757
  virtual unsigned int num_entity_dofs(unsigned int d) const
 
758
  {
 
759
    switch (d)
 
760
    {
 
761
    case 0:
 
762
      {
 
763
        return 1;
 
764
        break;
 
765
      }
 
766
    case 1:
 
767
      {
 
768
        return 0;
 
769
        break;
 
770
      }
 
771
    case 2:
 
772
      {
 
773
        return 0;
 
774
        break;
 
775
      }
 
776
    case 3:
 
777
      {
 
778
        return 0;
 
779
        break;
 
780
      }
 
781
    }
 
782
    
 
783
    return 0;
 
784
  }
 
785
 
 
786
  /// Tabulate the local-to-global mapping of dofs on a cell
 
787
  virtual void tabulate_dofs(unsigned int* dofs,
 
788
                             const ufc::mesh& m,
 
789
                             const ufc::cell& c) const
 
790
  {
 
791
    dofs[0] = c.entity_indices[0][0];
 
792
    dofs[1] = c.entity_indices[0][1];
 
793
    dofs[2] = c.entity_indices[0][2];
 
794
    dofs[3] = c.entity_indices[0][3];
 
795
  }
 
796
 
 
797
  /// Tabulate the local-to-local mapping from facet dofs to cell dofs
 
798
  virtual void tabulate_facet_dofs(unsigned int* dofs,
 
799
                                   unsigned int facet) const
 
800
  {
 
801
    switch (facet)
 
802
    {
 
803
    case 0:
 
804
      {
 
805
        dofs[0] = 1;
 
806
      dofs[1] = 2;
 
807
      dofs[2] = 3;
 
808
        break;
 
809
      }
 
810
    case 1:
 
811
      {
 
812
        dofs[0] = 0;
 
813
      dofs[1] = 2;
 
814
      dofs[2] = 3;
 
815
        break;
 
816
      }
 
817
    case 2:
 
818
      {
 
819
        dofs[0] = 0;
 
820
      dofs[1] = 1;
 
821
      dofs[2] = 3;
 
822
        break;
 
823
      }
 
824
    case 3:
 
825
      {
 
826
        dofs[0] = 0;
 
827
      dofs[1] = 1;
 
828
      dofs[2] = 2;
 
829
        break;
 
830
      }
 
831
    }
 
832
    
 
833
  }
 
834
 
 
835
  /// Tabulate the local-to-local mapping of dofs on entity (d, i)
 
836
  virtual void tabulate_entity_dofs(unsigned int* dofs,
 
837
                                    unsigned int d, unsigned int i) const
 
838
  {
 
839
    if (d > 3)
 
840
    {
 
841
    std::cerr << "*** FFC warning: " << "d is larger than dimension (3)" << std::endl;
 
842
    }
 
843
    
 
844
    switch (d)
 
845
    {
 
846
    case 0:
 
847
      {
 
848
        if (i > 3)
 
849
      {
 
850
      std::cerr << "*** FFC warning: " << "i is larger than number of entities (3)" << std::endl;
 
851
      }
 
852
      
 
853
      switch (i)
 
854
      {
 
855
      case 0:
 
856
        {
 
857
          dofs[0] = 0;
 
858
          break;
 
859
        }
 
860
      case 1:
 
861
        {
 
862
          dofs[0] = 1;
 
863
          break;
 
864
        }
 
865
      case 2:
 
866
        {
 
867
          dofs[0] = 2;
 
868
          break;
 
869
        }
 
870
      case 3:
 
871
        {
 
872
          dofs[0] = 3;
 
873
          break;
 
874
        }
 
875
      }
 
876
      
 
877
        break;
 
878
      }
 
879
    case 1:
 
880
      {
 
881
        
 
882
        break;
 
883
      }
 
884
    case 2:
 
885
      {
 
886
        
 
887
        break;
 
888
      }
 
889
    case 3:
 
890
      {
 
891
        
 
892
        break;
 
893
      }
 
894
    }
 
895
    
 
896
  }
 
897
 
 
898
  /// Tabulate the coordinates of all dofs on a cell
 
899
  virtual void tabulate_coordinates(double** coordinates,
 
900
                                    const ufc::cell& c) const
 
901
  {
 
902
    const double * const * x = c.coordinates;
 
903
    
 
904
    coordinates[0][0] = x[0][0];
 
905
    coordinates[0][1] = x[0][1];
 
906
    coordinates[0][2] = x[0][2];
 
907
    coordinates[1][0] = x[1][0];
 
908
    coordinates[1][1] = x[1][1];
 
909
    coordinates[1][2] = x[1][2];
 
910
    coordinates[2][0] = x[2][0];
 
911
    coordinates[2][1] = x[2][1];
 
912
    coordinates[2][2] = x[2][2];
 
913
    coordinates[3][0] = x[3][0];
 
914
    coordinates[3][1] = x[3][1];
 
915
    coordinates[3][2] = x[3][2];
 
916
  }
 
917
 
 
918
  /// Return the number of sub dof maps (for a mixed element)
 
919
  virtual unsigned int num_sub_dof_maps() const
 
920
  {
 
921
    return 0;
 
922
  }
 
923
 
 
924
  /// Create a new dof_map for sub dof map i (for a mixed element)
 
925
  virtual ufc::dof_map* create_sub_dof_map(unsigned int i) const
 
926
  {
 
927
    return 0;
 
928
  }
 
929
 
 
930
};
 
931
 
 
932
/// This class defines the interface for the tabulation of the cell
 
933
/// tensor corresponding to the local contribution to a form from
 
934
/// the integral over a cell.
 
935
 
 
936
class subdomains_cell_integral_0_0: public ufc::cell_integral
 
937
{
 
938
public:
 
939
 
 
940
  /// Constructor
 
941
  subdomains_cell_integral_0_0() : ufc::cell_integral()
 
942
  {
 
943
    // Do nothing
 
944
  }
 
945
 
 
946
  /// Destructor
 
947
  virtual ~subdomains_cell_integral_0_0()
 
948
  {
 
949
    // Do nothing
 
950
  }
 
951
 
 
952
  /// Tabulate the tensor for the contribution from a local cell
 
953
  virtual void tabulate_tensor(double* A,
 
954
                               const double * const * w,
 
955
                               const ufc::cell& c) const
 
956
  {
 
957
    // Number of operations (multiply-add pairs) for Jacobian data:      32
 
958
    // Number of operations (multiply-add pairs) for geometry tensor:    0
 
959
    // Number of operations (multiply-add pairs) for tensor contraction: 8
 
960
    // Total number of operations (multiply-add pairs):                  40
 
961
    
 
962
    // Extract vertex coordinates
 
963
    const double * const * x = c.coordinates;
 
964
    
 
965
    // Compute Jacobian of affine map from reference cell
 
966
    const double J_00 = x[1][0] - x[0][0];
 
967
    const double J_01 = x[2][0] - x[0][0];
 
968
    const double J_02 = x[3][0] - x[0][0];
 
969
    const double J_10 = x[1][1] - x[0][1];
 
970
    const double J_11 = x[2][1] - x[0][1];
 
971
    const double J_12 = x[3][1] - x[0][1];
 
972
    const double J_20 = x[1][2] - x[0][2];
 
973
    const double J_21 = x[2][2] - x[0][2];
 
974
    const double J_22 = x[3][2] - x[0][2];
 
975
    
 
976
    // Compute sub determinants
 
977
    const double d_00 = J_11*J_22 - J_12*J_21;
 
978
    const double d_10 = J_02*J_21 - J_01*J_22;
 
979
    const double d_20 = J_01*J_12 - J_02*J_11;
 
980
    
 
981
    // Compute determinant of Jacobian
 
982
    double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
 
983
    
 
984
    // Compute inverse of Jacobian
 
985
    
 
986
    // Set scale factor
 
987
    const double det = std::abs(detJ);
 
988
    
 
989
    // Compute geometry tensor
 
990
    const double G0_ = det;
 
991
    
 
992
    // Compute element tensor
 
993
    A[0] = 0.01666667*G0_;
 
994
    A[1] = 0.00833333*G0_;
 
995
    A[2] = 0.00833333*G0_;
 
996
    A[3] = 0.00833333*G0_;
 
997
    A[4] = 0.00833333*G0_;
 
998
    A[5] = 0.01666667*G0_;
 
999
    A[6] = 0.00833333*G0_;
 
1000
    A[7] = 0.00833333*G0_;
 
1001
    A[8] = 0.00833333*G0_;
 
1002
    A[9] = 0.00833333*G0_;
 
1003
    A[10] = 0.01666667*G0_;
 
1004
    A[11] = 0.00833333*G0_;
 
1005
    A[12] = 0.00833333*G0_;
 
1006
    A[13] = 0.00833333*G0_;
 
1007
    A[14] = 0.00833333*G0_;
 
1008
    A[15] = 0.01666667*G0_;
 
1009
  }
 
1010
 
 
1011
};
 
1012
 
 
1013
/// This class defines the interface for the tabulation of the cell
 
1014
/// tensor corresponding to the local contribution to a form from
 
1015
/// the integral over a cell.
 
1016
 
 
1017
class subdomains_cell_integral_0_1: public ufc::cell_integral
 
1018
{
 
1019
public:
 
1020
 
 
1021
  /// Constructor
 
1022
  subdomains_cell_integral_0_1() : ufc::cell_integral()
 
1023
  {
 
1024
    // Do nothing
 
1025
  }
 
1026
 
 
1027
  /// Destructor
 
1028
  virtual ~subdomains_cell_integral_0_1()
 
1029
  {
 
1030
    // Do nothing
 
1031
  }
 
1032
 
 
1033
  /// Tabulate the tensor for the contribution from a local cell
 
1034
  virtual void tabulate_tensor(double* A,
 
1035
                               const double * const * w,
 
1036
                               const ufc::cell& c) const
 
1037
  {
 
1038
    // Number of operations (multiply-add pairs) for Jacobian data:      32
 
1039
    // Number of operations (multiply-add pairs) for geometry tensor:    0
 
1040
    // Number of operations (multiply-add pairs) for tensor contraction: 8
 
1041
    // Total number of operations (multiply-add pairs):                  40
 
1042
    
 
1043
    // Extract vertex coordinates
 
1044
    const double * const * x = c.coordinates;
 
1045
    
 
1046
    // Compute Jacobian of affine map from reference cell
 
1047
    const double J_00 = x[1][0] - x[0][0];
 
1048
    const double J_01 = x[2][0] - x[0][0];
 
1049
    const double J_02 = x[3][0] - x[0][0];
 
1050
    const double J_10 = x[1][1] - x[0][1];
 
1051
    const double J_11 = x[2][1] - x[0][1];
 
1052
    const double J_12 = x[3][1] - x[0][1];
 
1053
    const double J_20 = x[1][2] - x[0][2];
 
1054
    const double J_21 = x[2][2] - x[0][2];
 
1055
    const double J_22 = x[3][2] - x[0][2];
 
1056
    
 
1057
    // Compute sub determinants
 
1058
    const double d_00 = J_11*J_22 - J_12*J_21;
 
1059
    const double d_10 = J_02*J_21 - J_01*J_22;
 
1060
    const double d_20 = J_01*J_12 - J_02*J_11;
 
1061
    
 
1062
    // Compute determinant of Jacobian
 
1063
    double detJ = J_00*d_00 + J_10*d_10 + J_20*d_20;
 
1064
    
 
1065
    // Compute inverse of Jacobian
 
1066
    
 
1067
    // Set scale factor
 
1068
    const double det = std::abs(detJ);
 
1069
    
 
1070
    // Compute geometry tensor
 
1071
    const double G0_ = det;
 
1072
    
 
1073
    // Compute element tensor
 
1074
    A[0] = 0.16666667*G0_;
 
1075
    A[1] = 0.08333333*G0_;
 
1076
    A[2] = 0.08333333*G0_;
 
1077
    A[3] = 0.08333333*G0_;
 
1078
    A[4] = 0.08333333*G0_;
 
1079
    A[5] = 0.16666667*G0_;
 
1080
    A[6] = 0.08333333*G0_;
 
1081
    A[7] = 0.08333333*G0_;
 
1082
    A[8] = 0.08333333*G0_;
 
1083
    A[9] = 0.08333333*G0_;
 
1084
    A[10] = 0.16666667*G0_;
 
1085
    A[11] = 0.08333333*G0_;
 
1086
    A[12] = 0.08333333*G0_;
 
1087
    A[13] = 0.08333333*G0_;
 
1088
    A[14] = 0.08333333*G0_;
 
1089
    A[15] = 0.16666667*G0_;
 
1090
  }
 
1091
 
 
1092
};
 
1093
 
 
1094
/// This class defines the interface for the tabulation of the
 
1095
/// exterior facet tensor corresponding to the local contribution to
 
1096
/// a form from the integral over an exterior facet.
 
1097
 
 
1098
class subdomains_exterior_facet_integral_0_0: public ufc::exterior_facet_integral
 
1099
{
 
1100
public:
 
1101
 
 
1102
  /// Constructor
 
1103
  subdomains_exterior_facet_integral_0_0() : ufc::exterior_facet_integral()
 
1104
  {
 
1105
    // Do nothing
 
1106
  }
 
1107
 
 
1108
  /// Destructor
 
1109
  virtual ~subdomains_exterior_facet_integral_0_0()
 
1110
  {
 
1111
    // Do nothing
 
1112
  }
 
1113
 
 
1114
  /// Tabulate the tensor for the contribution from a local exterior facet
 
1115
  virtual void tabulate_tensor(double* A,
 
1116
                               const double * const * w,
 
1117
                               const ufc::cell& c,
 
1118
                               unsigned int facet) const
 
1119
  {
 
1120
    // Number of operations (multiply-add pairs) for Jacobian data:      52
 
1121
    // Number of operations (multiply-add pairs) for geometry tensor:    0
 
1122
    // Number of operations (multiply-add pairs) for tensor contraction: 18
 
1123
    // Total number of operations (multiply-add pairs):                  70
 
1124
    
 
1125
    // Extract vertex coordinates
 
1126
    const double * const * x = c.coordinates;
 
1127
    
 
1128
    // Compute Jacobian of affine map from reference cell
 
1129
    
 
1130
    // Compute sub determinants
 
1131
    
 
1132
    // Compute determinant of Jacobian
 
1133
    
 
1134
    // Compute inverse of Jacobian
 
1135
    
 
1136
    // Get vertices on face
 
1137
    static unsigned int face_vertices[4][3] = {{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}};
 
1138
    const unsigned int v0 = face_vertices[facet][0];
 
1139
    const unsigned int v1 = face_vertices[facet][1];
 
1140
    const unsigned int v2 = face_vertices[facet][2];
 
1141
    
 
1142
    // Compute scale factor (area of face scaled by area of reference triangle)
 
1143
    const double a0 = (x[v0][1]*x[v1][2]
 
1144
                     + x[v0][2]*x[v2][1]
 
1145
                     + x[v1][1]*x[v2][2])
 
1146
                    - (x[v2][1]*x[v1][2]
 
1147
                     + x[v2][2]*x[v0][1]
 
1148
                     + x[v1][1]*x[v0][2]);
 
1149
    
 
1150
    const double a1 = (x[v0][2]*x[v1][0]
 
1151
                     + x[v0][0]*x[v2][2]
 
1152
                     + x[v1][2]*x[v2][0])
 
1153
                    - (x[v2][2]*x[v1][0]
 
1154
                     + x[v2][0]*x[v0][2]
 
1155
                    + x[v1][2]*x[v0][0]);
 
1156
    
 
1157
    const double a2 = (x[v0][0]*x[v1][1]
 
1158
                     + x[v0][1]*x[v2][0]
 
1159
                     + x[v1][0]*x[v2][1])
 
1160
                    - (x[v2][0]*x[v1][1]
 
1161
                     + x[v2][1]*x[v0][0]
 
1162
                     + x[v1][0]*x[v0][1]);
 
1163
    
 
1164
    const double det = std::sqrt(a0*a0 + a1*a1 + a2*a2);
 
1165
    
 
1166
    // Compute geometry tensor
 
1167
    const double G0_ = det;
 
1168
    
 
1169
    // Compute element tensor
 
1170
    switch (facet)
 
1171
    {
 
1172
    case 0:
 
1173
      {
 
1174
        A[0] = 0.00000000;
 
1175
      A[1] = 0.00000000;
 
1176
      A[2] = 0.00000000;
 
1177
      A[3] = 0.00000000;
 
1178
      A[4] = 0.00000000;
 
1179
      A[5] = 0.08333333*G0_;
 
1180
      A[6] = 0.04166667*G0_;
 
1181
      A[7] = 0.04166667*G0_;
 
1182
      A[8] = 0.00000000;
 
1183
      A[9] = 0.04166667*G0_;
 
1184
      A[10] = 0.08333333*G0_;
 
1185
      A[11] = 0.04166667*G0_;
 
1186
      A[12] = 0.00000000;
 
1187
      A[13] = 0.04166667*G0_;
 
1188
      A[14] = 0.04166667*G0_;
 
1189
      A[15] = 0.08333333*G0_;
 
1190
        break;
 
1191
      }
 
1192
    case 1:
 
1193
      {
 
1194
        A[0] = 0.08333333*G0_;
 
1195
      A[1] = 0.00000000;
 
1196
      A[2] = 0.04166667*G0_;
 
1197
      A[3] = 0.04166667*G0_;
 
1198
      A[4] = 0.00000000;
 
1199
      A[5] = 0.00000000;
 
1200
      A[6] = 0.00000000;
 
1201
      A[7] = 0.00000000;
 
1202
      A[8] = 0.04166667*G0_;
 
1203
      A[9] = 0.00000000;
 
1204
      A[10] = 0.08333333*G0_;
 
1205
      A[11] = 0.04166667*G0_;
 
1206
      A[12] = 0.04166667*G0_;
 
1207
      A[13] = 0.00000000;
 
1208
      A[14] = 0.04166667*G0_;
 
1209
      A[15] = 0.08333333*G0_;
 
1210
        break;
 
1211
      }
 
1212
    case 2:
 
1213
      {
 
1214
        A[0] = 0.08333333*G0_;
 
1215
      A[1] = 0.04166667*G0_;
 
1216
      A[2] = 0.00000000;
 
1217
      A[3] = 0.04166667*G0_;
 
1218
      A[4] = 0.04166667*G0_;
 
1219
      A[5] = 0.08333333*G0_;
 
1220
      A[6] = 0.00000000;
 
1221
      A[7] = 0.04166667*G0_;
 
1222
      A[8] = 0.00000000;
 
1223
      A[9] = 0.00000000;
 
1224
      A[10] = 0.00000000;
 
1225
      A[11] = 0.00000000;
 
1226
      A[12] = 0.04166667*G0_;
 
1227
      A[13] = 0.04166667*G0_;
 
1228
      A[14] = 0.00000000;
 
1229
      A[15] = 0.08333333*G0_;
 
1230
        break;
 
1231
      }
 
1232
    case 3:
 
1233
      {
 
1234
        A[0] = 0.08333333*G0_;
 
1235
      A[1] = 0.04166667*G0_;
 
1236
      A[2] = 0.04166667*G0_;
 
1237
      A[3] = 0.00000000;
 
1238
      A[4] = 0.04166667*G0_;
 
1239
      A[5] = 0.08333333*G0_;
 
1240
      A[6] = 0.04166667*G0_;
 
1241
      A[7] = 0.00000000;
 
1242
      A[8] = 0.04166667*G0_;
 
1243
      A[9] = 0.04166667*G0_;
 
1244
      A[10] = 0.08333333*G0_;
 
1245
      A[11] = 0.00000000;
 
1246
      A[12] = 0.00000000;
 
1247
      A[13] = 0.00000000;
 
1248
      A[14] = 0.00000000;
 
1249
      A[15] = 0.00000000;
 
1250
        break;
 
1251
      }
 
1252
    }
 
1253
    
 
1254
  }
 
1255
 
 
1256
};
 
1257
 
 
1258
/// This class defines the interface for the tabulation of the
 
1259
/// exterior facet tensor corresponding to the local contribution to
 
1260
/// a form from the integral over an exterior facet.
 
1261
 
 
1262
class subdomains_exterior_facet_integral_0_1: public ufc::exterior_facet_integral
 
1263
{
 
1264
public:
 
1265
 
 
1266
  /// Constructor
 
1267
  subdomains_exterior_facet_integral_0_1() : ufc::exterior_facet_integral()
 
1268
  {
 
1269
    // Do nothing
 
1270
  }
 
1271
 
 
1272
  /// Destructor
 
1273
  virtual ~subdomains_exterior_facet_integral_0_1()
 
1274
  {
 
1275
    // Do nothing
 
1276
  }
 
1277
 
 
1278
  /// Tabulate the tensor for the contribution from a local exterior facet
 
1279
  virtual void tabulate_tensor(double* A,
 
1280
                               const double * const * w,
 
1281
                               const ufc::cell& c,
 
1282
                               unsigned int facet) const
 
1283
  {
 
1284
    // Number of operations (multiply-add pairs) for Jacobian data:      52
 
1285
    // Number of operations (multiply-add pairs) for geometry tensor:    0
 
1286
    // Number of operations (multiply-add pairs) for tensor contraction: 18
 
1287
    // Total number of operations (multiply-add pairs):                  70
 
1288
    
 
1289
    // Extract vertex coordinates
 
1290
    const double * const * x = c.coordinates;
 
1291
    
 
1292
    // Compute Jacobian of affine map from reference cell
 
1293
    
 
1294
    // Compute sub determinants
 
1295
    
 
1296
    // Compute determinant of Jacobian
 
1297
    
 
1298
    // Compute inverse of Jacobian
 
1299
    
 
1300
    // Get vertices on face
 
1301
    static unsigned int face_vertices[4][3] = {{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}};
 
1302
    const unsigned int v0 = face_vertices[facet][0];
 
1303
    const unsigned int v1 = face_vertices[facet][1];
 
1304
    const unsigned int v2 = face_vertices[facet][2];
 
1305
    
 
1306
    // Compute scale factor (area of face scaled by area of reference triangle)
 
1307
    const double a0 = (x[v0][1]*x[v1][2]
 
1308
                     + x[v0][2]*x[v2][1]
 
1309
                     + x[v1][1]*x[v2][2])
 
1310
                    - (x[v2][1]*x[v1][2]
 
1311
                     + x[v2][2]*x[v0][1]
 
1312
                     + x[v1][1]*x[v0][2]);
 
1313
    
 
1314
    const double a1 = (x[v0][2]*x[v1][0]
 
1315
                     + x[v0][0]*x[v2][2]
 
1316
                     + x[v1][2]*x[v2][0])
 
1317
                    - (x[v2][2]*x[v1][0]
 
1318
                     + x[v2][0]*x[v0][2]
 
1319
                    + x[v1][2]*x[v0][0]);
 
1320
    
 
1321
    const double a2 = (x[v0][0]*x[v1][1]
 
1322
                     + x[v0][1]*x[v2][0]
 
1323
                     + x[v1][0]*x[v2][1])
 
1324
                    - (x[v2][0]*x[v1][1]
 
1325
                     + x[v2][1]*x[v0][0]
 
1326
                     + x[v1][0]*x[v0][1]);
 
1327
    
 
1328
    const double det = std::sqrt(a0*a0 + a1*a1 + a2*a2);
 
1329
    
 
1330
    // Compute geometry tensor
 
1331
    const double G0_ = det;
 
1332
    
 
1333
    // Compute element tensor
 
1334
    switch (facet)
 
1335
    {
 
1336
    case 0:
 
1337
      {
 
1338
        A[0] = 0.00000000;
 
1339
      A[1] = 0.00000000;
 
1340
      A[2] = 0.00000000;
 
1341
      A[3] = 0.00000000;
 
1342
      A[4] = 0.00000000;
 
1343
      A[5] = 0.16666667*G0_;
 
1344
      A[6] = 0.08333333*G0_;
 
1345
      A[7] = 0.08333333*G0_;
 
1346
      A[8] = 0.00000000;
 
1347
      A[9] = 0.08333333*G0_;
 
1348
      A[10] = 0.16666667*G0_;
 
1349
      A[11] = 0.08333333*G0_;
 
1350
      A[12] = 0.00000000;
 
1351
      A[13] = 0.08333333*G0_;
 
1352
      A[14] = 0.08333333*G0_;
 
1353
      A[15] = 0.16666667*G0_;
 
1354
        break;
 
1355
      }
 
1356
    case 1:
 
1357
      {
 
1358
        A[0] = 0.16666667*G0_;
 
1359
      A[1] = 0.00000000;
 
1360
      A[2] = 0.08333333*G0_;
 
1361
      A[3] = 0.08333333*G0_;
 
1362
      A[4] = 0.00000000;
 
1363
      A[5] = 0.00000000;
 
1364
      A[6] = 0.00000000;
 
1365
      A[7] = 0.00000000;
 
1366
      A[8] = 0.08333333*G0_;
 
1367
      A[9] = 0.00000000;
 
1368
      A[10] = 0.16666667*G0_;
 
1369
      A[11] = 0.08333333*G0_;
 
1370
      A[12] = 0.08333333*G0_;
 
1371
      A[13] = 0.00000000;
 
1372
      A[14] = 0.08333333*G0_;
 
1373
      A[15] = 0.16666667*G0_;
 
1374
        break;
 
1375
      }
 
1376
    case 2:
 
1377
      {
 
1378
        A[0] = 0.16666667*G0_;
 
1379
      A[1] = 0.08333333*G0_;
 
1380
      A[2] = 0.00000000;
 
1381
      A[3] = 0.08333333*G0_;
 
1382
      A[4] = 0.08333333*G0_;
 
1383
      A[5] = 0.16666667*G0_;
 
1384
      A[6] = 0.00000000;
 
1385
      A[7] = 0.08333333*G0_;
 
1386
      A[8] = 0.00000000;
 
1387
      A[9] = 0.00000000;
 
1388
      A[10] = 0.00000000;
 
1389
      A[11] = 0.00000000;
 
1390
      A[12] = 0.08333333*G0_;
 
1391
      A[13] = 0.08333333*G0_;
 
1392
      A[14] = 0.00000000;
 
1393
      A[15] = 0.16666667*G0_;
 
1394
        break;
 
1395
      }
 
1396
    case 3:
 
1397
      {
 
1398
        A[0] = 0.16666667*G0_;
 
1399
      A[1] = 0.08333333*G0_;
 
1400
      A[2] = 0.08333333*G0_;
 
1401
      A[3] = 0.00000000;
 
1402
      A[4] = 0.08333333*G0_;
 
1403
      A[5] = 0.16666667*G0_;
 
1404
      A[6] = 0.08333333*G0_;
 
1405
      A[7] = 0.00000000;
 
1406
      A[8] = 0.08333333*G0_;
 
1407
      A[9] = 0.08333333*G0_;
 
1408
      A[10] = 0.16666667*G0_;
 
1409
      A[11] = 0.00000000;
 
1410
      A[12] = 0.00000000;
 
1411
      A[13] = 0.00000000;
 
1412
      A[14] = 0.00000000;
 
1413
      A[15] = 0.00000000;
 
1414
        break;
 
1415
      }
 
1416
    }
 
1417
    
 
1418
  }
 
1419
 
 
1420
};
 
1421
 
 
1422
/// This class defines the interface for the tabulation of the
 
1423
/// interior facet tensor corresponding to the local contribution to
 
1424
/// a form from the integral over an interior facet.
 
1425
 
 
1426
class subdomains_interior_facet_integral_0_0: public ufc::interior_facet_integral
 
1427
{
 
1428
public:
 
1429
 
 
1430
  /// Constructor
 
1431
  subdomains_interior_facet_integral_0_0() : ufc::interior_facet_integral()
 
1432
  {
 
1433
    // Do nothing
 
1434
  }
 
1435
 
 
1436
  /// Destructor
 
1437
  virtual ~subdomains_interior_facet_integral_0_0()
 
1438
  {
 
1439
    // Do nothing
 
1440
  }
 
1441
 
 
1442
  /// Tabulate the tensor for the contribution from a local interior facet
 
1443
  virtual void tabulate_tensor(double* A,
 
1444
                               const double * const * w,
 
1445
                               const ufc::cell& c0,
 
1446
                               const ufc::cell& c1,
 
1447
                               unsigned int facet0,
 
1448
                               unsigned int facet1) const
 
1449
  {
 
1450
    // Number of operations (multiply-add pairs) for Jacobian data:      83
 
1451
    // Number of operations (multiply-add pairs) for geometry tensor:    0
 
1452
    // Number of operations (multiply-add pairs) for tensor contraction: 72
 
1453
    // Total number of operations (multiply-add pairs):                  155
 
1454
    
 
1455
    // Extract vertex coordinates
 
1456
    const double * const * x0 = c0.coordinates;
 
1457
    
 
1458
    // Compute Jacobian of affine map from reference cell
 
1459
    
 
1460
    // Compute sub determinants
 
1461
    
 
1462
    // Compute determinant of Jacobian
 
1463
    
 
1464
    // Compute inverse of Jacobian
 
1465
    
 
1466
    // Compute Jacobian of affine map from reference cell
 
1467
    
 
1468
    // Compute sub determinants
 
1469
    
 
1470
    // Compute determinant of Jacobian
 
1471
    
 
1472
    // Compute inverse of Jacobian
 
1473
    
 
1474
    // Get vertices on face
 
1475
    static unsigned int face_vertices[4][3] = {{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}};
 
1476
    const unsigned int v0 = face_vertices[facet0][0];
 
1477
    const unsigned int v1 = face_vertices[facet0][1];
 
1478
    const unsigned int v2 = face_vertices[facet0][2];
 
1479
    
 
1480
    // Compute scale factor (area of face scaled by area of reference triangle)
 
1481
    const double a0 = (x0[v0][1]*x0[v1][2]
 
1482
                     + x0[v0][2]*x0[v2][1]
 
1483
                     + x0[v1][1]*x0[v2][2])
 
1484
                    - (x0[v2][1]*x0[v1][2]
 
1485
                     + x0[v2][2]*x0[v0][1]
 
1486
                     + x0[v1][1]*x0[v0][2]);
 
1487
    
 
1488
    const double a1 = (x0[v0][2]*x0[v1][0]
 
1489
                     + x0[v0][0]*x0[v2][2]
 
1490
                     + x0[v1][2]*x0[v2][0])
 
1491
                    - (x0[v2][2]*x0[v1][0]
 
1492
                     + x0[v2][0]*x0[v0][2]
 
1493
                    + x0[v1][2]*x0[v0][0]);
 
1494
    
 
1495
    const double a2 = (x0[v0][0]*x0[v1][1]
 
1496
                     + x0[v0][1]*x0[v2][0]
 
1497
                     + x0[v1][0]*x0[v2][1])
 
1498
                    - (x0[v2][0]*x0[v1][1]
 
1499
                     + x0[v2][1]*x0[v0][0]
 
1500
                     + x0[v1][0]*x0[v0][1]);
 
1501
    
 
1502
    const double det = std::sqrt(a0*a0 + a1*a1 + a2*a2);
 
1503
    
 
1504
    // Compute geometry tensor
 
1505
    const double G0_ = det;
 
1506
    
 
1507
    // Compute element tensor
 
1508
    switch (facet0)
 
1509
    {
 
1510
    case 0:
 
1511
      {
 
1512
        switch (facet1)
 
1513
      {
 
1514
      case 0:
 
1515
        {
 
1516
          A[0] = 0.00000000;
 
1517
        A[1] = 0.00000000;
 
1518
        A[2] = 0.00000000;
 
1519
        A[3] = 0.00000000;
 
1520
        A[4] = 0.00000000;
 
1521
        A[5] = 0.00000000;
 
1522
        A[6] = 0.00000000;
 
1523
        A[7] = 0.00000000;
 
1524
        A[8] = 0.00000000;
 
1525
        A[9] = 0.08333333*G0_;
 
1526
        A[10] = 0.04166667*G0_;
 
1527
        A[11] = 0.04166667*G0_;
 
1528
        A[12] = 0.00000000;
 
1529
        A[13] = 0.00000000;
 
1530
        A[14] = 0.00000000;
 
1531
        A[15] = 0.00000000;
 
1532
        A[16] = 0.00000000;
 
1533
        A[17] = 0.04166667*G0_;
 
1534
        A[18] = 0.08333333*G0_;
 
1535
        A[19] = 0.04166667*G0_;
 
1536
        A[20] = 0.00000000;
 
1537
        A[21] = 0.00000000;
 
1538
        A[22] = 0.00000000;
 
1539
        A[23] = 0.00000000;
 
1540
        A[24] = 0.00000000;
 
1541
        A[25] = 0.04166667*G0_;
 
1542
        A[26] = 0.04166667*G0_;
 
1543
        A[27] = 0.08333333*G0_;
 
1544
        A[28] = 0.00000000;
 
1545
        A[29] = 0.00000000;
 
1546
        A[30] = 0.00000000;
 
1547
        A[31] = 0.00000000;
 
1548
        A[32] = 0.00000000;
 
1549
        A[33] = 0.00000000;
 
1550
        A[34] = 0.00000000;
 
1551
        A[35] = 0.00000000;
 
1552
        A[36] = 0.00000000;
 
1553
        A[37] = 0.00000000;
 
1554
        A[38] = 0.00000000;
 
1555
        A[39] = 0.00000000;
 
1556
        A[40] = 0.00000000;
 
1557
        A[41] = 0.00000000;
 
1558
        A[42] = 0.00000000;
 
1559
        A[43] = 0.00000000;
 
1560
        A[44] = 0.00000000;
 
1561
        A[45] = 0.00000000;
 
1562
        A[46] = 0.00000000;
 
1563
        A[47] = 0.00000000;
 
1564
        A[48] = 0.00000000;
 
1565
        A[49] = 0.00000000;
 
1566
        A[50] = 0.00000000;
 
1567
        A[51] = 0.00000000;
 
1568
        A[52] = 0.00000000;
 
1569
        A[53] = 0.00000000;
 
1570
        A[54] = 0.00000000;
 
1571
        A[55] = 0.00000000;
 
1572
        A[56] = 0.00000000;
 
1573
        A[57] = 0.00000000;
 
1574
        A[58] = 0.00000000;
 
1575
        A[59] = 0.00000000;
 
1576
        A[60] = 0.00000000;
 
1577
        A[61] = 0.00000000;
 
1578
        A[62] = 0.00000000;
 
1579
        A[63] = 0.00000000;
 
1580
          break;
 
1581
        }
 
1582
      case 1:
 
1583
        {
 
1584
          A[0] = 0.00000000;
 
1585
        A[1] = 0.00000000;
 
1586
        A[2] = 0.00000000;
 
1587
        A[3] = 0.00000000;
 
1588
        A[4] = 0.00000000;
 
1589
        A[5] = 0.00000000;
 
1590
        A[6] = 0.00000000;
 
1591
        A[7] = 0.00000000;
 
1592
        A[8] = 0.00000000;
 
1593
        A[9] = 0.08333333*G0_;
 
1594
        A[10] = 0.04166667*G0_;
 
1595
        A[11] = 0.04166667*G0_;
 
1596
        A[12] = 0.00000000;
 
1597
        A[13] = 0.00000000;
 
1598
        A[14] = 0.00000000;
 
1599
        A[15] = 0.00000000;
 
1600
        A[16] = 0.00000000;
 
1601
        A[17] = 0.04166667*G0_;
 
1602
        A[18] = 0.08333333*G0_;
 
1603
        A[19] = 0.04166667*G0_;
 
1604
        A[20] = 0.00000000;
 
1605
        A[21] = 0.00000000;
 
1606
        A[22] = 0.00000000;
 
1607
        A[23] = 0.00000000;
 
1608
        A[24] = 0.00000000;
 
1609
        A[25] = 0.04166667*G0_;
 
1610
        A[26] = 0.04166667*G0_;
 
1611
        A[27] = 0.08333333*G0_;
 
1612
        A[28] = 0.00000000;
 
1613
        A[29] = 0.00000000;
 
1614
        A[30] = 0.00000000;
 
1615
        A[31] = 0.00000000;
 
1616
        A[32] = 0.00000000;
 
1617
        A[33] = 0.00000000;
 
1618
        A[34] = 0.00000000;
 
1619
        A[35] = 0.00000000;
 
1620
        A[36] = 0.00000000;
 
1621
        A[37] = 0.00000000;
 
1622
        A[38] = 0.00000000;
 
1623
        A[39] = 0.00000000;
 
1624
        A[40] = 0.00000000;
 
1625
        A[41] = 0.00000000;
 
1626
        A[42] = 0.00000000;
 
1627
        A[43] = 0.00000000;
 
1628
        A[44] = 0.00000000;
 
1629
        A[45] = 0.00000000;
 
1630
        A[46] = 0.00000000;
 
1631
        A[47] = 0.00000000;
 
1632
        A[48] = 0.00000000;
 
1633
        A[49] = 0.00000000;
 
1634
        A[50] = 0.00000000;
 
1635
        A[51] = 0.00000000;
 
1636
        A[52] = 0.00000000;
 
1637
        A[53] = 0.00000000;
 
1638
        A[54] = 0.00000000;
 
1639
        A[55] = 0.00000000;
 
1640
        A[56] = 0.00000000;
 
1641
        A[57] = 0.00000000;
 
1642
        A[58] = 0.00000000;
 
1643
        A[59] = 0.00000000;
 
1644
        A[60] = 0.00000000;
 
1645
        A[61] = 0.00000000;
 
1646
        A[62] = 0.00000000;
 
1647
        A[63] = 0.00000000;
 
1648
          break;
 
1649
        }
 
1650
      case 2:
 
1651
        {
 
1652
          A[0] = 0.00000000;
 
1653
        A[1] = 0.00000000;
 
1654
        A[2] = 0.00000000;
 
1655
        A[3] = 0.00000000;
 
1656
        A[4] = 0.00000000;
 
1657
        A[5] = 0.00000000;
 
1658
        A[6] = 0.00000000;
 
1659
        A[7] = 0.00000000;
 
1660
        A[8] = 0.00000000;
 
1661
        A[9] = 0.08333333*G0_;
 
1662
        A[10] = 0.04166667*G0_;
 
1663
        A[11] = 0.04166667*G0_;
 
1664
        A[12] = 0.00000000;
 
1665
        A[13] = 0.00000000;
 
1666
        A[14] = 0.00000000;
 
1667
        A[15] = 0.00000000;
 
1668
        A[16] = 0.00000000;
 
1669
        A[17] = 0.04166667*G0_;
 
1670
        A[18] = 0.08333333*G0_;
 
1671
        A[19] = 0.04166667*G0_;
 
1672
        A[20] = 0.00000000;
 
1673
        A[21] = 0.00000000;
 
1674
        A[22] = 0.00000000;
 
1675
        A[23] = 0.00000000;
 
1676
        A[24] = 0.00000000;
 
1677
        A[25] = 0.04166667*G0_;
 
1678
        A[26] = 0.04166667*G0_;
 
1679
        A[27] = 0.08333333*G0_;
 
1680
        A[28] = 0.00000000;
 
1681
        A[29] = 0.00000000;
 
1682
        A[30] = 0.00000000;
 
1683
        A[31] = 0.00000000;
 
1684
        A[32] = 0.00000000;
 
1685
        A[33] = 0.00000000;
 
1686
        A[34] = 0.00000000;
 
1687
        A[35] = 0.00000000;
 
1688
        A[36] = 0.00000000;
 
1689
        A[37] = 0.00000000;
 
1690
        A[38] = 0.00000000;
 
1691
        A[39] = 0.00000000;
 
1692
        A[40] = 0.00000000;
 
1693
        A[41] = 0.00000000;
 
1694
        A[42] = 0.00000000;
 
1695
        A[43] = 0.00000000;
 
1696
        A[44] = 0.00000000;
 
1697
        A[45] = 0.00000000;
 
1698
        A[46] = 0.00000000;
 
1699
        A[47] = 0.00000000;
 
1700
        A[48] = 0.00000000;
 
1701
        A[49] = 0.00000000;
 
1702
        A[50] = 0.00000000;
 
1703
        A[51] = 0.00000000;
 
1704
        A[52] = 0.00000000;
 
1705
        A[53] = 0.00000000;
 
1706
        A[54] = 0.00000000;
 
1707
        A[55] = 0.00000000;
 
1708
        A[56] = 0.00000000;
 
1709
        A[57] = 0.00000000;
 
1710
        A[58] = 0.00000000;
 
1711
        A[59] = 0.00000000;
 
1712
        A[60] = 0.00000000;
 
1713
        A[61] = 0.00000000;
 
1714
        A[62] = 0.00000000;
 
1715
        A[63] = 0.00000000;
 
1716
          break;
 
1717
        }
 
1718
      case 3:
 
1719
        {
 
1720
          A[0] = 0.00000000;
 
1721
        A[1] = 0.00000000;
 
1722
        A[2] = 0.00000000;
 
1723
        A[3] = 0.00000000;
 
1724
        A[4] = 0.00000000;
 
1725
        A[5] = 0.00000000;
 
1726
        A[6] = 0.00000000;
 
1727
        A[7] = 0.00000000;
 
1728
        A[8] = 0.00000000;
 
1729
        A[9] = 0.08333333*G0_;
 
1730
        A[10] = 0.04166667*G0_;
 
1731
        A[11] = 0.04166667*G0_;
 
1732
        A[12] = 0.00000000;
 
1733
        A[13] = 0.00000000;
 
1734
        A[14] = 0.00000000;
 
1735
        A[15] = 0.00000000;
 
1736
        A[16] = 0.00000000;
 
1737
        A[17] = 0.04166667*G0_;
 
1738
        A[18] = 0.08333333*G0_;
 
1739
        A[19] = 0.04166667*G0_;
 
1740
        A[20] = 0.00000000;
 
1741
        A[21] = 0.00000000;
 
1742
        A[22] = 0.00000000;
 
1743
        A[23] = 0.00000000;
 
1744
        A[24] = 0.00000000;
 
1745
        A[25] = 0.04166667*G0_;
 
1746
        A[26] = 0.04166667*G0_;
 
1747
        A[27] = 0.08333333*G0_;
 
1748
        A[28] = 0.00000000;
 
1749
        A[29] = 0.00000000;
 
1750
        A[30] = 0.00000000;
 
1751
        A[31] = 0.00000000;
 
1752
        A[32] = 0.00000000;
 
1753
        A[33] = 0.00000000;
 
1754
        A[34] = 0.00000000;
 
1755
        A[35] = 0.00000000;
 
1756
        A[36] = 0.00000000;
 
1757
        A[37] = 0.00000000;
 
1758
        A[38] = 0.00000000;
 
1759
        A[39] = 0.00000000;
 
1760
        A[40] = 0.00000000;
 
1761
        A[41] = 0.00000000;
 
1762
        A[42] = 0.00000000;
 
1763
        A[43] = 0.00000000;
 
1764
        A[44] = 0.00000000;
 
1765
        A[45] = 0.00000000;
 
1766
        A[46] = 0.00000000;
 
1767
        A[47] = 0.00000000;
 
1768
        A[48] = 0.00000000;
 
1769
        A[49] = 0.00000000;
 
1770
        A[50] = 0.00000000;
 
1771
        A[51] = 0.00000000;
 
1772
        A[52] = 0.00000000;
 
1773
        A[53] = 0.00000000;
 
1774
        A[54] = 0.00000000;
 
1775
        A[55] = 0.00000000;
 
1776
        A[56] = 0.00000000;
 
1777
        A[57] = 0.00000000;
 
1778
        A[58] = 0.00000000;
 
1779
        A[59] = 0.00000000;
 
1780
        A[60] = 0.00000000;
 
1781
        A[61] = 0.00000000;
 
1782
        A[62] = 0.00000000;
 
1783
        A[63] = 0.00000000;
 
1784
          break;
 
1785
        }
 
1786
      }
 
1787
      
 
1788
        break;
 
1789
      }
 
1790
    case 1:
 
1791
      {
 
1792
        switch (facet1)
 
1793
      {
 
1794
      case 0:
 
1795
        {
 
1796
          A[0] = 0.08333333*G0_;
 
1797
        A[1] = 0.00000000;
 
1798
        A[2] = 0.04166667*G0_;
 
1799
        A[3] = 0.04166667*G0_;
 
1800
        A[4] = 0.00000000;
 
1801
        A[5] = 0.00000000;
 
1802
        A[6] = 0.00000000;
 
1803
        A[7] = 0.00000000;
 
1804
        A[8] = 0.00000000;
 
1805
        A[9] = 0.00000000;
 
1806
        A[10] = 0.00000000;
 
1807
        A[11] = 0.00000000;
 
1808
        A[12] = 0.00000000;
 
1809
        A[13] = 0.00000000;
 
1810
        A[14] = 0.00000000;
 
1811
        A[15] = 0.00000000;
 
1812
        A[16] = 0.04166667*G0_;
 
1813
        A[17] = 0.00000000;
 
1814
        A[18] = 0.08333333*G0_;
 
1815
        A[19] = 0.04166667*G0_;
 
1816
        A[20] = 0.00000000;
 
1817
        A[21] = 0.00000000;
 
1818
        A[22] = 0.00000000;
 
1819
        A[23] = 0.00000000;
 
1820
        A[24] = 0.04166667*G0_;
 
1821
        A[25] = 0.00000000;
 
1822
        A[26] = 0.04166667*G0_;
 
1823
        A[27] = 0.08333333*G0_;
 
1824
        A[28] = 0.00000000;
 
1825
        A[29] = 0.00000000;
 
1826
        A[30] = 0.00000000;
 
1827
        A[31] = 0.00000000;
 
1828
        A[32] = 0.00000000;
 
1829
        A[33] = 0.00000000;
 
1830
        A[34] = 0.00000000;
 
1831
        A[35] = 0.00000000;
 
1832
        A[36] = 0.00000000;
 
1833
        A[37] = 0.00000000;
 
1834
        A[38] = 0.00000000;
 
1835
        A[39] = 0.00000000;
 
1836
        A[40] = 0.00000000;
 
1837
        A[41] = 0.00000000;
 
1838
        A[42] = 0.00000000;
 
1839
        A[43] = 0.00000000;
 
1840
        A[44] = 0.00000000;
 
1841
        A[45] = 0.00000000;
 
1842
        A[46] = 0.00000000;
 
1843
        A[47] = 0.00000000;
 
1844
        A[48] = 0.00000000;
 
1845
        A[49] = 0.00000000;
 
1846
        A[50] = 0.00000000;
 
1847
        A[51] = 0.00000000;
 
1848
        A[52] = 0.00000000;
 
1849
        A[53] = 0.00000000;
 
1850
        A[54] = 0.00000000;
 
1851
        A[55] = 0.00000000;
 
1852
        A[56] = 0.00000000;
 
1853
        A[57] = 0.00000000;
 
1854
        A[58] = 0.00000000;
 
1855
        A[59] = 0.00000000;
 
1856
        A[60] = 0.00000000;
 
1857
        A[61] = 0.00000000;
 
1858
        A[62] = 0.00000000;
 
1859
        A[63] = 0.00000000;
 
1860
          break;
 
1861
        }
 
1862
      case 1:
 
1863
        {
 
1864
          A[0] = 0.08333333*G0_;
 
1865
        A[1] = 0.00000000;
 
1866
        A[2] = 0.04166667*G0_;
 
1867
        A[3] = 0.04166667*G0_;
 
1868
        A[4] = 0.00000000;
 
1869
        A[5] = 0.00000000;
 
1870
        A[6] = 0.00000000;
 
1871
        A[7] = 0.00000000;
 
1872
        A[8] = 0.00000000;
 
1873
        A[9] = 0.00000000;
 
1874
        A[10] = 0.00000000;
 
1875
        A[11] = 0.00000000;
 
1876
        A[12] = 0.00000000;
 
1877
        A[13] = 0.00000000;
 
1878
        A[14] = 0.00000000;
 
1879
        A[15] = 0.00000000;
 
1880
        A[16] = 0.04166667*G0_;
 
1881
        A[17] = 0.00000000;
 
1882
        A[18] = 0.08333333*G0_;
 
1883
        A[19] = 0.04166667*G0_;
 
1884
        A[20] = 0.00000000;
 
1885
        A[21] = 0.00000000;
 
1886
        A[22] = 0.00000000;
 
1887
        A[23] = 0.00000000;
 
1888
        A[24] = 0.04166667*G0_;
 
1889
        A[25] = 0.00000000;
 
1890
        A[26] = 0.04166667*G0_;
 
1891
        A[27] = 0.08333333*G0_;
 
1892
        A[28] = 0.00000000;
 
1893
        A[29] = 0.00000000;
 
1894
        A[30] = 0.00000000;
 
1895
        A[31] = 0.00000000;
 
1896
        A[32] = 0.00000000;
 
1897
        A[33] = 0.00000000;
 
1898
        A[34] = 0.00000000;
 
1899
        A[35] = 0.00000000;
 
1900
        A[36] = 0.00000000;
 
1901
        A[37] = 0.00000000;
 
1902
        A[38] = 0.00000000;
 
1903
        A[39] = 0.00000000;
 
1904
        A[40] = 0.00000000;
 
1905
        A[41] = 0.00000000;
 
1906
        A[42] = 0.00000000;
 
1907
        A[43] = 0.00000000;
 
1908
        A[44] = 0.00000000;
 
1909
        A[45] = 0.00000000;
 
1910
        A[46] = 0.00000000;
 
1911
        A[47] = 0.00000000;
 
1912
        A[48] = 0.00000000;
 
1913
        A[49] = 0.00000000;
 
1914
        A[50] = 0.00000000;
 
1915
        A[51] = 0.00000000;
 
1916
        A[52] = 0.00000000;
 
1917
        A[53] = 0.00000000;
 
1918
        A[54] = 0.00000000;
 
1919
        A[55] = 0.00000000;
 
1920
        A[56] = 0.00000000;
 
1921
        A[57] = 0.00000000;
 
1922
        A[58] = 0.00000000;
 
1923
        A[59] = 0.00000000;
 
1924
        A[60] = 0.00000000;
 
1925
        A[61] = 0.00000000;
 
1926
        A[62] = 0.00000000;
 
1927
        A[63] = 0.00000000;
 
1928
          break;
 
1929
        }
 
1930
      case 2:
 
1931
        {
 
1932
          A[0] = 0.08333333*G0_;
 
1933
        A[1] = 0.00000000;
 
1934
        A[2] = 0.04166667*G0_;
 
1935
        A[3] = 0.04166667*G0_;
 
1936
        A[4] = 0.00000000;
 
1937
        A[5] = 0.00000000;
 
1938
        A[6] = 0.00000000;
 
1939
        A[7] = 0.00000000;
 
1940
        A[8] = 0.00000000;
 
1941
        A[9] = 0.00000000;
 
1942
        A[10] = 0.00000000;
 
1943
        A[11] = 0.00000000;
 
1944
        A[12] = 0.00000000;
 
1945
        A[13] = 0.00000000;
 
1946
        A[14] = 0.00000000;
 
1947
        A[15] = 0.00000000;
 
1948
        A[16] = 0.04166667*G0_;
 
1949
        A[17] = 0.00000000;
 
1950
        A[18] = 0.08333333*G0_;
 
1951
        A[19] = 0.04166667*G0_;
 
1952
        A[20] = 0.00000000;
 
1953
        A[21] = 0.00000000;
 
1954
        A[22] = 0.00000000;
 
1955
        A[23] = 0.00000000;
 
1956
        A[24] = 0.04166667*G0_;
 
1957
        A[25] = 0.00000000;
 
1958
        A[26] = 0.04166667*G0_;
 
1959
        A[27] = 0.08333333*G0_;
 
1960
        A[28] = 0.00000000;
 
1961
        A[29] = 0.00000000;
 
1962
        A[30] = 0.00000000;
 
1963
        A[31] = 0.00000000;
 
1964
        A[32] = 0.00000000;
 
1965
        A[33] = 0.00000000;
 
1966
        A[34] = 0.00000000;
 
1967
        A[35] = 0.00000000;
 
1968
        A[36] = 0.00000000;
 
1969
        A[37] = 0.00000000;
 
1970
        A[38] = 0.00000000;
 
1971
        A[39] = 0.00000000;
 
1972
        A[40] = 0.00000000;
 
1973
        A[41] = 0.00000000;
 
1974
        A[42] = 0.00000000;
 
1975
        A[43] = 0.00000000;
 
1976
        A[44] = 0.00000000;
 
1977
        A[45] = 0.00000000;
 
1978
        A[46] = 0.00000000;
 
1979
        A[47] = 0.00000000;
 
1980
        A[48] = 0.00000000;
 
1981
        A[49] = 0.00000000;
 
1982
        A[50] = 0.00000000;
 
1983
        A[51] = 0.00000000;
 
1984
        A[52] = 0.00000000;
 
1985
        A[53] = 0.00000000;
 
1986
        A[54] = 0.00000000;
 
1987
        A[55] = 0.00000000;
 
1988
        A[56] = 0.00000000;
 
1989
        A[57] = 0.00000000;
 
1990
        A[58] = 0.00000000;
 
1991
        A[59] = 0.00000000;
 
1992
        A[60] = 0.00000000;
 
1993
        A[61] = 0.00000000;
 
1994
        A[62] = 0.00000000;
 
1995
        A[63] = 0.00000000;
 
1996
          break;
 
1997
        }
 
1998
      case 3:
 
1999
        {
 
2000
          A[0] = 0.08333333*G0_;
 
2001
        A[1] = 0.00000000;
 
2002
        A[2] = 0.04166667*G0_;
 
2003
        A[3] = 0.04166667*G0_;
 
2004
        A[4] = 0.00000000;
 
2005
        A[5] = 0.00000000;
 
2006
        A[6] = 0.00000000;
 
2007
        A[7] = 0.00000000;
 
2008
        A[8] = 0.00000000;
 
2009
        A[9] = 0.00000000;
 
2010
        A[10] = 0.00000000;
 
2011
        A[11] = 0.00000000;
 
2012
        A[12] = 0.00000000;
 
2013
        A[13] = 0.00000000;
 
2014
        A[14] = 0.00000000;
 
2015
        A[15] = 0.00000000;
 
2016
        A[16] = 0.04166667*G0_;
 
2017
        A[17] = 0.00000000;
 
2018
        A[18] = 0.08333333*G0_;
 
2019
        A[19] = 0.04166667*G0_;
 
2020
        A[20] = 0.00000000;
 
2021
        A[21] = 0.00000000;
 
2022
        A[22] = 0.00000000;
 
2023
        A[23] = 0.00000000;
 
2024
        A[24] = 0.04166667*G0_;
 
2025
        A[25] = 0.00000000;
 
2026
        A[26] = 0.04166667*G0_;
 
2027
        A[27] = 0.08333333*G0_;
 
2028
        A[28] = 0.00000000;
 
2029
        A[29] = 0.00000000;
 
2030
        A[30] = 0.00000000;
 
2031
        A[31] = 0.00000000;
 
2032
        A[32] = 0.00000000;
 
2033
        A[33] = 0.00000000;
 
2034
        A[34] = 0.00000000;
 
2035
        A[35] = 0.00000000;
 
2036
        A[36] = 0.00000000;
 
2037
        A[37] = 0.00000000;
 
2038
        A[38] = 0.00000000;
 
2039
        A[39] = 0.00000000;
 
2040
        A[40] = 0.00000000;
 
2041
        A[41] = 0.00000000;
 
2042
        A[42] = 0.00000000;
 
2043
        A[43] = 0.00000000;
 
2044
        A[44] = 0.00000000;
 
2045
        A[45] = 0.00000000;
 
2046
        A[46] = 0.00000000;
 
2047
        A[47] = 0.00000000;
 
2048
        A[48] = 0.00000000;
 
2049
        A[49] = 0.00000000;
 
2050
        A[50] = 0.00000000;
 
2051
        A[51] = 0.00000000;
 
2052
        A[52] = 0.00000000;
 
2053
        A[53] = 0.00000000;
 
2054
        A[54] = 0.00000000;
 
2055
        A[55] = 0.00000000;
 
2056
        A[56] = 0.00000000;
 
2057
        A[57] = 0.00000000;
 
2058
        A[58] = 0.00000000;
 
2059
        A[59] = 0.00000000;
 
2060
        A[60] = 0.00000000;
 
2061
        A[61] = 0.00000000;
 
2062
        A[62] = 0.00000000;
 
2063
        A[63] = 0.00000000;
 
2064
          break;
 
2065
        }
 
2066
      }
 
2067
      
 
2068
        break;
 
2069
      }
 
2070
    case 2:
 
2071
      {
 
2072
        switch (facet1)
 
2073
      {
 
2074
      case 0:
 
2075
        {
 
2076
          A[0] = 0.08333333*G0_;
 
2077
        A[1] = 0.04166667*G0_;
 
2078
        A[2] = 0.00000000;
 
2079
        A[3] = 0.04166667*G0_;
 
2080
        A[4] = 0.00000000;
 
2081
        A[5] = 0.00000000;
 
2082
        A[6] = 0.00000000;
 
2083
        A[7] = 0.00000000;
 
2084
        A[8] = 0.04166667*G0_;
 
2085
        A[9] = 0.08333333*G0_;
 
2086
        A[10] = 0.00000000;
 
2087
        A[11] = 0.04166667*G0_;
 
2088
        A[12] = 0.00000000;
 
2089
        A[13] = 0.00000000;
 
2090
        A[14] = 0.00000000;
 
2091
        A[15] = 0.00000000;
 
2092
        A[16] = 0.00000000;
 
2093
        A[17] = 0.00000000;
 
2094
        A[18] = 0.00000000;
 
2095
        A[19] = 0.00000000;
 
2096
        A[20] = 0.00000000;
 
2097
        A[21] = 0.00000000;
 
2098
        A[22] = 0.00000000;
 
2099
        A[23] = 0.00000000;
 
2100
        A[24] = 0.04166667*G0_;
 
2101
        A[25] = 0.04166667*G0_;
 
2102
        A[26] = 0.00000000;
 
2103
        A[27] = 0.08333333*G0_;
 
2104
        A[28] = 0.00000000;
 
2105
        A[29] = 0.00000000;
 
2106
        A[30] = 0.00000000;
 
2107
        A[31] = 0.00000000;
 
2108
        A[32] = 0.00000000;
 
2109
        A[33] = 0.00000000;
 
2110
        A[34] = 0.00000000;
 
2111
        A[35] = 0.00000000;
 
2112
        A[36] = 0.00000000;
 
2113
        A[37] = 0.00000000;
 
2114
        A[38] = 0.00000000;
 
2115
        A[39] = 0.00000000;
 
2116
        A[40] = 0.00000000;
 
2117
        A[41] = 0.00000000;
 
2118
        A[42] = 0.00000000;
 
2119
        A[43] = 0.00000000;
 
2120
        A[44] = 0.00000000;
 
2121
        A[45] = 0.00000000;
 
2122
        A[46] = 0.00000000;
 
2123
        A[47] = 0.00000000;
 
2124
        A[48] = 0.00000000;
 
2125
        A[49] = 0.00000000;
 
2126
        A[50] = 0.00000000;
 
2127
        A[51] = 0.00000000;
 
2128
        A[52] = 0.00000000;
 
2129
        A[53] = 0.00000000;
 
2130
        A[54] = 0.00000000;
 
2131
        A[55] = 0.00000000;
 
2132
        A[56] = 0.00000000;
 
2133
        A[57] = 0.00000000;
 
2134
        A[58] = 0.00000000;
 
2135
        A[59] = 0.00000000;
 
2136
        A[60] = 0.00000000;
 
2137
        A[61] = 0.00000000;
 
2138
        A[62] = 0.00000000;
 
2139
        A[63] = 0.00000000;
 
2140
          break;
 
2141
        }
 
2142
      case 1:
 
2143
        {
 
2144
          A[0] = 0.08333333*G0_;
 
2145
        A[1] = 0.04166667*G0_;
 
2146
        A[2] = 0.00000000;
 
2147
        A[3] = 0.04166667*G0_;
 
2148
        A[4] = 0.00000000;
 
2149
        A[5] = 0.00000000;
 
2150
        A[6] = 0.00000000;
 
2151
        A[7] = 0.00000000;
 
2152
        A[8] = 0.04166667*G0_;
 
2153
        A[9] = 0.08333333*G0_;
 
2154
        A[10] = 0.00000000;
 
2155
        A[11] = 0.04166667*G0_;
 
2156
        A[12] = 0.00000000;
 
2157
        A[13] = 0.00000000;
 
2158
        A[14] = 0.00000000;
 
2159
        A[15] = 0.00000000;
 
2160
        A[16] = 0.00000000;
 
2161
        A[17] = 0.00000000;
 
2162
        A[18] = 0.00000000;
 
2163
        A[19] = 0.00000000;
 
2164
        A[20] = 0.00000000;
 
2165
        A[21] = 0.00000000;
 
2166
        A[22] = 0.00000000;
 
2167
        A[23] = 0.00000000;
 
2168
        A[24] = 0.04166667*G0_;
 
2169
        A[25] = 0.04166667*G0_;
 
2170
        A[26] = 0.00000000;
 
2171
        A[27] = 0.08333333*G0_;
 
2172
        A[28] = 0.00000000;
 
2173
        A[29] = 0.00000000;
 
2174
        A[30] = 0.00000000;
 
2175
        A[31] = 0.00000000;
 
2176
        A[32] = 0.00000000;
 
2177
        A[33] = 0.00000000;
 
2178
        A[34] = 0.00000000;
 
2179
        A[35] = 0.00000000;
 
2180
        A[36] = 0.00000000;
 
2181
        A[37] = 0.00000000;
 
2182
        A[38] = 0.00000000;
 
2183
        A[39] = 0.00000000;
 
2184
        A[40] = 0.00000000;
 
2185
        A[41] = 0.00000000;
 
2186
        A[42] = 0.00000000;
 
2187
        A[43] = 0.00000000;
 
2188
        A[44] = 0.00000000;
 
2189
        A[45] = 0.00000000;
 
2190
        A[46] = 0.00000000;
 
2191
        A[47] = 0.00000000;
 
2192
        A[48] = 0.00000000;
 
2193
        A[49] = 0.00000000;
 
2194
        A[50] = 0.00000000;
 
2195
        A[51] = 0.00000000;
 
2196
        A[52] = 0.00000000;
 
2197
        A[53] = 0.00000000;
 
2198
        A[54] = 0.00000000;
 
2199
        A[55] = 0.00000000;
 
2200
        A[56] = 0.00000000;
 
2201
        A[57] = 0.00000000;
 
2202
        A[58] = 0.00000000;
 
2203
        A[59] = 0.00000000;
 
2204
        A[60] = 0.00000000;
 
2205
        A[61] = 0.00000000;
 
2206
        A[62] = 0.00000000;
 
2207
        A[63] = 0.00000000;
 
2208
          break;
 
2209
        }
 
2210
      case 2:
 
2211
        {
 
2212
          A[0] = 0.08333333*G0_;
 
2213
        A[1] = 0.04166667*G0_;
 
2214
        A[2] = 0.00000000;
 
2215
        A[3] = 0.04166667*G0_;
 
2216
        A[4] = 0.00000000;
 
2217
        A[5] = 0.00000000;
 
2218
        A[6] = 0.00000000;
 
2219
        A[7] = 0.00000000;
 
2220
        A[8] = 0.04166667*G0_;
 
2221
        A[9] = 0.08333333*G0_;
 
2222
        A[10] = 0.00000000;
 
2223
        A[11] = 0.04166667*G0_;
 
2224
        A[12] = 0.00000000;
 
2225
        A[13] = 0.00000000;
 
2226
        A[14] = 0.00000000;
 
2227
        A[15] = 0.00000000;
 
2228
        A[16] = 0.00000000;
 
2229
        A[17] = 0.00000000;
 
2230
        A[18] = 0.00000000;
 
2231
        A[19] = 0.00000000;
 
2232
        A[20] = 0.00000000;
 
2233
        A[21] = 0.00000000;
 
2234
        A[22] = 0.00000000;
 
2235
        A[23] = 0.00000000;
 
2236
        A[24] = 0.04166667*G0_;
 
2237
        A[25] = 0.04166667*G0_;
 
2238
        A[26] = 0.00000000;
 
2239
        A[27] = 0.08333333*G0_;
 
2240
        A[28] = 0.00000000;
 
2241
        A[29] = 0.00000000;
 
2242
        A[30] = 0.00000000;
 
2243
        A[31] = 0.00000000;
 
2244
        A[32] = 0.00000000;
 
2245
        A[33] = 0.00000000;
 
2246
        A[34] = 0.00000000;
 
2247
        A[35] = 0.00000000;
 
2248
        A[36] = 0.00000000;
 
2249
        A[37] = 0.00000000;
 
2250
        A[38] = 0.00000000;
 
2251
        A[39] = 0.00000000;
 
2252
        A[40] = 0.00000000;
 
2253
        A[41] = 0.00000000;
 
2254
        A[42] = 0.00000000;
 
2255
        A[43] = 0.00000000;
 
2256
        A[44] = 0.00000000;
 
2257
        A[45] = 0.00000000;
 
2258
        A[46] = 0.00000000;
 
2259
        A[47] = 0.00000000;
 
2260
        A[48] = 0.00000000;
 
2261
        A[49] = 0.00000000;
 
2262
        A[50] = 0.00000000;
 
2263
        A[51] = 0.00000000;
 
2264
        A[52] = 0.00000000;
 
2265
        A[53] = 0.00000000;
 
2266
        A[54] = 0.00000000;
 
2267
        A[55] = 0.00000000;
 
2268
        A[56] = 0.00000000;
 
2269
        A[57] = 0.00000000;
 
2270
        A[58] = 0.00000000;
 
2271
        A[59] = 0.00000000;
 
2272
        A[60] = 0.00000000;
 
2273
        A[61] = 0.00000000;
 
2274
        A[62] = 0.00000000;
 
2275
        A[63] = 0.00000000;
 
2276
          break;
 
2277
        }
 
2278
      case 3:
 
2279
        {
 
2280
          A[0] = 0.08333333*G0_;
 
2281
        A[1] = 0.04166667*G0_;
 
2282
        A[2] = 0.00000000;
 
2283
        A[3] = 0.04166667*G0_;
 
2284
        A[4] = 0.00000000;
 
2285
        A[5] = 0.00000000;
 
2286
        A[6] = 0.00000000;
 
2287
        A[7] = 0.00000000;
 
2288
        A[8] = 0.04166667*G0_;
 
2289
        A[9] = 0.08333333*G0_;
 
2290
        A[10] = 0.00000000;
 
2291
        A[11] = 0.04166667*G0_;
 
2292
        A[12] = 0.00000000;
 
2293
        A[13] = 0.00000000;
 
2294
        A[14] = 0.00000000;
 
2295
        A[15] = 0.00000000;
 
2296
        A[16] = 0.00000000;
 
2297
        A[17] = 0.00000000;
 
2298
        A[18] = 0.00000000;
 
2299
        A[19] = 0.00000000;
 
2300
        A[20] = 0.00000000;
 
2301
        A[21] = 0.00000000;
 
2302
        A[22] = 0.00000000;
 
2303
        A[23] = 0.00000000;
 
2304
        A[24] = 0.04166667*G0_;
 
2305
        A[25] = 0.04166667*G0_;
 
2306
        A[26] = 0.00000000;
 
2307
        A[27] = 0.08333333*G0_;
 
2308
        A[28] = 0.00000000;
 
2309
        A[29] = 0.00000000;
 
2310
        A[30] = 0.00000000;
 
2311
        A[31] = 0.00000000;
 
2312
        A[32] = 0.00000000;
 
2313
        A[33] = 0.00000000;
 
2314
        A[34] = 0.00000000;
 
2315
        A[35] = 0.00000000;
 
2316
        A[36] = 0.00000000;
 
2317
        A[37] = 0.00000000;
 
2318
        A[38] = 0.00000000;
 
2319
        A[39] = 0.00000000;
 
2320
        A[40] = 0.00000000;
 
2321
        A[41] = 0.00000000;
 
2322
        A[42] = 0.00000000;
 
2323
        A[43] = 0.00000000;
 
2324
        A[44] = 0.00000000;
 
2325
        A[45] = 0.00000000;
 
2326
        A[46] = 0.00000000;
 
2327
        A[47] = 0.00000000;
 
2328
        A[48] = 0.00000000;
 
2329
        A[49] = 0.00000000;
 
2330
        A[50] = 0.00000000;
 
2331
        A[51] = 0.00000000;
 
2332
        A[52] = 0.00000000;
 
2333
        A[53] = 0.00000000;
 
2334
        A[54] = 0.00000000;
 
2335
        A[55] = 0.00000000;
 
2336
        A[56] = 0.00000000;
 
2337
        A[57] = 0.00000000;
 
2338
        A[58] = 0.00000000;
 
2339
        A[59] = 0.00000000;
 
2340
        A[60] = 0.00000000;
 
2341
        A[61] = 0.00000000;
 
2342
        A[62] = 0.00000000;
 
2343
        A[63] = 0.00000000;
 
2344
          break;
 
2345
        }
 
2346
      }
 
2347
      
 
2348
        break;
 
2349
      }
 
2350
    case 3:
 
2351
      {
 
2352
        switch (facet1)
 
2353
      {
 
2354
      case 0:
 
2355
        {
 
2356
          A[0] = 0.08333333*G0_;
 
2357
        A[1] = 0.04166667*G0_;
 
2358
        A[2] = 0.04166667*G0_;
 
2359
        A[3] = 0.00000000;
 
2360
        A[4] = 0.00000000;
 
2361
        A[5] = 0.00000000;
 
2362
        A[6] = 0.00000000;
 
2363
        A[7] = 0.00000000;
 
2364
        A[8] = 0.04166667*G0_;
 
2365
        A[9] = 0.08333333*G0_;
 
2366
        A[10] = 0.04166667*G0_;
 
2367
        A[11] = 0.00000000;
 
2368
        A[12] = 0.00000000;
 
2369
        A[13] = 0.00000000;
 
2370
        A[14] = 0.00000000;
 
2371
        A[15] = 0.00000000;
 
2372
        A[16] = 0.04166667*G0_;
 
2373
        A[17] = 0.04166667*G0_;
 
2374
        A[18] = 0.08333333*G0_;
 
2375
        A[19] = 0.00000000;
 
2376
        A[20] = 0.00000000;
 
2377
        A[21] = 0.00000000;
 
2378
        A[22] = 0.00000000;
 
2379
        A[23] = 0.00000000;
 
2380
        A[24] = 0.00000000;
 
2381
        A[25] = 0.00000000;
 
2382
        A[26] = 0.00000000;
 
2383
        A[27] = 0.00000000;
 
2384
        A[28] = 0.00000000;
 
2385
        A[29] = 0.00000000;
 
2386
        A[30] = 0.00000000;
 
2387
        A[31] = 0.00000000;
 
2388
        A[32] = 0.00000000;
 
2389
        A[33] = 0.00000000;
 
2390
        A[34] = 0.00000000;
 
2391
        A[35] = 0.00000000;
 
2392
        A[36] = 0.00000000;
 
2393
        A[37] = 0.00000000;
 
2394
        A[38] = 0.00000000;
 
2395
        A[39] = 0.00000000;
 
2396
        A[40] = 0.00000000;
 
2397
        A[41] = 0.00000000;
 
2398
        A[42] = 0.00000000;
 
2399
        A[43] = 0.00000000;
 
2400
        A[44] = 0.00000000;
 
2401
        A[45] = 0.00000000;
 
2402
        A[46] = 0.00000000;
 
2403
        A[47] = 0.00000000;
 
2404
        A[48] = 0.00000000;
 
2405
        A[49] = 0.00000000;
 
2406
        A[50] = 0.00000000;
 
2407
        A[51] = 0.00000000;
 
2408
        A[52] = 0.00000000;
 
2409
        A[53] = 0.00000000;
 
2410
        A[54] = 0.00000000;
 
2411
        A[55] = 0.00000000;
 
2412
        A[56] = 0.00000000;
 
2413
        A[57] = 0.00000000;
 
2414
        A[58] = 0.00000000;
 
2415
        A[59] = 0.00000000;
 
2416
        A[60] = 0.00000000;
 
2417
        A[61] = 0.00000000;
 
2418
        A[62] = 0.00000000;
 
2419
        A[63] = 0.00000000;
 
2420
          break;
 
2421
        }
 
2422
      case 1:
 
2423
        {
 
2424
          A[0] = 0.08333333*G0_;
 
2425
        A[1] = 0.04166667*G0_;
 
2426
        A[2] = 0.04166667*G0_;
 
2427
        A[3] = 0.00000000;
 
2428
        A[4] = 0.00000000;
 
2429
        A[5] = 0.00000000;
 
2430
        A[6] = 0.00000000;
 
2431
        A[7] = 0.00000000;
 
2432
        A[8] = 0.04166667*G0_;
 
2433
        A[9] = 0.08333333*G0_;
 
2434
        A[10] = 0.04166667*G0_;
 
2435
        A[11] = 0.00000000;
 
2436
        A[12] = 0.00000000;
 
2437
        A[13] = 0.00000000;
 
2438
        A[14] = 0.00000000;
 
2439
        A[15] = 0.00000000;
 
2440
        A[16] = 0.04166667*G0_;
 
2441
        A[17] = 0.04166667*G0_;
 
2442
        A[18] = 0.08333333*G0_;
 
2443
        A[19] = 0.00000000;
 
2444
        A[20] = 0.00000000;
 
2445
        A[21] = 0.00000000;
 
2446
        A[22] = 0.00000000;
 
2447
        A[23] = 0.00000000;
 
2448
        A[24] = 0.00000000;
 
2449
        A[25] = 0.00000000;
 
2450
        A[26] = 0.00000000;
 
2451
        A[27] = 0.00000000;
 
2452
        A[28] = 0.00000000;
 
2453
        A[29] = 0.00000000;
 
2454
        A[30] = 0.00000000;
 
2455
        A[31] = 0.00000000;
 
2456
        A[32] = 0.00000000;
 
2457
        A[33] = 0.00000000;
 
2458
        A[34] = 0.00000000;
 
2459
        A[35] = 0.00000000;
 
2460
        A[36] = 0.00000000;
 
2461
        A[37] = 0.00000000;
 
2462
        A[38] = 0.00000000;
 
2463
        A[39] = 0.00000000;
 
2464
        A[40] = 0.00000000;
 
2465
        A[41] = 0.00000000;
 
2466
        A[42] = 0.00000000;
 
2467
        A[43] = 0.00000000;
 
2468
        A[44] = 0.00000000;
 
2469
        A[45] = 0.00000000;
 
2470
        A[46] = 0.00000000;
 
2471
        A[47] = 0.00000000;
 
2472
        A[48] = 0.00000000;
 
2473
        A[49] = 0.00000000;
 
2474
        A[50] = 0.00000000;
 
2475
        A[51] = 0.00000000;
 
2476
        A[52] = 0.00000000;
 
2477
        A[53] = 0.00000000;
 
2478
        A[54] = 0.00000000;
 
2479
        A[55] = 0.00000000;
 
2480
        A[56] = 0.00000000;
 
2481
        A[57] = 0.00000000;
 
2482
        A[58] = 0.00000000;
 
2483
        A[59] = 0.00000000;
 
2484
        A[60] = 0.00000000;
 
2485
        A[61] = 0.00000000;
 
2486
        A[62] = 0.00000000;
 
2487
        A[63] = 0.00000000;
 
2488
          break;
 
2489
        }
 
2490
      case 2:
 
2491
        {
 
2492
          A[0] = 0.08333333*G0_;
 
2493
        A[1] = 0.04166667*G0_;
 
2494
        A[2] = 0.04166667*G0_;
 
2495
        A[3] = 0.00000000;
 
2496
        A[4] = 0.00000000;
 
2497
        A[5] = 0.00000000;
 
2498
        A[6] = 0.00000000;
 
2499
        A[7] = 0.00000000;
 
2500
        A[8] = 0.04166667*G0_;
 
2501
        A[9] = 0.08333333*G0_;
 
2502
        A[10] = 0.04166667*G0_;
 
2503
        A[11] = 0.00000000;
 
2504
        A[12] = 0.00000000;
 
2505
        A[13] = 0.00000000;
 
2506
        A[14] = 0.00000000;
 
2507
        A[15] = 0.00000000;
 
2508
        A[16] = 0.04166667*G0_;
 
2509
        A[17] = 0.04166667*G0_;
 
2510
        A[18] = 0.08333333*G0_;
 
2511
        A[19] = 0.00000000;
 
2512
        A[20] = 0.00000000;
 
2513
        A[21] = 0.00000000;
 
2514
        A[22] = 0.00000000;
 
2515
        A[23] = 0.00000000;
 
2516
        A[24] = 0.00000000;
 
2517
        A[25] = 0.00000000;
 
2518
        A[26] = 0.00000000;
 
2519
        A[27] = 0.00000000;
 
2520
        A[28] = 0.00000000;
 
2521
        A[29] = 0.00000000;
 
2522
        A[30] = 0.00000000;
 
2523
        A[31] = 0.00000000;
 
2524
        A[32] = 0.00000000;
 
2525
        A[33] = 0.00000000;
 
2526
        A[34] = 0.00000000;
 
2527
        A[35] = 0.00000000;
 
2528
        A[36] = 0.00000000;
 
2529
        A[37] = 0.00000000;
 
2530
        A[38] = 0.00000000;
 
2531
        A[39] = 0.00000000;
 
2532
        A[40] = 0.00000000;
 
2533
        A[41] = 0.00000000;
 
2534
        A[42] = 0.00000000;
 
2535
        A[43] = 0.00000000;
 
2536
        A[44] = 0.00000000;
 
2537
        A[45] = 0.00000000;
 
2538
        A[46] = 0.00000000;
 
2539
        A[47] = 0.00000000;
 
2540
        A[48] = 0.00000000;
 
2541
        A[49] = 0.00000000;
 
2542
        A[50] = 0.00000000;
 
2543
        A[51] = 0.00000000;
 
2544
        A[52] = 0.00000000;
 
2545
        A[53] = 0.00000000;
 
2546
        A[54] = 0.00000000;
 
2547
        A[55] = 0.00000000;
 
2548
        A[56] = 0.00000000;
 
2549
        A[57] = 0.00000000;
 
2550
        A[58] = 0.00000000;
 
2551
        A[59] = 0.00000000;
 
2552
        A[60] = 0.00000000;
 
2553
        A[61] = 0.00000000;
 
2554
        A[62] = 0.00000000;
 
2555
        A[63] = 0.00000000;
 
2556
          break;
 
2557
        }
 
2558
      case 3:
 
2559
        {
 
2560
          A[0] = 0.08333333*G0_;
 
2561
        A[1] = 0.04166667*G0_;
 
2562
        A[2] = 0.04166667*G0_;
 
2563
        A[3] = 0.00000000;
 
2564
        A[4] = 0.00000000;
 
2565
        A[5] = 0.00000000;
 
2566
        A[6] = 0.00000000;
 
2567
        A[7] = 0.00000000;
 
2568
        A[8] = 0.04166667*G0_;
 
2569
        A[9] = 0.08333333*G0_;
 
2570
        A[10] = 0.04166667*G0_;
 
2571
        A[11] = 0.00000000;
 
2572
        A[12] = 0.00000000;
 
2573
        A[13] = 0.00000000;
 
2574
        A[14] = 0.00000000;
 
2575
        A[15] = 0.00000000;
 
2576
        A[16] = 0.04166667*G0_;
 
2577
        A[17] = 0.04166667*G0_;
 
2578
        A[18] = 0.08333333*G0_;
 
2579
        A[19] = 0.00000000;
 
2580
        A[20] = 0.00000000;
 
2581
        A[21] = 0.00000000;
 
2582
        A[22] = 0.00000000;
 
2583
        A[23] = 0.00000000;
 
2584
        A[24] = 0.00000000;
 
2585
        A[25] = 0.00000000;
 
2586
        A[26] = 0.00000000;
 
2587
        A[27] = 0.00000000;
 
2588
        A[28] = 0.00000000;
 
2589
        A[29] = 0.00000000;
 
2590
        A[30] = 0.00000000;
 
2591
        A[31] = 0.00000000;
 
2592
        A[32] = 0.00000000;
 
2593
        A[33] = 0.00000000;
 
2594
        A[34] = 0.00000000;
 
2595
        A[35] = 0.00000000;
 
2596
        A[36] = 0.00000000;
 
2597
        A[37] = 0.00000000;
 
2598
        A[38] = 0.00000000;
 
2599
        A[39] = 0.00000000;
 
2600
        A[40] = 0.00000000;
 
2601
        A[41] = 0.00000000;
 
2602
        A[42] = 0.00000000;
 
2603
        A[43] = 0.00000000;
 
2604
        A[44] = 0.00000000;
 
2605
        A[45] = 0.00000000;
 
2606
        A[46] = 0.00000000;
 
2607
        A[47] = 0.00000000;
 
2608
        A[48] = 0.00000000;
 
2609
        A[49] = 0.00000000;
 
2610
        A[50] = 0.00000000;
 
2611
        A[51] = 0.00000000;
 
2612
        A[52] = 0.00000000;
 
2613
        A[53] = 0.00000000;
 
2614
        A[54] = 0.00000000;
 
2615
        A[55] = 0.00000000;
 
2616
        A[56] = 0.00000000;
 
2617
        A[57] = 0.00000000;
 
2618
        A[58] = 0.00000000;
 
2619
        A[59] = 0.00000000;
 
2620
        A[60] = 0.00000000;
 
2621
        A[61] = 0.00000000;
 
2622
        A[62] = 0.00000000;
 
2623
        A[63] = 0.00000000;
 
2624
          break;
 
2625
        }
 
2626
      }
 
2627
      
 
2628
        break;
 
2629
      }
 
2630
    }
 
2631
    
 
2632
  }
 
2633
 
 
2634
};
 
2635
 
 
2636
/// This class defines the interface for the tabulation of the
 
2637
/// interior facet tensor corresponding to the local contribution to
 
2638
/// a form from the integral over an interior facet.
 
2639
 
 
2640
class subdomains_interior_facet_integral_0_1: public ufc::interior_facet_integral
 
2641
{
 
2642
public:
 
2643
 
 
2644
  /// Constructor
 
2645
  subdomains_interior_facet_integral_0_1() : ufc::interior_facet_integral()
 
2646
  {
 
2647
    // Do nothing
 
2648
  }
 
2649
 
 
2650
  /// Destructor
 
2651
  virtual ~subdomains_interior_facet_integral_0_1()
 
2652
  {
 
2653
    // Do nothing
 
2654
  }
 
2655
 
 
2656
  /// Tabulate the tensor for the contribution from a local interior facet
 
2657
  virtual void tabulate_tensor(double* A,
 
2658
                               const double * const * w,
 
2659
                               const ufc::cell& c0,
 
2660
                               const ufc::cell& c1,
 
2661
                               unsigned int facet0,
 
2662
                               unsigned int facet1) const
 
2663
  {
 
2664
    // Number of operations (multiply-add pairs) for Jacobian data:      83
 
2665
    // Number of operations (multiply-add pairs) for geometry tensor:    0
 
2666
    // Number of operations (multiply-add pairs) for tensor contraction: 72
 
2667
    // Total number of operations (multiply-add pairs):                  155
 
2668
    
 
2669
    // Extract vertex coordinates
 
2670
    const double * const * x0 = c0.coordinates;
 
2671
    
 
2672
    // Compute Jacobian of affine map from reference cell
 
2673
    
 
2674
    // Compute sub determinants
 
2675
    
 
2676
    // Compute determinant of Jacobian
 
2677
    
 
2678
    // Compute inverse of Jacobian
 
2679
    
 
2680
    // Compute Jacobian of affine map from reference cell
 
2681
    
 
2682
    // Compute sub determinants
 
2683
    
 
2684
    // Compute determinant of Jacobian
 
2685
    
 
2686
    // Compute inverse of Jacobian
 
2687
    
 
2688
    // Get vertices on face
 
2689
    static unsigned int face_vertices[4][3] = {{1, 2, 3}, {0, 2, 3}, {0, 1, 3}, {0, 1, 2}};
 
2690
    const unsigned int v0 = face_vertices[facet0][0];
 
2691
    const unsigned int v1 = face_vertices[facet0][1];
 
2692
    const unsigned int v2 = face_vertices[facet0][2];
 
2693
    
 
2694
    // Compute scale factor (area of face scaled by area of reference triangle)
 
2695
    const double a0 = (x0[v0][1]*x0[v1][2]
 
2696
                     + x0[v0][2]*x0[v2][1]
 
2697
                     + x0[v1][1]*x0[v2][2])
 
2698
                    - (x0[v2][1]*x0[v1][2]
 
2699
                     + x0[v2][2]*x0[v0][1]
 
2700
                     + x0[v1][1]*x0[v0][2]);
 
2701
    
 
2702
    const double a1 = (x0[v0][2]*x0[v1][0]
 
2703
                     + x0[v0][0]*x0[v2][2]
 
2704
                     + x0[v1][2]*x0[v2][0])
 
2705
                    - (x0[v2][2]*x0[v1][0]
 
2706
                     + x0[v2][0]*x0[v0][2]
 
2707
                    + x0[v1][2]*x0[v0][0]);
 
2708
    
 
2709
    const double a2 = (x0[v0][0]*x0[v1][1]
 
2710
                     + x0[v0][1]*x0[v2][0]
 
2711
                     + x0[v1][0]*x0[v2][1])
 
2712
                    - (x0[v2][0]*x0[v1][1]
 
2713
                     + x0[v2][1]*x0[v0][0]
 
2714
                     + x0[v1][0]*x0[v0][1]);
 
2715
    
 
2716
    const double det = std::sqrt(a0*a0 + a1*a1 + a2*a2);
 
2717
    
 
2718
    // Compute geometry tensor
 
2719
    const double G0_ = det;
 
2720
    
 
2721
    // Compute element tensor
 
2722
    switch (facet0)
 
2723
    {
 
2724
    case 0:
 
2725
      {
 
2726
        switch (facet1)
 
2727
      {
 
2728
      case 0:
 
2729
        {
 
2730
          A[0] = 0.00000000;
 
2731
        A[1] = 0.00000000;
 
2732
        A[2] = 0.00000000;
 
2733
        A[3] = 0.00000000;
 
2734
        A[4] = 0.00000000;
 
2735
        A[5] = 0.00000000;
 
2736
        A[6] = 0.00000000;
 
2737
        A[7] = 0.00000000;
 
2738
        A[8] = 0.00000000;
 
2739
        A[9] = 0.35833333*G0_;
 
2740
        A[10] = 0.17916667*G0_;
 
2741
        A[11] = 0.17916667*G0_;
 
2742
        A[12] = 0.00000000;
 
2743
        A[13] = 0.00000000;
 
2744
        A[14] = 0.00000000;
 
2745
        A[15] = 0.00000000;
 
2746
        A[16] = 0.00000000;
 
2747
        A[17] = 0.17916667*G0_;
 
2748
        A[18] = 0.35833333*G0_;
 
2749
        A[19] = 0.17916667*G0_;
 
2750
        A[20] = 0.00000000;
 
2751
        A[21] = 0.00000000;
 
2752
        A[22] = 0.00000000;
 
2753
        A[23] = 0.00000000;
 
2754
        A[24] = 0.00000000;
 
2755
        A[25] = 0.17916667*G0_;
 
2756
        A[26] = 0.17916667*G0_;
 
2757
        A[27] = 0.35833333*G0_;
 
2758
        A[28] = 0.00000000;
 
2759
        A[29] = 0.00000000;
 
2760
        A[30] = 0.00000000;
 
2761
        A[31] = 0.00000000;
 
2762
        A[32] = 0.00000000;
 
2763
        A[33] = 0.00000000;
 
2764
        A[34] = 0.00000000;
 
2765
        A[35] = 0.00000000;
 
2766
        A[36] = 0.00000000;
 
2767
        A[37] = 0.00000000;
 
2768
        A[38] = 0.00000000;
 
2769
        A[39] = 0.00000000;
 
2770
        A[40] = 0.00000000;
 
2771
        A[41] = 0.00000000;
 
2772
        A[42] = 0.00000000;
 
2773
        A[43] = 0.00000000;
 
2774
        A[44] = 0.00000000;
 
2775
        A[45] = 0.00000000;
 
2776
        A[46] = 0.00000000;
 
2777
        A[47] = 0.00000000;
 
2778
        A[48] = 0.00000000;
 
2779
        A[49] = 0.00000000;
 
2780
        A[50] = 0.00000000;
 
2781
        A[51] = 0.00000000;
 
2782
        A[52] = 0.00000000;
 
2783
        A[53] = 0.00000000;
 
2784
        A[54] = 0.00000000;
 
2785
        A[55] = 0.00000000;
 
2786
        A[56] = 0.00000000;
 
2787
        A[57] = 0.00000000;
 
2788
        A[58] = 0.00000000;
 
2789
        A[59] = 0.00000000;
 
2790
        A[60] = 0.00000000;
 
2791
        A[61] = 0.00000000;
 
2792
        A[62] = 0.00000000;
 
2793
        A[63] = 0.00000000;
 
2794
          break;
 
2795
        }
 
2796
      case 1:
 
2797
        {
 
2798
          A[0] = 0.00000000;
 
2799
        A[1] = 0.00000000;
 
2800
        A[2] = 0.00000000;
 
2801
        A[3] = 0.00000000;
 
2802
        A[4] = 0.00000000;
 
2803
        A[5] = 0.00000000;
 
2804
        A[6] = 0.00000000;
 
2805
        A[7] = 0.00000000;
 
2806
        A[8] = 0.00000000;
 
2807
        A[9] = 0.35833333*G0_;
 
2808
        A[10] = 0.17916667*G0_;
 
2809
        A[11] = 0.17916667*G0_;
 
2810
        A[12] = 0.00000000;
 
2811
        A[13] = 0.00000000;
 
2812
        A[14] = 0.00000000;
 
2813
        A[15] = 0.00000000;
 
2814
        A[16] = 0.00000000;
 
2815
        A[17] = 0.17916667*G0_;
 
2816
        A[18] = 0.35833333*G0_;
 
2817
        A[19] = 0.17916667*G0_;
 
2818
        A[20] = 0.00000000;
 
2819
        A[21] = 0.00000000;
 
2820
        A[22] = 0.00000000;
 
2821
        A[23] = 0.00000000;
 
2822
        A[24] = 0.00000000;
 
2823
        A[25] = 0.17916667*G0_;
 
2824
        A[26] = 0.17916667*G0_;
 
2825
        A[27] = 0.35833333*G0_;
 
2826
        A[28] = 0.00000000;
 
2827
        A[29] = 0.00000000;
 
2828
        A[30] = 0.00000000;
 
2829
        A[31] = 0.00000000;
 
2830
        A[32] = 0.00000000;
 
2831
        A[33] = 0.00000000;
 
2832
        A[34] = 0.00000000;
 
2833
        A[35] = 0.00000000;
 
2834
        A[36] = 0.00000000;
 
2835
        A[37] = 0.00000000;
 
2836
        A[38] = 0.00000000;
 
2837
        A[39] = 0.00000000;
 
2838
        A[40] = 0.00000000;
 
2839
        A[41] = 0.00000000;
 
2840
        A[42] = 0.00000000;
 
2841
        A[43] = 0.00000000;
 
2842
        A[44] = 0.00000000;
 
2843
        A[45] = 0.00000000;
 
2844
        A[46] = 0.00000000;
 
2845
        A[47] = 0.00000000;
 
2846
        A[48] = 0.00000000;
 
2847
        A[49] = 0.00000000;
 
2848
        A[50] = 0.00000000;
 
2849
        A[51] = 0.00000000;
 
2850
        A[52] = 0.00000000;
 
2851
        A[53] = 0.00000000;
 
2852
        A[54] = 0.00000000;
 
2853
        A[55] = 0.00000000;
 
2854
        A[56] = 0.00000000;
 
2855
        A[57] = 0.00000000;
 
2856
        A[58] = 0.00000000;
 
2857
        A[59] = 0.00000000;
 
2858
        A[60] = 0.00000000;
 
2859
        A[61] = 0.00000000;
 
2860
        A[62] = 0.00000000;
 
2861
        A[63] = 0.00000000;
 
2862
          break;
 
2863
        }
 
2864
      case 2:
 
2865
        {
 
2866
          A[0] = 0.00000000;
 
2867
        A[1] = 0.00000000;
 
2868
        A[2] = 0.00000000;
 
2869
        A[3] = 0.00000000;
 
2870
        A[4] = 0.00000000;
 
2871
        A[5] = 0.00000000;
 
2872
        A[6] = 0.00000000;
 
2873
        A[7] = 0.00000000;
 
2874
        A[8] = 0.00000000;
 
2875
        A[9] = 0.35833333*G0_;
 
2876
        A[10] = 0.17916667*G0_;
 
2877
        A[11] = 0.17916667*G0_;
 
2878
        A[12] = 0.00000000;
 
2879
        A[13] = 0.00000000;
 
2880
        A[14] = 0.00000000;
 
2881
        A[15] = 0.00000000;
 
2882
        A[16] = 0.00000000;
 
2883
        A[17] = 0.17916667*G0_;
 
2884
        A[18] = 0.35833333*G0_;
 
2885
        A[19] = 0.17916667*G0_;
 
2886
        A[20] = 0.00000000;
 
2887
        A[21] = 0.00000000;
 
2888
        A[22] = 0.00000000;
 
2889
        A[23] = 0.00000000;
 
2890
        A[24] = 0.00000000;
 
2891
        A[25] = 0.17916667*G0_;
 
2892
        A[26] = 0.17916667*G0_;
 
2893
        A[27] = 0.35833333*G0_;
 
2894
        A[28] = 0.00000000;
 
2895
        A[29] = 0.00000000;
 
2896
        A[30] = 0.00000000;
 
2897
        A[31] = 0.00000000;
 
2898
        A[32] = 0.00000000;
 
2899
        A[33] = 0.00000000;
 
2900
        A[34] = 0.00000000;
 
2901
        A[35] = 0.00000000;
 
2902
        A[36] = 0.00000000;
 
2903
        A[37] = 0.00000000;
 
2904
        A[38] = 0.00000000;
 
2905
        A[39] = 0.00000000;
 
2906
        A[40] = 0.00000000;
 
2907
        A[41] = 0.00000000;
 
2908
        A[42] = 0.00000000;
 
2909
        A[43] = 0.00000000;
 
2910
        A[44] = 0.00000000;
 
2911
        A[45] = 0.00000000;
 
2912
        A[46] = 0.00000000;
 
2913
        A[47] = 0.00000000;
 
2914
        A[48] = 0.00000000;
 
2915
        A[49] = 0.00000000;
 
2916
        A[50] = 0.00000000;
 
2917
        A[51] = 0.00000000;
 
2918
        A[52] = 0.00000000;
 
2919
        A[53] = 0.00000000;
 
2920
        A[54] = 0.00000000;
 
2921
        A[55] = 0.00000000;
 
2922
        A[56] = 0.00000000;
 
2923
        A[57] = 0.00000000;
 
2924
        A[58] = 0.00000000;
 
2925
        A[59] = 0.00000000;
 
2926
        A[60] = 0.00000000;
 
2927
        A[61] = 0.00000000;
 
2928
        A[62] = 0.00000000;
 
2929
        A[63] = 0.00000000;
 
2930
          break;
 
2931
        }
 
2932
      case 3:
 
2933
        {
 
2934
          A[0] = 0.00000000;
 
2935
        A[1] = 0.00000000;
 
2936
        A[2] = 0.00000000;
 
2937
        A[3] = 0.00000000;
 
2938
        A[4] = 0.00000000;
 
2939
        A[5] = 0.00000000;
 
2940
        A[6] = 0.00000000;
 
2941
        A[7] = 0.00000000;
 
2942
        A[8] = 0.00000000;
 
2943
        A[9] = 0.35833333*G0_;
 
2944
        A[10] = 0.17916667*G0_;
 
2945
        A[11] = 0.17916667*G0_;
 
2946
        A[12] = 0.00000000;
 
2947
        A[13] = 0.00000000;
 
2948
        A[14] = 0.00000000;
 
2949
        A[15] = 0.00000000;
 
2950
        A[16] = 0.00000000;
 
2951
        A[17] = 0.17916667*G0_;
 
2952
        A[18] = 0.35833333*G0_;
 
2953
        A[19] = 0.17916667*G0_;
 
2954
        A[20] = 0.00000000;
 
2955
        A[21] = 0.00000000;
 
2956
        A[22] = 0.00000000;
 
2957
        A[23] = 0.00000000;
 
2958
        A[24] = 0.00000000;
 
2959
        A[25] = 0.17916667*G0_;
 
2960
        A[26] = 0.17916667*G0_;
 
2961
        A[27] = 0.35833333*G0_;
 
2962
        A[28] = 0.00000000;
 
2963
        A[29] = 0.00000000;
 
2964
        A[30] = 0.00000000;
 
2965
        A[31] = 0.00000000;
 
2966
        A[32] = 0.00000000;
 
2967
        A[33] = 0.00000000;
 
2968
        A[34] = 0.00000000;
 
2969
        A[35] = 0.00000000;
 
2970
        A[36] = 0.00000000;
 
2971
        A[37] = 0.00000000;
 
2972
        A[38] = 0.00000000;
 
2973
        A[39] = 0.00000000;
 
2974
        A[40] = 0.00000000;
 
2975
        A[41] = 0.00000000;
 
2976
        A[42] = 0.00000000;
 
2977
        A[43] = 0.00000000;
 
2978
        A[44] = 0.00000000;
 
2979
        A[45] = 0.00000000;
 
2980
        A[46] = 0.00000000;
 
2981
        A[47] = 0.00000000;
 
2982
        A[48] = 0.00000000;
 
2983
        A[49] = 0.00000000;
 
2984
        A[50] = 0.00000000;
 
2985
        A[51] = 0.00000000;
 
2986
        A[52] = 0.00000000;
 
2987
        A[53] = 0.00000000;
 
2988
        A[54] = 0.00000000;
 
2989
        A[55] = 0.00000000;
 
2990
        A[56] = 0.00000000;
 
2991
        A[57] = 0.00000000;
 
2992
        A[58] = 0.00000000;
 
2993
        A[59] = 0.00000000;
 
2994
        A[60] = 0.00000000;
 
2995
        A[61] = 0.00000000;
 
2996
        A[62] = 0.00000000;
 
2997
        A[63] = 0.00000000;
 
2998
          break;
 
2999
        }
 
3000
      }
 
3001
      
 
3002
        break;
 
3003
      }
 
3004
    case 1:
 
3005
      {
 
3006
        switch (facet1)
 
3007
      {
 
3008
      case 0:
 
3009
        {
 
3010
          A[0] = 0.35833333*G0_;
 
3011
        A[1] = 0.00000000;
 
3012
        A[2] = 0.17916667*G0_;
 
3013
        A[3] = 0.17916667*G0_;
 
3014
        A[4] = 0.00000000;
 
3015
        A[5] = 0.00000000;
 
3016
        A[6] = 0.00000000;
 
3017
        A[7] = 0.00000000;
 
3018
        A[8] = 0.00000000;
 
3019
        A[9] = 0.00000000;
 
3020
        A[10] = 0.00000000;
 
3021
        A[11] = 0.00000000;
 
3022
        A[12] = 0.00000000;
 
3023
        A[13] = 0.00000000;
 
3024
        A[14] = 0.00000000;
 
3025
        A[15] = 0.00000000;
 
3026
        A[16] = 0.17916667*G0_;
 
3027
        A[17] = 0.00000000;
 
3028
        A[18] = 0.35833333*G0_;
 
3029
        A[19] = 0.17916667*G0_;
 
3030
        A[20] = 0.00000000;
 
3031
        A[21] = 0.00000000;
 
3032
        A[22] = 0.00000000;
 
3033
        A[23] = 0.00000000;
 
3034
        A[24] = 0.17916667*G0_;
 
3035
        A[25] = 0.00000000;
 
3036
        A[26] = 0.17916667*G0_;
 
3037
        A[27] = 0.35833333*G0_;
 
3038
        A[28] = 0.00000000;
 
3039
        A[29] = 0.00000000;
 
3040
        A[30] = 0.00000000;
 
3041
        A[31] = 0.00000000;
 
3042
        A[32] = 0.00000000;
 
3043
        A[33] = 0.00000000;
 
3044
        A[34] = 0.00000000;
 
3045
        A[35] = 0.00000000;
 
3046
        A[36] = 0.00000000;
 
3047
        A[37] = 0.00000000;
 
3048
        A[38] = 0.00000000;
 
3049
        A[39] = 0.00000000;
 
3050
        A[40] = 0.00000000;
 
3051
        A[41] = 0.00000000;
 
3052
        A[42] = 0.00000000;
 
3053
        A[43] = 0.00000000;
 
3054
        A[44] = 0.00000000;
 
3055
        A[45] = 0.00000000;
 
3056
        A[46] = 0.00000000;
 
3057
        A[47] = 0.00000000;
 
3058
        A[48] = 0.00000000;
 
3059
        A[49] = 0.00000000;
 
3060
        A[50] = 0.00000000;
 
3061
        A[51] = 0.00000000;
 
3062
        A[52] = 0.00000000;
 
3063
        A[53] = 0.00000000;
 
3064
        A[54] = 0.00000000;
 
3065
        A[55] = 0.00000000;
 
3066
        A[56] = 0.00000000;
 
3067
        A[57] = 0.00000000;
 
3068
        A[58] = 0.00000000;
 
3069
        A[59] = 0.00000000;
 
3070
        A[60] = 0.00000000;
 
3071
        A[61] = 0.00000000;
 
3072
        A[62] = 0.00000000;
 
3073
        A[63] = 0.00000000;
 
3074
          break;
 
3075
        }
 
3076
      case 1:
 
3077
        {
 
3078
          A[0] = 0.35833333*G0_;
 
3079
        A[1] = 0.00000000;
 
3080
        A[2] = 0.17916667*G0_;
 
3081
        A[3] = 0.17916667*G0_;
 
3082
        A[4] = 0.00000000;
 
3083
        A[5] = 0.00000000;
 
3084
        A[6] = 0.00000000;
 
3085
        A[7] = 0.00000000;
 
3086
        A[8] = 0.00000000;
 
3087
        A[9] = 0.00000000;
 
3088
        A[10] = 0.00000000;
 
3089
        A[11] = 0.00000000;
 
3090
        A[12] = 0.00000000;
 
3091
        A[13] = 0.00000000;
 
3092
        A[14] = 0.00000000;
 
3093
        A[15] = 0.00000000;
 
3094
        A[16] = 0.17916667*G0_;
 
3095
        A[17] = 0.00000000;
 
3096
        A[18] = 0.35833333*G0_;
 
3097
        A[19] = 0.17916667*G0_;
 
3098
        A[20] = 0.00000000;
 
3099
        A[21] = 0.00000000;
 
3100
        A[22] = 0.00000000;
 
3101
        A[23] = 0.00000000;
 
3102
        A[24] = 0.17916667*G0_;
 
3103
        A[25] = 0.00000000;
 
3104
        A[26] = 0.17916667*G0_;
 
3105
        A[27] = 0.35833333*G0_;
 
3106
        A[28] = 0.00000000;
 
3107
        A[29] = 0.00000000;
 
3108
        A[30] = 0.00000000;
 
3109
        A[31] = 0.00000000;
 
3110
        A[32] = 0.00000000;
 
3111
        A[33] = 0.00000000;
 
3112
        A[34] = 0.00000000;
 
3113
        A[35] = 0.00000000;
 
3114
        A[36] = 0.00000000;
 
3115
        A[37] = 0.00000000;
 
3116
        A[38] = 0.00000000;
 
3117
        A[39] = 0.00000000;
 
3118
        A[40] = 0.00000000;
 
3119
        A[41] = 0.00000000;
 
3120
        A[42] = 0.00000000;
 
3121
        A[43] = 0.00000000;
 
3122
        A[44] = 0.00000000;
 
3123
        A[45] = 0.00000000;
 
3124
        A[46] = 0.00000000;
 
3125
        A[47] = 0.00000000;
 
3126
        A[48] = 0.00000000;
 
3127
        A[49] = 0.00000000;
 
3128
        A[50] = 0.00000000;
 
3129
        A[51] = 0.00000000;
 
3130
        A[52] = 0.00000000;
 
3131
        A[53] = 0.00000000;
 
3132
        A[54] = 0.00000000;
 
3133
        A[55] = 0.00000000;
 
3134
        A[56] = 0.00000000;
 
3135
        A[57] = 0.00000000;
 
3136
        A[58] = 0.00000000;
 
3137
        A[59] = 0.00000000;
 
3138
        A[60] = 0.00000000;
 
3139
        A[61] = 0.00000000;
 
3140
        A[62] = 0.00000000;
 
3141
        A[63] = 0.00000000;
 
3142
          break;
 
3143
        }
 
3144
      case 2:
 
3145
        {
 
3146
          A[0] = 0.35833333*G0_;
 
3147
        A[1] = 0.00000000;
 
3148
        A[2] = 0.17916667*G0_;
 
3149
        A[3] = 0.17916667*G0_;
 
3150
        A[4] = 0.00000000;
 
3151
        A[5] = 0.00000000;
 
3152
        A[6] = 0.00000000;
 
3153
        A[7] = 0.00000000;
 
3154
        A[8] = 0.00000000;
 
3155
        A[9] = 0.00000000;
 
3156
        A[10] = 0.00000000;
 
3157
        A[11] = 0.00000000;
 
3158
        A[12] = 0.00000000;
 
3159
        A[13] = 0.00000000;
 
3160
        A[14] = 0.00000000;
 
3161
        A[15] = 0.00000000;
 
3162
        A[16] = 0.17916667*G0_;
 
3163
        A[17] = 0.00000000;
 
3164
        A[18] = 0.35833333*G0_;
 
3165
        A[19] = 0.17916667*G0_;
 
3166
        A[20] = 0.00000000;
 
3167
        A[21] = 0.00000000;
 
3168
        A[22] = 0.00000000;
 
3169
        A[23] = 0.00000000;
 
3170
        A[24] = 0.17916667*G0_;
 
3171
        A[25] = 0.00000000;
 
3172
        A[26] = 0.17916667*G0_;
 
3173
        A[27] = 0.35833333*G0_;
 
3174
        A[28] = 0.00000000;
 
3175
        A[29] = 0.00000000;
 
3176
        A[30] = 0.00000000;
 
3177
        A[31] = 0.00000000;
 
3178
        A[32] = 0.00000000;
 
3179
        A[33] = 0.00000000;
 
3180
        A[34] = 0.00000000;
 
3181
        A[35] = 0.00000000;
 
3182
        A[36] = 0.00000000;
 
3183
        A[37] = 0.00000000;
 
3184
        A[38] = 0.00000000;
 
3185
        A[39] = 0.00000000;
 
3186
        A[40] = 0.00000000;
 
3187
        A[41] = 0.00000000;
 
3188
        A[42] = 0.00000000;
 
3189
        A[43] = 0.00000000;
 
3190
        A[44] = 0.00000000;
 
3191
        A[45] = 0.00000000;
 
3192
        A[46] = 0.00000000;
 
3193
        A[47] = 0.00000000;
 
3194
        A[48] = 0.00000000;
 
3195
        A[49] = 0.00000000;
 
3196
        A[50] = 0.00000000;
 
3197
        A[51] = 0.00000000;
 
3198
        A[52] = 0.00000000;
 
3199
        A[53] = 0.00000000;
 
3200
        A[54] = 0.00000000;
 
3201
        A[55] = 0.00000000;
 
3202
        A[56] = 0.00000000;
 
3203
        A[57] = 0.00000000;
 
3204
        A[58] = 0.00000000;
 
3205
        A[59] = 0.00000000;
 
3206
        A[60] = 0.00000000;
 
3207
        A[61] = 0.00000000;
 
3208
        A[62] = 0.00000000;
 
3209
        A[63] = 0.00000000;
 
3210
          break;
 
3211
        }
 
3212
      case 3:
 
3213
        {
 
3214
          A[0] = 0.35833333*G0_;
 
3215
        A[1] = 0.00000000;
 
3216
        A[2] = 0.17916667*G0_;
 
3217
        A[3] = 0.17916667*G0_;
 
3218
        A[4] = 0.00000000;
 
3219
        A[5] = 0.00000000;
 
3220
        A[6] = 0.00000000;
 
3221
        A[7] = 0.00000000;
 
3222
        A[8] = 0.00000000;
 
3223
        A[9] = 0.00000000;
 
3224
        A[10] = 0.00000000;
 
3225
        A[11] = 0.00000000;
 
3226
        A[12] = 0.00000000;
 
3227
        A[13] = 0.00000000;
 
3228
        A[14] = 0.00000000;
 
3229
        A[15] = 0.00000000;
 
3230
        A[16] = 0.17916667*G0_;
 
3231
        A[17] = 0.00000000;
 
3232
        A[18] = 0.35833333*G0_;
 
3233
        A[19] = 0.17916667*G0_;
 
3234
        A[20] = 0.00000000;
 
3235
        A[21] = 0.00000000;
 
3236
        A[22] = 0.00000000;
 
3237
        A[23] = 0.00000000;
 
3238
        A[24] = 0.17916667*G0_;
 
3239
        A[25] = 0.00000000;
 
3240
        A[26] = 0.17916667*G0_;
 
3241
        A[27] = 0.35833333*G0_;
 
3242
        A[28] = 0.00000000;
 
3243
        A[29] = 0.00000000;
 
3244
        A[30] = 0.00000000;
 
3245
        A[31] = 0.00000000;
 
3246
        A[32] = 0.00000000;
 
3247
        A[33] = 0.00000000;
 
3248
        A[34] = 0.00000000;
 
3249
        A[35] = 0.00000000;
 
3250
        A[36] = 0.00000000;
 
3251
        A[37] = 0.00000000;
 
3252
        A[38] = 0.00000000;
 
3253
        A[39] = 0.00000000;
 
3254
        A[40] = 0.00000000;
 
3255
        A[41] = 0.00000000;
 
3256
        A[42] = 0.00000000;
 
3257
        A[43] = 0.00000000;
 
3258
        A[44] = 0.00000000;
 
3259
        A[45] = 0.00000000;
 
3260
        A[46] = 0.00000000;
 
3261
        A[47] = 0.00000000;
 
3262
        A[48] = 0.00000000;
 
3263
        A[49] = 0.00000000;
 
3264
        A[50] = 0.00000000;
 
3265
        A[51] = 0.00000000;
 
3266
        A[52] = 0.00000000;
 
3267
        A[53] = 0.00000000;
 
3268
        A[54] = 0.00000000;
 
3269
        A[55] = 0.00000000;
 
3270
        A[56] = 0.00000000;
 
3271
        A[57] = 0.00000000;
 
3272
        A[58] = 0.00000000;
 
3273
        A[59] = 0.00000000;
 
3274
        A[60] = 0.00000000;
 
3275
        A[61] = 0.00000000;
 
3276
        A[62] = 0.00000000;
 
3277
        A[63] = 0.00000000;
 
3278
          break;
 
3279
        }
 
3280
      }
 
3281
      
 
3282
        break;
 
3283
      }
 
3284
    case 2:
 
3285
      {
 
3286
        switch (facet1)
 
3287
      {
 
3288
      case 0:
 
3289
        {
 
3290
          A[0] = 0.35833333*G0_;
 
3291
        A[1] = 0.17916667*G0_;
 
3292
        A[2] = 0.00000000;
 
3293
        A[3] = 0.17916667*G0_;
 
3294
        A[4] = 0.00000000;
 
3295
        A[5] = 0.00000000;
 
3296
        A[6] = 0.00000000;
 
3297
        A[7] = 0.00000000;
 
3298
        A[8] = 0.17916667*G0_;
 
3299
        A[9] = 0.35833333*G0_;
 
3300
        A[10] = 0.00000000;
 
3301
        A[11] = 0.17916667*G0_;
 
3302
        A[12] = 0.00000000;
 
3303
        A[13] = 0.00000000;
 
3304
        A[14] = 0.00000000;
 
3305
        A[15] = 0.00000000;
 
3306
        A[16] = 0.00000000;
 
3307
        A[17] = 0.00000000;
 
3308
        A[18] = 0.00000000;
 
3309
        A[19] = 0.00000000;
 
3310
        A[20] = 0.00000000;
 
3311
        A[21] = 0.00000000;
 
3312
        A[22] = 0.00000000;
 
3313
        A[23] = 0.00000000;
 
3314
        A[24] = 0.17916667*G0_;
 
3315
        A[25] = 0.17916667*G0_;
 
3316
        A[26] = 0.00000000;
 
3317
        A[27] = 0.35833333*G0_;
 
3318
        A[28] = 0.00000000;
 
3319
        A[29] = 0.00000000;
 
3320
        A[30] = 0.00000000;
 
3321
        A[31] = 0.00000000;
 
3322
        A[32] = 0.00000000;
 
3323
        A[33] = 0.00000000;
 
3324
        A[34] = 0.00000000;
 
3325
        A[35] = 0.00000000;
 
3326
        A[36] = 0.00000000;
 
3327
        A[37] = 0.00000000;
 
3328
        A[38] = 0.00000000;
 
3329
        A[39] = 0.00000000;
 
3330
        A[40] = 0.00000000;
 
3331
        A[41] = 0.00000000;
 
3332
        A[42] = 0.00000000;
 
3333
        A[43] = 0.00000000;
 
3334
        A[44] = 0.00000000;
 
3335
        A[45] = 0.00000000;
 
3336
        A[46] = 0.00000000;
 
3337
        A[47] = 0.00000000;
 
3338
        A[48] = 0.00000000;
 
3339
        A[49] = 0.00000000;
 
3340
        A[50] = 0.00000000;
 
3341
        A[51] = 0.00000000;
 
3342
        A[52] = 0.00000000;
 
3343
        A[53] = 0.00000000;
 
3344
        A[54] = 0.00000000;
 
3345
        A[55] = 0.00000000;
 
3346
        A[56] = 0.00000000;
 
3347
        A[57] = 0.00000000;
 
3348
        A[58] = 0.00000000;
 
3349
        A[59] = 0.00000000;
 
3350
        A[60] = 0.00000000;
 
3351
        A[61] = 0.00000000;
 
3352
        A[62] = 0.00000000;
 
3353
        A[63] = 0.00000000;
 
3354
          break;
 
3355
        }
 
3356
      case 1:
 
3357
        {
 
3358
          A[0] = 0.35833333*G0_;
 
3359
        A[1] = 0.17916667*G0_;
 
3360
        A[2] = 0.00000000;
 
3361
        A[3] = 0.17916667*G0_;
 
3362
        A[4] = 0.00000000;
 
3363
        A[5] = 0.00000000;
 
3364
        A[6] = 0.00000000;
 
3365
        A[7] = 0.00000000;
 
3366
        A[8] = 0.17916667*G0_;
 
3367
        A[9] = 0.35833333*G0_;
 
3368
        A[10] = 0.00000000;
 
3369
        A[11] = 0.17916667*G0_;
 
3370
        A[12] = 0.00000000;
 
3371
        A[13] = 0.00000000;
 
3372
        A[14] = 0.00000000;
 
3373
        A[15] = 0.00000000;
 
3374
        A[16] = 0.00000000;
 
3375
        A[17] = 0.00000000;
 
3376
        A[18] = 0.00000000;
 
3377
        A[19] = 0.00000000;
 
3378
        A[20] = 0.00000000;
 
3379
        A[21] = 0.00000000;
 
3380
        A[22] = 0.00000000;
 
3381
        A[23] = 0.00000000;
 
3382
        A[24] = 0.17916667*G0_;
 
3383
        A[25] = 0.17916667*G0_;
 
3384
        A[26] = 0.00000000;
 
3385
        A[27] = 0.35833333*G0_;
 
3386
        A[28] = 0.00000000;
 
3387
        A[29] = 0.00000000;
 
3388
        A[30] = 0.00000000;
 
3389
        A[31] = 0.00000000;
 
3390
        A[32] = 0.00000000;
 
3391
        A[33] = 0.00000000;
 
3392
        A[34] = 0.00000000;
 
3393
        A[35] = 0.00000000;
 
3394
        A[36] = 0.00000000;
 
3395
        A[37] = 0.00000000;
 
3396
        A[38] = 0.00000000;
 
3397
        A[39] = 0.00000000;
 
3398
        A[40] = 0.00000000;
 
3399
        A[41] = 0.00000000;
 
3400
        A[42] = 0.00000000;
 
3401
        A[43] = 0.00000000;
 
3402
        A[44] = 0.00000000;
 
3403
        A[45] = 0.00000000;
 
3404
        A[46] = 0.00000000;
 
3405
        A[47] = 0.00000000;
 
3406
        A[48] = 0.00000000;
 
3407
        A[49] = 0.00000000;
 
3408
        A[50] = 0.00000000;
 
3409
        A[51] = 0.00000000;
 
3410
        A[52] = 0.00000000;
 
3411
        A[53] = 0.00000000;
 
3412
        A[54] = 0.00000000;
 
3413
        A[55] = 0.00000000;
 
3414
        A[56] = 0.00000000;
 
3415
        A[57] = 0.00000000;
 
3416
        A[58] = 0.00000000;
 
3417
        A[59] = 0.00000000;
 
3418
        A[60] = 0.00000000;
 
3419
        A[61] = 0.00000000;
 
3420
        A[62] = 0.00000000;
 
3421
        A[63] = 0.00000000;
 
3422
          break;
 
3423
        }
 
3424
      case 2:
 
3425
        {
 
3426
          A[0] = 0.35833333*G0_;
 
3427
        A[1] = 0.17916667*G0_;
 
3428
        A[2] = 0.00000000;
 
3429
        A[3] = 0.17916667*G0_;
 
3430
        A[4] = 0.00000000;
 
3431
        A[5] = 0.00000000;
 
3432
        A[6] = 0.00000000;
 
3433
        A[7] = 0.00000000;
 
3434
        A[8] = 0.17916667*G0_;
 
3435
        A[9] = 0.35833333*G0_;
 
3436
        A[10] = 0.00000000;
 
3437
        A[11] = 0.17916667*G0_;
 
3438
        A[12] = 0.00000000;
 
3439
        A[13] = 0.00000000;
 
3440
        A[14] = 0.00000000;
 
3441
        A[15] = 0.00000000;
 
3442
        A[16] = 0.00000000;
 
3443
        A[17] = 0.00000000;
 
3444
        A[18] = 0.00000000;
 
3445
        A[19] = 0.00000000;
 
3446
        A[20] = 0.00000000;
 
3447
        A[21] = 0.00000000;
 
3448
        A[22] = 0.00000000;
 
3449
        A[23] = 0.00000000;
 
3450
        A[24] = 0.17916667*G0_;
 
3451
        A[25] = 0.17916667*G0_;
 
3452
        A[26] = 0.00000000;
 
3453
        A[27] = 0.35833333*G0_;
 
3454
        A[28] = 0.00000000;
 
3455
        A[29] = 0.00000000;
 
3456
        A[30] = 0.00000000;
 
3457
        A[31] = 0.00000000;
 
3458
        A[32] = 0.00000000;
 
3459
        A[33] = 0.00000000;
 
3460
        A[34] = 0.00000000;
 
3461
        A[35] = 0.00000000;
 
3462
        A[36] = 0.00000000;
 
3463
        A[37] = 0.00000000;
 
3464
        A[38] = 0.00000000;
 
3465
        A[39] = 0.00000000;
 
3466
        A[40] = 0.00000000;
 
3467
        A[41] = 0.00000000;
 
3468
        A[42] = 0.00000000;
 
3469
        A[43] = 0.00000000;
 
3470
        A[44] = 0.00000000;
 
3471
        A[45] = 0.00000000;
 
3472
        A[46] = 0.00000000;
 
3473
        A[47] = 0.00000000;
 
3474
        A[48] = 0.00000000;
 
3475
        A[49] = 0.00000000;
 
3476
        A[50] = 0.00000000;
 
3477
        A[51] = 0.00000000;
 
3478
        A[52] = 0.00000000;
 
3479
        A[53] = 0.00000000;
 
3480
        A[54] = 0.00000000;
 
3481
        A[55] = 0.00000000;
 
3482
        A[56] = 0.00000000;
 
3483
        A[57] = 0.00000000;
 
3484
        A[58] = 0.00000000;
 
3485
        A[59] = 0.00000000;
 
3486
        A[60] = 0.00000000;
 
3487
        A[61] = 0.00000000;
 
3488
        A[62] = 0.00000000;
 
3489
        A[63] = 0.00000000;
 
3490
          break;
 
3491
        }
 
3492
      case 3:
 
3493
        {
 
3494
          A[0] = 0.35833333*G0_;
 
3495
        A[1] = 0.17916667*G0_;
 
3496
        A[2] = 0.00000000;
 
3497
        A[3] = 0.17916667*G0_;
 
3498
        A[4] = 0.00000000;
 
3499
        A[5] = 0.00000000;
 
3500
        A[6] = 0.00000000;
 
3501
        A[7] = 0.00000000;
 
3502
        A[8] = 0.17916667*G0_;
 
3503
        A[9] = 0.35833333*G0_;
 
3504
        A[10] = 0.00000000;
 
3505
        A[11] = 0.17916667*G0_;
 
3506
        A[12] = 0.00000000;
 
3507
        A[13] = 0.00000000;
 
3508
        A[14] = 0.00000000;
 
3509
        A[15] = 0.00000000;
 
3510
        A[16] = 0.00000000;
 
3511
        A[17] = 0.00000000;
 
3512
        A[18] = 0.00000000;
 
3513
        A[19] = 0.00000000;
 
3514
        A[20] = 0.00000000;
 
3515
        A[21] = 0.00000000;
 
3516
        A[22] = 0.00000000;
 
3517
        A[23] = 0.00000000;
 
3518
        A[24] = 0.17916667*G0_;
 
3519
        A[25] = 0.17916667*G0_;
 
3520
        A[26] = 0.00000000;
 
3521
        A[27] = 0.35833333*G0_;
 
3522
        A[28] = 0.00000000;
 
3523
        A[29] = 0.00000000;
 
3524
        A[30] = 0.00000000;
 
3525
        A[31] = 0.00000000;
 
3526
        A[32] = 0.00000000;
 
3527
        A[33] = 0.00000000;
 
3528
        A[34] = 0.00000000;
 
3529
        A[35] = 0.00000000;
 
3530
        A[36] = 0.00000000;
 
3531
        A[37] = 0.00000000;
 
3532
        A[38] = 0.00000000;
 
3533
        A[39] = 0.00000000;
 
3534
        A[40] = 0.00000000;
 
3535
        A[41] = 0.00000000;
 
3536
        A[42] = 0.00000000;
 
3537
        A[43] = 0.00000000;
 
3538
        A[44] = 0.00000000;
 
3539
        A[45] = 0.00000000;
 
3540
        A[46] = 0.00000000;
 
3541
        A[47] = 0.00000000;
 
3542
        A[48] = 0.00000000;
 
3543
        A[49] = 0.00000000;
 
3544
        A[50] = 0.00000000;
 
3545
        A[51] = 0.00000000;
 
3546
        A[52] = 0.00000000;
 
3547
        A[53] = 0.00000000;
 
3548
        A[54] = 0.00000000;
 
3549
        A[55] = 0.00000000;
 
3550
        A[56] = 0.00000000;
 
3551
        A[57] = 0.00000000;
 
3552
        A[58] = 0.00000000;
 
3553
        A[59] = 0.00000000;
 
3554
        A[60] = 0.00000000;
 
3555
        A[61] = 0.00000000;
 
3556
        A[62] = 0.00000000;
 
3557
        A[63] = 0.00000000;
 
3558
          break;
 
3559
        }
 
3560
      }
 
3561
      
 
3562
        break;
 
3563
      }
 
3564
    case 3:
 
3565
      {
 
3566
        switch (facet1)
 
3567
      {
 
3568
      case 0:
 
3569
        {
 
3570
          A[0] = 0.35833333*G0_;
 
3571
        A[1] = 0.17916667*G0_;
 
3572
        A[2] = 0.17916667*G0_;
 
3573
        A[3] = 0.00000000;
 
3574
        A[4] = 0.00000000;
 
3575
        A[5] = 0.00000000;
 
3576
        A[6] = 0.00000000;
 
3577
        A[7] = 0.00000000;
 
3578
        A[8] = 0.17916667*G0_;
 
3579
        A[9] = 0.35833333*G0_;
 
3580
        A[10] = 0.17916667*G0_;
 
3581
        A[11] = 0.00000000;
 
3582
        A[12] = 0.00000000;
 
3583
        A[13] = 0.00000000;
 
3584
        A[14] = 0.00000000;
 
3585
        A[15] = 0.00000000;
 
3586
        A[16] = 0.17916667*G0_;
 
3587
        A[17] = 0.17916667*G0_;
 
3588
        A[18] = 0.35833333*G0_;
 
3589
        A[19] = 0.00000000;
 
3590
        A[20] = 0.00000000;
 
3591
        A[21] = 0.00000000;
 
3592
        A[22] = 0.00000000;
 
3593
        A[23] = 0.00000000;
 
3594
        A[24] = 0.00000000;
 
3595
        A[25] = 0.00000000;
 
3596
        A[26] = 0.00000000;
 
3597
        A[27] = 0.00000000;
 
3598
        A[28] = 0.00000000;
 
3599
        A[29] = 0.00000000;
 
3600
        A[30] = 0.00000000;
 
3601
        A[31] = 0.00000000;
 
3602
        A[32] = 0.00000000;
 
3603
        A[33] = 0.00000000;
 
3604
        A[34] = 0.00000000;
 
3605
        A[35] = 0.00000000;
 
3606
        A[36] = 0.00000000;
 
3607
        A[37] = 0.00000000;
 
3608
        A[38] = 0.00000000;
 
3609
        A[39] = 0.00000000;
 
3610
        A[40] = 0.00000000;
 
3611
        A[41] = 0.00000000;
 
3612
        A[42] = 0.00000000;
 
3613
        A[43] = 0.00000000;
 
3614
        A[44] = 0.00000000;
 
3615
        A[45] = 0.00000000;
 
3616
        A[46] = 0.00000000;
 
3617
        A[47] = 0.00000000;
 
3618
        A[48] = 0.00000000;
 
3619
        A[49] = 0.00000000;
 
3620
        A[50] = 0.00000000;
 
3621
        A[51] = 0.00000000;
 
3622
        A[52] = 0.00000000;
 
3623
        A[53] = 0.00000000;
 
3624
        A[54] = 0.00000000;
 
3625
        A[55] = 0.00000000;
 
3626
        A[56] = 0.00000000;
 
3627
        A[57] = 0.00000000;
 
3628
        A[58] = 0.00000000;
 
3629
        A[59] = 0.00000000;
 
3630
        A[60] = 0.00000000;
 
3631
        A[61] = 0.00000000;
 
3632
        A[62] = 0.00000000;
 
3633
        A[63] = 0.00000000;
 
3634
          break;
 
3635
        }
 
3636
      case 1:
 
3637
        {
 
3638
          A[0] = 0.35833333*G0_;
 
3639
        A[1] = 0.17916667*G0_;
 
3640
        A[2] = 0.17916667*G0_;
 
3641
        A[3] = 0.00000000;
 
3642
        A[4] = 0.00000000;
 
3643
        A[5] = 0.00000000;
 
3644
        A[6] = 0.00000000;
 
3645
        A[7] = 0.00000000;
 
3646
        A[8] = 0.17916667*G0_;
 
3647
        A[9] = 0.35833333*G0_;
 
3648
        A[10] = 0.17916667*G0_;
 
3649
        A[11] = 0.00000000;
 
3650
        A[12] = 0.00000000;
 
3651
        A[13] = 0.00000000;
 
3652
        A[14] = 0.00000000;
 
3653
        A[15] = 0.00000000;
 
3654
        A[16] = 0.17916667*G0_;
 
3655
        A[17] = 0.17916667*G0_;
 
3656
        A[18] = 0.35833333*G0_;
 
3657
        A[19] = 0.00000000;
 
3658
        A[20] = 0.00000000;
 
3659
        A[21] = 0.00000000;
 
3660
        A[22] = 0.00000000;
 
3661
        A[23] = 0.00000000;
 
3662
        A[24] = 0.00000000;
 
3663
        A[25] = 0.00000000;
 
3664
        A[26] = 0.00000000;
 
3665
        A[27] = 0.00000000;
 
3666
        A[28] = 0.00000000;
 
3667
        A[29] = 0.00000000;
 
3668
        A[30] = 0.00000000;
 
3669
        A[31] = 0.00000000;
 
3670
        A[32] = 0.00000000;
 
3671
        A[33] = 0.00000000;
 
3672
        A[34] = 0.00000000;
 
3673
        A[35] = 0.00000000;
 
3674
        A[36] = 0.00000000;
 
3675
        A[37] = 0.00000000;
 
3676
        A[38] = 0.00000000;
 
3677
        A[39] = 0.00000000;
 
3678
        A[40] = 0.00000000;
 
3679
        A[41] = 0.00000000;
 
3680
        A[42] = 0.00000000;
 
3681
        A[43] = 0.00000000;
 
3682
        A[44] = 0.00000000;
 
3683
        A[45] = 0.00000000;
 
3684
        A[46] = 0.00000000;
 
3685
        A[47] = 0.00000000;
 
3686
        A[48] = 0.00000000;
 
3687
        A[49] = 0.00000000;
 
3688
        A[50] = 0.00000000;
 
3689
        A[51] = 0.00000000;
 
3690
        A[52] = 0.00000000;
 
3691
        A[53] = 0.00000000;
 
3692
        A[54] = 0.00000000;
 
3693
        A[55] = 0.00000000;
 
3694
        A[56] = 0.00000000;
 
3695
        A[57] = 0.00000000;
 
3696
        A[58] = 0.00000000;
 
3697
        A[59] = 0.00000000;
 
3698
        A[60] = 0.00000000;
 
3699
        A[61] = 0.00000000;
 
3700
        A[62] = 0.00000000;
 
3701
        A[63] = 0.00000000;
 
3702
          break;
 
3703
        }
 
3704
      case 2:
 
3705
        {
 
3706
          A[0] = 0.35833333*G0_;
 
3707
        A[1] = 0.17916667*G0_;
 
3708
        A[2] = 0.17916667*G0_;
 
3709
        A[3] = 0.00000000;
 
3710
        A[4] = 0.00000000;
 
3711
        A[5] = 0.00000000;
 
3712
        A[6] = 0.00000000;
 
3713
        A[7] = 0.00000000;
 
3714
        A[8] = 0.17916667*G0_;
 
3715
        A[9] = 0.35833333*G0_;
 
3716
        A[10] = 0.17916667*G0_;
 
3717
        A[11] = 0.00000000;
 
3718
        A[12] = 0.00000000;
 
3719
        A[13] = 0.00000000;
 
3720
        A[14] = 0.00000000;
 
3721
        A[15] = 0.00000000;
 
3722
        A[16] = 0.17916667*G0_;
 
3723
        A[17] = 0.17916667*G0_;
 
3724
        A[18] = 0.35833333*G0_;
 
3725
        A[19] = 0.00000000;
 
3726
        A[20] = 0.00000000;
 
3727
        A[21] = 0.00000000;
 
3728
        A[22] = 0.00000000;
 
3729
        A[23] = 0.00000000;
 
3730
        A[24] = 0.00000000;
 
3731
        A[25] = 0.00000000;
 
3732
        A[26] = 0.00000000;
 
3733
        A[27] = 0.00000000;
 
3734
        A[28] = 0.00000000;
 
3735
        A[29] = 0.00000000;
 
3736
        A[30] = 0.00000000;
 
3737
        A[31] = 0.00000000;
 
3738
        A[32] = 0.00000000;
 
3739
        A[33] = 0.00000000;
 
3740
        A[34] = 0.00000000;
 
3741
        A[35] = 0.00000000;
 
3742
        A[36] = 0.00000000;
 
3743
        A[37] = 0.00000000;
 
3744
        A[38] = 0.00000000;
 
3745
        A[39] = 0.00000000;
 
3746
        A[40] = 0.00000000;
 
3747
        A[41] = 0.00000000;
 
3748
        A[42] = 0.00000000;
 
3749
        A[43] = 0.00000000;
 
3750
        A[44] = 0.00000000;
 
3751
        A[45] = 0.00000000;
 
3752
        A[46] = 0.00000000;
 
3753
        A[47] = 0.00000000;
 
3754
        A[48] = 0.00000000;
 
3755
        A[49] = 0.00000000;
 
3756
        A[50] = 0.00000000;
 
3757
        A[51] = 0.00000000;
 
3758
        A[52] = 0.00000000;
 
3759
        A[53] = 0.00000000;
 
3760
        A[54] = 0.00000000;
 
3761
        A[55] = 0.00000000;
 
3762
        A[56] = 0.00000000;
 
3763
        A[57] = 0.00000000;
 
3764
        A[58] = 0.00000000;
 
3765
        A[59] = 0.00000000;
 
3766
        A[60] = 0.00000000;
 
3767
        A[61] = 0.00000000;
 
3768
        A[62] = 0.00000000;
 
3769
        A[63] = 0.00000000;
 
3770
          break;
 
3771
        }
 
3772
      case 3:
 
3773
        {
 
3774
          A[0] = 0.35833333*G0_;
 
3775
        A[1] = 0.17916667*G0_;
 
3776
        A[2] = 0.17916667*G0_;
 
3777
        A[3] = 0.00000000;
 
3778
        A[4] = 0.00000000;
 
3779
        A[5] = 0.00000000;
 
3780
        A[6] = 0.00000000;
 
3781
        A[7] = 0.00000000;
 
3782
        A[8] = 0.17916667*G0_;
 
3783
        A[9] = 0.35833333*G0_;
 
3784
        A[10] = 0.17916667*G0_;
 
3785
        A[11] = 0.00000000;
 
3786
        A[12] = 0.00000000;
 
3787
        A[13] = 0.00000000;
 
3788
        A[14] = 0.00000000;
 
3789
        A[15] = 0.00000000;
 
3790
        A[16] = 0.17916667*G0_;
 
3791
        A[17] = 0.17916667*G0_;
 
3792
        A[18] = 0.35833333*G0_;
 
3793
        A[19] = 0.00000000;
 
3794
        A[20] = 0.00000000;
 
3795
        A[21] = 0.00000000;
 
3796
        A[22] = 0.00000000;
 
3797
        A[23] = 0.00000000;
 
3798
        A[24] = 0.00000000;
 
3799
        A[25] = 0.00000000;
 
3800
        A[26] = 0.00000000;
 
3801
        A[27] = 0.00000000;
 
3802
        A[28] = 0.00000000;
 
3803
        A[29] = 0.00000000;
 
3804
        A[30] = 0.00000000;
 
3805
        A[31] = 0.00000000;
 
3806
        A[32] = 0.00000000;
 
3807
        A[33] = 0.00000000;
 
3808
        A[34] = 0.00000000;
 
3809
        A[35] = 0.00000000;
 
3810
        A[36] = 0.00000000;
 
3811
        A[37] = 0.00000000;
 
3812
        A[38] = 0.00000000;
 
3813
        A[39] = 0.00000000;
 
3814
        A[40] = 0.00000000;
 
3815
        A[41] = 0.00000000;
 
3816
        A[42] = 0.00000000;
 
3817
        A[43] = 0.00000000;
 
3818
        A[44] = 0.00000000;
 
3819
        A[45] = 0.00000000;
 
3820
        A[46] = 0.00000000;
 
3821
        A[47] = 0.00000000;
 
3822
        A[48] = 0.00000000;
 
3823
        A[49] = 0.00000000;
 
3824
        A[50] = 0.00000000;
 
3825
        A[51] = 0.00000000;
 
3826
        A[52] = 0.00000000;
 
3827
        A[53] = 0.00000000;
 
3828
        A[54] = 0.00000000;
 
3829
        A[55] = 0.00000000;
 
3830
        A[56] = 0.00000000;
 
3831
        A[57] = 0.00000000;
 
3832
        A[58] = 0.00000000;
 
3833
        A[59] = 0.00000000;
 
3834
        A[60] = 0.00000000;
 
3835
        A[61] = 0.00000000;
 
3836
        A[62] = 0.00000000;
 
3837
        A[63] = 0.00000000;
 
3838
          break;
 
3839
        }
 
3840
      }
 
3841
      
 
3842
        break;
 
3843
      }
 
3844
    }
 
3845
    
 
3846
  }
 
3847
 
 
3848
};
 
3849
 
 
3850
/// This class defines the interface for the assembly of the global
 
3851
/// tensor corresponding to a form with r + n arguments, that is, a
 
3852
/// mapping
 
3853
///
 
3854
///     a : V1 x V2 x ... Vr x W1 x W2 x ... x Wn -> R
 
3855
///
 
3856
/// with arguments v1, v2, ..., vr, w1, w2, ..., wn. The rank r
 
3857
/// global tensor A is defined by
 
3858
///
 
3859
///     A = a(V1, V2, ..., Vr, w1, w2, ..., wn),
 
3860
///
 
3861
/// where each argument Vj represents the application to the
 
3862
/// sequence of basis functions of Vj and w1, w2, ..., wn are given
 
3863
/// fixed functions (coefficients).
 
3864
 
 
3865
class subdomains_form_0: public ufc::form
 
3866
{
 
3867
public:
 
3868
 
 
3869
  /// Constructor
 
3870
  subdomains_form_0() : ufc::form()
 
3871
  {
 
3872
    // Do nothing
 
3873
  }
 
3874
 
 
3875
  /// Destructor
 
3876
  virtual ~subdomains_form_0()
 
3877
  {
 
3878
    // Do nothing
 
3879
  }
 
3880
 
 
3881
  /// Return a string identifying the form
 
3882
  virtual const char* signature() const
 
3883
  {
 
3884
    return "Form([Integral(Product(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 0), Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 1)), Measure('cell', 0, None)), Integral(Product(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 1), Product(FloatValue(10.0, (), (), {}), Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 0))), Measure('cell', 1, None)), Integral(Product(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 0), Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 1)), Measure('exterior_facet', 0, None)), Integral(Product(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 1), Product(FloatValue(2.0, (), (), {}), Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 0))), Measure('exterior_facet', 1, None)), Integral(Product(PositiveRestricted(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 0)), PositiveRestricted(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 1))), Measure('interior_facet', 0, None)), Integral(Product(PositiveRestricted(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 1)), Product(FloatValue(4.2999999999999998, (), (), {}), PositiveRestricted(Argument(FiniteElement('Lagrange', Cell('tetrahedron', 1, Space(3)), 1), 0)))), Measure('interior_facet', 1, None))])";
 
3885
  }
 
3886
 
 
3887
  /// Return the rank of the global tensor (r)
 
3888
  virtual unsigned int rank() const
 
3889
  {
 
3890
    return 2;
 
3891
  }
 
3892
 
 
3893
  /// Return the number of coefficients (n)
 
3894
  virtual unsigned int num_coefficients() const
 
3895
  {
 
3896
    return 0;
 
3897
  }
 
3898
 
 
3899
  /// Return the number of cell integrals
 
3900
  virtual unsigned int num_cell_integrals() const
 
3901
  {
 
3902
    return 2;
 
3903
  }
 
3904
 
 
3905
  /// Return the number of exterior facet integrals
 
3906
  virtual unsigned int num_exterior_facet_integrals() const
 
3907
  {
 
3908
    return 2;
 
3909
  }
 
3910
 
 
3911
  /// Return the number of interior facet integrals
 
3912
  virtual unsigned int num_interior_facet_integrals() const
 
3913
  {
 
3914
    return 2;
 
3915
  }
 
3916
 
 
3917
  /// Create a new finite element for argument function i
 
3918
  virtual ufc::finite_element* create_finite_element(unsigned int i) const
 
3919
  {
 
3920
    switch (i)
 
3921
    {
 
3922
    case 0:
 
3923
      {
 
3924
        return new subdomains_finite_element_0();
 
3925
        break;
 
3926
      }
 
3927
    case 1:
 
3928
      {
 
3929
        return new subdomains_finite_element_0();
 
3930
        break;
 
3931
      }
 
3932
    }
 
3933
    
 
3934
    return 0;
 
3935
  }
 
3936
 
 
3937
  /// Create a new dof map for argument function i
 
3938
  virtual ufc::dof_map* create_dof_map(unsigned int i) const
 
3939
  {
 
3940
    switch (i)
 
3941
    {
 
3942
    case 0:
 
3943
      {
 
3944
        return new subdomains_dof_map_0();
 
3945
        break;
 
3946
      }
 
3947
    case 1:
 
3948
      {
 
3949
        return new subdomains_dof_map_0();
 
3950
        break;
 
3951
      }
 
3952
    }
 
3953
    
 
3954
    return 0;
 
3955
  }
 
3956
 
 
3957
  /// Create a new cell integral on sub domain i
 
3958
  virtual ufc::cell_integral* create_cell_integral(unsigned int i) const
 
3959
  {
 
3960
    switch (i)
 
3961
    {
 
3962
    case 0:
 
3963
      {
 
3964
        return new subdomains_cell_integral_0_0();
 
3965
        break;
 
3966
      }
 
3967
    case 1:
 
3968
      {
 
3969
        return new subdomains_cell_integral_0_1();
 
3970
        break;
 
3971
      }
 
3972
    }
 
3973
    
 
3974
    return 0;
 
3975
  }
 
3976
 
 
3977
  /// Create a new exterior facet integral on sub domain i
 
3978
  virtual ufc::exterior_facet_integral* create_exterior_facet_integral(unsigned int i) const
 
3979
  {
 
3980
    switch (i)
 
3981
    {
 
3982
    case 0:
 
3983
      {
 
3984
        return new subdomains_exterior_facet_integral_0_0();
 
3985
        break;
 
3986
      }
 
3987
    case 1:
 
3988
      {
 
3989
        return new subdomains_exterior_facet_integral_0_1();
 
3990
        break;
 
3991
      }
 
3992
    }
 
3993
    
 
3994
    return 0;
 
3995
  }
 
3996
 
 
3997
  /// Create a new interior facet integral on sub domain i
 
3998
  virtual ufc::interior_facet_integral* create_interior_facet_integral(unsigned int i) const
 
3999
  {
 
4000
    switch (i)
 
4001
    {
 
4002
    case 0:
 
4003
      {
 
4004
        return new subdomains_interior_facet_integral_0_0();
 
4005
        break;
 
4006
      }
 
4007
    case 1:
 
4008
      {
 
4009
        return new subdomains_interior_facet_integral_0_1();
 
4010
        break;
 
4011
      }
 
4012
    }
 
4013
    
 
4014
    return 0;
 
4015
  }
 
4016
 
 
4017
};
 
4018
 
 
4019
#endif