From 78d7799ea5a2ee53cf5ec80b0c733f6acee43595 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 10 Jan 2018 01:05:34 +0100 Subject: [PATCH] Simplify implementation for normal_vector and get_normals_at_vertices in SphericalManifold --- include/deal.II/grid/manifold_lib.h | 16 + source/grid/manifold_lib.cc | 91 ++++++ tests/manifold/spherical_manifold_09.cc | 4 +- tests/manifold/spherical_manifold_09.output | 308 +++++++++--------- tests/manifold/spherical_manifold_10.cc | 2 +- tests/manifold/spherical_manifold_12.cc | 94 ++++++ tests/manifold/spherical_manifold_12.output | 2 + ...rix_03.with_trilinos=true.mpirun=10.output | 96 +++--- ...trix_03.with_trilinos=true.mpirun=4.output | 100 +++--- 9 files changed, 458 insertions(+), 255 deletions(-) create mode 100644 tests/manifold/spherical_manifold_12.cc create mode 100644 tests/manifold/spherical_manifold_12.output diff --git a/include/deal.II/grid/manifold_lib.h b/include/deal.II/grid/manifold_lib.h index 143ca29813..1392896a3c 100644 --- a/include/deal.II/grid/manifold_lib.h +++ b/include/deal.II/grid/manifold_lib.h @@ -235,6 +235,22 @@ public: get_tangent_vector (const Point &x1, const Point &x2) const override; + /** + * Return the (normalized) normal vector at the point @p p. + */ + virtual + Tensor<1,spacedim> + normal_vector (const typename Triangulation::face_iterator &face, + const Point &p) const override; + + /** + * Compute the normal vectors to the boundary at each vertex. + */ + virtual + void + get_normals_at_vertices (const typename Triangulation::face_iterator &face, + typename Manifold::FaceVertexNormals &face_vertex_normals) const override; + /** * Compute a new set of points that interpolate between the given points @p * surrounding_points. @p weights is a table with as many columns as @p diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index b83ca0cc74..78ab035496 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -379,6 +379,97 @@ get_tangent_vector (const Point &p1, +template +Tensor<1, spacedim> +SphericalManifold:: +normal_vector (const typename Triangulation::face_iterator &face, + const Point &p) const +{ + // if the maximum deviation for the distance from the vertices to the center + // is less than 1.e-5 of the minimum distance to the first vertex, assume we can + // simply return p-center. + // otherwise, we compute the normal using get_normal_vector + constexpr unsigned int n_vertices = GeometryInfo::vertices_per_face; + std::array distances_to_center; + std::array distances_to_first_vertex; + distances_to_center[0] = (face->vertex(0)-center).norm_square(); + for (unsigned int i=1; ivertex(i)-center).norm_square(); + distances_to_first_vertex[i-1] = (face->vertex(i)-face->vertex(0)).norm_square(); + } + const auto minmax_distance = std::minmax_element(distances_to_center.begin(), + distances_to_center.end()); + const auto min_distance_to_first_vertex = std::min_element(distances_to_first_vertex.begin(), + distances_to_first_vertex.end()); + + if (*minmax_distance.second-*minmax_distance.first<1.e-10 * *min_distance_to_first_vertex) + { + const Tensor<1,spacedim> unnormalized_spherical_normal = p-center; + const Tensor<1,spacedim> normalized_spherical_normal + = unnormalized_spherical_normal/unnormalized_spherical_normal.norm(); + return normalized_spherical_normal; + } + return Manifold::normal_vector(face, p); +} + + + +template <> +void +SphericalManifold<1,1>:: +get_normals_at_vertices (const Triangulation<1>::face_iterator &, + Manifold<1,1>::FaceVertexNormals &) const +{ + Assert (false, ExcImpossibleInDim(1)); +} + + + +template <> +void +SphericalManifold<1,2>:: +get_normals_at_vertices (const Triangulation<1,2>::face_iterator &, + Manifold<1,2>::FaceVertexNormals &) const +{ + Assert (false, ExcImpossibleInDim(1)); +} + + + +template +void +SphericalManifold:: +get_normals_at_vertices (const typename Triangulation::face_iterator &face, + typename Manifold::FaceVertexNormals &face_vertex_normals) const +{ + // if the maximum deviation for the distance from the vertices to the center + // is less than 1.e-5 of the minimum distance to the first vertex, assume we can + // simply return vertex-center. + // otherwise, we compute the normal using get_normal_vector + constexpr unsigned int n_vertices = GeometryInfo::vertices_per_face; + std::array distances_to_center; + std::array distances_to_first_vertex; + distances_to_center[0] = (face->vertex(0)-center).norm_square(); + for (unsigned int i=1; ivertex(i)-center).norm_square(); + distances_to_first_vertex[i-1] = (face->vertex(i)-face->vertex(0)).norm_square(); + } + const auto minmax_distance = std::minmax_element(distances_to_center.begin(), + distances_to_center.end()); + const auto min_distance_to_first_vertex = std::min_element(distances_to_first_vertex.begin(), + distances_to_first_vertex.end()); + + if (*minmax_distance.second-*minmax_distance.first<1.e-10 * *min_distance_to_first_vertex) + for (unsigned int vertex=0; vertexvertex(vertex)-center; + + Manifold::get_normals_at_vertices(face, face_vertex_normals); +} + + + template void SphericalManifold:: diff --git a/tests/manifold/spherical_manifold_09.cc b/tests/manifold/spherical_manifold_09.cc index 0f752934b1..8744cff625 100644 --- a/tests/manifold/spherical_manifold_09.cc +++ b/tests/manifold/spherical_manifold_09.cc @@ -42,7 +42,7 @@ main() for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f)) { - if (std::abs(cell->face(f)->vertex(1).norm()-1.) < 1e-12) + if (std::abs(cell->face(f)->vertex(1).norm()-1.) < 1e-1) { // at outer boundary, the normal should point outwards and be // aligned with the point down to roundoff. Check this for the @@ -55,7 +55,7 @@ main() spherical.normal_vector(cell->face(f), cell->face(f)->center(true))) << std::endl; } - else if (std::abs(cell->face(f)->vertex(1).norm()-0.5) < 1e-12) + else if (std::abs(cell->face(f)->vertex(1).norm()-0.5) < 1e-1) { // at inner boundary, the normal should point inwards and be // aligned with the point down to roundoff. Check this for the diff --git a/tests/manifold/spherical_manifold_09.output b/tests/manifold/spherical_manifold_09.output index 454a47f46a..6cf7ba2644 100644 --- a/tests/manifold/spherical_manifold_09.output +++ b/tests/manifold/spherical_manifold_09.output @@ -1,193 +1,193 @@ +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): -1.11e-16 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 5.55e-17 5.55e-17 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): -2.22e-16 0.00 +DEAL::Outer normal correctness (should be 0): 0.00 0.00 +DEAL::Outer normal correctness (should be 0): 1.11e-16 1.11e-16 +DEAL::Inner normal correctness (should be 0): 5.55e-17 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Outer normal correctness (should be 0): 1.11e-16 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 0.00 0.00 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 DEAL::Inner normal correctness (should be 0): -1.11e-16 -1.11e-16 DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 +DEAL::Inner normal correctness (should be 0): 5.55e-17 5.55e-17 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): -2.22e-16 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 1.11e-16 1.11e-16 +DEAL::Inner normal correctness (should be 0): 5.55e-17 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 0.00 +DEAL::Outer normal correctness (should be 0): 1.11e-16 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 0.00 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): -1.11e-16 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 5.55e-17 5.55e-17 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 DEAL::Outer normal correctness (should be 0): -2.22e-16 -2.22e-16 DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 +DEAL::Outer normal correctness (should be 0): 1.11e-16 1.11e-16 DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Inner normal correctness (should be 0): -1.11e-16 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 2.22e-16 0.00 -DEAL::Outer normal correctness (should be 0): -2.22e-16 0.00 -DEAL::Inner normal correctness (should be 0): 0.00 0.00 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 DEAL::Inner normal correctness (should be 0): -1.11e-16 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 5.55e-17 5.55e-17 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 DEAL::Outer normal correctness (should be 0): -2.22e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 +DEAL::Outer normal correctness (should be 0): 1.11e-16 1.11e-16 DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 DEAL::Inner normal correctness (should be 0): -1.11e-16 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 5.55e-17 5.55e-17 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 DEAL::Outer normal correctness (should be 0): -2.22e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Inner normal correctness (should be 0): 0.00 5.55e-17 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 1.11e-16 -DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): -1.11e-16 -1.11e-16 +DEAL::Outer normal correctness (should be 0): 1.11e-16 1.11e-16 +DEAL::Inner normal correctness (should be 0): 5.55e-17 -1.11e-16 DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): -2.22e-16 -2.22e-16 -DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Inner normal correctness (should be 0): -1.11e-16 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 2.22e-16 0.00 -DEAL::Outer normal correctness (should be 0): -2.22e-16 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): -1.11e-16 -1.11e-16 -DEAL::Inner normal correctness (should be 0): 5.55e-17 -1.11e-16 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): -2.22e-16 -2.22e-16 DEAL::Outer normal correctness (should be 0): 1.11e-16 -2.22e-16 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 -DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 +DEAL::Inner normal correctness (should be 0): -1.11e-16 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): -1.11e-16 -1.11e-16 -DEAL::Inner normal correctness (should be 0): 5.55e-17 -1.11e-16 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 +DEAL::Inner normal correctness (should be 0): 5.55e-17 5.55e-17 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 +DEAL::Outer normal correctness (should be 0): -2.22e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): -2.22e-16 -2.22e-16 -DEAL::Outer normal correctness (should be 0): 1.11e-16 -2.22e-16 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 +DEAL::Outer normal correctness (should be 0): 1.11e-16 1.11e-16 DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 DEAL::Inner normal correctness (should be 0): 0.00 0.00 -DEAL::Inner normal correctness (should be 0): 5.55e-17 0.00 +DEAL::Inner normal correctness (should be 0): 0.00 -1.11e-16 DEAL::Inner normal correctness (should be 0): 0.00 0.00 DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Outer normal correctness (should be 0): 1.11e-16 0.00 +DEAL::Outer normal correctness (should be 0): 0.00 -2.22e-16 DEAL::Outer normal correctness (should be 0): 0.00 0.00 -DEAL::Approximate normal in -0.170 -0.435 0.00: -0.519 -0.833 -0.193, adjusted: -0.363 -0.932 -2.53e-17 -DEAL::Approximate normal in -0.312 -0.312 0.153: -0.801 -0.592 0.0902, adjusted: -0.668 -0.668 0.328 -DEAL::Approximate normal in -0.312 -0.312 -0.153: -0.801 -0.592 -0.0902, adjusted: -0.668 -0.668 -0.328 -DEAL::Approximate normal in -0.435 -0.170 0.00: -0.833 -0.519 -0.193, adjusted: -0.932 -0.363 -1.58e-16 -DEAL::Approximate normal in -0.339 -0.871 0.00: -0.519 -0.833 -0.193, adjusted: -0.363 -0.932 -2.53e-17 -DEAL::Approximate normal in -0.624 -0.624 0.307: -0.801 -0.592 0.0902, adjusted: -0.668 -0.668 0.328 -DEAL::Approximate normal in -0.624 -0.624 -0.307: -0.801 -0.592 -0.0902, adjusted: -0.668 -0.668 -0.328 -DEAL::Approximate normal in -0.871 -0.339 0.00: -0.833 -0.519 -0.193, adjusted: -0.932 -0.363 -1.58e-16 -DEAL::Approximate normal in -0.312 -0.153 0.312: -0.801 -0.0902 0.592, adjusted: -0.668 -0.328 0.668 -DEAL::Approximate normal in -0.170 -6.94e-18 0.435: -0.519 0.193 0.833, adjusted: -0.363 -1.87e-16 0.932 -DEAL::Approximate normal in -0.435 -6.94e-18 0.170: -0.833 0.193 0.519, adjusted: -0.932 1.58e-16 0.363 -DEAL::Approximate normal in -0.312 0.153 0.312: -0.801 0.0902 0.592, adjusted: -0.668 0.328 0.668 -DEAL::Approximate normal in -0.624 -0.307 0.624: -0.801 -0.0902 0.592, adjusted: -0.668 -0.328 0.668 -DEAL::Approximate normal in -0.339 -1.39e-17 0.871: -0.519 0.193 0.833, adjusted: -0.363 -1.87e-16 0.932 -DEAL::Approximate normal in -0.871 -1.39e-17 0.339: -0.833 0.193 0.519, adjusted: -0.932 1.58e-16 0.363 -DEAL::Approximate normal in -0.624 0.307 0.624: -0.801 0.0902 0.592, adjusted: -0.668 0.328 0.668 -DEAL::Approximate normal in 0.00 -0.435 0.170: -0.193 -0.833 0.519, adjusted: -2.53e-17 -0.932 0.363 -DEAL::Approximate normal in 0.153 -0.312 0.312: 0.0902 -0.592 0.801, adjusted: 0.328 -0.668 0.668 -DEAL::Approximate normal in -0.153 -0.312 0.312: -0.0902 -0.592 0.801, adjusted: -0.328 -0.668 0.668 -DEAL::Approximate normal in 0.00 -0.170 0.435: -0.193 -0.519 0.833, adjusted: -1.58e-16 -0.363 0.932 -DEAL::Approximate normal in 0.00 -0.871 0.339: -0.193 -0.833 0.519, adjusted: -2.53e-17 -0.932 0.363 -DEAL::Approximate normal in 0.307 -0.624 0.624: 0.0902 -0.592 0.801, adjusted: 0.328 -0.668 0.668 -DEAL::Approximate normal in -0.307 -0.624 0.624: -0.0902 -0.592 0.801, adjusted: -0.328 -0.668 0.668 -DEAL::Approximate normal in 0.00 -0.339 0.871: -0.193 -0.519 0.833, adjusted: -1.58e-16 -0.363 0.932 -DEAL::Approximate normal in 0.312 -0.312 -0.153: 0.592 -0.801 -0.0902, adjusted: 0.668 -0.668 -0.328 -DEAL::Approximate normal in 0.435 -0.170 -6.94e-18: 0.833 -0.519 0.193, adjusted: 0.932 -0.363 -1.87e-16 -DEAL::Approximate normal in 0.170 -0.435 -6.94e-18: 0.519 -0.833 0.193, adjusted: 0.363 -0.932 1.58e-16 -DEAL::Approximate normal in 0.312 -0.312 0.153: 0.592 -0.801 0.0902, adjusted: 0.668 -0.668 0.328 -DEAL::Approximate normal in 0.624 -0.624 -0.307: 0.592 -0.801 -0.0902, adjusted: 0.668 -0.668 -0.328 -DEAL::Approximate normal in 0.871 -0.339 -1.39e-17: 0.833 -0.519 0.193, adjusted: 0.932 -0.363 -1.87e-16 -DEAL::Approximate normal in 0.339 -0.871 -1.39e-17: 0.519 -0.833 0.193, adjusted: 0.363 -0.932 1.58e-16 -DEAL::Approximate normal in 0.624 -0.624 0.307: 0.592 -0.801 0.0902, adjusted: 0.668 -0.668 0.328 -DEAL::Approximate normal in 0.435 0.00 0.170: 0.833 -0.193 0.519, adjusted: 0.932 -2.53e-17 0.363 -DEAL::Approximate normal in 0.312 0.153 0.312: 0.592 0.0902 0.801, adjusted: 0.668 0.328 0.668 -DEAL::Approximate normal in 0.312 -0.153 0.312: 0.592 -0.0902 0.801, adjusted: 0.668 -0.328 0.668 -DEAL::Approximate normal in 0.170 0.00 0.435: 0.519 -0.193 0.833, adjusted: 0.363 -1.58e-16 0.932 -DEAL::Approximate normal in 0.871 0.00 0.339: 0.833 -0.193 0.519, adjusted: 0.932 -2.53e-17 0.363 -DEAL::Approximate normal in 0.624 0.307 0.624: 0.592 0.0902 0.801, adjusted: 0.668 0.328 0.668 -DEAL::Approximate normal in 0.624 -0.307 0.624: 0.592 -0.0902 0.801, adjusted: 0.668 -0.328 0.668 -DEAL::Approximate normal in 0.339 0.00 0.871: 0.519 -0.193 0.833, adjusted: 0.363 -1.58e-16 0.932 -DEAL::Approximate normal in 0.153 0.312 0.312: 0.0902 0.592 0.801, adjusted: 0.328 0.668 0.668 -DEAL::Approximate normal in 6.94e-18 0.435 0.170: -0.193 0.833 0.519, adjusted: 1.87e-16 0.932 0.363 -DEAL::Approximate normal in 6.94e-18 0.170 0.435: -0.193 0.519 0.833, adjusted: -1.58e-16 0.363 0.932 -DEAL::Approximate normal in -0.153 0.312 0.312: -0.0902 0.592 0.801, adjusted: -0.328 0.668 0.668 -DEAL::Approximate normal in 0.307 0.624 0.624: 0.0902 0.592 0.801, adjusted: 0.328 0.668 0.668 -DEAL::Approximate normal in 1.39e-17 0.871 0.339: -0.193 0.833 0.519, adjusted: 1.87e-16 0.932 0.363 -DEAL::Approximate normal in 1.39e-17 0.339 0.871: -0.193 0.519 0.833, adjusted: -1.58e-16 0.363 0.932 -DEAL::Approximate normal in -0.307 0.624 0.624: -0.0902 0.592 0.801, adjusted: -0.328 0.668 0.668 -DEAL::Approximate normal in 0.435 0.170 0.00: 0.833 0.519 0.193, adjusted: 0.932 0.363 2.53e-17 -DEAL::Approximate normal in 0.312 0.312 -0.153: 0.592 0.801 -0.0902, adjusted: 0.668 0.668 -0.328 -DEAL::Approximate normal in 0.312 0.312 0.153: 0.592 0.801 0.0902, adjusted: 0.668 0.668 0.328 -DEAL::Approximate normal in 0.170 0.435 0.00: 0.519 0.833 0.193, adjusted: 0.363 0.932 1.58e-16 -DEAL::Approximate normal in 0.871 0.339 0.00: 0.833 0.519 0.193, adjusted: 0.932 0.363 2.53e-17 -DEAL::Approximate normal in 0.624 0.624 -0.307: 0.592 0.801 -0.0902, adjusted: 0.668 0.668 -0.328 -DEAL::Approximate normal in 0.624 0.624 0.307: 0.592 0.801 0.0902, adjusted: 0.668 0.668 0.328 -DEAL::Approximate normal in 0.339 0.871 0.00: 0.519 0.833 0.193, adjusted: 0.363 0.932 1.58e-16 -DEAL::Approximate normal in 0.312 -0.153 -0.312: 0.801 -0.0902 -0.592, adjusted: 0.668 -0.328 -0.668 -DEAL::Approximate normal in 0.170 -6.94e-18 -0.435: 0.519 0.193 -0.833, adjusted: 0.363 -1.87e-16 -0.932 -DEAL::Approximate normal in 0.435 -6.94e-18 -0.170: 0.833 0.193 -0.519, adjusted: 0.932 1.58e-16 -0.363 -DEAL::Approximate normal in 0.312 0.153 -0.312: 0.801 0.0902 -0.592, adjusted: 0.668 0.328 -0.668 -DEAL::Approximate normal in 0.624 -0.307 -0.624: 0.801 -0.0902 -0.592, adjusted: 0.668 -0.328 -0.668 -DEAL::Approximate normal in 0.339 -1.39e-17 -0.871: 0.519 0.193 -0.833, adjusted: 0.363 -1.87e-16 -0.932 -DEAL::Approximate normal in 0.871 -1.39e-17 -0.339: 0.833 0.193 -0.519, adjusted: 0.932 1.58e-16 -0.363 -DEAL::Approximate normal in 0.624 0.307 -0.624: 0.801 0.0902 -0.592, adjusted: 0.668 0.328 -0.668 -DEAL::Approximate normal in 0.00 0.170 -0.435: 0.193 0.519 -0.833, adjusted: 4.18e-16 0.363 -0.932 -DEAL::Approximate normal in -0.153 0.312 -0.312: -0.0902 0.801 -0.592, adjusted: -0.328 0.668 -0.668 -DEAL::Approximate normal in 0.153 0.312 -0.312: 0.0902 0.801 -0.592, adjusted: 0.328 0.668 -0.668 -DEAL::Approximate normal in 0.00 0.435 -0.170: 0.193 0.833 -0.519, adjusted: 1.58e-16 0.932 -0.363 -DEAL::Approximate normal in 0.00 0.339 -0.871: 0.193 0.519 -0.833, adjusted: 4.18e-16 0.363 -0.932 -DEAL::Approximate normal in -0.307 0.624 -0.624: -0.0902 0.801 -0.592, adjusted: -0.328 0.668 -0.668 -DEAL::Approximate normal in 0.307 0.624 -0.624: 0.0902 0.801 -0.592, adjusted: 0.328 0.668 -0.668 -DEAL::Approximate normal in 0.00 0.871 -0.339: 0.193 0.833 -0.519, adjusted: 1.58e-16 0.932 -0.363 -DEAL::Approximate normal in -0.312 0.312 -0.153: -0.592 0.801 -0.0902, adjusted: -0.668 0.668 -0.328 -DEAL::Approximate normal in -0.435 0.170 -6.94e-18: -0.833 0.519 0.193, adjusted: -0.932 0.363 -1.87e-16 -DEAL::Approximate normal in -0.170 0.435 -6.94e-18: -0.519 0.833 0.193, adjusted: -0.363 0.932 1.58e-16 -DEAL::Approximate normal in -0.312 0.312 0.153: -0.592 0.801 0.0902, adjusted: -0.668 0.668 0.328 -DEAL::Approximate normal in -0.624 0.624 -0.307: -0.592 0.801 -0.0902, adjusted: -0.668 0.668 -0.328 -DEAL::Approximate normal in -0.871 0.339 -1.39e-17: -0.833 0.519 0.193, adjusted: -0.932 0.363 -1.87e-16 -DEAL::Approximate normal in -0.339 0.871 -1.39e-17: -0.519 0.833 0.193, adjusted: -0.363 0.932 1.58e-16 -DEAL::Approximate normal in -0.624 0.624 0.307: -0.592 0.801 0.0902, adjusted: -0.668 0.668 0.328 -DEAL::Approximate normal in -0.170 0.00 -0.435: -0.519 0.193 -0.833, adjusted: -0.363 4.18e-16 -0.932 -DEAL::Approximate normal in -0.312 -0.153 -0.312: -0.801 -0.0902 -0.592, adjusted: -0.668 -0.328 -0.668 -DEAL::Approximate normal in -0.312 0.153 -0.312: -0.801 0.0902 -0.592, adjusted: -0.668 0.328 -0.668 -DEAL::Approximate normal in -0.435 0.00 -0.170: -0.833 0.193 -0.519, adjusted: -0.932 1.58e-16 -0.363 -DEAL::Approximate normal in -0.339 0.00 -0.871: -0.519 0.193 -0.833, adjusted: -0.363 4.18e-16 -0.932 -DEAL::Approximate normal in -0.624 -0.307 -0.624: -0.801 -0.0902 -0.592, adjusted: -0.668 -0.328 -0.668 -DEAL::Approximate normal in -0.624 0.307 -0.624: -0.801 0.0902 -0.592, adjusted: -0.668 0.328 -0.668 -DEAL::Approximate normal in -0.871 0.00 -0.339: -0.833 0.193 -0.519, adjusted: -0.932 1.58e-16 -0.363 -DEAL::Approximate normal in 0.153 -0.312 -0.312: 0.0902 -0.592 -0.801, adjusted: 0.328 -0.668 -0.668 -DEAL::Approximate normal in 6.94e-18 -0.435 -0.170: -0.193 -0.833 -0.519, adjusted: 1.87e-16 -0.932 -0.363 -DEAL::Approximate normal in 6.94e-18 -0.170 -0.435: -0.193 -0.519 -0.833, adjusted: -1.58e-16 -0.363 -0.932 -DEAL::Approximate normal in -0.153 -0.312 -0.312: -0.0902 -0.592 -0.801, adjusted: -0.328 -0.668 -0.668 -DEAL::Approximate normal in 0.307 -0.624 -0.624: 0.0902 -0.592 -0.801, adjusted: 0.328 -0.668 -0.668 -DEAL::Approximate normal in 1.39e-17 -0.871 -0.339: -0.193 -0.833 -0.519, adjusted: 1.87e-16 -0.932 -0.363 -DEAL::Approximate normal in 1.39e-17 -0.339 -0.871: -0.193 -0.519 -0.833, adjusted: -1.58e-16 -0.363 -0.932 -DEAL::Approximate normal in -0.307 -0.624 -0.624: -0.0902 -0.592 -0.801, adjusted: -0.328 -0.668 -0.668 +DEAL::Approximate normal in -0.170 -0.435 0.00: -0.363 -0.932 0.00, adjusted: -0.363 -0.932 0.00 +DEAL::Approximate normal in -0.312 -0.312 0.153: -0.668 -0.668 0.328, adjusted: -0.668 -0.668 0.328 +DEAL::Approximate normal in -0.312 -0.312 -0.153: -0.668 -0.668 -0.328, adjusted: -0.668 -0.668 -0.328 +DEAL::Approximate normal in -0.435 -0.170 0.00: -0.932 -0.363 0.00, adjusted: -0.932 -0.363 0.00 +DEAL::Approximate normal in -0.339 -0.871 0.00: -0.363 -0.932 0.00, adjusted: -0.363 -0.932 0.00 +DEAL::Approximate normal in -0.624 -0.624 0.307: -0.668 -0.668 0.328, adjusted: -0.668 -0.668 0.328 +DEAL::Approximate normal in -0.624 -0.624 -0.307: -0.668 -0.668 -0.328, adjusted: -0.668 -0.668 -0.328 +DEAL::Approximate normal in -0.871 -0.339 0.00: -0.932 -0.363 0.00, adjusted: -0.932 -0.363 0.00 +DEAL::Approximate normal in -0.312 -0.153 0.312: -0.668 -0.328 0.668, adjusted: -0.668 -0.328 0.668 +DEAL::Approximate normal in -0.170 -2.08e-17 0.435: -0.363 -4.45e-17 0.932, adjusted: -0.363 -4.45e-17 0.932 +DEAL::Approximate normal in -0.435 -2.08e-17 0.170: -0.932 -4.45e-17 0.363, adjusted: -0.932 -4.45e-17 0.363 +DEAL::Approximate normal in -0.312 0.153 0.312: -0.668 0.328 0.668, adjusted: -0.668 0.328 0.668 +DEAL::Approximate normal in -0.624 -0.307 0.624: -0.668 -0.328 0.668, adjusted: -0.668 -0.328 0.668 +DEAL::Approximate normal in -0.339 -4.16e-17 0.871: -0.363 -4.45e-17 0.932, adjusted: -0.363 -4.45e-17 0.932 +DEAL::Approximate normal in -0.871 -4.16e-17 0.339: -0.932 -4.45e-17 0.363, adjusted: -0.932 -4.45e-17 0.363 +DEAL::Approximate normal in -0.624 0.307 0.624: -0.668 0.328 0.668, adjusted: -0.668 0.328 0.668 +DEAL::Approximate normal in 0.00 -0.435 0.170: 0.00 -0.932 0.363, adjusted: 0.00 -0.932 0.363 +DEAL::Approximate normal in 0.153 -0.312 0.312: 0.328 -0.668 0.668, adjusted: 0.328 -0.668 0.668 +DEAL::Approximate normal in -0.153 -0.312 0.312: -0.328 -0.668 0.668, adjusted: -0.328 -0.668 0.668 +DEAL::Approximate normal in 0.00 -0.170 0.435: 0.00 -0.363 0.932, adjusted: 0.00 -0.363 0.932 +DEAL::Approximate normal in 0.00 -0.871 0.339: 0.00 -0.932 0.363, adjusted: 0.00 -0.932 0.363 +DEAL::Approximate normal in 0.307 -0.624 0.624: 0.328 -0.668 0.668, adjusted: 0.328 -0.668 0.668 +DEAL::Approximate normal in -0.307 -0.624 0.624: -0.328 -0.668 0.668, adjusted: -0.328 -0.668 0.668 +DEAL::Approximate normal in 0.00 -0.339 0.871: 0.00 -0.363 0.932, adjusted: 0.00 -0.363 0.932 +DEAL::Approximate normal in 0.312 -0.312 -0.153: 0.668 -0.668 -0.328, adjusted: 0.668 -0.668 -0.328 +DEAL::Approximate normal in 0.435 -0.170 -2.08e-17: 0.932 -0.363 -4.45e-17, adjusted: 0.932 -0.363 -4.45e-17 +DEAL::Approximate normal in 0.170 -0.435 -2.08e-17: 0.363 -0.932 -4.45e-17, adjusted: 0.363 -0.932 -4.45e-17 +DEAL::Approximate normal in 0.312 -0.312 0.153: 0.668 -0.668 0.328, adjusted: 0.668 -0.668 0.328 +DEAL::Approximate normal in 0.624 -0.624 -0.307: 0.668 -0.668 -0.328, adjusted: 0.668 -0.668 -0.328 +DEAL::Approximate normal in 0.871 -0.339 -4.16e-17: 0.932 -0.363 -4.45e-17, adjusted: 0.932 -0.363 -4.45e-17 +DEAL::Approximate normal in 0.339 -0.871 -4.16e-17: 0.363 -0.932 -4.45e-17, adjusted: 0.363 -0.932 -4.45e-17 +DEAL::Approximate normal in 0.624 -0.624 0.307: 0.668 -0.668 0.328, adjusted: 0.668 -0.668 0.328 +DEAL::Approximate normal in 0.435 0.00 0.170: 0.932 0.00 0.363, adjusted: 0.932 0.00 0.363 +DEAL::Approximate normal in 0.312 0.153 0.312: 0.668 0.328 0.668, adjusted: 0.668 0.328 0.668 +DEAL::Approximate normal in 0.312 -0.153 0.312: 0.668 -0.328 0.668, adjusted: 0.668 -0.328 0.668 +DEAL::Approximate normal in 0.170 0.00 0.435: 0.363 0.00 0.932, adjusted: 0.363 0.00 0.932 +DEAL::Approximate normal in 0.871 0.00 0.339: 0.932 0.00 0.363, adjusted: 0.932 0.00 0.363 +DEAL::Approximate normal in 0.624 0.307 0.624: 0.668 0.328 0.668, adjusted: 0.668 0.328 0.668 +DEAL::Approximate normal in 0.624 -0.307 0.624: 0.668 -0.328 0.668, adjusted: 0.668 -0.328 0.668 +DEAL::Approximate normal in 0.339 0.00 0.871: 0.363 0.00 0.932, adjusted: 0.363 0.00 0.932 +DEAL::Approximate normal in 0.153 0.312 0.312: 0.328 0.668 0.668, adjusted: 0.328 0.668 0.668 +DEAL::Approximate normal in 2.08e-17 0.435 0.170: 4.45e-17 0.932 0.363, adjusted: 4.45e-17 0.932 0.363 +DEAL::Approximate normal in 2.08e-17 0.170 0.435: 4.45e-17 0.363 0.932, adjusted: 4.45e-17 0.363 0.932 +DEAL::Approximate normal in -0.153 0.312 0.312: -0.328 0.668 0.668, adjusted: -0.328 0.668 0.668 +DEAL::Approximate normal in 0.307 0.624 0.624: 0.328 0.668 0.668, adjusted: 0.328 0.668 0.668 +DEAL::Approximate normal in 4.16e-17 0.871 0.339: 4.45e-17 0.932 0.363, adjusted: 4.45e-17 0.932 0.363 +DEAL::Approximate normal in 4.16e-17 0.339 0.871: 4.45e-17 0.363 0.932, adjusted: 4.45e-17 0.363 0.932 +DEAL::Approximate normal in -0.307 0.624 0.624: -0.328 0.668 0.668, adjusted: -0.328 0.668 0.668 +DEAL::Approximate normal in 0.435 0.170 0.00: 0.932 0.363 0.00, adjusted: 0.932 0.363 0.00 +DEAL::Approximate normal in 0.312 0.312 -0.153: 0.668 0.668 -0.328, adjusted: 0.668 0.668 -0.328 +DEAL::Approximate normal in 0.312 0.312 0.153: 0.668 0.668 0.328, adjusted: 0.668 0.668 0.328 +DEAL::Approximate normal in 0.170 0.435 0.00: 0.363 0.932 0.00, adjusted: 0.363 0.932 0.00 +DEAL::Approximate normal in 0.871 0.339 0.00: 0.932 0.363 0.00, adjusted: 0.932 0.363 0.00 +DEAL::Approximate normal in 0.624 0.624 -0.307: 0.668 0.668 -0.328, adjusted: 0.668 0.668 -0.328 +DEAL::Approximate normal in 0.624 0.624 0.307: 0.668 0.668 0.328, adjusted: 0.668 0.668 0.328 +DEAL::Approximate normal in 0.339 0.871 0.00: 0.363 0.932 0.00, adjusted: 0.363 0.932 0.00 +DEAL::Approximate normal in 0.312 -0.153 -0.312: 0.668 -0.328 -0.668, adjusted: 0.668 -0.328 -0.668 +DEAL::Approximate normal in 0.170 -2.08e-17 -0.435: 0.363 -4.45e-17 -0.932, adjusted: 0.363 -4.45e-17 -0.932 +DEAL::Approximate normal in 0.435 -2.08e-17 -0.170: 0.932 -4.45e-17 -0.363, adjusted: 0.932 -4.45e-17 -0.363 +DEAL::Approximate normal in 0.312 0.153 -0.312: 0.668 0.328 -0.668, adjusted: 0.668 0.328 -0.668 +DEAL::Approximate normal in 0.624 -0.307 -0.624: 0.668 -0.328 -0.668, adjusted: 0.668 -0.328 -0.668 +DEAL::Approximate normal in 0.339 -4.16e-17 -0.871: 0.363 -4.45e-17 -0.932, adjusted: 0.363 -4.45e-17 -0.932 +DEAL::Approximate normal in 0.871 -4.16e-17 -0.339: 0.932 -4.45e-17 -0.363, adjusted: 0.932 -4.45e-17 -0.363 +DEAL::Approximate normal in 0.624 0.307 -0.624: 0.668 0.328 -0.668, adjusted: 0.668 0.328 -0.668 +DEAL::Approximate normal in 0.00 0.170 -0.435: 0.00 0.363 -0.932, adjusted: 0.00 0.363 -0.932 +DEAL::Approximate normal in -0.153 0.312 -0.312: -0.328 0.668 -0.668, adjusted: -0.328 0.668 -0.668 +DEAL::Approximate normal in 0.153 0.312 -0.312: 0.328 0.668 -0.668, adjusted: 0.328 0.668 -0.668 +DEAL::Approximate normal in 0.00 0.435 -0.170: 0.00 0.932 -0.363, adjusted: 0.00 0.932 -0.363 +DEAL::Approximate normal in 0.00 0.339 -0.871: 0.00 0.363 -0.932, adjusted: 0.00 0.363 -0.932 +DEAL::Approximate normal in -0.307 0.624 -0.624: -0.328 0.668 -0.668, adjusted: -0.328 0.668 -0.668 +DEAL::Approximate normal in 0.307 0.624 -0.624: 0.328 0.668 -0.668, adjusted: 0.328 0.668 -0.668 +DEAL::Approximate normal in 0.00 0.871 -0.339: 0.00 0.932 -0.363, adjusted: 0.00 0.932 -0.363 +DEAL::Approximate normal in -0.312 0.312 -0.153: -0.668 0.668 -0.328, adjusted: -0.668 0.668 -0.328 +DEAL::Approximate normal in -0.435 0.170 -2.08e-17: -0.932 0.363 -4.45e-17, adjusted: -0.932 0.363 -4.45e-17 +DEAL::Approximate normal in -0.170 0.435 -2.08e-17: -0.363 0.932 -4.45e-17, adjusted: -0.363 0.932 -4.45e-17 +DEAL::Approximate normal in -0.312 0.312 0.153: -0.668 0.668 0.328, adjusted: -0.668 0.668 0.328 +DEAL::Approximate normal in -0.624 0.624 -0.307: -0.668 0.668 -0.328, adjusted: -0.668 0.668 -0.328 +DEAL::Approximate normal in -0.871 0.339 -4.16e-17: -0.932 0.363 -4.45e-17, adjusted: -0.932 0.363 -4.45e-17 +DEAL::Approximate normal in -0.339 0.871 -4.16e-17: -0.363 0.932 -4.45e-17, adjusted: -0.363 0.932 -4.45e-17 +DEAL::Approximate normal in -0.624 0.624 0.307: -0.668 0.668 0.328, adjusted: -0.668 0.668 0.328 +DEAL::Approximate normal in -0.170 0.00 -0.435: -0.363 0.00 -0.932, adjusted: -0.363 0.00 -0.932 +DEAL::Approximate normal in -0.312 -0.153 -0.312: -0.668 -0.328 -0.668, adjusted: -0.668 -0.328 -0.668 +DEAL::Approximate normal in -0.312 0.153 -0.312: -0.668 0.328 -0.668, adjusted: -0.668 0.328 -0.668 +DEAL::Approximate normal in -0.435 0.00 -0.170: -0.932 0.00 -0.363, adjusted: -0.932 0.00 -0.363 +DEAL::Approximate normal in -0.339 0.00 -0.871: -0.363 0.00 -0.932, adjusted: -0.363 0.00 -0.932 +DEAL::Approximate normal in -0.624 -0.307 -0.624: -0.668 -0.328 -0.668, adjusted: -0.668 -0.328 -0.668 +DEAL::Approximate normal in -0.624 0.307 -0.624: -0.668 0.328 -0.668, adjusted: -0.668 0.328 -0.668 +DEAL::Approximate normal in -0.871 0.00 -0.339: -0.932 0.00 -0.363, adjusted: -0.932 0.00 -0.363 +DEAL::Approximate normal in 0.153 -0.312 -0.312: 0.328 -0.668 -0.668, adjusted: 0.328 -0.668 -0.668 +DEAL::Approximate normal in 2.08e-17 -0.435 -0.170: 4.45e-17 -0.932 -0.363, adjusted: 4.45e-17 -0.932 -0.363 +DEAL::Approximate normal in 2.08e-17 -0.170 -0.435: 4.45e-17 -0.363 -0.932, adjusted: 4.45e-17 -0.363 -0.932 +DEAL::Approximate normal in -0.153 -0.312 -0.312: -0.328 -0.668 -0.668, adjusted: -0.328 -0.668 -0.668 +DEAL::Approximate normal in 0.307 -0.624 -0.624: 0.328 -0.668 -0.668, adjusted: 0.328 -0.668 -0.668 +DEAL::Approximate normal in 4.16e-17 -0.871 -0.339: 4.45e-17 -0.932 -0.363, adjusted: 4.45e-17 -0.932 -0.363 +DEAL::Approximate normal in 4.16e-17 -0.339 -0.871: 4.45e-17 -0.363 -0.932, adjusted: 4.45e-17 -0.363 -0.932 +DEAL::Approximate normal in -0.307 -0.624 -0.624: -0.328 -0.668 -0.668, adjusted: -0.328 -0.668 -0.668 diff --git a/tests/manifold/spherical_manifold_10.cc b/tests/manifold/spherical_manifold_10.cc index 911b73c075..9468215d79 100644 --- a/tests/manifold/spherical_manifold_10.cc +++ b/tests/manifold/spherical_manifold_10.cc @@ -55,7 +55,7 @@ main() // all points should coincide to an accuracy of at least 1e-8 (note // that we use a 4-th degree mapping, so its accuracy on the 96 cell - // version of the sphere should but be enough) + // version of the sphere should be enough) const double tolerance = 1e-8; for (unsigned int q=0; q +#include +#include +#include +#include +#include +#include + +using namespace dealii; + +int +main() +{ + initlog(); + deallog << std::setprecision(8); + + constexpr unsigned int dim = 3; + SphericalManifold<3> spherical; + FlatManifold<3> flat; + + Triangulation tria; + GridGenerator::half_hyper_shell(tria, Point(), .5, 1., 0, true); + tria.set_manifold(0, spherical); + tria.set_manifold(1, spherical); + tria.set_manifold(2, spherical); + + tria.refine_global(1); + + MappingQGeneric mapping(4); + QGaussLobatto quadrature(4); + FE_Nothing dummy; + FEFaceValues fe_values(mapping, dummy, quadrature, + update_normal_vectors | update_quadrature_points); + + for (auto cell : tria.active_cell_iterators()) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (cell->at_boundary(f)) + { + fe_values.reinit(cell, f); + + // all points should coincide to an accuracy of at least 1e-7 (note + // that we use a 4-th degree mapping, so its accuracy on the once + // refined version of the sphere should be enough) + const double tolerance = 1e-7; + for (unsigned int q=0; q normal_manifold = + spherical.normal_vector(cell->face(f), fe_values.quadrature_point(q)); + if (cell->face(f)->boundary_id()==2) + { + const Tensor<1,dim> normal_flat = flat.normal_vector(cell->face(f), fe_values.quadrature_point(q)); + if (std::abs(1.0 - std::abs(normal_manifold * normal_flat)) > tolerance) + deallog << "Error in point " << fe_values.quadrature_point(q) << ": " + << "FlatManifold says " << normal_flat << " but SphericalManifold says " + << normal_manifold << std::endl + << "error: " << std::abs(1.0 - std::abs(normal_manifold * normal_flat)) + << std::endl; + } + else + { + const Tensor<1,dim> normal_feval = fe_values.normal_vector(q); + if (std::abs(1.0 - std::abs(normal_manifold * normal_feval)) > tolerance) + deallog << "Error in point " << fe_values.quadrature_point(q) << ": " + << "FEFaceValues says " << normal_feval << " but manifold says " + << normal_manifold << std::endl + << "error: " << std::abs(1.0 - std::abs(normal_manifold * normal_feval)) + << std::endl; + } + } + } + deallog << "OK" << std::endl; + + return 0; +} diff --git a/tests/manifold/spherical_manifold_12.output b/tests/manifold/spherical_manifold_12.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/manifold/spherical_manifold_12.output @@ -0,0 +1,2 @@ + +DEAL::OK diff --git a/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=10.output b/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=10.output index 44f2ebda68..bdf366028c 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=10.output +++ b/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=10.output @@ -15,7 +15,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.30333082e-01 +-2.63304995e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -53,7 +53,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.33527178e+00 +-1.53465398e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -68,7 +68,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.33527178e+00 +-1.53465398e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -143,7 +143,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.06914255e+00 +9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -157,7 +157,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -7.52853500e-01 +6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -190,7 +190,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --7.52853500e-01 +-6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -201,7 +201,7 @@ 2.00000000e+00 8.16987298e-01 2.00000000e+00 --1.06914255e+00 +-9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -282,7 +282,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -4.66433230e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -293,7 +293,7 @@ 2.00000000e+00 1.25000000e+00 2.00000000e+00 -1.97077264e-01 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -496,7 +496,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --9.87224211e-01 +-8.28427125e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -510,7 +510,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --3.98605130e-01 +-2.63304995e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -593,7 +593,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.06591211e-01 +6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -654,13 +654,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.53795718e-02 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -3.30105238e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -737,7 +737,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -8.67017967e-01 +9.06188211e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -751,7 +751,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.11148712e+00 +1.06902227e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -964,13 +964,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.87338004e+00 +1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.43332132e+00 +1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1072,13 +1072,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.24355020e+00 +1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.87338004e+00 +1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1392,7 +1392,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.87338004e+00 +1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1406,7 +1406,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.24355020e+00 +1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1441,7 +1441,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.19873798e+00 +1.24367992e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1455,7 +1455,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.38420293e+00 +1.43317973e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1598,7 +1598,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.69689373e+00 +1.64135758e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1609,7 +1609,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.93562081e+00 +1.87320442e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1807,7 +1807,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.06914255e+00 +9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1821,7 +1821,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.06591211e-01 +6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1895,7 +1895,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -3.30105238e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1909,7 +1909,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.53795718e-02 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2712,7 +2712,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --6.06591211e-01 +-6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2726,7 +2726,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --9.06075459e-01 +-9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2816,13 +2816,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --6.53795718e-02 +-1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 --3.30105238e-01 +-3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2970,7 +2970,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.19873798e+00 +-1.24367992e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2984,7 +2984,7 @@ 2.00000000e+00 6.74504759e-01 2.00000000e+00 --1.48331920e+00 +-1.43317973e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3145,7 +3145,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.87338004e+00 +-1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3180,7 +3180,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.64120103e+00 +-1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3293,7 +3293,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.48331920e+00 +-1.43317973e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3307,7 +3307,7 @@ 2.00000000e+00 8.16987298e-01 2.00000000e+00 --1.19873798e+00 +-1.24367992e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3613,7 +3613,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.06914255e+00 +-9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3627,7 +3627,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --7.52853500e-01 +-6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3659,7 +3659,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --4.66433230e-01 +-3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3673,7 +3673,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.97077264e-01 +-1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -4142,13 +4142,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -7.52853500e-01 +6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.06914255e+00 +9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -4172,13 +4172,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.53795718e-02 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -4.66433230e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 diff --git a/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=4.output b/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=4.output index 84ab164fba..39f096534c 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=4.output +++ b/tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=4.output @@ -156,7 +156,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --7.52853500e-01 +-6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -170,7 +170,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.06914255e+00 +-9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -195,7 +195,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.24355020e+00 +-1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -209,7 +209,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.64120103e+00 +-1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -232,7 +232,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.64120103e+00 +-1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -246,7 +246,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.43332132e+00 +-1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -604,7 +604,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -7.90355725e-01 +7.52746698e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -618,7 +618,7 @@ 2.00000000e+00 1.45096189e+00 2.00000000e+00 -5.71117827e-01 +6.06693367e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -654,7 +654,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --9.82654126e-02 +-6.54732208e-02 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -668,7 +668,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.63978894e-01 +-1.96982807e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -705,7 +705,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --2.96660033e-01 +-3.30201336e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -716,7 +716,7 @@ 2.00000000e+00 1.04903811e+00 2.00000000e+00 --4.31946369e-01 +-4.66334594e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -816,13 +816,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.11148712e+00 +1.06902227e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -9.45943851e-01 +9.06188211e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1130,7 +1130,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -9.87224211e-01 +8.28427125e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1158,7 +1158,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.06914255e+00 +-9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1172,7 +1172,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --7.52853500e-01 +-6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1207,7 +1207,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.87338004e+00 +1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1215,7 +1215,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.43332132e+00 +1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1306,7 +1306,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -4.66433230e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1314,7 +1314,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.97077264e-01 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1357,13 +1357,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.24355020e+00 +1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.87338004e+00 +1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1391,7 +1391,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --3.30105238e-01 +-3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1405,7 +1405,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --6.53795718e-02 +-1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1432,7 +1432,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.53795718e-02 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -1443,7 +1443,7 @@ 2.00000000e+00 1.45096189e+00 2.00000000e+00 -3.30105238e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2190,7 +2190,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.33527178e+00 +1.53465398e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2231,7 +2231,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.78071492e-01 +8.28427125e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2295,7 +2295,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.87338004e+00 +1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2306,7 +2306,7 @@ 2.00000000e+00 1.68301270e+00 2.00000000e+00 -1.24355020e+00 +1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2345,7 +2345,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --6.53795718e-02 +-1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2375,13 +2375,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -3.30105238e-01 +3.97824735e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -6.53795718e-02 +1.31086926e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2520,7 +2520,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --3.63924432e-01 +-3.30201336e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2534,7 +2534,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --5.00986338e-01 +-4.66334594e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2813,7 +2813,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --5.88870669e-01 +-5.71130465e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2827,7 +2827,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --6.60712374e-01 +-6.42611095e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2852,7 +2852,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --6.97206003e-01 +-7.15611443e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -2866,7 +2866,7 @@ 2.00000000e+00 9.39339828e-01 2.00000000e+00 --7.71483455e-01 +-7.90342216e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3262,7 +3262,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.75528131e+00 +-1.53465398e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3290,7 +3290,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --9.87224211e-01 +-8.28427125e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3304,7 +3304,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.30333082e-01 +-2.63304995e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3336,7 +3336,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.30333082e-01 +2.63304995e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3434,7 +3434,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --1.43332132e+00 +-1.33635728e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3445,7 +3445,7 @@ 2.00000000e+00 2.00000000e+00 5.00000000e-01 --1.87338004e+00 +-1.75395293e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3545,13 +3545,13 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 -7.52853500e-01 +6.78908518e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -1.06914255e+00 +9.86290852e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3574,7 +3574,7 @@ 2.00000000e+00 2.00000000e+00 2.00000000e+00 --8.67017967e-01 +-9.06188211e-01 2.00000000e+00 2.00000000e+00 2.00000000e+00 @@ -3585,7 +3585,7 @@ 2.00000000e+00 8.16987298e-01 2.00000000e+00 --1.02729410e+00 +-1.06902227e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 -- 2.39.5