~ubuntu-branches/ubuntu/wily/dolfin/wily-proposed

« back to all changes in this revision

Viewing changes to demo/documented/stokes-stabilized/cpp/Stokes.h

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2015-03-17 07:57:11 UTC
  • mfrom: (1.1.18) (19.1.24 experimental)
  • Revision ID: package-import@ubuntu.com-20150317075711-1v207zbty9qmygow
Tags: 1.5.0-1
* New upstream release (closes: #780359).
* debian/control:
  - Bump Standards-Version to 3.9.6 (no changes needed).
  - Bump X-Python-Version to >= 2.7.
  - Update package names for new SONAME 1.5 (libdolfin1.4 ->
    libdolfin1.5, libdolfin1.4-dbg -> libdolfin1.5-dbg and
    libdolfin1.4-dev -> libdolfin1.5-dev).
  - Bump minimum required version for python-instant, python-ufl and
    python-ffc to 1.5.0.
  - Add python-sympy and python-six to Depends for binary package
    python-dolfin.
  - Add dh-python to Build-Depends.
  - Remove libcgal-dev from {Build-}Depends.
* Remove CSGCGALMeshGenerator3D-oom.patch since CGAL is no longer used
  by DOLFIN.
* Move debian/libdolfin1.4.install -> debian/libdolfin1.5.install.
* debian/rules: No longer any non DFSG-free stuff to remove, so update
  get-orig-source target (update debian/watch accordingly).
* 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.0
2
 
// and was automatically generated by FFC version 1.4.0.
 
1
// This code conforms with the UFC specification version 1.5.0
 
2
// and was automatically generated by FFC version 1.5.0.
3
3
//
4
4
// This code was generated with the option '-l dolfin' and
5
5
// contains DOLFIN-specific wrappers that depend on DOLFIN.
373
373
      // Tables of derivatives of the polynomial base (transpose).
374
374
      static const double dmats0[3][3] = \
375
375
      {{0.0, 0.0, 0.0},
376
 
      {4.89897948556636, 0.0, 0.0},
 
376
      {4.89897948556635, 0.0, 0.0},
377
377
      {0.0, 0.0, 0.0}};
378
378
      
379
379
      static const double dmats1[3][3] = \
504
504
      // Tables of derivatives of the polynomial base (transpose).
505
505
      static const double dmats0[3][3] = \
506
506
      {{0.0, 0.0, 0.0},
507
 
      {4.89897948556636, 0.0, 0.0},
 
507
      {4.89897948556635, 0.0, 0.0},
508
508
      {0.0, 0.0, 0.0}};
509
509
      
510
510
      static const double dmats1[3][3] = \
635
635
      // Tables of derivatives of the polynomial base (transpose).
636
636
      static const double dmats0[3][3] = \
637
637
      {{0.0, 0.0, 0.0},
638
 
      {4.89897948556636, 0.0, 0.0},
 
638
      {4.89897948556635, 0.0, 0.0},
639
639
      {0.0, 0.0, 0.0}};
640
640
      
641
641
      static const double dmats1[3][3] = \
1375
1375
      // Tables of derivatives of the polynomial base (transpose).
1376
1376
      static const double dmats0[3][3] = \
1377
1377
      {{0.0, 0.0, 0.0},
1378
 
      {4.89897948556636, 0.0, 0.0},
 
1378
      {4.89897948556635, 0.0, 0.0},
1379
1379
      {0.0, 0.0, 0.0}};
1380
1380
      
1381
1381
      static const double dmats1[3][3] = \
1506
1506
      // Tables of derivatives of the polynomial base (transpose).
1507
1507
      static const double dmats0[3][3] = \
1508
1508
      {{0.0, 0.0, 0.0},
1509
 
      {4.89897948556636, 0.0, 0.0},
 
1509
      {4.89897948556635, 0.0, 0.0},
1510
1510
      {0.0, 0.0, 0.0}};
1511
1511
      
1512
1512
      static const double dmats1[3][3] = \
1637
1637
      // Tables of derivatives of the polynomial base (transpose).
1638
1638
      static const double dmats0[3][3] = \
1639
1639
      {{0.0, 0.0, 0.0},
1640
 
      {4.89897948556636, 0.0, 0.0},
 
1640
      {4.89897948556635, 0.0, 0.0},
1641
1641
      {0.0, 0.0, 0.0}};
1642
1642
      
1643
1643
      static const double dmats1[3][3] = \
1768
1768
      // Tables of derivatives of the polynomial base (transpose).
1769
1769
      static const double dmats0[3][3] = \
1770
1770
      {{0.0, 0.0, 0.0},
1771
 
      {4.89897948556636, 0.0, 0.0},
 
1771
      {4.89897948556635, 0.0, 0.0},
1772
1772
      {0.0, 0.0, 0.0}};
1773
1773
      
1774
1774
      static const double dmats1[3][3] = \
1899
1899
      // Tables of derivatives of the polynomial base (transpose).
1900
1900
      static const double dmats0[3][3] = \
1901
1901
      {{0.0, 0.0, 0.0},
1902
 
      {4.89897948556636, 0.0, 0.0},
 
1902
      {4.89897948556635, 0.0, 0.0},
1903
1903
      {0.0, 0.0, 0.0}};
1904
1904
      
1905
1905
      static const double dmats1[3][3] = \
2030
2030
      // Tables of derivatives of the polynomial base (transpose).
2031
2031
      static const double dmats0[3][3] = \
2032
2032
      {{0.0, 0.0, 0.0},
2033
 
      {4.89897948556636, 0.0, 0.0},
 
2033
      {4.89897948556635, 0.0, 0.0},
2034
2034
      {0.0, 0.0, 0.0}};
2035
2035
      
2036
2036
      static const double dmats1[3][3] = \
2909
2909
      // Tables of derivatives of the polynomial base (transpose).
2910
2910
      static const double dmats0[3][3] = \
2911
2911
      {{0.0, 0.0, 0.0},
2912
 
      {4.89897948556636, 0.0, 0.0},
 
2912
      {4.89897948556635, 0.0, 0.0},
2913
2913
      {0.0, 0.0, 0.0}};
2914
2914
      
2915
2915
      static const double dmats1[3][3] = \
3040
3040
      // Tables of derivatives of the polynomial base (transpose).
3041
3041
      static const double dmats0[3][3] = \
3042
3042
      {{0.0, 0.0, 0.0},
3043
 
      {4.89897948556636, 0.0, 0.0},
 
3043
      {4.89897948556635, 0.0, 0.0},
3044
3044
      {0.0, 0.0, 0.0}};
3045
3045
      
3046
3046
      static const double dmats1[3][3] = \
3171
3171
      // Tables of derivatives of the polynomial base (transpose).
3172
3172
      static const double dmats0[3][3] = \
3173
3173
      {{0.0, 0.0, 0.0},
3174
 
      {4.89897948556636, 0.0, 0.0},
 
3174
      {4.89897948556635, 0.0, 0.0},
3175
3175
      {0.0, 0.0, 0.0}};
3176
3176
      
3177
3177
      static const double dmats1[3][3] = \
3302
3302
      // Tables of derivatives of the polynomial base (transpose).
3303
3303
      static const double dmats0[3][3] = \
3304
3304
      {{0.0, 0.0, 0.0},
3305
 
      {4.89897948556636, 0.0, 0.0},
 
3305
      {4.89897948556635, 0.0, 0.0},
3306
3306
      {0.0, 0.0, 0.0}};
3307
3307
      
3308
3308
      static const double dmats1[3][3] = \
3433
3433
      // Tables of derivatives of the polynomial base (transpose).
3434
3434
      static const double dmats0[3][3] = \
3435
3435
      {{0.0, 0.0, 0.0},
3436
 
      {4.89897948556636, 0.0, 0.0},
 
3436
      {4.89897948556635, 0.0, 0.0},
3437
3437
      {0.0, 0.0, 0.0}};
3438
3438
      
3439
3439
      static const double dmats1[3][3] = \
3564
3564
      // Tables of derivatives of the polynomial base (transpose).
3565
3565
      static const double dmats0[3][3] = \
3566
3566
      {{0.0, 0.0, 0.0},
3567
 
      {4.89897948556636, 0.0, 0.0},
 
3567
      {4.89897948556635, 0.0, 0.0},
3568
3568
      {0.0, 0.0, 0.0}};
3569
3569
      
3570
3570
      static const double dmats1[3][3] = \
3695
3695
      // Tables of derivatives of the polynomial base (transpose).
3696
3696
      static const double dmats0[3][3] = \
3697
3697
      {{0.0, 0.0, 0.0},
3698
 
      {4.89897948556636, 0.0, 0.0},
 
3698
      {4.89897948556635, 0.0, 0.0},
3699
3699
      {0.0, 0.0, 0.0}};
3700
3700
      
3701
3701
      static const double dmats1[3][3] = \
3826
3826
      // Tables of derivatives of the polynomial base (transpose).
3827
3827
      static const double dmats0[3][3] = \
3828
3828
      {{0.0, 0.0, 0.0},
3829
 
      {4.89897948556636, 0.0, 0.0},
 
3829
      {4.89897948556635, 0.0, 0.0},
3830
3830
      {0.0, 0.0, 0.0}};
3831
3831
      
3832
3832
      static const double dmats1[3][3] = \
3957
3957
      // Tables of derivatives of the polynomial base (transpose).
3958
3958
      static const double dmats0[3][3] = \
3959
3959
      {{0.0, 0.0, 0.0},
3960
 
      {4.89897948556636, 0.0, 0.0},
 
3960
      {4.89897948556635, 0.0, 0.0},
3961
3961
      {0.0, 0.0, 0.0}};
3962
3962
      
3963
3963
      static const double dmats1[3][3] = \
4553
4553
  }
