]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify implementation for normal_vector and get_normals_at_vertices in SphericalMan... 5711/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 10 Jan 2018 00:05:34 +0000 (01:05 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 29 Jan 2018 14:05:33 +0000 (15:05 +0100)
include/deal.II/grid/manifold_lib.h
source/grid/manifold_lib.cc
tests/manifold/spherical_manifold_09.cc
tests/manifold/spherical_manifold_09.output
tests/manifold/spherical_manifold_10.cc
tests/manifold/spherical_manifold_12.cc [new file with mode: 0644]
tests/manifold/spherical_manifold_12.output [new file with mode: 0644]
tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=10.output
tests/mpi/p4est_2d_constraintmatrix_03.with_trilinos=true.mpirun=4.output

index 143ca298139a7e4fbd83de49295f0df2ec98674d..1392896a3c8c5d2e785a45a6833cad2c97ead387 100644 (file)
@@ -235,6 +235,22 @@ public:
   get_tangent_vector (const Point<spacedim> &x1,
                       const Point<spacedim> &x2) const override;
 
+  /**
+   * Return the (normalized) normal vector at the point @p p.
+   */
+  virtual
+  Tensor<1,spacedim>
+  normal_vector (const typename Triangulation<dim,spacedim>::face_iterator &face,
+                 const Point<spacedim>                                     &p) const override;
+
+  /**
+   * Compute the normal vectors to the boundary at each vertex.
+   */
+  virtual
+  void
+  get_normals_at_vertices (const typename Triangulation<dim,spacedim>::face_iterator &face,
+                           typename Manifold<dim, spacedim>::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
index b83ca0cc74286a6d11714dbaf01984b68984d2b1..78ab035496bbc1ade1937e754ae6aa64bb3c7e19 100644 (file)
@@ -379,6 +379,97 @@ get_tangent_vector (const Point<spacedim> &p1,
 
 
 
+template<int dim, int spacedim>
+Tensor<1, spacedim>
+SphericalManifold<dim, spacedim>::
+normal_vector (const typename Triangulation<dim, spacedim >::face_iterator &face,
+               const Point<spacedim>                                       &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<spacedim>::vertices_per_face;
+  std::array<double, n_vertices> distances_to_center;
+  std::array<double, n_vertices-1> distances_to_first_vertex;
+  distances_to_center[0] = (face->vertex(0)-center).norm_square();
+  for (unsigned int i=1; i<n_vertices; ++i)
+    {
+      distances_to_center[i] = (face->vertex(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<dim, spacedim>::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 <int dim, int spacedim>
+void
+SphericalManifold<dim,spacedim>::
+get_normals_at_vertices (const typename Triangulation<dim,spacedim>::face_iterator &face,
+                         typename Manifold<dim,spacedim>::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<spacedim>::vertices_per_face;
+  std::array<double, n_vertices> distances_to_center;
+  std::array<double, n_vertices-1> distances_to_first_vertex;
+  distances_to_center[0] = (face->vertex(0)-center).norm_square();
+  for (unsigned int i=1; i<n_vertices; ++i)
+    {
+      distances_to_center[i] = (face->vertex(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; vertex<n_vertices; ++vertex)
+      face_vertex_normals[vertex] = face->vertex(vertex)-center;
+
+  Manifold<dim, spacedim>::get_normals_at_vertices(face, face_vertex_normals);
+}
+
+
+
 template <int dim, int spacedim>
 void
 SphericalManifold<dim, spacedim>::
index 0f752934b1e785672241b8a0eabeb0dbf65917d2..8744cff6259cae2fcc6a8a5aa514afb63eaba4e0 100644 (file)
@@ -42,7 +42,7 @@ main()
     for (unsigned int f=0; f<GeometryInfo<dim>::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
index 454a47f46acd6898016929265d7493f433717d7d..6cf7ba2644b462515d4a028a4882041242164004 100644 (file)
 
+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
index 911b73c0753f8edfc196b132020ff803ae019fd7..9468215d799edabf6c7e97ee115a72ac7490403c 100644 (file)
@@ -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<quadrature.size(); ++q)
           {
diff --git a/tests/manifold/spherical_manifold_12.cc b/tests/manifold/spherical_manifold_12.cc
new file mode 100644 (file)
index 0000000..69601ff
--- /dev/null
@@ -0,0 +1,94 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// Compare SphericalManifold::normal_vector with the result of
+// FEFaceValues::normal_vector. Those should give very similar results, but an
+// old implementation in the manifold gave wrong points
+
+#include "../tests.h"
+#include <deal.II/base/point.h>
+#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/fe/fe_values.h>
+#include <deal.II/fe/fe_nothing.h>
+#include <deal.II/fe/mapping_q_generic.h>
+
+using namespace dealii;
+
+int
+main()
+{
+  initlog();
+  deallog << std::setprecision(8);
+
+  constexpr unsigned int dim = 3;
+  SphericalManifold<3> spherical;
+  FlatManifold<3>      flat;
+
+  Triangulation<dim> tria;
+  GridGenerator::half_hyper_shell(tria, Point<dim>(), .5, 1., 0, true);
+  tria.set_manifold(0, spherical);
+  tria.set_manifold(1, spherical);
+  tria.set_manifold(2, spherical);
+
+  tria.refine_global(1);
+
+  MappingQGeneric<dim> mapping(4);
+  QGaussLobatto<dim-1> quadrature(4);
+  FE_Nothing<dim> dummy;
+  FEFaceValues<dim> fe_values(mapping, dummy, quadrature,
+                              update_normal_vectors | update_quadrature_points);
+
+  for (auto cell : tria.active_cell_iterators())
+    for (unsigned int f=0; f<GeometryInfo<dim>::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<quadrature.size(); ++q)
+            {
+              const Tensor<1,dim> 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 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
index 44f2ebda68873cb81e83712fe888062e6c888f0d..bdf366028c9483d28874a07473c276a9e45fa59d 100644 (file)
@@ -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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.06914255e+00
+9.86290852e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 2.00000000e+00
--7.52853500e-01
+-6.78908518e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 8.16987298e-01
 2.00000000e+00
--1.06914255e+00
+-9.86290852e-01
 2.00000000e+00
 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
 2.00000000e+00
 1.25000000e+00
 2.00000000e+00
-1.97077264e-01
+1.31086926e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--9.87224211e-01
+-8.28427125e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--3.98605130e-01
+-2.63304995e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-6.06591211e-01
+6.78908518e-01
 2.00000000e+00
 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
 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
 2.00000000e+00
-8.67017967e-01
+9.06188211e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 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
 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
 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
 2.00000000e+00
-1.24355020e+00
+1.33635728e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.19873798e+00
+1.24367992e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.38420293e+00
+1.43317973e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.69689373e+00
+1.64135758e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.93562081e+00
+1.87320442e+00
 2.00000000e+00
 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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-6.06591211e-01
+6.78908518e-01
 2.00000000e+00
 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
 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
 2.00000000e+00
--6.06591211e-01
+-6.78908518e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--9.06075459e-01
+-9.86290852e-01
 2.00000000e+00
 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
 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
 2.00000000e+00
--1.19873798e+00
+-1.24367992e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 6.74504759e-01
 2.00000000e+00
--1.48331920e+00
+-1.43317973e+00
 2.00000000e+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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.64120103e+00
+-1.75395293e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.48331920e+00
+-1.43317973e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 8.16987298e-01
 2.00000000e+00
--1.19873798e+00
+-1.24367992e+00
 2.00000000e+00
 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
 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
 2.00000000e+00
--4.66433230e-01
+-3.97824735e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.97077264e-01
+-1.31086926e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 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
index 84ab164fbae9fc7e6ae96efb0303a5b76501c0ec..39f096534ce9ba8f063d6b3b5cd86e87fa221899 100644 (file)
 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
 2.00000000e+00
--1.06914255e+00
+-9.86290852e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 2.00000000e+00
--1.64120103e+00
+-1.75395293e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.64120103e+00
+-1.75395293e+00
 2.00000000e+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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-7.90355725e-01
+7.52746698e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 1.45096189e+00
 2.00000000e+00
-5.71117827e-01
+6.06693367e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--9.82654126e-02
+-6.54732208e-02
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.63978894e-01
+-1.96982807e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--2.96660033e-01
+-3.30201336e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 1.04903811e+00
 2.00000000e+00
--4.31946369e-01
+-4.66334594e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-9.87224211e-01
+8.28427125e-01
 2.00000000e+00
 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
 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
 2.00000000e+00
-1.87338004e+00
+1.75395293e+00
 2.00000000e+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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-4.66433230e-01
+3.97824735e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.97077264e-01
+1.31086926e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 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
 2.00000000e+00
--6.53795718e-02
+-1.31086926e-01
 2.00000000e+00
 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
 2.00000000e+00
 1.45096189e+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
 2.00000000e+00
-1.33527178e+00
+1.53465398e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-6.78071492e-01
+8.28427125e-01
 2.00000000e+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
 2.00000000e+00
 1.68301270e+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
 2.00000000e+00
--6.53795718e-02
+-1.31086926e-01
 2.00000000e+00
 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
 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
 2.00000000e+00
--3.63924432e-01
+-3.30201336e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--5.00986338e-01
+-4.66334594e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--5.88870669e-01
+-5.71130465e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--6.60712374e-01
+-6.42611095e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--6.97206003e-01
+-7.15611443e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 9.39339828e-01
 2.00000000e+00
--7.71483455e-01
+-7.90342216e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.75528131e+00
+-1.53465398e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--9.87224211e-01
+-8.28427125e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--1.30333082e-01
+-2.63304995e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
-1.30333082e-01
+2.63304995e-01
 2.00000000e+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
 2.00000000e+00
 2.00000000e+00
 5.00000000e-01
--1.87338004e+00
+-1.75395293e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 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
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
--8.67017967e-01
+-9.06188211e-01
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00
 8.16987298e-01
 2.00000000e+00
--1.02729410e+00
+-1.06902227e+00
 2.00000000e+00
 2.00000000e+00
 2.00000000e+00

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.