~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to bench/fem/convergence/cpp/forms/Poisson2D_2.h

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
      
155
155
      // Table(s) of coefficients.
156
156
      static const double coefficients0[6] = \
157
 
      {0.0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817};
 
157
      {0.0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582063, 0.0544331053951817};
158
158
      
159
159
      // Compute value(s).
160
160
      for (unsigned int r = 0; r < 6; r++)
190
190
      
191
191
      // Table(s) of coefficients.
192
192
      static const double coefficients0[6] = \
193
 
      {0.0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818};
 
193
      {0.0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582064, 0.0544331053951818};
194
194
      
195
195
      // Compute value(s).
196
196
      for (unsigned int r = 0; r < 6; r++)
489
489
      
490
490
      // Table(s) of coefficients.
491
491
      static const double coefficients0[6] = \
492
 
      {0.0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582064, 0.0544331053951817};
 
492
      {0.0, -0.173205080756888, -0.1, 0.121716123890037, 0.0942809041582063, 0.0544331053951817};
493
493
      
494
494
      // Tables of derivatives of the polynomial base (transpose).
495
495
      static const double dmats0[6][6] = \
497
497
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
498
498
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
499
499
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
500
 
      {4.0, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
500
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
501
501
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
502
502
      
503
503
      static const double dmats1[6][6] = \
505
505
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
506
506
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
507
507
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
508
 
      {2, 6.12372435695794, 3.53553390593274, 0.0, 0.0, 0.0},
 
508
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
509
509
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
510
510
      
511
511
      // Compute reference derivatives.
655
655
      
656
656
      // Table(s) of coefficients.
657
657
      static const double coefficients0[6] = \
658
 
      {0.0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582063, 0.0544331053951818};
 
658
      {0.0, 0.173205080756888, -0.1, 0.121716123890037, -0.0942809041582064, 0.0544331053951818};
659
659
      
660
660
      // Tables of derivatives of the polynomial base (transpose).
661
661
      static const double dmats0[6][6] = \
663
663
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
664
664
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
665
665
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
666
 
      {4.0, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
666
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
667
667
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
668
668
      
669
669
      static const double dmats1[6][6] = \
671
671
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
672
672
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
673
673
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
674
 
      {2, 6.12372435695794, 3.53553390593274, 0.0, 0.0, 0.0},
 
674
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
675
675
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
676
676
      
677
677
      // Compute reference derivatives.
829
829
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
830
830
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
831
831
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
832
 
      {4.0, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
832
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
833
833
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
834
834
      
835
835
      static const double dmats1[6][6] = \
837
837
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
838
838
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
839
839
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
840
 
      {2, 6.12372435695794, 3.53553390593274, 0.0, 0.0, 0.0},
 
840
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
841
841
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
842
842
      
843
843
      // Compute reference derivatives.
995
995
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
996
996
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
997
997
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
998
 
      {4.0, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
998
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
999
999
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
1000
1000
      
1001
1001
      static const double dmats1[6][6] = \
1003
1003
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
1004
1004
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
1005
1005
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
1006
 
      {2, 6.12372435695794, 3.53553390593274, 0.0, 0.0, 0.0},
 
1006
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
1007
1007
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
1008
1008
      
1009
1009
      // Compute reference derivatives.
1161
1161
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
1162
1162
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1163
1163
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
1164
 
      {4.0, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
1164
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
1165
1165
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
1166
1166
      
1167
1167
      static const double dmats1[6][6] = \
1169
1169
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
1170
1170
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
1171
1171
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
1172
 
      {2, 6.12372435695794, 3.53553390593274, 0.0, 0.0, 0.0},
 
1172
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
1173
1173
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
1174
1174
      
1175
1175
      // Compute reference derivatives.
1327
1327
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
1328
1328
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1329
1329
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
1330
 
      {4.0, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
1330
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
1331
1331
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
1332
1332
      
1333
1333
      static const double dmats1[6][6] = \
1335
1335
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
1336
1336
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
1337
1337
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
1338
 
      {2, 6.12372435695794, 3.53553390593274, 0.0, 0.0, 0.0},
 
1338
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
1339
1339
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
1340
1340
      
1341
1341
      // Compute reference derivatives.
2017
2017
    A[13] = -0.166666666666667*G0_1_0;
2018
2018
    A[14] = 0.5*G0_1_1;
2019
2019
    A[15] = 0.666666666666666*G0_1_0;
2020
 
    A[16] = -0.666666666666667*G0_1_0 - 0.666666666666666*G0_1_1;
 
2020
    A[16] = -0.666666666666666*G0_1_0 - 0.666666666666666*G0_1_1;
2021
2021
    A[17] = 0.0;
2022
2022
    A[18] = 0.0;
2023
2023
    A[19] = 0.666666666666666*G0_1_0;
2024
2024
    A[20] = 0.666666666666666*G0_0_1;
2025
 
    A[21] = 1.33333333333333*G0_0_0 + 0.666666666666666*G0_0_1 + 0.666666666666666*G0_1_0 + 1.33333333333333*G0_1_1;
2026
 
    A[22] = -1.33333333333333*G0_0_0 - 0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_0;
2027
 
    A[23] = -0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_0 - 1.33333333333333*G0_1_1;
 
2025
    A[21] = 1.33333333333333*G0_0_0 + 0.666666666666665*G0_0_1 + 0.666666666666665*G0_1_0 + 1.33333333333333*G0_1_1;
 
2026
    A[22] = -1.33333333333333*G0_0_0 - 0.666666666666666*G0_0_1 - 0.666666666666665*G0_1_0;
 
2027
    A[23] = -0.666666666666665*G0_0_1 - 0.666666666666667*G0_1_0 - 1.33333333333333*G0_1_1;
2028
2028
    A[24] = -0.666666666666667*G0_1_0 - 0.666666666666667*G0_1_1;
2029
2029
    A[25] = 0.0;
2030
 
    A[26] = -0.666666666666667*G0_0_1 - 0.666666666666666*G0_1_1;
2031
 
    A[27] = -1.33333333333333*G0_0_0 - 0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_0;
 
2030
    A[26] = -0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_1;
 
2031
    A[27] = -1.33333333333333*G0_0_0 - 0.666666666666665*G0_0_1 - 0.666666666666666*G0_1_0;
2032
2032
    A[28] = 1.33333333333333*G0_0_0 + 0.666666666666666*G0_0_1 + 0.666666666666666*G0_1_0 + 1.33333333333333*G0_1_1;
2033
 
    A[29] = 0.666666666666666*G0_0_1 + 0.666666666666667*G0_1_0;
 
2033
    A[29] = 0.666666666666665*G0_0_1 + 0.666666666666667*G0_1_0;
2034
2034
    A[30] = -0.666666666666667*G0_0_0 - 0.666666666666667*G0_0_1;
2035
2035
    A[31] = -0.666666666666667*G0_0_0 - 0.666666666666666*G0_1_0;
2036
2036
    A[32] = 0.0;
2037
 
    A[33] = -0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_0 - 1.33333333333333*G0_1_1;
2038
 
    A[34] = 0.666666666666667*G0_0_1 + 0.666666666666666*G0_1_0;
2039
 
    A[35] = 1.33333333333333*G0_0_0 + 0.666666666666666*G0_0_1 + 0.666666666666666*G0_1_0 + 1.33333333333333*G0_1_1;
 
2037
    A[33] = -0.666666666666667*G0_0_1 - 0.666666666666665*G0_1_0 - 1.33333333333333*G0_1_1;
 
2038
    A[34] = 0.666666666666667*G0_0_1 + 0.666666666666665*G0_1_0;
 
2039
    A[35] = 1.33333333333333*G0_0_0 + 0.666666666666667*G0_0_1 + 0.666666666666667*G0_1_0 + 1.33333333333333*G0_1_1;
2040
2040
  }
2041
2041
 
2042
2042
  /// Tabulate the tensor for the contribution from a local cell
2110
2110
    
2111
2111
    // Compute element tensor
2112
2112
    A[0] = 0.0166666666666666*G0_0 - 0.00277777777777778*G0_1 - 0.00277777777777778*G0_2 - 0.0111111111111111*G0_3;
2113
 
    A[1] = -0.00277777777777778*G0_0 + 0.0166666666666667*G0_1 - 0.0027777777777778*G0_2 - 0.0111111111111111*G0_4;
 
2113
    A[1] = -0.00277777777777778*G0_0 + 0.0166666666666667*G0_1 - 0.00277777777777781*G0_2 - 0.0111111111111111*G0_4;
2114
2114
    A[2] = -0.00277777777777778*G0_0 - 0.0027777777777778*G0_1 + 0.0166666666666667*G0_2 - 0.0111111111111111*G0_5;
2115
 
    A[3] = -0.0111111111111111*G0_0 + 0.0888888888888889*G0_3 + 0.0444444444444443*G0_4 + 0.0444444444444443*G0_5;
 
2115
    A[3] = -0.0111111111111111*G0_0 + 0.0888888888888888*G0_3 + 0.0444444444444443*G0_4 + 0.0444444444444443*G0_5;
2116
2116
    A[4] = -0.0111111111111111*G0_1 + 0.0444444444444443*G0_3 + 0.0888888888888887*G0_4 + 0.0444444444444443*G0_5;
2117
 
    A[5] = -0.0111111111111111*G0_2 + 0.0444444444444443*G0_3 + 0.0444444444444443*G0_4 + 0.0888888888888888*G0_5;
 
2117
    A[5] = -0.0111111111111111*G0_2 + 0.0444444444444443*G0_3 + 0.0444444444444443*G0_4 + 0.0888888888888887*G0_5;
2118
2118
  }
2119
2119
 
2120
2120
  /// Tabulate the tensor for the contribution from a local cell
2165
2165
  /// Return a string identifying the form
2166
2166
  virtual const char* signature() const
2167
2167
  {
2168
 
    return "2901e913e17e14e3ddfb1bd8f3aa56a11d4245a0184017d5ff9c1e60c073f505bef38375bd05487a431521116ffd6babf2ade19d7fe21f6dece1d2ba4b530644";
 
2168
    return "fe5b8e0a18b6d2660665fc11728a2307e724e02c8c78f32cfcb3b91b93e128b727ced2f3c77e16ecfc4e057c89ad2b747cab553c48d85bacf2284553e99a4520";
2169
2169
  }
2170
2170
 
2171
2171
  /// Return the rank of the global tensor (r)
2301
2301
  /// Return a string identifying the form
2302
2302
  virtual const char* signature() const
2303
2303
  {
2304
 
    return "e1540788128bd76dd65023fbac68f400cbf645e40cb34f7eb666ba5329f7c1ab81e94e3f9cba895a798bddc56de851e24ccfa4a59d0c937b72659bed80255226";
 
2304
    return "0f16aead6df57ba42589f62efadd4c456027a78e4867168f5e88c38f156d23c10dbc414754a74361b1296947a1207a6e9d8d16f2678b7b6c2a2f925eac035a69";
2305
2305
  }
2306
2306
 
2307
2307
  /// Return the rank of the global tensor (r)
2410
2410
 
2411
2411
// DOLFIN includes
2412
2412
#include <dolfin/common/NoDeleter.h>
 
2413
#include <dolfin/mesh/Restriction.h>
2413
2414
#include <dolfin/fem/FiniteElement.h>
2414
2415
#include <dolfin/fem/DofMap.h>
2415
2416
#include <dolfin/fem/Form.h>
2426
2427
{
2427
2428
public:
2428
2429
 
 
2430
  //--- Constructors for standard function space, 2 different versions ---
 
2431
 
 
2432
  // Create standard function space (reference version)
2429
2433
  CoefficientSpace_f(const dolfin::Mesh& mesh):
2430
2434
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2431
2435
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2434
2438
    // Do nothing
2435
2439
  }
2436
2440
 
2437
 
  CoefficientSpace_f(dolfin::Mesh& mesh):
2438
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2439
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2440
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2441
 
  {
2442
 
    // Do nothing
2443
 
  }
2444
 
 
2445
 
  CoefficientSpace_f(boost::shared_ptr<dolfin::Mesh> mesh):
2446
 
    dolfin::FunctionSpace(mesh,
2447
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2448
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2449
 
  {
2450
 
      // Do nothing
2451
 
  }
2452
 
 
 
2441
  // Create standard function space (shared pointer version)
2453
2442
  CoefficientSpace_f(boost::shared_ptr<const dolfin::Mesh> mesh):
2454
2443
    dolfin::FunctionSpace(mesh,
2455
2444
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2456
2445
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2457
2446
  {
2458
 
      // Do nothing
2459
 
  }
2460
 
 
 
2447
    // Do nothing
 
2448
  }
 
2449
 
 
2450
  //--- Constructors for restricted function space, 2 different versions ---
 
2451
 
 
2452
  // Create restricted function space (reference version)
 
2453
  CoefficientSpace_f(const dolfin::Restriction& restriction):
 
2454
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
2455
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2456
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2457
                                                                                     reference_to_no_delete_pointer(restriction))))
 
2458
  {
 
2459
    // Do nothing
 
2460
  }
 
2461
 
 
2462
  // Create restricted function space (shared pointer version)
 
2463
  CoefficientSpace_f(boost::shared_ptr<const dolfin::Restriction> restriction):
 
2464
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
2465
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2466
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2467
                                                                                     restriction)))
 