4554
4554
 
4555
4555
  /// Tabulate the coordinates of all dofs on a cell
4556
 
  virtual void tabulate_coordinates(double** dof_coordinates,
 
4556
  virtual void tabulate_coordinates(double* dof_coordinates,
4557
4557
                                    const double* vertex_coordinates) const
4558
4558
  {
4559
 
    dof_coordinates[0][0] = vertex_coordinates[0];
4560
 
    dof_coordinates[0][1] = vertex_coordinates[1];
4561
 
    dof_coordinates[1][0] = vertex_coordinates[2];
4562
 
    dof_coordinates[1][1] = vertex_coordinates[3];
4563
 
    dof_coordinates[2][0] = vertex_coordinates[4];
4564
 
    dof_coordinates[2][1] = vertex_coordinates[5];
 
4559
    dof_coordinates[0] = vertex_coordinates[0];
 
4560
    dof_coordinates[1] = vertex_coordinates[1];
 
4561
    dof_coordinates[2] = vertex_coordinates[2];
 
4562
    dof_coordinates[3] = vertex_coordinates[3];
 
4563
    dof_coordinates[4] = vertex_coordinates[4];
 
4564
    dof_coordinates[5] = vertex_coordinates[5];
4565
4565
  }
4566
4566
 
4567
4567
  /// Return the number of sub dofmaps (for a mixed element)
4797
4797
  }
