From 7a33874c84bc35e4c889cffbf02c86ac93b16d94 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 2 Nov 2017 21:13:59 +0100 Subject: [PATCH] Fix data type. --- source/grid/manifold_lib.cc | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index 72b67d2fea..5256a5ead9 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -92,6 +92,7 @@ namespace internal } + // ============================================================ // PolarManifold // ============================================================ @@ -102,6 +103,8 @@ PolarManifold::PolarManifold(const Point center): center(center) {} + + template Tensor<1,spacedim> PolarManifold::get_periodicity() @@ -116,6 +119,8 @@ PolarManifold::get_periodicity() return periodicity; } + + template Point PolarManifold::push_forward(const Point &spherical_point) const @@ -147,6 +152,8 @@ PolarManifold::push_forward(const Point &spherical_point return p+center; } + + template Point PolarManifold::pull_back(const Point &space_point) const @@ -183,6 +190,8 @@ PolarManifold::pull_back(const Point &space_point) const return p; } + + template DerivativeForm<1,spacedim,spacedim> PolarManifold::push_forward_gradient(const Point &spherical_point) const @@ -228,6 +237,8 @@ PolarManifold::push_forward_gradient(const Point &spheri return DX; } + + // ============================================================ // SphericalManifold // ============================================================ @@ -237,6 +248,8 @@ SphericalManifold::SphericalManifold(const Point center) center(center) {} + + template Point SphericalManifold:: @@ -298,6 +311,8 @@ get_intermediate_point (const Point &p1, return Point(center + (w*r2+(1.0-w)*r1)*P); } + + template Tensor<1,spacedim> SphericalManifold:: @@ -341,6 +356,7 @@ get_tangent_vector (const Point &p1, } + // The main part of the implementation uses the ideas in the publication // // Buss, Samuel R., and Jay P. Fillmore. @@ -497,6 +513,8 @@ get_new_point (const ArrayView> &vertices, return center + rho*candidate; } + + // ============================================================ // CylindricalManifold // ============================================================ @@ -525,7 +543,6 @@ CylindricalManifold::CylindricalManifold(const Point &d // easier. Assert (spacedim==3, ExcMessage("CylindricalManifold can only be used for spacedim==3!")); - } @@ -726,6 +743,9 @@ FunctionManifold::pull_back(const Point &space_ +// ============================================================ +// TorusManifold +// ============================================================ template Point<3> TorusManifold::pull_back(const Point<3> &p) const @@ -797,6 +817,9 @@ TorusManifold::push_forward_gradient(const Point<3> &chart_point) const +// ============================================================ +// TransfiniteInterpolationManifold +// ============================================================ template TransfiniteInterpolationManifold::TransfiniteInterpolationManifold() : @@ -934,7 +957,7 @@ namespace // this is replicated from GeometryInfo::face_to_cell_vertices since we need // it very often in compute_transfinite_interpolation and the function is // performance critical - unsigned int + static constexpr unsigned int face_to_cell_vertices_3d[6][4] = { {0, 2, 4, 6}, @@ -948,7 +971,8 @@ namespace // this is replicated from GeometryInfo::face_to_cell_lines since we need it // very often in compute_transfinite_interpolation and the function is // performance critical - unsigned int face_to_cell_lines_3d[6][4] = + static constexpr unsigned int + face_to_cell_lines_3d[6][4] = { {8,10, 0, 4}, {9,11, 1, 5}, -- 2.39.5