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

« back to all changes in this revision

Viewing changes to demo/undocumented/extrapolation/cpp/P2.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.
515
515
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
516
516
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
517
517
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
518
 
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
519
 
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
518
      {0.0, 9.48683298050515, 0.0, 0.0, 0.0, 0.0},
 
519
      {3.99999999999999, 0.0, 7.07106781186547, 0.0, 0.0, 0.0},
520
520
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
521
521
      
522
522
      static const double dmats1[6][6] = \
523
523
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
524
524
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
525
525
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
526
 
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
527
 
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
528
 
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
 
526
      {2.58198889747162, 4.74341649025257, -0.91287092917528, 0.0, 0.0, 0.0},
 
527
      {1.99999999999991, 6.12372435695794, 3.53553390593273, 0.0, 0.0, 0.0},
 
528
      {-2.30940107675849, 0.0, 8.16496580927727, 0.0, 0.0, 0.0}};
529
529
      
530
530
      // Compute reference derivatives.
531
531
      // Declare array of derivatives on FIAT element.
666
666
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
667
667
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
668
668
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
669
 
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
670
 
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
669
      {0.0, 9.48683298050515, 0.0, 0.0, 0.0, 0.0},
 
670
      {3.99999999999999, 0.0, 7.07106781186547, 0.0, 0.0, 0.0},
671
671
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
672
672
      
673
673
      static const double dmats1[6][6] = \
674
674
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
675
675
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
676
676
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
677
 
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
678
 
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
679
 
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
 
677
      {2.58198889747162, 4.74341649025257, -0.91287092917528, 0.0, 0.0, 0.0},
 
678
      {1.99999999999991, 6.12372435695794, 3.53553390593273, 0.0, 0.0, 0.0},
 
679
      {-2.30940107675849, 0.0, 8.16496580927727, 0.0, 0.0, 0.0}};
680
680
      
681
681
      // Compute reference derivatives.
682
682
      // Declare array of derivatives on FIAT element.
817
817
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
818
818
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
819
819
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
820
 
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
821
 
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
820
      {0.0, 9.48683298050515, 0.0, 0.0, 0.0, 0.0},
 
821
      {3.99999999999999, 0.0, 7.07106781186547, 0.0, 0.0, 0.0},
822
822
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
823
823
      
824
824
      static const double dmats1[6][6] = \
825
825
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
826
826
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
827
827
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
828
 
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
829
 
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
830
 
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
 
828
      {2.58198889747162, 4.74341649025257, -0.91287092917528, 0.0, 0.0, 0.0},
 
829
      {1.99999999999991, 6.12372435695794, 3.53553390593273, 0.0, 0.0, 0.0},
 
830
      {-2.30940107675849, 0.0, 8.16496580927727, 0.0, 0.0, 0.0}};
831
831
      
832
832
      // Compute reference derivatives.
833
833
      // Declare array of derivatives on FIAT element.
968
968
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
969
969
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
970
970
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
971
 
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
972
 
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
971
      {0.0, 9.48683298050515, 0.0, 0.0, 0.0, 0.0},
 
972
      {3.99999999999999, 0.0, 7.07106781186547, 0.0, 0.0, 0.0},
973
973
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
974
974
      
975
975
      static const double dmats1[6][6] = \
976
976
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
977
977
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
978
978
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
979
 
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
980
 
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
981
 
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
 
979
      {2.58198889747162, 4.74341649025257, -0.91287092917528, 0.0, 0.0, 0.0},
 
980
      {1.99999999999991, 6.12372435695794, 3.53553390593273, 0.0, 0.0, 0.0},
 
981
      {-2.30940107675849, 0.0, 8.16496580927727, 0.0, 0.0, 0.0}};
982
982
      
983
983
      // Compute reference derivatives.
984
984
      // Declare array of derivatives on FIAT element.
1119
1119
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1120
1120
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
1121
1121
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1122
 
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
1123
 
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
1122
      {0.0, 9.48683298050515, 0.0, 0.0, 0.0, 0.0},
 
1123
      {3.99999999999999, 0.0, 7.07106781186547, 0.0, 0.0, 0.0},
1124
1124
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
1125
1125
      
1126
1126
      static const double dmats1[6][6] = \
1127
1127
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1128
1128
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
1129
1129
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
1130
 
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
1131
 
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
1132
 
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
 
1130
      {2.58198889747162, 4.74341649025257, -0.91287092917528, 0.0, 0.0, 0.0},
 
1131
      {1.99999999999991, 6.12372435695794, 3.53553390593273, 0.0, 0.0, 0.0},
 
1132
      {-2.30940107675849, 0.0, 8.16496580927727, 0.0, 0.0, 0.0}};
1133
1133
      
1134
1134
      // Compute reference derivatives.
1135
1135
      // Declare array of derivatives on FIAT element.
1270
1270
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1271
1271
      {4.89897948556635, 0.0, 0.0, 0.0, 0.0, 0.0},
1272
1272
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1273
 
      {0.0, 9.48683298050514, 0.0, 0.0, 0.0, 0.0},
1274
 
      {4, 0.0, 7.07106781186548, 0.0, 0.0, 0.0},
 
1273
      {0.0, 9.48683298050515, 0.0, 0.0, 0.0, 0.0},
 
1274
      {3.99999999999999, 0.0, 7.07106781186547, 0.0, 0.0, 0.0},