4798
4798
 
4799
4799
  /// Tabulate the coordinates of all dofs on a cell
4800
 
  virtual void tabulate_coordinates(double** dof_coordinates,
 
4800
  virtual void tabulate_coordinates(double* dof_coordinates,
4801
4801
                                    const double* vertex_coordinates) const
4802
4802
  {
4803
 
    dof_coordinates[0][0] = vertex_coordinates[0];
4804
 
    dof_coordinates[0][1] = vertex_coordinates[1];
4805
 
    dof_coordinates[1][0] = vertex_coordinates[2];
4806
 
    dof_coordinates[1][1] = vertex_coordinates[3];
4807
 
    dof_coordinates[2][0] = vertex_coordinates[4];
4808
 
    dof_coordinates[2][1] = vertex_coordinates[5];
4809
 
    dof_coordinates[3][0] = vertex_coordinates[0];
4810
 
    dof_coordinates[3][1] = vertex_coordinates[1];
4811
 
    dof_coordinates[4][0] = vertex_coordinates[2];
4812
 
    dof_coordinates[4][1] = vertex_coordinates[3];
4813
 
    dof_coordinates[5][0] = vertex_coordinates[4];
4814
 
    dof_coordinates[5][1] = vertex_coordinates[5];
 
4803
    dof_coordinates[0] = vertex_coordinates[0];
 
4804
    dof_coordinates[1] = vertex_coordinates[1];
 
4805
    dof_coordinates[2] = vertex_coordinates[2];
 
4806
    dof_coordinates[3] = vertex_coordinates[3];
 
4807
    dof_coordinates[4] = vertex_coordinates[4];
 
4808
    dof_coordinates[5] = vertex_coordinates[5];
 
4809
    dof_coordinates[6] = vertex_coordinates[0];
 
4810
    dof_coordinates[7] = vertex_coordinates[1];
 
4811
    dof_coordinates[8] = vertex_coordinates[2];
 
4812
    dof_coordinates[9] = vertex_coordinates[3];
 
4813
    dof_coordinates[10] = vertex_coordinates[4];
 
4814
    dof_coordinates[11] = vertex_coordinates[5];
4815
4815
  }
4816
4816
 
4817
4817
  /// Return the number of sub dofmaps (for a mixed element)
5074
5074
  }
