]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add changelog and test 5366/head
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Tue, 31 Oct 2017 21:13:05 +0000 (15:13 -0600)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Tue, 31 Oct 2017 21:27:31 +0000 (15:27 -0600)
doc/news/changes/minor/20171031ReneGassmoeller [new file with mode: 0644]
tests/manifold/spherical_manifold_06.cc [new file with mode: 0644]
tests/manifold/spherical_manifold_06.output [new file with mode: 0644]

diff --git a/doc/news/changes/minor/20171031ReneGassmoeller b/doc/news/changes/minor/20171031ReneGassmoeller
new file mode 100644 (file)
index 0000000..55e9b33
--- /dev/null
@@ -0,0 +1,6 @@
+Fixed: The spherical manifold used to do a division
+by zero inside of SphericalManifold::get_new_point() 
+if the new point was exactly at the center of the
+manifold. This is fixed now.
+<br>
+(Rene Gassmoeller, 2017/10/31)
diff --git a/tests/manifold/spherical_manifold_06.cc b/tests/manifold/spherical_manifold_06.cc
new file mode 100644 (file)
index 0000000..beb7867
--- /dev/null
@@ -0,0 +1,59 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 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.
+//
+// ---------------------------------------------------------------------
+
+// Check SphericalManifold for get_new_point issues at the origin.
+
+#include "../tests.h"
+
+#include <deal.II/base/utilities.h>
+#include <deal.II/grid/manifold_lib.h>
+
+int
+main()
+{
+  initlog();
+
+  {
+    Point<2> center(1.0, 0.0);
+    const SphericalManifold<2,2> manifold(center);
+    Point<2> P1(1.0, 1.0);
+    Point<2> P2(1.0, -1.0);
+    std::vector<Point<2> > points;
+    std::vector<double > weights;
+    points.push_back(P1);
+    points.push_back(P2);
+    weights.push_back(0.5);
+    weights.push_back(0.5);
+    Point<2> mid_point = manifold.get_new_point(points,weights);
+    deallog << mid_point << std::endl;
+  }
+
+  {
+    Point<3> center(1.0, 0.0, 0.0);
+    const SphericalManifold<3,3> manifold(center);
+    Point<3> P1(1.0, 1.0, 0.0);
+    Point<3> P2(1.0, -1.0, 0.0);
+    std::vector<Point<3> > points;
+    std::vector<double > weights;
+    points.push_back(P1);
+    points.push_back(P2);
+    weights.push_back(0.5);
+    weights.push_back(0.5);
+    Point<3> mid_point = manifold.get_new_point(points,weights);
+    deallog << mid_point << std::endl;
+  }
+
+  return 0;
+}
diff --git a/tests/manifold/spherical_manifold_06.output b/tests/manifold/spherical_manifold_06.output
new file mode 100644 (file)
index 0000000..901ef0a
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::1.00000 0.00000
+DEAL::1.00000 0.00000 0.00000

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.