2468
  {
 
2469
    // Do nothing
 
2470
  }
 
2471
 
 
2472
  // Copy constructor
2461
2473
  ~CoefficientSpace_f()
2462
2474
  {
2463
2475
  }
2464
2476
 
2465
2477
};
2466
2478
 
2467
 
class Form_0_FunctionSpace_0: public dolfin::FunctionSpace
2468
 
{
2469
 
public:
2470
 
 
2471
 
  Form_0_FunctionSpace_0(const dolfin::Mesh& mesh):
2472
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2473
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2474
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2475
 
  {
2476
 
    // Do nothing
2477
 
  }
2478
 
 
2479
 
  Form_0_FunctionSpace_0(dolfin::Mesh& mesh):
2480
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2481
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2482
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2483
 
  {
2484
 
    // Do nothing
2485
 
  }
2486
 
 
2487
 
  Form_0_FunctionSpace_0(boost::shared_ptr<dolfin::Mesh> mesh):
2488
 
    dolfin::FunctionSpace(mesh,
2489
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2490
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2491
 
  {
2492
 
      // Do nothing
2493
 
  }
2494
 
 
2495
 
  Form_0_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
2496
 
    dolfin::FunctionSpace(mesh,
2497
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2498
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2499
 
  {
2500
 
      // Do nothing
2501
 
  }
2502
 
 
2503
 
  ~Form_0_FunctionSpace_0()
2504
 
  {
2505
 
  }
2506
 
 
2507
 
};
2508
 
 
2509
 
class Form_0_FunctionSpace_1: public dolfin::FunctionSpace
2510
 
{
2511
 
public:
2512
 
 
2513
 
  Form_0_FunctionSpace_1(const dolfin::Mesh& mesh):
2514
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2515
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2516
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2517
 
  {
2518
 
    // Do nothing
2519
 
  }
2520
 
 
2521
 
  Form_0_FunctionSpace_1(dolfin::Mesh& mesh):
2522
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2523
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2524
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2525
 
  {
2526
 
    // Do nothing
2527
 
  }
2528
 
 
2529
 
  Form_0_FunctionSpace_1(boost::shared_ptr<dolfin::Mesh> mesh):
2530
 
    dolfin::FunctionSpace(mesh,
2531
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2532
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2533
 
  {
2534
 
      // Do nothing
2535
 
  }
2536
 
 
2537
 
  Form_0_FunctionSpace_1(boost::shared_ptr<const dolfin::Mesh> mesh):
2538
 
    dolfin::FunctionSpace(mesh,
2539
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2540
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2541
 
  {
2542
 
      // Do nothing
2543
 
  }
2544
 
 
2545
 
  ~Form_0_FunctionSpace_1()
2546
 
  {
2547
 
  }
2548
 
 
2549
 
};
2550
 
 
2551
 
class Form_0: public dolfin::Form
 
2479
class Form_a_FunctionSpace_0: public dolfin::FunctionSpace
 
2480
{
 
2481
public:
 
2482
 
 
2483
  //--- Constructors for standard function space, 2 different versions ---
 
2484
 
 
2485
  // Create standard function space (reference version)
 
2486
  Form_a_FunctionSpace_0(const dolfin::Mesh& mesh):
 
2487
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
 
2488
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2489
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
 
2490
  {
 
2491
    // Do nothing
 
2492
  }
 
2493
 
 
2494
  // Create standard function space (shared pointer version)
 
2495
  Form_a_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
 
2496
    dolfin::FunctionSpace(mesh,
 
2497
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2498
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
 
2499
  {
 
2500
    // Do nothing
 
2501
  }
 
2502
 
 
2503
  //--- Constructors for restricted function space, 2 different versions ---
 
2504
 
 
2505
  // Create restricted function space (reference version)
 
2506
  Form_a_FunctionSpace_0(const dolfin::Restriction& restriction):
 
2507
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
2508
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2509
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2510
                                                                                     reference_to_no_delete_pointer(restriction))))
 
2511
  {
 
2512
    // Do nothing
 
2513
  }
 
2514
 
 
2515
  // Create restricted function space (shared pointer version)
 
2516
  Form_a_FunctionSpace_0(boost::shared_ptr<const dolfin::Restriction> restriction):
 
2517
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
2518
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2519
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2520
                                                                                     restriction)))
 
