From 6d4123cc166b59e664616d195440fb68c7851027 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 4 Jan 2015 15:37:36 -0600 Subject: [PATCH] Remove deprecated function Triangulation::distort_random. --- doc/news/changes.h | 3 ++- include/deal.II/grid/tria.h | 15 --------------- source/grid/tria.cc | 24 ------------------------ tests/bits/rt_2.cc | 5 +++-- tests/fail/abf_approximation_01.cc | 4 ++-- tests/fail/rt_distorted_01.cc | 5 +++-- tests/fail/rt_distorted_02.cc | 5 +++-- tests/fe/abf_01.cc | 4 ++-- tests/fe/rt_approximation_01.cc | 4 ++-- tests/fe/rt_normal_02.cc | 5 +++-- 10 files changed, 20 insertions(+), 54 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index 3574913212..71f82d7464 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -98,8 +98,9 @@ inconvenience this causes. class. - The deprecated constructor of MPI_InitFinalize - The MPI support functions in namespace Utilities and Utilities::System. -- Deprecated members of namespace types +- Deprecated members of namespace types. - Namespace deal_II_numbers. +- Triangulation::distort_random. diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 22d249d7a1..92126bf269 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -1772,21 +1772,6 @@ public: */ void flip_all_direction_flags(); - /** - * Distort the grid by randomly moving around all the vertices of the grid. - * The direction of moving is random, while the length of the shift vector - * has a value of @p factor times the minimal length of the active lines - * adjacent to this vertex. Note that @p factor should obviously be well - * below 0.5. - * - * If @p keep_boundary is set to @p true (which is the default), then - * boundary vertices are not moved. - * - * @deprecated Use GridTools::distort_random instead. - */ - void distort_random (const double factor, - const bool keep_boundary=true) DEAL_II_DEPRECATED; - /** * @name Mesh refinement * @{ diff --git a/source/grid/tria.cc b/source/grid/tria.cc index de79df8f7a..e79cb9fa4e 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -2788,21 +2788,6 @@ namespace internal } - /** - * Distort a triangulation in - * some random way. - */ - template - static - void - distort_random (const double factor, - const bool keep_boundary, - Triangulation &triangulation) - { - GridTools::distort_random (factor, triangulation, keep_boundary); - } - - /** * Actually delete a cell, or rather all * its children, which is the main step for @@ -9146,15 +9131,6 @@ flip_all_direction_flags() -template -void Triangulation::distort_random (const double factor, - const bool keep_boundary) -{ - internal::Triangulation::Implementation::distort_random (factor, keep_boundary, *this); -} - - - template void Triangulation::set_all_refine_flags () { diff --git a/tests/bits/rt_2.cc b/tests/bits/rt_2.cc index 2ed707bad7..f27ea31018 100644 --- a/tests/bits/rt_2.cc +++ b/tests/bits/rt_2.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2013 by the deal.II authors +// Copyright (C) 2005 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -167,7 +168,7 @@ int main () // Then test same on distorted mesh - tria_test.distort_random (0.05); + GridTools::distort_random (0.05, tria_test); deallog << "Distorted mesh test" << std::endl; evaluate_normal (dof_handler, solution); } diff --git a/tests/fail/abf_approximation_01.cc b/tests/fail/abf_approximation_01.cc index fbf42c0f17..67f7a97eee 100644 --- a/tests/fail/abf_approximation_01.cc +++ b/tests/fail/abf_approximation_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -445,7 +445,7 @@ int main () GridGenerator::hyper_rectangle (tria_test, p1, p2); // tria_test.refine_global (1); - // tria_test.distort_random (0.4); + // GridTools::distort_random (0.4, tria_test); // Create a DoFHandler for the ABF space FE_ABF<2> fe (0); diff --git a/tests/fail/rt_distorted_01.cc b/tests/fail/rt_distorted_01.cc index 94c8ea22a9..a0a3f20b9a 100644 --- a/tests/fail/rt_distorted_01.cc +++ b/tests/fail/rt_distorted_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -60,6 +60,7 @@ std::ofstream logfile ("output"); #include #include #include +#include #include @@ -325,7 +326,7 @@ int main (int /*argc*/, char **/*argv*/) // Uncommenting the following line, demonstrates the problem // of RT elements on distorted Quads! - tria_test.distort_random (0.4); + GridTools::distort_random (0.4, tria_test); // Create a DoFHandler for the RT space FE_RaviartThomas<2> fe (2); diff --git a/tests/fail/rt_distorted_02.cc b/tests/fail/rt_distorted_02.cc index 480df10e8d..dfe03247b7 100644 --- a/tests/fail/rt_distorted_02.cc +++ b/tests/fail/rt_distorted_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -62,6 +62,7 @@ char buf[1000]; #include #include #include +#include #include @@ -339,7 +340,7 @@ int main () GridGenerator::hyper_rectangle (tria_test, p1, p2); tria_test.refine_global (1); - tria_test.distort_random (0.4); + GridTools::distort_random (0.4, tria_test); // Create a DoFHandler for the RT space FE_RaviartThomas<2> fe (2); diff --git a/tests/fe/abf_01.cc b/tests/fe/abf_01.cc index 07adcd482f..d78e57bbfe 100644 --- a/tests/fe/abf_01.cc +++ b/tests/fe/abf_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -609,7 +609,7 @@ int main (int /*argc*/, char **/*argv*/) // tria_test.refine_global (1); -// tria_test.distort_random (0.25); +// GridTools::distort_random (0.25, tria_test); FE_ABF<2> fe (0); deallog << "Dofs/cell " << fe.dofs_per_cell diff --git a/tests/fe/rt_approximation_01.cc b/tests/fe/rt_approximation_01.cc index 2d7fb7a8c5..f8940e6a23 100644 --- a/tests/fe/rt_approximation_01.cc +++ b/tests/fe/rt_approximation_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -450,7 +450,7 @@ int main () GridGenerator::hyper_rectangle (tria_test, p1, p2); // tria_test.refine_global (1); - // tria_test.distort_random (0.4); + // GridTools::distort_random (0.4, tria_test); // Create a DoFHandler for the RT space FE_RaviartThomas<2> fe (1); diff --git a/tests/fe/rt_normal_02.cc b/tests/fe/rt_normal_02.cc index 9111717e99..136f8e74b8 100644 --- a/tests/fe/rt_normal_02.cc +++ b/tests/fe/rt_normal_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2003 - 2013 by the deal.II authors +// Copyright (C) 2003 - 2013, 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -277,7 +278,7 @@ int main (int /*argc*/, char **/*argv*/) GridGenerator::subdivided_hyper_rectangle (tria_test, sub_div, p1, p2); tria_test.refine_global (2); - tria_test.distort_random (0.05); + GridTools::distort_random (0.05, tria_test); // Create a DoFHandler FE_RaviartThomas<2> fe (1); -- 2.39.5