From: Matthias Maier Date: Thu, 27 Aug 2015 23:20:51 +0000 (-0500) Subject: Testsuite: Avoid c++11isms X-Git-Tag: v8.4.0-rc2~537^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74069aefa716b5d54c541b84670dbc78b56a67dd;p=dealii.git Testsuite: Avoid c++11isms --- diff --git a/tests/deal.II/grid_tools_halo_layer_01.cc b/tests/deal.II/grid_tools_halo_layer_01.cc index 911899c39c..27cee7f1b9 100644 --- a/tests/deal.II/grid_tools_halo_layer_01.cc +++ b/tests/deal.II/grid_tools_halo_layer_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -83,8 +83,8 @@ void test () write_mat_id_to_file(tria); // Write to file to visually check result { - const std::string filename = "grid_no_halo_" + std::to_string(dim) + "d.vtk"; - std::ofstream f(filename); + const std::string filename = "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + std::ofstream f(filename.c_str()); GridOut().write_vtk (tria, f); } @@ -103,8 +103,8 @@ void test () write_mat_id_to_file(tria); // Write to file to visually check result { - const std::string filename = "grid_with_halo_" + std::to_string(dim) + "d.vtk"; - std::ofstream f(filename); + const std::string filename = "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + std::ofstream f(filename.c_str()); GridOut().write_vtk (tria, f); } } diff --git a/tests/deal.II/grid_tools_halo_layer_02.cc b/tests/deal.II/grid_tools_halo_layer_02.cc index 8cf6744f6d..ed87b4569f 100644 --- a/tests/deal.II/grid_tools_halo_layer_02.cc +++ b/tests/deal.II/grid_tools_halo_layer_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -77,8 +77,8 @@ void test () write_mat_id_to_file(tria); // Write to file to visually check result { - const std::string filename = "grid_no_halo_" + std::to_string(dim) + "d.vtk"; - std::ofstream f(filename); + const std::string filename = "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + std::ofstream f(filename.c_str()); GridOut().write_vtk (tria, f); } @@ -97,8 +97,8 @@ void test () write_mat_id_to_file(tria); // Write to file to visually check result { - const std::string filename = "grid_with_halo_" + std::to_string(dim) + "d.vtk"; - std::ofstream f(filename); + const std::string filename = "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + std::ofstream f(filename.c_str()); GridOut().write_vtk (tria, f); } } diff --git a/tests/deal.II/grid_tools_halo_layer_03.cc b/tests/deal.II/grid_tools_halo_layer_03.cc index c2de9aef7c..325efbc96b 100644 --- a/tests/deal.II/grid_tools_halo_layer_03.cc +++ b/tests/deal.II/grid_tools_halo_layer_03.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -82,8 +82,8 @@ void test () write_mat_id_to_file(tria); // Write to file to visually check result { - const std::string filename = "grid_no_halo_" + std::to_string(dim) + "d.vtk"; - std::ofstream f(filename); + const std::string filename = "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + std::ofstream f(filename.c_str()); GridOut().write_vtk (tria, f); } @@ -102,8 +102,8 @@ void test () write_mat_id_to_file(tria); // Write to file to visually check result { - const std::string filename = "grid_with_halo_" + std::to_string(dim) + "d.vtk"; - std::ofstream f(filename); + const std::string filename = "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + std::ofstream f(filename.c_str()); GridOut().write_vtk (tria, f); } } diff --git a/tests/deal.II/grid_tools_halo_layer_04.cc b/tests/deal.II/grid_tools_halo_layer_04.cc index 9db8a250ff..1e934083d0 100644 --- a/tests/deal.II/grid_tools_halo_layer_04.cc +++ b/tests/deal.II/grid_tools_halo_layer_04.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -109,8 +109,8 @@ void test () write_active_fe_index_to_file(dof_handler); // Write to file to visually check result { - const std::string filename = "grid_no_halo_" + std::to_string(dim) + "d.vtk"; - write_vtk(dof_handler, filename); + const std::string filename = "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + write_vtk(dof_handler, filename.c_str()); } // Compute a halo layer around active fe index 2 and set it to active fe index 3 @@ -128,8 +128,8 @@ void test () write_active_fe_index_to_file(dof_handler); // Write to file to visually check result { - const std::string filename = "grid_with_halo_" + std::to_string(dim) + "d.vtk"; - write_vtk(dof_handler, filename); + const std::string filename = "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + write_vtk(dof_handler, filename.c_str()); } } diff --git a/tests/deal.II/grid_tools_halo_layer_05.cc b/tests/deal.II/grid_tools_halo_layer_05.cc index 8edbba36f8..ff35b09ae0 100644 --- a/tests/deal.II/grid_tools_halo_layer_05.cc +++ b/tests/deal.II/grid_tools_halo_layer_05.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -115,8 +115,8 @@ void test () write_active_fe_index_to_file(dof_handler); // Write to file to visually check result { - const std::string filename = "grid_no_halo_" + std::to_string(dim) + "d.vtk"; - write_vtk(dof_handler, filename); + const std::string filename = "grid_no_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + write_vtk(dof_handler, filename.c_str()); } // Compute a halo layer around active fe indices 2,3 and set it to active fe index 4 @@ -134,8 +134,8 @@ void test () write_active_fe_index_to_file(dof_handler); // Write to file to visually check result { - const std::string filename = "grid_with_halo_" + std::to_string(dim) + "d.vtk"; - write_vtk(dof_handler, filename); + const std::string filename = "grid_with_halo_" + Utilities::int_to_string(dim) + "d.vtk"; + write_vtk(dof_handler, filename.c_str()); } } diff --git a/tests/deal.II/grid_tools_halo_layer_ghost_cells.cc b/tests/deal.II/grid_tools_halo_layer_ghost_cells.cc index f8fc22f479..7eae0972b0 100644 --- a/tests/deal.II/grid_tools_halo_layer_ghost_cells.cc +++ b/tests/deal.II/grid_tools_halo_layer_ghost_cells.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2001 - 2014 by the deal.II authors +// Copyright (C) 2001 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -35,10 +35,6 @@ void test () GridGenerator::hyper_cube(tria); tria.refine_global(2); -// // Write to file for visual inspection -// const std::string filename = "grid_" + std::to_string(dim) + "d"; -// tria.write_mesh_vtk(filename.c_str()); - typedef typename parallel::distributed::Triangulation::active_cell_iterator cell_iterator; // Mark a small block at the corner of the hypercube