2521
  {
 
2522
    // Do nothing
 
2523
  }
 
2524
 
 
2525
  // Copy constructor
 
2526
  ~Form_a_FunctionSpace_0()
 
2527
  {
 
2528
  }
 
2529
 
 
2530
};
 
2531
 
 
2532
class Form_a_FunctionSpace_1: public dolfin::FunctionSpace
 
2533
{
 
2534
public:
 
2535
 
 
2536
  //--- Constructors for standard function space, 2 different versions ---
 
2537
 
 
2538
  // Create standard function space (reference version)
 
2539
  Form_a_FunctionSpace_1(const dolfin::Mesh& mesh):
 
2540
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
 
2541
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2542
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
 
2543
  {
 
2544
    // Do nothing
 
2545
  }
 
2546
 
 
2547
  // Create standard function space (shared pointer version)
 
2548
  Form_a_FunctionSpace_1(boost::shared_ptr<const dolfin::Mesh> mesh):
 
2549
    dolfin::FunctionSpace(mesh,
 
2550
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2551
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
 
2552
  {
 
2553
    // Do nothing
 
2554
  }
 
2555
 
 
2556
  //--- Constructors for restricted function space, 2 different versions ---
 
2557
 
 
2558
  // Create restricted function space (reference version)
 
2559
  Form_a_FunctionSpace_1(const dolfin::Restriction& restriction):
 
2560
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
2561
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2562
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2563
                                                                                     reference_to_no_delete_pointer(restriction))))
 
