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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2011-05-18 11:22:37 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110518112237-22o6lwrno3uf0jyz
Tags: 0.9.10-1
* New upstream release. This release introduces some new features and
  some behind-the-scenes improvements. Special quadrature schemes for
  simplices have been added, which will lead to improved performance
  when using the quadrature representation for low-order forms.
* Move from python-central to dh_python2 (closes: #616807).
  - Remove python-central from Build-Depends.
  - Bump minimum required python-all package version to 2.6.6-3~.
  - Remove XB-Python-Version line.
  - Bump minimum required cdbs version to 0.4.90~.
  - Remove DEB_PYTHON_SYSTEM=pycentral from debian/rules.
  - Replace XS-Python-Version with X-Python-Version.
* debian/rules:
  - Avoid compressing files with .ufl extension.
  - Use DEB_COMPRESS_EXCLUDE_ALL instead of deprecated
    DEB_COMPRESS_EXCLUDE.
  - Include cdbs utils.mk rule for automated copyright checks.
* Remove old custom cdbs rules and licensecheck script for copyright
  check.
* Bump Standards-Version to 3.9.2 (no changes needed).
* debian/copyright:
  - Update for upstream license change to LGPLv3.
  - Switch to DEP-5 format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// This code conforms with the UFC specification version 2.0.0
2
 
// and was automatically generated by FFC version 0.9.9.
 
2
// and was automatically generated by FFC version 0.9.10.
3
3
// 
4
4
// This code was generated with the following parameters:
5
5
// 
20
20
//   quadrature_rule:                'auto'
21
21
//   representation:                 'auto'
22
22
//   split:                          False
 
23
//   swig_binary:                    'swig'
 
24
//   swig_path:                      ''
23
25
 
24
26
#ifndef __HEAT_H
25
27
#define __HEAT_H
50
52
  /// Return a string identifying the finite element
51
53
  virtual const char* signature() const
52
54
  {
53
 
    return "FiniteElement('Discontinuous Lagrange', Cell('triangle', 1, Space(2)), 0)";
 
55
    return "FiniteElement('Discontinuous Lagrange', Cell('triangle', Space(2)), 0, None)";
54
56
  }
55
57
 
56
58
  /// Return the cell shape
428
430
  /// Map coordinate xhat from reference cell to coordinate x in cell
429
431
  virtual void map_from_reference_cell(double* x,
430
432
                                       const double* xhat,
431
 
                                       const ufc::cell& c)
 
433
                                       const ufc::cell& c) const
432
434
  {
433
435
    std::cerr << "*** FFC warning: " << "map_from_reference_cell not yet implemented (introduced in UFC 2.0)." << std::endl;
434
436
  }
436
438
  /// Map from coordinate x in cell to coordinate xhat in reference cell
437
439
  virtual void map_to_reference_cell(double* xhat,
438
440
                                     const double* x,
439
 
                                     const ufc::cell& c)
 
441
                                     const ufc::cell& c) const
440
442
  {
441
443
    std::cerr << "*** FFC warning: " << "map_to_reference_cell not yet implemented (introduced in UFC 2.0)." << std::endl;
442
444
  }
482
484
  /// Return a string identifying the finite element
483
485
  virtual const char* signature() const
484
486
  {
485
 
    return "FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1)";
 
487
    return "FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None)";
486
488
  }
487
489
 
488
490
  /// Return the cell shape
1385
1387
  /// Map coordinate xhat from reference cell to coordinate x in cell
1386
1388
  virtual void map_from_reference_cell(double* x,
1387
1389
                                       const double* xhat,
1388
 
                                       const ufc::cell& c)
 
1390
                                       const ufc::cell& c) const
1389
1391
  {
1390
1392
    std::cerr << "*** FFC warning: " << "map_from_reference_cell not yet implemented (introduced in UFC 2.0)." << std::endl;
1391
1393
  }
1393
1395
  /// Map from coordinate x in cell to coordinate xhat in reference cell
