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}};
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}};
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}};
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}};
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}};
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}};
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}};
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}};
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}};
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}};
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}};
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}};
1285
1285
// Compute reference derivatives.
1286
1286
// Declare array of derivatives on FIAT element.
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
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];
1870
1870
/// Return the number of sub dofmaps (for a mixed element)
1955
//--- Constructors for restricted function space, 2 different versions ---
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))))
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()),