5075
5075
 
5076
5076
  /// Tabulate the coordinates of all dofs on a cell
5077
 
  virtual void tabulate_coordinates(double** dof_coordinates,
 
5077
  virtual void tabulate_coordinates(double* dof_coordinates,
5078
5078
                                    const double* vertex_coordinates) const
5079
5079
  {
5080
 
    dof_coordinates[0][0] = vertex_coordinates[0];
5081
 
    dof_coordinates[0][1] = vertex_coordinates[1];
5082
 
    dof_coordinates[1][0] = vertex_coordinates[2];
5083
 
    dof_coordinates[1][1] = vertex_coordinates[3];
5084
 
    dof_coordinates[2][0] = vertex_coordinates[4];
5085
 
    dof_coordinates[2][1] = vertex_coordinates[5];
5086
 
    dof_coordinates[3][0] = vertex_coordinates[0];
5087
 
    dof_coordinates[3][1] = vertex_coordinates[1];
5088
 
    dof_coordinates[4][0] = vertex_coordinates[2];
5089
 
    dof_coordinates[4][1] = vertex_coordinates[3];
5090
 
    dof_coordinates[5][0] = vertex_coordinates[4];
5091
 
    dof_coordinates[5][1] = vertex_coordinates[5];
5092
 
    dof_coordinates[6][0] = vertex_coordinates[0];
5093
 
    dof_coordinates[6][1] = vertex_coordinates[1];
5094
 
    dof_coordinates[7][0] = vertex_coordinates[2];
5095
 
    dof_coordinates[7][1] = vertex_coordinates[3];
5096
 
    dof_coordinates[8][0] = vertex_coordinates[4];
5097
 
    dof_coordinates[8][1] = vertex_coordinates[5];
 
5080
    dof_coordinates[0] = vertex_coordinates[0];
 
5081
    dof_coordinates[1] = vertex_coordinates[1];
 
5082
    dof_coordinates[2] = vertex_coordinates[2];
 
5083
    dof_coordinates[3] = vertex_coordinates[3];
 
5084
    dof_coordinates[4] = vertex_coordinates[4];
 
5085
    dof_coordinates[5] = vertex_coordinates[5];
 
5086
    dof_coordinates[6] = vertex_coordinates[0];
 
5087
    dof_coordinates[7] = vertex_coordinates[1];
 
5088
    dof_coordinates[8] = vertex_coordinates[2];
 
5089
    dof_coordinates[9] = vertex_coordinates[3];
 
5090
    dof_coordinates[10] = vertex_coordinates[4];
 
5091
    dof_coordinates[11] = vertex_coordinates[5];
 
5092
    dof_coordinates[12] = vertex_coordinates[0];
 
5093
    dof_coordinates[13] = vertex_coordinates[1];
 
5094
    dof_coordinates[14] = vertex_coordinates[2];
 
5095
    dof_coordinates[15] = vertex_coordinates[3];
 
5096
    dof_coordinates[16] = vertex_coordinates[4];
 
5097
    dof_coordinates[17] = vertex_coordinates[5];
5098
5098
  }
5099
5099
 
5100
5100
  /// Return the number of sub dofmaps (for a mixed element)
5202
5202
    {{-1.0, 1.0}};
5203
5203
    
5204
5204
    // Array of non-zero columns
5205
 
    static const unsigned int nzc11[2] = {3, 4};
5206
 
    
5207
 
    // Array of non-zero columns
5208
 
    static const unsigned int nzc14[2] = {6, 7};
5209
 
    
5210
 
    // Array of non-zero columns
5211
 
    static const unsigned int nzc13[2] = {6, 8};
5212
 
    
5213
 
    // Array of non-zero columns
5214
 
    static const unsigned int nzc10[2] = {3, 5};
5215
 
    
5216
 
    // Array of non-zero columns
5217
5205
    static const unsigned int nzc7[2] = {0, 2};
5218
5206
    
5219
5207
    // Array of non-zero columns
5220
5208
    static const unsigned int nzc8[2] = {0, 1};
5221
5209
    
 
5210
    // Array of non-zero columns
 
5211
    static const unsigned int nzc10[2] = {3, 5};
 
5212
    
 
5213
    // Array of non-zero columns
 
5214
    static const unsigned int nzc11[2] = {3, 4};
 
5215
    
 
5216
    // Array of non-zero columns
 
5217
    static const unsigned int nzc13[2] = {6, 8};
 
5218
    
 
5219
    // Array of non-zero columns
 
5220
    static const unsigned int nzc14[2] = {6, 7};
 
5221
    
5222
5222
    // Reset values in the element tensor.
5223
5223
    for (unsigned int r = 0; r < 81; r++)
5224
5224
    {
5249
5249
    for (unsigned int ip = 0; ip < 1; ip++)
5250
5250
    {
5251
5251
      
5252
 
      // Number of operations for primary indices: 72
5253
 
      for (unsigned int j = 0; j < 3; j++)
5254
 
      {
5255
 
        for (unsigned int k = 0; k < 2; k++)
5256
 
        {
5257
 
          // Number of operations to compute entry: 3
5258
 
          A[nzc12[j]*9 + nzc10[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[10];
5259
 
          // Number of operations to compute entry: 3
5260
 
          A[nzc12[j]*9 + nzc11[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[11];
5261
 
          // Number of operations to compute entry: 3
5262
 
          A[nzc12[j]*9 + nzc7[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[12];
5263
 
          // Number of operations to compute entry: 3
5264
 
          A[nzc12[j]*9 + nzc8[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[13];
5265
 
        } // end loop over 'k'
5266
 
      } // end loop over 'j'
5267
 
      
5268
5252
      // Number of operations for primary indices: 144
5269
5253
      for (unsigned int j = 0; j < 2; j++)
5270
5254
      {
5312
5296
          A[nzc8[j]*9 + nzc12[k]] += FE0_C0[0][k]*FE0_C0_D01[0][j]*G[9];
5313
5297
        } // end loop over 'k'
5314
5298
      } // end loop over 'j'
 
5299
      
 
5300
      // Number of operations for primary indices: 72
 
5301
      for (unsigned int j = 0; j < 3; j++)
 
5302
      {
 
5303
        for (unsigned int k = 0; k < 2; k++)
 
5304
        {
 
5305
          // Number of operations to compute entry: 3
 
5306
          A[nzc12[j]*9 + nzc10[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[10];
 
5307
          // Number of operations to compute entry: 3
 
5308
          A[nzc12[j]*9 + nzc11[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[11];
 
5309
          // Number of operations to compute entry: 3
 
5310
          A[nzc12[j]*9 + nzc7[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[12];
 
5311
          // Number of operations to compute entry: 3
 
5312
          A[nzc12[j]*9 + nzc8[k]] += FE0_C0[0][j]*FE0_C0_D01[0][k]*G[13];
 
5313
        } // end loop over 'k'
 
5314
      } // end loop over 'j'
5315
5315
    } // end loop over 'ip'
5316
5316
  }
5317
5317
 
5384
5384
    {0.166666666666667, 0.666666666666667, 0.166666666666667}};
5385
5385
    
5386
5386
    // Array of non-zero columns
 
5387
    static const unsigned int nzc0[3] = {0, 1, 2};
 
5388
    
 
5389
    // Array of non-zero columns
 
5390
    static const unsigned int nzc3[3] = {3, 4, 5};
 
5391
    
 
5392
    // Array of non-zero columns
5387
5393
    static const unsigned int nzc6[3] = {0, 1, 2};
5388
5394
    
5389
5395
    // Array of non-zero columns
5390
5396
    static const unsigned int nzc9[3] = {3, 4, 5};
5391
5397
    
5392
 
    // Array of non-zero columns
5393
 
    static const unsigned int nzc3[3] = {3, 4, 5};
5394
 
    
5395
 
    // Array of non-zero columns
5396
 
    static const unsigned int nzc0[3] = {0, 1, 2};
5397
 
    
5398
5398
    static const double FE0_C0_D01[3][2] = \
5399
5399
    {{-1.0, 1.0},
5400
5400
    {-1.0, 1.0},
5401
5401
    {-1.0, 1.0}};
5402
5402
    
5403
5403
    // Array of non-zero columns
 
5404
    static const unsigned int nzc13[2] = {6, 8};
 
5405
    
 
5406
    // Array of non-zero columns
5404
5407
    static const unsigned int nzc14[2] = {6, 7};
5405
5408
    
5406
 
    // Array of non-zero columns
5407
 
    static const unsigned int nzc13[2] = {6, 8};
5408
 
    
5409
5409
    // Reset values in the element tensor.
5410
5410
    for (unsigned int r = 0; r < 9; r++)
5411
5411
    {
5452
5452
      I[3] = F1*W3[ip]*det;
5453
5453
      
5454
5454
      
 
5455
      // Number of operations for primary indices: 8
 
5456
      for (unsigned int j = 0; j < 2; j++)
 
5457
      {
 
5458
        // Number of operations to compute entry: 2
 
5459
        A[nzc13[j]] += FE0_C0_D01[ip][j]*I[0];
 
5460
        // Number of operations to compute entry: 2
 
5461
        A[nzc14[j]] += FE0_C0_D01[ip][j]*I[1];
 
5462
      } // end loop over 'j'
 
5463
      
5455
5464
      // Number of operations for primary indices: 12
5456
5465
      for (unsigned int j = 0; j < 3; j++)
5457
5466
      {
5460
5469
        // Number of operations to compute entry: 2
5461
5470
        A[nzc9[j]] += FE0_C0[ip][j]*I[3];
5462
5471
      } // end loop over 'j'
5463
 
      
5464
 
      // Number of operations for primary indices: 8
5465
 
      for (unsigned int j = 0; j < 2; j++)
5466
 
      {
5467
 
        // Number of operations to compute entry: 2
5468
 
        A[nzc13[j]] += FE0_C0_D01[ip][j]*I[0];
5469
 
        // Number of operations to compute entry: 2
5470
 
        A[nzc14[j]] += FE0_C0_D01[ip][j]*I[1];
5471
 
      } // end loop over 'j'
5472
5472
    } // end loop over 'ip'
5473
5473
  }
5474
5474
 
5508
5508
  /// Return a string identifying the form
5509
5509
  virtual const char* signature() const
5510
5510
  {
5511
 
    return "e93f366239c0a95b7d77687ec4280e2205009455fa7d3a92b0a8033a36e3996bf2dda5cb95beeb7a6f03157d0b4b0ac507ae0bf86be7c9dcf5cc992cfc6b564a";
 
5511
    return "7f9591d8bb1ba1cad4fc8adc29656ceb0f322055b1699e9fdb7712e5846edc10bc8e382207d7cf1ac42d8753f086e90ab4920c2e0ac6451eafd63e2dbf951899";
 
5512
  }
 
5513
 
 
5514
  /// Return original coefficient position for each coefficient (0 <= i < n)
 
5515
  virtual std::size_t original_coefficient_position(std::size_t i) const
 
5516
  {
 
5517
    static const std::vector<std::size_t> position({});
 
5518
    return position[i];
5512
5519
  }
5513
5520
 
5514
5521
  /// Return the rank of the global tensor (r)
5719
5726
  /// Return a string identifying the form
5720
5727
  virtual const char* signature() const
5721
5728
  {
5722
 
    return "d4604ad643cbbe4c46e97258ce6269f7ea258a2f6592eaae95337d9841bd3a9ccc2188d19f05ef1c9ab24601eef5358c6577d0860e27ce15f476e4bd101c4e78";
 
5729
    return "e07cbcc92d3eb0b1538b488ca04f830e5adca241f7326f82acf57aff83b2022487969f2b3cb4812eb0b6768483748b2a6e39aa0290a0a12dcbb5038fdc094de4";
 
5730
  }
 
5731
 
 
5732
  /// Return original coefficient position for each coefficient (0 <= i < n)
 
5733
  virtual std::size_t original_coefficient_position(std::size_t i) const
 
5734
  {
 
5735
    static const std::vector<std::size_t> position({0});
 
5736
    return position[i];
5723
5737
  }
5724
5738
 
5725
5739
  /// Return the rank of the global tensor (r)
5903
5917
 
5904
5918
// DOLFIN includes
5905
5919
#include <dolfin/common/NoDeleter.h>
5906
 
#include <dolfin/mesh/Restriction.h>
5907
5920
#include <dolfin/fem/FiniteElement.h>
5908
5921
#include <dolfin/fem/DofMap.h>
5909
5922
#include <dolfin/fem/Form.h>
5961
5974
    // Do nothing
5962
5975
  }
5963
5976
 
5964
 
  //--- Constructors for restricted function space, 2 different versions ---
5965
 
 
5966
 
  // Create restricted function space (reference version)
5967
 
  CoefficientSpace_f(const dolfin::Restriction& restriction):
5968
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
5969
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_1()))),
5970
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_1()),
5971
 
                                                                                     reference_to_no_delete_pointer(restriction))))
5972
 
  {
5973
 
    // Do nothing
5974
 
  }
5975
 
 
5976
 
  // Create restricted function space (shared pointer version)
5977
 
  CoefficientSpace_f(std::shared_ptr<const dolfin::Restriction> restriction):
5978
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
5979
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_1()))),
5980
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_1()),
5981
 
                                                                                     restriction)))