2564
  {
 
2565
    // Do nothing
 
2566
  }
 
2567
 
 
2568
  // Create restricted function space (shared pointer version)
 
2569
  Form_a_FunctionSpace_1(boost::shared_ptr<const dolfin::Restriction> restriction):
 
2570
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
2571
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2572
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2573
                                                                                     restriction)))
 
2574
  {
 
2575
    // Do nothing
 
2576
  }
 
2577
 
 
2578
  // Copy constructor
 
2579
  ~Form_a_FunctionSpace_1()
 
2580
  {
 
2581
  }
 
2582
 
 
2583
};
 
2584
 
 
2585
class Form_a: public dolfin::Form
2552
2586
{
2553
2587
public:
2554
2588
 
2555
2589
  // Constructor
2556
 
  Form_0(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0):
 
2590
  Form_a(const dolfin::FunctionSpace& V1, const dolfin::FunctionSpace& V0):
2557
2591
    dolfin::Form(2, 0)
2558
2592
  {
2559
2593
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
2563
2597
  }
2564
2598
 
2565
2599
  // Constructor
2566
 
  Form_0(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0):
 
2600
  Form_a(boost::shared_ptr<const dolfin::FunctionSpace> V1, boost::shared_ptr<const dolfin::FunctionSpace> V0):
2567
2601
    dolfin::Form(2, 0)
2568
2602
  {
2569
2603
    _function_spaces[0] = V0;
2573
2607
  }
2574
2608
 
2575
2609
  // Destructor
2576
 
  ~Form_0()
 
2610
  ~Form_a()
2577
2611
  {}
2578
2612
 
2579
2613
  /// Return the number of the coefficient with this name
2580
 
  virtual dolfin::uint coefficient_number(const std::string& name) const
 
2614
  virtual std::size_t coefficient_number(const std::string& name) const
2581
2615
  {
2582
2616
 
2583
2617
    dolfin::dolfin_error("generated code for class Form",
2587
2621
  }
2588
2622
 
2589
2623
  /// Return the name of the coefficient with this number
2590
 
  virtual std::string coefficient_name(dolfin::uint i) const
 
2624
  virtual std::string coefficient_name(std::size_t i) const
2591
2625
  {
2592
2626
 
2593
2627
    dolfin::dolfin_error("generated code for class Form",
2597
2631
  }
2598
2632
 
2599
2633
  // Typedefs
2600
 
  typedef Form_0_FunctionSpace_0 TestSpace;
2601
 
  typedef Form_0_FunctionSpace_1 TrialSpace;
 
2634
  typedef Form_a_FunctionSpace_0 TestSpace;
 
2635
  typedef Form_a_FunctionSpace_1 TrialSpace;
2602
2636
 
2603
2637
  // Coefficients
2604
2638
};
2605
2639
 
2606
 
class Form_1_FunctionSpace_0: public dolfin::FunctionSpace
 
2640
class Form_L_FunctionSpace_0: public dolfin::FunctionSpace
2607
2641
{
2608
2642
public:
2609
2643
 
2610
 
  Form_1_FunctionSpace_0(const dolfin::Mesh& mesh):
2611
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2612
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2613
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2614
 
  {
2615
 
    // Do nothing
2616
 
  }
2617
 
 
2618
 
  Form_1_FunctionSpace_0(dolfin::Mesh& mesh):
2619
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
2620
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2621
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
2622
 
  {
2623
 
    // Do nothing
2624
 
  }
2625
 
 
2626
 
  Form_1_FunctionSpace_0(boost::shared_ptr<dolfin::Mesh> mesh):
2627
 
    dolfin::FunctionSpace(mesh,
2628
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2629
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2630
 
  {
2631
 
      // Do nothing
2632
 
  }
2633
 
 
2634
 
  Form_1_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
2635
 
    dolfin::FunctionSpace(mesh,
2636
 
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
2637
 
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
2638
 
  {
2639
 
      // Do nothing
2640
 
  }
2641
 
 
2642
 
  ~Form_1_FunctionSpace_0()
 
2644
  //--- Constructors for standard function space, 2 different versions ---
 
2645
 
 
2646
  // Create standard function space (reference version)
 
2647
  Form_L_FunctionSpace_0(const dolfin::Mesh& mesh):
 
2648
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(mesh),
 
2649
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2650
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), mesh)))
 
2651
  {
 
2652
    // Do nothing
 
2653
  }
 
2654
 
 
2655
  // Create standard function space (shared pointer version)
 
2656
  Form_L_FunctionSpace_0(boost::shared_ptr<const dolfin::Mesh> mesh):
 
2657
    dolfin::FunctionSpace(mesh,
 
2658
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2659
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()), *mesh)))
 
