From: Martin Kronbichler Date: Mon, 20 Nov 2017 12:08:58 +0000 (+0100) Subject: Add test. X-Git-Tag: v9.0.0-rc1~749^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5507%2Fhead;p=dealii.git Add test. --- diff --git a/tests/manifold/spherical_manifold_08.cc b/tests/manifold/spherical_manifold_08.cc new file mode 100644 index 0000000000..2de8ee343b --- /dev/null +++ b/tests/manifold/spherical_manifold_08.cc @@ -0,0 +1,45 @@ +// --------------------------------------------------------------------- +// +// 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. +// +// --------------------------------------------------------------------- + +// Check SphericalManifold::get_intermediate_point for two particular points +// that are almost along a line to the center (this used to trigger when +// refining a 3d shell starting from 12 initial elements 6 times globally). + +#include "../tests.h" +#include +#include + +using namespace dealii; + +int +main() +{ + initlog(); + deallog << std::setprecision(10); + + SphericalManifold<3> spherical; + + Point<3> p1(-0.036923837121444085, -0.87096345314118251, -0.075394254055706517); + Point<3> p2(-0.037583190343442631, -0.8865163726762405, -0.076740572095662762); + + // when projected to radius one, both points are almost the same: + // p1/p1.norm() : [-0.042198670995936091, -0.99538680358992271, -0.086164861777950297] + // p2/p2.norm() : [-0.042198669859304011, -0.99538680440841054, -0.086164852879340656] + + deallog << "intermediate point: " << spherical.get_intermediate_point(p1, p2, 0.5) + << std::endl; + + return 0; +} diff --git a/tests/manifold/spherical_manifold_08.output b/tests/manifold/spherical_manifold_08.output new file mode 100644 index 0000000000..4c43f0bc27 --- /dev/null +++ b/tests/manifold/spherical_manifold_08.output @@ -0,0 +1,2 @@ + +DEAL::intermediate point: -0.03725351424 -0.8787399125 -0.07606741704