5982
 
  {
5983
 
    // Do nothing
5984
 
  }
5985
 
 
5986
 
  // Copy constructor
5987
 
  ~CoefficientSpace_f()
5988
 
  {
5989
 
  }
5990
 
 
5991
5977
};
5992
5978
 
5993
5979
class Form_a_FunctionSpace_0: public dolfin::FunctionSpace
6035
6021
    // Do nothing
6036
6022
  }
6037
6023
 
6038
 
  //--- Constructors for restricted function space, 2 different versions ---
6039
 
 
6040
 
  // Create restricted function space (reference version)
6041
 
  Form_a_FunctionSpace_0(const dolfin::Restriction& restriction):
6042
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
6043
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_2()))),
6044
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_2()),
6045
 
                                                                                     reference_to_no_delete_pointer(restriction))))
6046
 
  {
6047
 
    // Do nothing
6048
 
  }
6049
 
 
6050
 
  // Create restricted function space (shared pointer version)
6051
 
  Form_a_FunctionSpace_0(std::shared_ptr<const dolfin::Restriction> restriction):
6052
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
6053
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_2()))),
6054
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_2()),
6055
 
                                                                                     restriction)))
6056
 
  {
6057
 
    // Do nothing
6058
 
  }
6059
 
 
6060
 
  // Copy constructor