2660
  {
 
2661
    // Do nothing
 
2662
  }
 
2663
 
 
2664
  //--- Constructors for restricted function space, 2 different versions ---
 
2665
 
 
2666
  // Create restricted function space (reference version)
 
2667
  Form_L_FunctionSpace_0(const dolfin::Restriction& restriction):
 
2668
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
 
2669
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2670
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2671
                                                                                     reference_to_no_delete_pointer(restriction))))
 
2672
  {
 
2673
    // Do nothing
 
2674
  }
 
2675
 
 
2676
  // Create restricted function space (shared pointer version)
 
2677
  Form_L_FunctionSpace_0(boost::shared_ptr<const dolfin::Restriction> restriction):
 
2678
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
 
2679
                          boost::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(boost::shared_ptr<ufc::finite_element>(new poisson2d_2_finite_element_0()))),
 
2680
                          boost::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(boost::shared_ptr<ufc::dofmap>(new poisson2d_2_dofmap_0()),
 
2681
                                                                                     restriction)))
 
2682
  {
 
2683
    // Do nothing
 
2684
  }
 
2685
 
 
2686
  // Copy constructor
 
2687
  ~Form_L_FunctionSpace_0()
2643
2688
  {
2644
2689
  }
2645
2690
 
2646
2691
};
2647
2692
 