1394
1396
  virtual void map_to_reference_cell(double* xhat,
1395
1397
                                     const double* x,
1396
 
                                     const ufc::cell& c)
 
1398
                                     const ufc::cell& c) const
1397
1399
  {
1398
1400
    std::cerr << "*** FFC warning: " << "map_to_reference_cell not yet implemented (introduced in UFC 2.0)." << std::endl;
1399
1401
  }
1443
1445
  /// Return a string identifying the dofmap
1444
1446
  virtual const char* signature() const
1445
1447
  {
1446
 
    return "FFC dofmap for FiniteElement('Discontinuous Lagrange', Cell('triangle', 1, Space(2)), 0)";
 
1448
    return "FFC dofmap for FiniteElement('Discontinuous Lagrange', Cell('triangle', Space(2)), 0, None)";
1447
1449
  }
1448
1450
 
1449
1451
  /// Return true iff mesh entities of topological dimension d are needed
1675
1677
  /// Return a string identifying the dofmap
1676
1678
  virtual const char* signature() const
1677
1679
  {
1678
 
    return "FFC dofmap for FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1)";
 
1680
    return "FFC dofmap for FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None)";
1679
1681
  }
1680
1682
 
1681
1683
  /// Return true iff mesh entities of topological dimension d are needed
1961
1963
    
1962
1964
    
1963
1965
    // Array of quadrature weights.
1964
 
    static const double W4[4] = {0.15902069, 0.09097931, 0.15902069, 0.09097931};
1965
 
    // Quadrature points on the UFC reference element: (0.17855873, 0.15505103), (0.07503111, 0.64494897), (0.66639025, 0.15505103), (0.28001992, 0.64494897)
 
1966
    static const double W3[3] = {0.16666667, 0.16666667, 0.16666667};
 
1967
    // Quadrature points on the UFC reference element: (0.16666667, 0.16666667), (0.16666667, 0.66666667), (0.66666667, 0.16666667)
1966
1968
    
1967
1969
    // Value of basis functions at quadrature points.
1968
 
    static const double FE0[4][3] = \
1969
 
    {{0.66639025, 0.17855873, 0.15505103},
1970
 
    {0.28001992, 0.07503111, 0.64494897},
1971
 
    {0.17855873, 0.66639025, 0.15505103},
1972
 
    {0.07503111, 0.28001992, 0.64494897}};
 
1970
    static const double FE0[3][3] = \
 
1971
    {{0.66666667, 0.16666667, 0.16666667},
 
1972
    {0.16666667, 0.16666667, 0.66666667},
 
1973
    {0.16666667, 0.66666667, 0.16666667}};
1973
1974
    
1974
 
    static const double FE0_D01[4][3] = \
 
1975
    static const double FE0_D01[3][3] = \
1975
1976
    {{-1.00000000, 0.00000000, 1.00000000},
1976
1977
    {-1.00000000, 0.00000000, 1.00000000},
1977
 
    {-1.00000000, 0.00000000, 1.00000000},
1978
1978
    {-1.00000000, 0.00000000, 1.00000000}};
1979
1979
    
1980
 
    static const double FE0_D10[4][3] = \
 
1980
    static const double FE0_D10[3][3] = \
1981
1981
    {{-1.00000000, 1.00000000, 0.00000000},
1982
1982
    {-1.00000000, 1.00000000, 0.00000000},
1983
 
    {-1.00000000, 1.00000000, 0.00000000},
1984
1983
    {-1.00000000, 1.00000000, 0.00000000}};
1985
1984
    
1986
1985
    // Reset values in the element tensor.
1993
1992
    // Optimisations: ('eliminate zeros', False), ('ignore ones', False), ('ignore zero tables', False), ('optimisation', False), ('remove zero terms', False)
1994
1993
    
1995
1994
    // Loop quadrature points for integral.
1996
 
    // Number of operations to compute element tensor for following IP loop = 816
