From: Stefano Dominici Date: Thu, 18 Oct 2018 12:51:43 +0000 (+0200) Subject: New tensor_product_manifold_03 test X-Git-Tag: v9.1.0-rc1~605^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa696d0a06b198b4d85964c6a31f40486e7b6348;p=dealii.git New tensor_product_manifold_03 test This test exposes the bug and currently fails. It attempts the assignment of a TensorProductManifold object, to a Triangulation object, in an inner visibility scope. Once the execution flows leaves the inner scope, the local manifold objects are destroyed triggering a subscriptor error. --- diff --git a/tests/manifold/tensor_product_manifold_03.cc b/tests/manifold/tensor_product_manifold_03.cc new file mode 100644 index 0000000000..ecfea9cccb --- /dev/null +++ b/tests/manifold/tensor_product_manifold_03.cc @@ -0,0 +1,52 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2016 - 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.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + +// Test the correct handling of data members within the TensorProductManifold +// class. The test generates a general hypercube grid and, in an inner scope, +// attempts to assign a TensorProductManifold to it. The test is succesfull if +// it terminates without subscriptor errors or memory leaks. + +#include +#include +#include + +#include "../tests.h" + + +void +test() +{ + Triangulation<3, 3> tria; + GridGenerator::hyper_cube(tria); + { + FunctionManifold<1, 1> F("x", "x"); + PolarManifold<2, 2> G(Point<2>(0.5, 0.5)); + TensorProductManifold<3, 2, 2, 2, 1, 1, 1> manifold(G, F); + tria.set_all_manifold_ids(0); + tria.set_manifold(0, manifold); + } + tria.refine_global(1); +} + + + +int +main() +{ + test(); + + return 0; +} diff --git a/tests/manifold/tensor_product_manifold_03.output b/tests/manifold/tensor_product_manifold_03.output new file mode 100644 index 0000000000..e69de29bb2