2648
 
typedef CoefficientSpace_f Form_1_FunctionSpace_1;
 
2693
typedef CoefficientSpace_f Form_L_FunctionSpace_1;
2649
2694
 
2650
 
class Form_1: public dolfin::Form
 
2695
class Form_L: public dolfin::Form
2651
2696
{
2652
2697
public:
2653
2698
 
2654
2699
  // Constructor
2655
 
  Form_1(const dolfin::FunctionSpace& V0):
2656
 
    dolfin::Form(1, 1), f(*this, 0)
2657
 
  {
2658
 
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
2659
 
 
 
2700
  Form_L(const dolfin::FunctionSpace& V0):
 
2701
    dolfin::Form(1, 1), f(*this, 0)
 
2702
  {
 
2703
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
 
2704
 
2660
2705
    _ufc_form = boost::shared_ptr<const ufc::form>(new poisson2d_2_form_1());
2661
2706
  }
2662
 
 
 
2707
 
2663
2708
  // Constructor
2664
 
  Form_1(const dolfin::FunctionSpace& V0, const dolfin::GenericFunction& f):
2665
 
    dolfin::Form(1, 1), f(*this, 0)
2666
 
  {
2667
 
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
2668
 
 
 
2709
  Form_L(const dolfin::FunctionSpace& V0, const dolfin::GenericFunction& f):
 
2710
    dolfin::Form(1, 1), f(*this, 0)
 
2711
  {
 
2712
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
 
2713
 
2669
2714
    this->f = f;
2670
 
 
 
2715
 
2671
2716
    _ufc_form = boost::shared_ptr<const ufc::form>(new poisson2d_2_form_1());
2672
2717
  }
2673
 
 
 
2718
 
2674
2719
  // Constructor
2675
 
  Form_1(const dolfin::FunctionSpace& V0, boost::shared_ptr<const dolfin::GenericFunction> f):
 
2720
  Form_L(const dolfin::FunctionSpace& V0, boost::shared_ptr<const dolfin::GenericFunction> f):
2676
2721
    dolfin::Form(1, 1), f(*this, 0)
2677
2722
  {
2678
2723
    _function_spaces[0] = reference_to_no_delete_pointer(V0);
2679
 
 
 
2724
 
2680
2725
    this->f = *f;
2681
2726
 
2682
2727
    _ufc_form = boost::shared_ptr<const ufc::form>(new poisson2d_2_form_1());
2683
2728
  }
2684
2729
 
2685
2730
  // Constructor
2686
 
  Form_1(boost::shared_ptr<const dolfin::FunctionSpace> V0):
2687
 
    dolfin::Form(1, 1), f(*this, 0)
2688
 
  {
2689
 
    _function_spaces[0] = V0;
2690
 
 
2691
 
    _ufc_form = boost::shared_ptr<const ufc::form>(new poisson2d_2_form_1());
2692
 
  }
2693
 
 
2694
 
  // Constructor
2695
 
  Form_1(boost::shared_ptr<const dolfin::FunctionSpace> V0, const dolfin::GenericFunction& f):
2696
 
    dolfin::Form(1, 1), f(*this, 0)
2697
 
  {
2698
 
    _function_spaces[0] = V0;
2699
 
 
 
2731
  Form_L(boost::shared_ptr<const dolfin::FunctionSpace> V0):
 
2732
    dolfin::Form(1, 1), f(*this, 0)
 
2733
  {
 
2734
    _function_spaces[0] = V0;
 
2735
 
 
2736
    _ufc_form = boost::shared_ptr<const ufc::form>(new poisson2d_2_form_1());
 
2737
  }
 
2738
 
 
2739
  // Constructor
 
2740
  Form_L(boost::shared_ptr<const dolfin::FunctionSpace> V0, const dolfin::GenericFunction& f):
 
2741
    dolfin::Form(1, 1), f(*this, 0)
 
2742
  {
 
2743
    _function_spaces[0] = V0;
 
2744
 
2700
2745
    this->f = f;
2701
 
 
 
2746
 
2702
2747
    _ufc_form = boost::shared_ptr<const ufc::form>(new poisson2d_2_form_1());
2703
2748
  }
2704
 
 
 
2749
 
2705
2750
  // Constructor
2706
 
  Form_1(boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::GenericFunction> f):
 
2751
  Form_L(boost::shared_ptr<const dolfin::FunctionSpace> V0, boost::shared_ptr<const dolfin::GenericFunction> f):
2707
2752
    dolfin::Form(1, 1), f(*this, 0)
2708
2753
  {
2709
2754
    _function_spaces[0] = V0;
2714
2759
  }
2715
2760
 
2716
2761
  // Destructor
2717
 
  ~Form_1()
 
2762
  ~Form_L()
2718
2763
  {}
2719
2764
 
2720
2765
  /// Return the number of the coefficient with this name
2721
 
  virtual dolfin::uint coefficient_number(const std::string& name) const
 
2766
  virtual std::size_t coefficient_number(const std::string& name) const
2722
2767
  {
2723
2768
    if (name == "f")
2724
2769
      return 0;
2730
2775
  }
2731
2776
 
2732
2777
  /// Return the name of the coefficient with this number
2733
 
  virtual std::string coefficient_name(dolfin::uint i) const
 
2778
  virtual std::string coefficient_name(std::size_t i) const
2734
2779
  {
2735
2780
    switch (i)
2736
2781
    {
2745
2790
  }
2746
2791
 
2747
2792
  // Typedefs
2748
 
  typedef Form_1_FunctionSpace_0 TestSpace;
2749
 
  typedef Form_1_FunctionSpace_1 CoefficientSpace_f;
 
2793
  typedef Form_L_FunctionSpace_0 TestSpace;
 
2794
  typedef Form_L_FunctionSpace_1 CoefficientSpace_f;
2750
2795
 
2751
2796
  // Coefficients
2752
2797
  dolfin::CoefficientAssigner f;
2753
2798
};
2754
2799
 
2755
2800
// Class typedefs
2756
 
typedef Form_0 BilinearForm;
2757
 
typedef Form_0 JacobianForm;
2758
 
typedef Form_1 LinearForm;
2759
 
typedef Form_1 ResidualForm;
2760
 
typedef Form_0::TestSpace FunctionSpace;
 
2801
typedef Form_a BilinearForm;
 
2802
typedef Form_a JacobianForm;
 
2803
typedef Form_L LinearForm;
 
2804
typedef Form_L ResidualForm;
 
2805
typedef Form_a::TestSpace FunctionSpace;
2761
2806
 
2762
2807
}
2763
2808