1997
 
    for (unsigned int ip = 0; ip < 4; ip++)
 
1995
    // Number of operations to compute element tensor for following IP loop = 612
 
1996
    for (unsigned int ip = 0; ip < 3; ip++)
1998
1997
    {
1999
1998
      
2000
1999
      // Coefficient declarations.
2012
2011
        for (unsigned int k = 0; k < 3; k++)
2013
2012
        {
2014
2013
          // Number of operations to compute entry: 22
2015
 
          A[j*3 + k] += (FE0[ip][j]*FE0[ip][k] + ((((K_00*FE0_D10[ip][j] + K_10*FE0_D01[ip][j]))*((K_00*FE0_D10[ip][k] + K_10*FE0_D01[ip][k])) + ((K_01*FE0_D10[ip][j] + K_11*FE0_D01[ip][j]))*((K_01*FE0_D10[ip][k] + K_11*FE0_D01[ip][k]))))*F0*w[1][0])*W4[ip]*det;
 
2014
          A[j*3 + k] += (FE0[ip][j]*FE0[ip][k] + ((((K_00*FE0_D10[ip][j] + K_10*FE0_D01[ip][j]))*((K_00*FE0_D10[ip][k] + K_10*FE0_D01[ip][k])) + ((K_01*FE0_D10[ip][j] + K_11*FE0_D01[ip][j]))*((K_01*FE0_D10[ip][k] + K_11*FE0_D01[ip][k]))))*F0*w[1][0])*W3[ip]*det;
2016
2015
        }// end loop over 'k'
2017
2016
      }// end loop over 'j'
2018
2017
    }// end loop over 'ip'
2141
2140
  /// Return a string identifying the form
2142
2141
  virtual const char* signature() const
2143
2142
  {
2144
 
    return "Form([Integral(Sum(Product(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 0), Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 1)), Product(IndexSum(Product(Indexed(ComponentTensor(SpatialDerivative(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 0), MultiIndex((Index(0),), {Index(0): 2})), MultiIndex((Index(0),), {Index(0): 2})), MultiIndex((Index(1),), {Index(1): 2})), Indexed(ComponentTensor(SpatialDerivative(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 1), MultiIndex((Index(2),), {Index(2): 2})), MultiIndex((Index(2),), {Index(2): 2})), MultiIndex((Index(1),), {Index(1): 2}))), MultiIndex((Index(1),), {Index(1): 2})), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 0), Constant(Cell('triangle', 1, Space(2)), 1)))), Measure('cell', 0, None))])";
 
2143
    return "Form([Integral(Sum(Product(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1)), Product(IndexSum(Product(Indexed(ComponentTensor(SpatialDerivative(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), MultiIndex((Index(0),), {Index(0): 2})), MultiIndex((Index(0),), {Index(0): 2})), MultiIndex((Index(1),), {Index(1): 2})), Indexed(ComponentTensor(SpatialDerivative(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1), MultiIndex((Index(2),), {Index(2): 2})), MultiIndex((Index(2),), {Index(2): 2})), MultiIndex((Index(1),), {Index(1): 2}))), MultiIndex((Index(1),), {Index(1): 2})), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Constant(Cell('triangle', Space(2)), 1)))), Measure('cell', 0, None))])";
2145
2144
  }
2146
2145
 
2147
2146
  /// Return the rank of the global tensor (r)
2297
2296
  /// Return a string identifying the form
2298
2297
  virtual const char* signature() const
2299
2298
  {
2300
 
    return "Form([Integral(Sum(Product(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 0)), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 1), Product(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 1), 0), Constant(Cell('triangle', 1, Space(2)), 2)))), Measure('cell', 0, None))])";
 
2299
    return "Form([Integral(Sum(Product(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0)), Product(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 0), Product(Coefficient(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), 1), Constant(Cell('triangle', Space(2)), 2)))), Measure('cell', 0, None))])";
2301
2300
  }
2302
2301
 
2303
2302
  /// Return the rank of the global tensor (r)