6061
 
  ~Form_a_FunctionSpace_0()
6062
 
  {
6063
 
  }
6064
 
 
6065
6024
};
6066
6025
 
6067
6026
class Form_a_FunctionSpace_1: public dolfin::FunctionSpace
6109
6068
    // Do nothing
6110
6069
  }
6111
6070
 
6112
 
  //--- Constructors for restricted function space, 2 different versions ---
6113
 
 
6114
 
  // Create restricted function space (reference version)
6115
 
  Form_a_FunctionSpace_1(const dolfin::Restriction& restriction):
6116
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
6117
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_2()))),
6118
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_2()),
6119
 
                                                                                     reference_to_no_delete_pointer(restriction))))
6120
 
  {
6121
 
    // Do nothing
6122
 
  }
6123
 
 
6124
 
  // Create restricted function space (shared pointer version)
6125
 
  Form_a_FunctionSpace_1(std::shared_ptr<const dolfin::Restriction> restriction):
6126
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
6127
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_2()))),
6128
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_2()),
6129
 
                                                                                     restriction)))
6130
 
  {
6131
 
    // Do nothing
6132
 
  }
6133
 
 
6134
 
  // Copy constructor
6135
 
  ~Form_a_FunctionSpace_1()
6136
 
  {
6137
 
  }