1275
1275
      {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
1276
1276
      
1277
1277
      static const double dmats1[6][6] = \
1278
1278
      {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
1279
1279
      {2.44948974278318, 0.0, 0.0, 0.0, 0.0, 0.0},
1280
1280
      {4.24264068711928, 0.0, 0.0, 0.0, 0.0, 0.0},
1281
 
      {2.58198889747161, 4.74341649025257, -0.912870929175278, 0.0, 0.0, 0.0},
1282
 
      {2.0, 6.12372435695795, 3.53553390593274, 0.0, 0.0, 0.0},
1283
 
      {-2.3094010767585, 0.0, 8.16496580927726, 0.0, 0.0, 0.0}};
 
1281
      {2.58198889747162, 4.74341649025257, -0.91287092917528, 0.0, 0.0, 0.0},
 
1282
      {1.99999999999991, 6.12372435695794, 3.53553390593273, 0.0, 0.0, 0.0},
 
1283
      {-2.30940107675849, 0.0, 8.16496580927727, 0.0, 0.0, 0.0}};
1284
1284
      
1285
1285
      // Compute reference derivatives.
1286
1286
      // Declare array of derivatives on FIAT element.
1850
1850
  }
1851
1851
 
1852
1852
  /// Tabulate the coordinates of all dofs on a cell
1853
 
  virtual void tabulate_coordinates(double** dof_coordinates,
 
1853
  virtual void tabulate_coordinates(double* dof_coordinates,
1854
1854
                                    const double* vertex_coordinates) const
1855
1855
  {
1856
 
    dof_coordinates[0][0] = vertex_coordinates[0];
1857
 
    dof_coordinates[0][1] = vertex_coordinates[1];
1858
 
    dof_coordinates[1][0] = vertex_coordinates[2];
1859
 
    dof_coordinates[1][1] = vertex_coordinates[3];
1860
 
    dof_coordinates[2][0] = vertex_coordinates[4];
1861
 
    dof_coordinates[2][1] = vertex_coordinates[5];
1862
 
    dof_coordinates[3][0] = 0.5*vertex_coordinates[2] + 0.5*vertex_coordinates[4];
1863
 
    dof_coordinates[3][1] = 0.5*vertex_coordinates[3] + 0.5*vertex_coordinates[5];
1864
 
    dof_coordinates[4][0] = 0.5*vertex_coordinates[0] + 0.5*vertex_coordinates[4];
1865
 
    dof_coordinates[4][1] = 0.5*vertex_coordinates[1] + 0.5*vertex_coordinates[5];
1866
 
    dof_coordinates[5][0] = 0.5*vertex_coordinates[0] + 0.5*vertex_coordinates[2];
1867
 
    dof_coordinates[5][1] = 0.5*vertex_coordinates[1] + 0.5*vertex_coordinates[3];
 
1856
    dof_coordinates[0] = vertex_coordinates[0];
 
1857
    dof_coordinates[1] = vertex_coordinates[1];
 
1858
    dof_coordinates[2] = vertex_coordinates[2];
 
1859
    dof_coordinates[3] = vertex_coordinates[3];
 
1860
    dof_coordinates[4] = vertex_coordinates[4];
 
1861
    dof_coordinates[5] = vertex_coordinates[5];
 
1862
    dof_coordinates[6] = 0.5*vertex_coordinates[2] + 0.5*vertex_coordinates[4];
 
1863
    dof_coordinates[7] = 0.5*vertex_coordinates[3] + 0.5*vertex_coordinates[5];
 
1864
    dof_coordinates[8] = 0.5*vertex_coordinates[0] + 0.5*vertex_coordinates[4];
 
1865
    dof_coordinates[9] = 0.5*vertex_coordinates[1] + 0.5*vertex_coordinates[5];
 
1866
    dof_coordinates[10] = 0.5*vertex_coordinates[0] + 0.5*vertex_coordinates[2];
 
1867
    dof_coordinates[11] = 0.5*vertex_coordinates[1] + 0.5*vertex_coordinates[3];
1868
1868
  }
1869
1869
 
1870
1870
  /// Return the number of sub dofmaps (for a mixed element)
1894
1894
 
1895
1895
// DOLFIN includes
1896
1896
#include <dolfin/common/NoDeleter.h>
1897
 
#include <dolfin/mesh/Restriction.h>
1898
1897
#include <dolfin/fem/FiniteElement.h>
1899
1898
#include <dolfin/fem/DofMap.h>
1900
1899
#include <dolfin/fem/Form.h>
1952
1951
    // Do nothing
1953
1952
  }
1954
1953
 
1955
 
  //--- Constructors for restricted function space, 2 different versions ---
1956
 
 
1957
 
  // Create restricted function space (reference version)
1958
 
  FunctionSpace(const dolfin::Restriction& restriction):
1959
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction.mesh()),
1960
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new p2_finite_element_0()))),
1961
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new p2_dofmap_0()),
1962
 
                                                                                     reference_to_no_delete_pointer(restriction))))
1963
 
  {
1964
 
    // Do nothing
1965
 
  }
1966
 
 
1967
 
  // Create restricted function space (shared pointer version)
1968
 
  FunctionSpace(std::shared_ptr<const dolfin::Restriction> restriction):
1969
 
    dolfin::FunctionSpace(dolfin::reference_to_no_delete_pointer(restriction->mesh()),
1970
 
                          std::shared_ptr<const dolfin::FiniteElement>(new dolfin::FiniteElement(std::shared_ptr<ufc::finite_element>(new p2_finite_element_0()))),
1971
 
                          std::shared_ptr<const dolfin::DofMap>(new dolfin::DofMap(std::shared_ptr<ufc::dofmap>(new p2_dofmap_0()),
1972
 
                                                                                     restriction)))
1973
 
  {
1974
 
    // Do nothing
1975
 
  }
1976
 
 
1977
 
  // Copy constructor
1978
 
  ~FunctionSpace()
1979
 
  {
1980
 
  }
1981
 
 
1982
1954
};
1983
1955
 
1984
1956
}