6138
 
 
6139
6071
};
6140
6072
 
6141
6073
class Form_a: public dolfin::Form
6238
6170
    // Do nothing
6239
6171
  }
6240
6172
 
6241
 
  //--- Constructors for restricted function space, 2 different versions ---
6242
 
 
6243
 
  // Create restricted function space (reference version)
6244
 
  Form_L_FunctionSpace_0(const dolfin::Restriction& restriction):
6245
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
6246
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_2()))),
6247
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_2()),
6248
 
                                                                                     reference_to_no_delete_pointer(restriction))))
6249
 
  {
6250
 
    // Do nothing
6251
 
  }
6252
 
 
6253
 
  // Create restricted function space (shared pointer version)
6254
 
  Form_L_FunctionSpace_0(std::shared_ptr<const dolfin::Restriction> restriction):
6255
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
6256
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new stokes_finite_element_2()))),
6257
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new stokes_dofmap_2()),
6258
 
                                                                                     restriction)))
6259
 
  {
6260
 
    // Do nothing
6261
 
  }
6262
 
 
6263
 
  // Copy constructor
6264
 
  ~Form_L_FunctionSpace_0()
6265
 
  {
6266
 
  }
6267
 
 
6268
6173
};
6269
6174
 
6270
6175
typedef CoefficientSpace_f Form_L_FunctionSpace_1;