From 158f5f845058d6a9db5ce8cd50eac502de429fbd Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 21 Mar 2023 17:47:34 -0400 Subject: [PATCH] Don't use namespace std in tests --- tests/base/polynomials_bdm_01.cc | 2 -- tests/base/polynomials_bdm_02.cc | 2 -- tests/base/polynomials_rt.cc | 2 -- tests/base/polynomials_tensor.cc | 2 -- tests/bits/count_dofs_per_component_hp_01.cc | 2 -- tests/bits/count_dofs_per_component_hp_02.cc | 2 -- .../bits/map_dofs_to_support_points_hp_01.cc | 2 -- .../bits/map_dofs_to_support_points_hp_02.cc | 2 -- tests/codim_one/bem_integration.cc | 32 +++++++++---------- tests/codim_one/boundary_indicator_01.cc | 4 +-- tests/codim_one/direction_flag_01.cc | 2 -- tests/codim_one/direction_flag_02.cc | 2 -- tests/codim_one/direction_flag_03.cc | 2 -- tests/codim_one/extract_boundary_mesh_00.cc | 24 +++++++------- tests/codim_one/extract_boundary_mesh_01.cc | 22 ++++++------- tests/codim_one/extract_boundary_mesh_02.cc | 12 +++---- tests/codim_one/extract_boundary_mesh_03.cc | 12 +++---- tests/codim_one/extract_boundary_mesh_04.cc | 14 ++++---- tests/codim_one/extract_boundary_mesh_05.cc | 6 ++-- tests/codim_one/extract_boundary_mesh_06.cc | 6 ++-- tests/codim_one/integrate_log_2.cc | 14 ++++---- tests/codim_one/integrate_one_over_r.cc | 26 +++++++-------- .../codim_one/integrate_one_over_r_telles.cc | 20 ++++++------ .../integrate_one_over_r_telles_middle.cc | 19 ++++++----- tests/grid/mesh_3d_22.cc | 2 -- tests/grid/mesh_3d_25.cc | 2 -- tests/grid/mesh_3d_26.cc | 2 -- tests/multigrid/boundary_01.cc | 2 +- tests/multigrid/constrained_dofs_01.cc | 2 +- tests/multigrid/constrained_dofs_02.cc | 2 +- tests/multigrid/constrained_dofs_03.cc | 2 +- tests/multigrid/count_01.cc | 2 +- tests/multigrid/dof_01.cc | 1 - tests/multigrid/dof_02.cc | 1 - tests/multigrid/mg_level_obj_01.cc | 1 - tests/multigrid/mg_output_dirichlet.cc | 2 +- tests/multigrid/mg_output_neumann.cc | 2 +- tests/multigrid/renumbering_01.cc | 2 +- tests/multigrid/renumbering_02.cc | 4 +-- tests/multigrid/renumbering_03.cc | 8 ++--- tests/multigrid/renumbering_04.cc | 4 +-- tests/multigrid/renumbering_05.cc | 1 - tests/multigrid/renumbering_06.cc | 1 - tests/multigrid/renumbering_07.cc | 1 - tests/multigrid/renumbering_08.cc | 1 - .../multigrid/sparse_matrix_collection_01.cc | 2 -- tests/multigrid/transfer_01.cc | 2 +- tests/multigrid/transfer_02.cc | 2 +- tests/multigrid/transfer_03.cc | 2 +- tests/multigrid/transfer_04.cc | 2 +- tests/multigrid/transfer_04a.cc | 2 +- tests/multigrid/transfer_04b.cc | 2 +- tests/multigrid/transfer_05.cc | 1 - tests/multigrid/transfer_06.cc | 1 - tests/multigrid/transfer_block.cc | 16 +++++----- tests/multigrid/transfer_block_select.cc | 10 +++--- tests/multigrid/transfer_compare_01.cc | 5 ++- tests/multigrid/transfer_prebuilt_01.cc | 2 +- tests/multigrid/transfer_prebuilt_02.cc | 2 +- tests/multigrid/transfer_prebuilt_03.cc | 2 +- tests/multigrid/transfer_select.cc | 4 +-- tests/multigrid/transfer_system_01.cc | 2 +- tests/multigrid/transfer_system_02.cc | 2 +- tests/multigrid/transfer_system_03.cc | 2 +- tests/multigrid/transfer_system_04.cc | 2 +- tests/multigrid/transfer_system_05.cc | 1 - .../multigrid/transfer_system_adaptive_01.cc | 2 +- .../multigrid/transfer_system_adaptive_02.cc | 2 +- .../multigrid/transfer_system_adaptive_03.cc | 2 +- .../multigrid/transfer_system_adaptive_04.cc | 2 +- .../multigrid/transfer_system_adaptive_05.cc | 2 +- .../multigrid/transfer_system_adaptive_06.cc | 2 +- .../multigrid/transfer_system_adaptive_07.cc | 2 +- .../multigrid/transfer_system_adaptive_08.cc | 2 +- .../multigrid/transfer_system_adaptive_09.cc | 1 - tests/numerics/derivative_approximation_02.cc | 25 ++++++++------- tests/numerics/derivative_approximation_03.cc | 25 ++++++++------- .../interpolate_to_different_mesh_01.cc | 30 ++++++++--------- .../interpolate_to_different_mesh_02.cc | 32 +++++++++---------- .../interpolate_to_different_mesh_03.cc | 12 +++---- .../interpolate_to_different_mesh_04.cc | 16 +++++----- tests/trilinos/mg_transfer_prebuilt_01.cc | 2 +- 82 files changed, 223 insertions(+), 280 deletions(-) diff --git a/tests/base/polynomials_bdm_01.cc b/tests/base/polynomials_bdm_01.cc index fee75eea17..a2e60998e8 100644 --- a/tests/base/polynomials_bdm_01.cc +++ b/tests/base/polynomials_bdm_01.cc @@ -25,8 +25,6 @@ #include "../tests.h" -using namespace std; - template void plot(const PolynomialsBDM &poly) diff --git a/tests/base/polynomials_bdm_02.cc b/tests/base/polynomials_bdm_02.cc index 16e88addb7..948323d7d3 100644 --- a/tests/base/polynomials_bdm_02.cc +++ b/tests/base/polynomials_bdm_02.cc @@ -25,8 +25,6 @@ #include "../tests.h" -using namespace std; - template void plot(const PolynomialsBDM &poly) diff --git a/tests/base/polynomials_rt.cc b/tests/base/polynomials_rt.cc index 836f8122fe..693aea4df0 100644 --- a/tests/base/polynomials_rt.cc +++ b/tests/base/polynomials_rt.cc @@ -24,8 +24,6 @@ #include "../tests.h" -using namespace std; - template void plot(const PolynomialsRaviartThomas &poly) diff --git a/tests/base/polynomials_tensor.cc b/tests/base/polynomials_tensor.cc index abc98635f7..db4b6be1e5 100644 --- a/tests/base/polynomials_tensor.cc +++ b/tests/base/polynomials_tensor.cc @@ -26,8 +26,6 @@ #include "../tests.h" -using namespace std; - template void check_point(const Point &x, const PolynomialType &p) diff --git a/tests/bits/count_dofs_per_component_hp_01.cc b/tests/bits/count_dofs_per_component_hp_01.cc index bb3f29548b..81ee3376a2 100644 --- a/tests/bits/count_dofs_per_component_hp_01.cc +++ b/tests/bits/count_dofs_per_component_hp_01.cc @@ -31,8 +31,6 @@ // for the hp-case -using namespace std; - template void test() diff --git a/tests/bits/count_dofs_per_component_hp_02.cc b/tests/bits/count_dofs_per_component_hp_02.cc index 02265cfd6c..b174d4952c 100644 --- a/tests/bits/count_dofs_per_component_hp_02.cc +++ b/tests/bits/count_dofs_per_component_hp_02.cc @@ -38,8 +38,6 @@ // collection has more than one element -using namespace std; - template void test() diff --git a/tests/bits/map_dofs_to_support_points_hp_01.cc b/tests/bits/map_dofs_to_support_points_hp_01.cc index 580f63ad08..014b9514b5 100644 --- a/tests/bits/map_dofs_to_support_points_hp_01.cc +++ b/tests/bits/map_dofs_to_support_points_hp_01.cc @@ -34,8 +34,6 @@ // for the hp-case -using namespace std; - template void test() diff --git a/tests/bits/map_dofs_to_support_points_hp_02.cc b/tests/bits/map_dofs_to_support_points_hp_02.cc index aedc353269..8b2ae44472 100644 --- a/tests/bits/map_dofs_to_support_points_hp_02.cc +++ b/tests/bits/map_dofs_to_support_points_hp_02.cc @@ -36,8 +36,6 @@ // on different cells. -using namespace std; - template void test() diff --git a/tests/codim_one/bem_integration.cc b/tests/codim_one/bem_integration.cc index 3b397343bb..b97d686a1e 100644 --- a/tests/codim_one/bem_integration.cc +++ b/tests/codim_one/bem_integration.cc @@ -57,9 +57,7 @@ #include #include -using namespace std; - -ofstream logfile("output"); +std::ofstream logfile("output"); template @@ -74,7 +72,7 @@ public: void compute_SD_integral_on_cell( - vector & dst, + std::vector & dst, typename DoFHandler::active_cell_iterator &cell, const Point & point); @@ -95,14 +93,14 @@ private: template <> LaplaceKernelIntegration<2>::LaplaceKernelIntegration() { - static FE_DGP<2, 3> fe(0); - vector> qps(5); + static FE_DGP<2, 3> fe(0); + std::vector> qps(5); qps[0] = Point<2>(0, 0); qps[1] = Point<2>(0, 1); qps[2] = Point<2>(1, 0); qps[3] = Point<2>(1, 1); qps[4] = Point<2>(.5, .5); - vector ws(5, 1.); + std::vector ws(5, 1.); static Quadrature<2> quadrature(qps, ws); fe_values = new FEValues<2, 3>( fe, quadrature, update_values | update_jacobians | update_normal_vectors); @@ -120,22 +118,22 @@ LaplaceKernelIntegration::~LaplaceKernelIntegration() template <> void LaplaceKernelIntegration<2>::compute_SD_integral_on_cell( - vector & dst, + std::vector & dst, DoFHandler<2, 3>::active_cell_iterator &cell, const Point<3> & point) { Assert(dst.size() == 2, ExcDimensionMismatch(dst.size(), 2)); fe_values->reinit(cell); - vector> jacobians = fe_values->get_jacobians(); - vector> normals = fe_values->get_normal_vectors(); + std::vector> jacobians = fe_values->get_jacobians(); + std::vector> normals = fe_values->get_normal_vectors(); Tensor<1, 3> n, n_c; Tensor<1, 3> r_c = point - cell->center(); n_c = normals[4]; - double rn_c = r_c * n_c; - vector i_S(4); - vector i_D(4); + double rn_c = r_c * n_c; + std::vector i_S(4); + std::vector i_D(4); for (unsigned int q_point = 0; q_point < 4; ++q_point) { const Tensor<1, 3> r = point - cell->vertex(q_point); @@ -198,7 +196,7 @@ integration(Point<3> point) DoFHandler<2, 3>::active_cell_iterator cell = dof_handler.begin_active(); LaplaceKernelIntegration<2> laplace; - vector integrals(2); + std::vector integrals(2); laplace.compute_SD_integral_on_cell(integrals, cell, point); return integrals[0]; } @@ -215,17 +213,17 @@ main() Point<3> point(.5, .5, 0); double true_result = -3.163145629 / numbers::PI; deallog << "Error on " << point << " : " << integration(point) - true_result - << endl; + << std::endl; point = Point<3>(3, 3, 0); true_result = -.2306783616; deallog << "Error on " << point << " : " << integration(point) - true_result - << endl; + << std::endl; point = Point<3>(1.5, .5, 0); true_result = -1.006860525; deallog << "Error on " << point << " : " << integration(point) - true_result - << endl; + << std::endl; return 0; } diff --git a/tests/codim_one/boundary_indicator_01.cc b/tests/codim_one/boundary_indicator_01.cc index 3228002318..8b7fb29c48 100644 --- a/tests/codim_one/boundary_indicator_01.cc +++ b/tests/codim_one/boundary_indicator_01.cc @@ -35,8 +35,6 @@ #include "../tests.h" -using namespace std; - template @@ -56,7 +54,7 @@ main() // Extract the boundary of 3/4 of a sphere { const int dim = 3; - deallog << "Testing hyper_cube in dim: " << dim << "..." << endl; + deallog << "Testing hyper_cube in dim: " << dim << "..." << std::endl; const SphericalManifold boundary_description; Triangulation volume_mesh; diff --git a/tests/codim_one/direction_flag_01.cc b/tests/codim_one/direction_flag_01.cc index cca0cf7399..98fbf83782 100644 --- a/tests/codim_one/direction_flag_01.cc +++ b/tests/codim_one/direction_flag_01.cc @@ -24,8 +24,6 @@ #include "../tests.h" -using namespace std; - void test() diff --git a/tests/codim_one/direction_flag_02.cc b/tests/codim_one/direction_flag_02.cc index d2a7a422cd..785ad3d5f8 100644 --- a/tests/codim_one/direction_flag_02.cc +++ b/tests/codim_one/direction_flag_02.cc @@ -24,8 +24,6 @@ #include "../tests.h" -using namespace std; - void test() diff --git a/tests/codim_one/direction_flag_03.cc b/tests/codim_one/direction_flag_03.cc index 9bb62f6af1..e14b26ca16 100644 --- a/tests/codim_one/direction_flag_03.cc +++ b/tests/codim_one/direction_flag_03.cc @@ -25,8 +25,6 @@ #include "../tests.h" -using namespace std; - template void diff --git a/tests/codim_one/extract_boundary_mesh_00.cc b/tests/codim_one/extract_boundary_mesh_00.cc index 078fc1be8a..55dad10897 100644 --- a/tests/codim_one/extract_boundary_mesh_00.cc +++ b/tests/codim_one/extract_boundary_mesh_00.cc @@ -32,8 +32,6 @@ #include "../tests.h" -using namespace std; - template void @@ -53,9 +51,9 @@ main() // Extract the whole boundary of a hyper-cube const int dim = 2; - deallog << "Testing hyper_cube in dim: " << dim << "..." << endl; - map::cell_iterator, - Triangulation::face_iterator> + deallog << "Testing hyper_cube in dim: " << dim << "..." << std::endl; + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; Triangulation volume_mesh; @@ -77,9 +75,9 @@ main() // Extract the whole boundary of a hyper-cube const int dim = 3; - deallog << "Testing hyper_cube in dim: " << dim << "..." << endl; - map::cell_iterator, - Triangulation::face_iterator> + deallog << "Testing hyper_cube in dim: " << dim << "..." << std::endl; + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; Triangulation volume_mesh; @@ -102,10 +100,10 @@ main() // Extract a piece of the boundary of a hyper-cube const int dim = 3; - deallog << "Testing hyper_cube in dim: " << dim << "..." << endl; + deallog << "Testing hyper_cube in dim: " << dim << "..." << std::endl; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; Triangulation volume_mesh; @@ -115,8 +113,8 @@ main() save_mesh(volume_mesh); - Triangulation boundary_mesh; - const set boundary_ids = {0}; + Triangulation boundary_mesh; + const std::set boundary_ids = {0}; surface_to_volume_mapping = GridGenerator::extract_boundary_mesh(volume_mesh, diff --git a/tests/codim_one/extract_boundary_mesh_01.cc b/tests/codim_one/extract_boundary_mesh_01.cc index b348ce8dbf..836e73ee5b 100644 --- a/tests/codim_one/extract_boundary_mesh_01.cc +++ b/tests/codim_one/extract_boundary_mesh_01.cc @@ -34,15 +34,13 @@ #include "../tests.h" -using namespace std; - template bool test_vertices_orientation( const Triangulation &boundary_mesh, - map::cell_iterator, - typename Triangulation::face_iterator> + std::map::cell_iterator, + typename Triangulation::face_iterator> & surface_to_volume_mapping, const int verbosity = 1) { @@ -55,13 +53,13 @@ test_vertices_orientation( if (verbosity > 1) { - deallog << "The last column should be 0" << endl; + deallog << "The last column should be 0" << std::endl; deallog << "Vol faces" << "\t\t" << "Surf cell" << "\t\t" - << "Distance" << endl - << endl; + << "Distance" << std::endl + << std::endl; } for (; cell != endc; ++cell) @@ -73,7 +71,7 @@ test_vertices_orientation( if (verbosity > 1) { deallog << face->center() << "\t\t"; - deallog << cell->center() << "\t\t\t" << diff.square() << endl; + deallog << cell->center() << "\t\t\t" << diff.square() << std::endl; } if (diff.square() > 0) { @@ -81,7 +79,7 @@ test_vertices_orientation( break; } if (verbosity > 1) - deallog << endl; + deallog << std::endl; } return success; } @@ -105,10 +103,10 @@ main() // Extract the boundary of a hyper-sphere const int dim = 3; - deallog << "Testing hyper_ball in dim: " << dim << "..." << endl; + deallog << "Testing hyper_ball in dim: " << dim << "..." << std::endl; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_ball(volume_mesh); diff --git a/tests/codim_one/extract_boundary_mesh_02.cc b/tests/codim_one/extract_boundary_mesh_02.cc index c31bb631e5..f77a1145a9 100644 --- a/tests/codim_one/extract_boundary_mesh_02.cc +++ b/tests/codim_one/extract_boundary_mesh_02.cc @@ -34,15 +34,13 @@ #include "../tests.h" -using namespace std; - template void test_vertices_orientation( const Triangulation &boundary_mesh, - map::cell_iterator, - typename Triangulation::face_iterator> + std::map::cell_iterator, + typename Triangulation::face_iterator> &surface_to_volume_mapping) { typename Triangulation::active_cell_iterator @@ -88,10 +86,10 @@ main() // Extract the boundary of a hyper-sphere const int dim = 3; - deallog << "Testing hyper_cube in dim: " << dim << "..." << endl; + deallog << "Testing hyper_cube in dim: " << dim << "..." << std::endl; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; const SphericalManifold boundary_description; Triangulation volume_mesh; diff --git a/tests/codim_one/extract_boundary_mesh_03.cc b/tests/codim_one/extract_boundary_mesh_03.cc index 45de924f93..11d0d84e6f 100644 --- a/tests/codim_one/extract_boundary_mesh_03.cc +++ b/tests/codim_one/extract_boundary_mesh_03.cc @@ -32,15 +32,13 @@ #include "../tests.h" -using namespace std; - template void test_vertices_orientation( const Triangulation &boundary_mesh, - map::cell_iterator, - typename Triangulation::face_iterator> + std::map::cell_iterator, + typename Triangulation::face_iterator> &surface_to_volume_mapping) { typename Triangulation::active_cell_iterator @@ -98,10 +96,10 @@ main() // Extract the boundary of a hyper-sphere const int dim = 3; - deallog << "Testing hyper_ball in dim: " << dim << "..." << endl; + deallog << "Testing hyper_ball in dim: " << dim << "..." << std::endl; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; const SphericalManifold boundary_description; Triangulation volume_mesh; diff --git a/tests/codim_one/extract_boundary_mesh_04.cc b/tests/codim_one/extract_boundary_mesh_04.cc index 738254a787..b9de1824c0 100644 --- a/tests/codim_one/extract_boundary_mesh_04.cc +++ b/tests/codim_one/extract_boundary_mesh_04.cc @@ -32,15 +32,13 @@ #include "../tests.h" -using namespace std; - template void test_vertices_orientation( const Triangulation &boundary_mesh, - map::cell_iterator, - typename Triangulation::face_iterator> + std::map::cell_iterator, + typename Triangulation::face_iterator> &surface_to_volume_mapping) { typename Triangulation::active_cell_iterator @@ -98,10 +96,10 @@ main() // Extract the boundary of a hyper-sphere const int dim = 3; - deallog << "Testing hyper_cube in dim: " << dim << "..." << endl; + deallog << "Testing hyper_cube in dim: " << dim << "..." << std::endl; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; const SphericalManifold boundary_description; Triangulation volume_mesh; @@ -123,7 +121,7 @@ main() boundary_mesh.set_manifold(1, surface_description); boundary_mesh.set_manifold(0, surface_description); - set boundary_ids; + std::set boundary_ids; boundary_ids.insert(1); surface_to_volume_mapping = diff --git a/tests/codim_one/extract_boundary_mesh_05.cc b/tests/codim_one/extract_boundary_mesh_05.cc index 403e8f17ff..e187246d81 100644 --- a/tests/codim_one/extract_boundary_mesh_05.cc +++ b/tests/codim_one/extract_boundary_mesh_05.cc @@ -29,8 +29,6 @@ #include "../tests.h" -using namespace std; - void test() @@ -38,8 +36,8 @@ test() const unsigned int dim = 2; Triangulation boundary_mesh; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); diff --git a/tests/codim_one/extract_boundary_mesh_06.cc b/tests/codim_one/extract_boundary_mesh_06.cc index 4f3abf5128..3f8bac1361 100644 --- a/tests/codim_one/extract_boundary_mesh_06.cc +++ b/tests/codim_one/extract_boundary_mesh_06.cc @@ -28,8 +28,6 @@ #include "../tests.h" -using namespace std; - void test() @@ -38,8 +36,8 @@ test() const unsigned int dim = spacedim - 1; Triangulation boundary_mesh; - map::cell_iterator, - Triangulation::face_iterator> + std::map::cell_iterator, + Triangulation::face_iterator> surface_to_volume_mapping; Triangulation volume_mesh; GridGenerator::hyper_cube(volume_mesh); diff --git a/tests/codim_one/integrate_log_2.cc b/tests/codim_one/integrate_log_2.cc index 5656b63f8d..df95569105 100644 --- a/tests/codim_one/integrate_log_2.cc +++ b/tests/codim_one/integrate_log_2.cc @@ -43,8 +43,6 @@ #include -using namespace std; - // Returns the following integral: /int_0^1 x^N * ln(|x-point|/alpha) dx double log_integral(const unsigned int N, const double point, const double alpha); @@ -58,7 +56,7 @@ main() deallog << std::setprecision(10); - vector> origins; + std::vector> origins; origins.push_back(Point<1>()); origins.push_back(Point<1>(1.)); origins.push_back(Point<1>(1. / 3.)); @@ -66,7 +64,7 @@ main() origins.push_back(Point<1>(1. / 5.)); origins.push_back(Point<1>(3. / 5.)); - vector alphas; + std::vector alphas; alphas.push_back(1.); alphas.push_back(1. / 3.); alphas.push_back(3. / 2.); @@ -84,10 +82,10 @@ main() exact_integral = log_integral(power, origins[nos][0], alphas[nas]); deallog << "==================================================" - << endl; + << std::endl; deallog << "int_0^1 x^" << power << " ln(|x-" << origins[nos] << "|/" << alphas[nas] << ") = " << exact_integral - << endl; + << std::endl; for (unsigned int nq = 2; nq < 13; ++nq) { QGaussLogR<1> quad(nq, origins[nos], alphas[nas]); @@ -127,11 +125,11 @@ main() deallog << ", difference between factored and unfactored: " << std::abs(approx_integral - approx_integral_factored); - deallog << endl; + deallog << std::endl; } } deallog << "==================================================" - << endl; + << std::endl; } } } diff --git a/tests/codim_one/integrate_one_over_r.cc b/tests/codim_one/integrate_one_over_r.cc index c87374d3df..b01d7764a7 100644 --- a/tests/codim_one/integrate_one_over_r.cc +++ b/tests/codim_one/integrate_one_over_r.cc @@ -32,9 +32,7 @@ #include "../base/simplex.h" -using namespace std; - -ofstream logfile("output"); +std::ofstream logfile("output"); int main() @@ -42,26 +40,28 @@ main() deallog.attach(logfile); deallog << std::fixed; - deallog << endl - << "Calculation of the integral of f(x,y)*1/R on [0,1]x[0,1]" << endl + deallog << std::endl + << "Calculation of the integral of f(x,y)*1/R on [0,1]x[0,1]" + << std::endl << "for f(x,y) = x^i y^j, with i,j ranging from 0 to 5, and R being" - << endl - << "the distance from (x,y) to four vertices of the square." << endl - << endl; + << std::endl + << "the distance from (x,y) to four vertices of the square." + << std::endl + << std::endl; double eps = 1e-10; for (unsigned int m = 1; m < 7; ++m) { deallog << " =========Quadrature Order: " << m - << " =============================== " << endl; + << " =============================== " << std::endl; deallog << " ============================================================ " - << endl; + << std::endl; for (unsigned int index = 0; index < 4; ++index) { deallog << " ===============Vertex Index: " << index - << " ============================= " << endl; + << " ============================= " << std::endl; QGaussOneOverR<2> quad(m, index); QGaussOneOverR<2> quad_de(m, index, true); for (unsigned int i = 0; i < 6; ++i) @@ -90,11 +90,11 @@ main() deallog << "f(x,y) = x^" << i << " y^" << j << ", Error = " << approx_integral - exact_integral; if (std::abs(approx_integral - approx_integral_2) < eps) - deallog << endl; + deallog << std::endl; else deallog << ", desing: " << approx_integral_2 - exact_integral - << endl; + << std::endl; } } } diff --git a/tests/codim_one/integrate_one_over_r_telles.cc b/tests/codim_one/integrate_one_over_r_telles.cc index e7945c0a55..75541b1689 100644 --- a/tests/codim_one/integrate_one_over_r_telles.cc +++ b/tests/codim_one/integrate_one_over_r_telles.cc @@ -29,20 +29,20 @@ #include "../base/simplex.h" -using namespace std; - int main() { initlog(); deallog << std::fixed; - deallog << endl - << "Calculation of the integral of f(x,y)*1/R on [0,1]x[0,1]" << endl + deallog << std::endl + << "Calculation of the integral of f(x,y)*1/R on [0,1]x[0,1]" + << std::endl << "for f(x,y) = x^i y^j, with i,j ranging from 0 to 5, and R being" - << endl - << "the distance from (x,y) to four vertices of the square." << endl - << endl; + << std::endl + << "the distance from (x,y) to four vertices of the square." + << std::endl + << std::endl; std::vector> vertices = FE_Q<2>(1).get_unit_support_points(); @@ -50,14 +50,14 @@ main() for (unsigned int m = 1; m < 7; ++m) { deallog << " =========Quadrature Order: " << m - << " =============================== " << endl; + << " =============================== " << std::endl; deallog << " ============================================================ " - << endl; + << std::endl; unsigned int index = 0; { deallog << " ===============Vertex: " << vertices[index] - << " ============================= " << endl; + << " ============================= " << std::endl; QTelles<2> quad(m, vertices[index]); QGaussOneOverR<2> quad2(m, vertices[index]); diff --git a/tests/codim_one/integrate_one_over_r_telles_middle.cc b/tests/codim_one/integrate_one_over_r_telles_middle.cc index ad6efc1127..1f3e262338 100644 --- a/tests/codim_one/integrate_one_over_r_telles_middle.cc +++ b/tests/codim_one/integrate_one_over_r_telles_middle.cc @@ -29,8 +29,6 @@ #include "../base/simplex.h" -using namespace std; - // We test the integration of singular kernels with a singularity of kind 1/R // We multiply this function with a polynomial up to degree 6. @@ -40,24 +38,25 @@ main() initlog(); deallog << std::fixed; - deallog << endl - << "Calculation of the integral of f(x,y)*1/R on [0,1]x[0,1]" << endl + deallog << std::endl + << "Calculation of the integral of f(x,y)*1/R on [0,1]x[0,1]" + << std::endl << "for f(x,y) = x^i y^j, with i,j ranging from 0 to 5, and R being" - << endl - << "the distance from (x,y) to [0.5,0.5]." << endl - << endl; + << std::endl + << "the distance from (x,y) to [0.5,0.5]." << std::endl + << std::endl; Point<2> center(0.5, 0.5); for (unsigned int m = 1; m < 6; ++m) { deallog << " =========Quadrature Order: " << m - << " =============================== " << endl; + << " =============================== " << std::endl; deallog << " ============================================================ " - << endl; + << std::endl; deallog << " ===============Vertex: " << center - << " ============================= " << endl; + << " ============================= " << std::endl; QTelles<2> quad(4 * m, center); QGaussOneOverR<2> quad_2(m, center, true); diff --git a/tests/grid/mesh_3d_22.cc b/tests/grid/mesh_3d_22.cc index 4d9a8b63de..b27ce3632f 100644 --- a/tests/grid/mesh_3d_22.cc +++ b/tests/grid/mesh_3d_22.cc @@ -48,8 +48,6 @@ #include "../tests.h" -using namespace std; - template class F : public Function { diff --git a/tests/grid/mesh_3d_25.cc b/tests/grid/mesh_3d_25.cc index e354fde6ea..2fbf960293 100644 --- a/tests/grid/mesh_3d_25.cc +++ b/tests/grid/mesh_3d_25.cc @@ -45,8 +45,6 @@ #include "../grid/mesh_3d.h" -using namespace std; - template class F : public Function { diff --git a/tests/grid/mesh_3d_26.cc b/tests/grid/mesh_3d_26.cc index 13c89c2fe5..f83fc1099a 100644 --- a/tests/grid/mesh_3d_26.cc +++ b/tests/grid/mesh_3d_26.cc @@ -44,8 +44,6 @@ #include "../tests.h" -using namespace std; - template class F : public Function { diff --git a/tests/multigrid/boundary_01.cc b/tests/multigrid/boundary_01.cc index e8b6f73157..2ead93a2e8 100644 --- a/tests/multigrid/boundary_01.cc +++ b/tests/multigrid/boundary_01.cc @@ -39,7 +39,7 @@ #include "../tests.h" -using namespace std; + void log_vector(const std::vector> &count) diff --git a/tests/multigrid/constrained_dofs_01.cc b/tests/multigrid/constrained_dofs_01.cc index c82b359188..4029cadc89 100644 --- a/tests/multigrid/constrained_dofs_01.cc +++ b/tests/multigrid/constrained_dofs_01.cc @@ -42,7 +42,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/constrained_dofs_02.cc b/tests/multigrid/constrained_dofs_02.cc index 2881ea85f0..16a12731b0 100644 --- a/tests/multigrid/constrained_dofs_02.cc +++ b/tests/multigrid/constrained_dofs_02.cc @@ -42,7 +42,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/constrained_dofs_03.cc b/tests/multigrid/constrained_dofs_03.cc index 77aab997d7..e0db3b31c6 100644 --- a/tests/multigrid/constrained_dofs_03.cc +++ b/tests/multigrid/constrained_dofs_03.cc @@ -42,7 +42,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/count_01.cc b/tests/multigrid/count_01.cc index bef29b0ea6..58c84a7186 100644 --- a/tests/multigrid/count_01.cc +++ b/tests/multigrid/count_01.cc @@ -35,7 +35,7 @@ #include "../tests.h" -using namespace std; + void log_vector(const std::vector> &count) diff --git a/tests/multigrid/dof_01.cc b/tests/multigrid/dof_01.cc index 716cf1af4f..44974152bc 100644 --- a/tests/multigrid/dof_01.cc +++ b/tests/multigrid/dof_01.cc @@ -39,7 +39,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/dof_02.cc b/tests/multigrid/dof_02.cc index d1f46435ed..7bbdd8aa43 100644 --- a/tests/multigrid/dof_02.cc +++ b/tests/multigrid/dof_02.cc @@ -39,7 +39,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/mg_level_obj_01.cc b/tests/multigrid/mg_level_obj_01.cc index e622cab0f1..ca29fb229b 100644 --- a/tests/multigrid/mg_level_obj_01.cc +++ b/tests/multigrid/mg_level_obj_01.cc @@ -22,7 +22,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/mg_output_dirichlet.cc b/tests/multigrid/mg_output_dirichlet.cc index 8de985f29d..b3b4ca2e4c 100644 --- a/tests/multigrid/mg_output_dirichlet.cc +++ b/tests/multigrid/mg_output_dirichlet.cc @@ -48,7 +48,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/mg_output_neumann.cc b/tests/multigrid/mg_output_neumann.cc index 93c8e69289..73871ee6a5 100644 --- a/tests/multigrid/mg_output_neumann.cc +++ b/tests/multigrid/mg_output_neumann.cc @@ -48,7 +48,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/renumbering_01.cc b/tests/multigrid/renumbering_01.cc index bcfa26b247..07ad682628 100644 --- a/tests/multigrid/renumbering_01.cc +++ b/tests/multigrid/renumbering_01.cc @@ -35,7 +35,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/renumbering_02.cc b/tests/multigrid/renumbering_02.cc index 71546bf283..66fd170909 100644 --- a/tests/multigrid/renumbering_02.cc +++ b/tests/multigrid/renumbering_02.cc @@ -36,7 +36,7 @@ #include "../tests.h" -using namespace std; + template void @@ -73,5 +73,5 @@ main() check<2>(); check<3>(); - deallog << "OK" << endl; + deallog << "OK" << std::endl; } diff --git a/tests/multigrid/renumbering_03.cc b/tests/multigrid/renumbering_03.cc index 80b35202f7..8fe14cd417 100644 --- a/tests/multigrid/renumbering_03.cc +++ b/tests/multigrid/renumbering_03.cc @@ -38,7 +38,7 @@ #include "../tests.h" -using namespace std; + template void @@ -62,8 +62,8 @@ check() mg_dof_handler.distribute_mg_dofs(); for (unsigned int level = 0; level < tria.n_levels(); ++level) { - const types::global_dof_index n_dofs = mg_dof_handler.n_dofs(level); - vector new_numbers(n_dofs); + const types::global_dof_index n_dofs = mg_dof_handler.n_dofs(level); + std::vector new_numbers(n_dofs); for (unsigned int i = 0; i < n_dofs; ++i) new_numbers[i] = n_dofs - 1 - i; @@ -80,5 +80,5 @@ main() check<2>(); check<3>(); - deallog << "OK" << endl; + deallog << "OK" << std::endl; } diff --git a/tests/multigrid/renumbering_04.cc b/tests/multigrid/renumbering_04.cc index e01915dd1c..6eef56b077 100644 --- a/tests/multigrid/renumbering_04.cc +++ b/tests/multigrid/renumbering_04.cc @@ -35,7 +35,7 @@ #include "../tests.h" -using namespace std; + template void @@ -125,5 +125,5 @@ main() check<3>(fe); } - deallog << "OK" << endl; + deallog << "OK" << std::endl; } diff --git a/tests/multigrid/renumbering_05.cc b/tests/multigrid/renumbering_05.cc index cee50d2b95..6fb39bb5ef 100644 --- a/tests/multigrid/renumbering_05.cc +++ b/tests/multigrid/renumbering_05.cc @@ -30,7 +30,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/renumbering_06.cc b/tests/multigrid/renumbering_06.cc index e0fa84be43..40765a0d27 100644 --- a/tests/multigrid/renumbering_06.cc +++ b/tests/multigrid/renumbering_06.cc @@ -37,7 +37,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/renumbering_07.cc b/tests/multigrid/renumbering_07.cc index 6ce9cb2ac0..a328fae21d 100644 --- a/tests/multigrid/renumbering_07.cc +++ b/tests/multigrid/renumbering_07.cc @@ -37,7 +37,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/renumbering_08.cc b/tests/multigrid/renumbering_08.cc index ac572e514c..229c9d9ef7 100644 --- a/tests/multigrid/renumbering_08.cc +++ b/tests/multigrid/renumbering_08.cc @@ -30,7 +30,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/sparse_matrix_collection_01.cc b/tests/multigrid/sparse_matrix_collection_01.cc index 551cd02bdd..d980d1ea35 100644 --- a/tests/multigrid/sparse_matrix_collection_01.cc +++ b/tests/multigrid/sparse_matrix_collection_01.cc @@ -19,8 +19,6 @@ #include "../tests.h" -using namespace std; - int diff --git a/tests/multigrid/transfer_01.cc b/tests/multigrid/transfer_01.cc index 32b048fffa..8cf981609f 100644 --- a/tests/multigrid/transfer_01.cc +++ b/tests/multigrid/transfer_01.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_02.cc b/tests/multigrid/transfer_02.cc index e74411e310..16df3c61be 100644 --- a/tests/multigrid/transfer_02.cc +++ b/tests/multigrid/transfer_02.cc @@ -44,7 +44,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_03.cc b/tests/multigrid/transfer_03.cc index bd9b8411c6..8d02a395bc 100644 --- a/tests/multigrid/transfer_03.cc +++ b/tests/multigrid/transfer_03.cc @@ -46,7 +46,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_04.cc b/tests/multigrid/transfer_04.cc index 9efc6df25a..fc378eb63f 100644 --- a/tests/multigrid/transfer_04.cc +++ b/tests/multigrid/transfer_04.cc @@ -46,7 +46,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_04a.cc b/tests/multigrid/transfer_04a.cc index 80e48b8201..644ee252b8 100644 --- a/tests/multigrid/transfer_04a.cc +++ b/tests/multigrid/transfer_04a.cc @@ -46,7 +46,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_04b.cc b/tests/multigrid/transfer_04b.cc index 9f107b365c..dcd63c8540 100644 --- a/tests/multigrid/transfer_04b.cc +++ b/tests/multigrid/transfer_04b.cc @@ -46,7 +46,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_05.cc b/tests/multigrid/transfer_05.cc index 6127a6a9b8..f22cbf60fa 100644 --- a/tests/multigrid/transfer_05.cc +++ b/tests/multigrid/transfer_05.cc @@ -39,7 +39,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/transfer_06.cc b/tests/multigrid/transfer_06.cc index 2d1edd53f2..d04459a5fd 100644 --- a/tests/multigrid/transfer_06.cc +++ b/tests/multigrid/transfer_06.cc @@ -40,7 +40,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/transfer_block.cc b/tests/multigrid/transfer_block.cc index 1bcc426558..4f3b3e3610 100644 --- a/tests/multigrid/transfer_block.cc +++ b/tests/multigrid/transfer_block.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void @@ -82,9 +82,9 @@ reinit_vector_by_blocks( template void -check_block(const FiniteElement &fe, - const vector & selected, - const vector & factors) +check_block(const FiniteElement & fe, + const std::vector & selected, + const std::vector &factors) { deallog << fe.get_name() << std::endl << "selected "; for (unsigned int i = 0; i < selected.size(); ++i) @@ -100,7 +100,7 @@ check_block(const FiniteElement &fe, mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(); DoFRenumbering::component_wise(mgdof); - const vector ndofs = + const std::vector ndofs = DoFTools::count_dofs_per_fe_block(mgdof); Assert(ndofs.size() == fe.n_blocks(), ExcInternalError()); @@ -166,7 +166,7 @@ check_block(const FiniteElement &fe, deallog << std::endl; // Check copy to mg and back - // Fill a global vector by counting + // Fill a global std::vector by counting // from one up BlockVector v; v.reinit(ndofs); @@ -183,7 +183,7 @@ check_block(const FiniteElement &fe, deallog << std::endl; // Now do the opposite: fill a - // multigrid vector counting the + // multigrid std::vector counting the // dofs and see where the numbers go for (unsigned int i = 0; i < u[2].size(); ++i) u[2](i) = i + 1; @@ -214,7 +214,7 @@ main() FESystem<2> fe0(rt1, 1, q1, 1); FESystem<2> fe1(rt0, 2, q0, 2); - vector s1(2, true); + std::vector s1(2, true); deallog << "All" << std::endl; check_block(fe0, s1, factors); diff --git a/tests/multigrid/transfer_block_select.cc b/tests/multigrid/transfer_block_select.cc index 3264d1adcb..0d526e6d38 100644 --- a/tests/multigrid/transfer_block_select.cc +++ b/tests/multigrid/transfer_block_select.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void @@ -86,7 +86,7 @@ check_select(const FiniteElement &fe, unsigned int selected) mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(); DoFRenumbering::component_wise(mgdof); - const vector ndofs = + const std::vector ndofs = DoFTools::count_dofs_per_fe_block(mgdof); for (unsigned int l = 0; l < tr.n_levels(); ++l) @@ -127,7 +127,7 @@ check_select(const FiniteElement &fe, unsigned int selected) deallog << "u0\t" << (int)(u[0] * u[0] + .4) << std::endl << "u1\t" << (int)(u[1] * u[1] + .4) << std::endl << "u2\t" << (int)(u[2] * u[2] + .4) << std::endl; - // Now restrict the same vectors. + // Now restrict the same std::vectors. u[1] = 0.; u[0] = 0.; transfer.restrict_and_add(2, u[1], u[2]); @@ -136,7 +136,7 @@ check_select(const FiniteElement &fe, unsigned int selected) << "u0\t" << (int)(u[0] * u[0] + .5) << std::endl; // Check copy to mg and back - // Fill a global vector by counting + // Fill a global std::vector by counting // from one up BlockVector v; v.reinit(ndofs); @@ -153,7 +153,7 @@ check_select(const FiniteElement &fe, unsigned int selected) deallog << std::endl; // Now do the opposite: fill a - // multigrid vector counting the + // multigrid std::vector counting the // dofs and see where the numbers go for (unsigned int i = 0; i < u[2].size(); ++i) u[2](i) = i + 1; diff --git a/tests/multigrid/transfer_compare_01.cc b/tests/multigrid/transfer_compare_01.cc index f3d126c593..ef2c667d1a 100644 --- a/tests/multigrid/transfer_compare_01.cc +++ b/tests/multigrid/transfer_compare_01.cc @@ -42,7 +42,6 @@ #include "../tests.h" -using namespace std; template @@ -144,7 +143,7 @@ check_block(const FiniteElement &fe) } // Store sizes - const vector ndofs = + const std::vector ndofs = DoFTools::count_dofs_per_fe_block(mgdof); std::vector> mg_ndofs( mgdof.get_triangulation().n_levels(), @@ -244,7 +243,7 @@ check_block(const FiniteElement &fe) } deallog << std::endl << "copy from mg "; // Now do the opposite: fill a - // multigrid vector counting the + // multigrid std::vector counting the // dofs and see where the numbers go u = 0.; for (unsigned int i = 0; i < v[2].size(); ++i) diff --git a/tests/multigrid/transfer_prebuilt_01.cc b/tests/multigrid/transfer_prebuilt_01.cc index 844eb7d78f..4616007532 100644 --- a/tests/multigrid/transfer_prebuilt_01.cc +++ b/tests/multigrid/transfer_prebuilt_01.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_prebuilt_02.cc b/tests/multigrid/transfer_prebuilt_02.cc index 39d1451919..8d852fb566 100644 --- a/tests/multigrid/transfer_prebuilt_02.cc +++ b/tests/multigrid/transfer_prebuilt_02.cc @@ -42,7 +42,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_prebuilt_03.cc b/tests/multigrid/transfer_prebuilt_03.cc index a478eb2837..2f0e00456e 100644 --- a/tests/multigrid/transfer_prebuilt_03.cc +++ b/tests/multigrid/transfer_prebuilt_03.cc @@ -43,7 +43,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_select.cc b/tests/multigrid/transfer_select.cc index c4b32870c3..38dd30bc3a 100644 --- a/tests/multigrid/transfer_select.cc +++ b/tests/multigrid/transfer_select.cc @@ -38,7 +38,7 @@ #include "../tests.h" -using namespace std; + template void @@ -59,7 +59,7 @@ check_select(const FiniteElement &fe, mgdof.distribute_dofs(fe); mgdof.distribute_mg_dofs(); DoFRenumbering::component_wise(mgdof, target_component); - const vector ndofs = + const std::vector ndofs = DoFTools::count_dofs_per_fe_component(mgdof, true, target_component); Assert(ndofs.size() == *std::max_element(target_component.begin(), target_component.end()) + diff --git a/tests/multigrid/transfer_system_01.cc b/tests/multigrid/transfer_system_01.cc index c71ea7e252..53029cf2be 100644 --- a/tests/multigrid/transfer_system_01.cc +++ b/tests/multigrid/transfer_system_01.cc @@ -37,7 +37,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_02.cc b/tests/multigrid/transfer_system_02.cc index 8464bccc7a..4db0290432 100644 --- a/tests/multigrid/transfer_system_02.cc +++ b/tests/multigrid/transfer_system_02.cc @@ -38,7 +38,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_03.cc b/tests/multigrid/transfer_system_03.cc index 528f92357c..6177c670d1 100644 --- a/tests/multigrid/transfer_system_03.cc +++ b/tests/multigrid/transfer_system_03.cc @@ -39,7 +39,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_04.cc b/tests/multigrid/transfer_system_04.cc index 70d05e2d99..60327246a7 100644 --- a/tests/multigrid/transfer_system_04.cc +++ b/tests/multigrid/transfer_system_04.cc @@ -39,7 +39,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_05.cc b/tests/multigrid/transfer_system_05.cc index cd385a2fb3..dca2411dcb 100644 --- a/tests/multigrid/transfer_system_05.cc +++ b/tests/multigrid/transfer_system_05.cc @@ -38,7 +38,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/multigrid/transfer_system_adaptive_01.cc b/tests/multigrid/transfer_system_adaptive_01.cc index 1f4237bb28..88b191019e 100644 --- a/tests/multigrid/transfer_system_adaptive_01.cc +++ b/tests/multigrid/transfer_system_adaptive_01.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_02.cc b/tests/multigrid/transfer_system_adaptive_02.cc index 7cabda4f3f..e4ca2f0076 100644 --- a/tests/multigrid/transfer_system_adaptive_02.cc +++ b/tests/multigrid/transfer_system_adaptive_02.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_03.cc b/tests/multigrid/transfer_system_adaptive_03.cc index 1ba7efec90..7bdb78b343 100644 --- a/tests/multigrid/transfer_system_adaptive_03.cc +++ b/tests/multigrid/transfer_system_adaptive_03.cc @@ -41,7 +41,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_04.cc b/tests/multigrid/transfer_system_adaptive_04.cc index 8088753f34..a0677c5354 100644 --- a/tests/multigrid/transfer_system_adaptive_04.cc +++ b/tests/multigrid/transfer_system_adaptive_04.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_05.cc b/tests/multigrid/transfer_system_adaptive_05.cc index 6ff42903ef..4b394c4b49 100644 --- a/tests/multigrid/transfer_system_adaptive_05.cc +++ b/tests/multigrid/transfer_system_adaptive_05.cc @@ -42,7 +42,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_06.cc b/tests/multigrid/transfer_system_adaptive_06.cc index 51df602298..b5a9f7f132 100644 --- a/tests/multigrid/transfer_system_adaptive_06.cc +++ b/tests/multigrid/transfer_system_adaptive_06.cc @@ -40,7 +40,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_07.cc b/tests/multigrid/transfer_system_adaptive_07.cc index 1a640522fd..a1cd397031 100644 --- a/tests/multigrid/transfer_system_adaptive_07.cc +++ b/tests/multigrid/transfer_system_adaptive_07.cc @@ -42,7 +42,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_08.cc b/tests/multigrid/transfer_system_adaptive_08.cc index 6bdb0c6784..803187909d 100644 --- a/tests/multigrid/transfer_system_adaptive_08.cc +++ b/tests/multigrid/transfer_system_adaptive_08.cc @@ -41,7 +41,7 @@ #include "../tests.h" -using namespace std; + template void diff --git a/tests/multigrid/transfer_system_adaptive_09.cc b/tests/multigrid/transfer_system_adaptive_09.cc index a41074a63b..8ecfb37470 100644 --- a/tests/multigrid/transfer_system_adaptive_09.cc +++ b/tests/multigrid/transfer_system_adaptive_09.cc @@ -41,7 +41,6 @@ #include "../tests.h" -using namespace std; template diff --git a/tests/numerics/derivative_approximation_02.cc b/tests/numerics/derivative_approximation_02.cc index 55944d4551..66eb132689 100644 --- a/tests/numerics/derivative_approximation_02.cc +++ b/tests/numerics/derivative_approximation_02.cc @@ -40,7 +40,7 @@ #include #include "../tests.h" -using namespace std; + const double a = 4, b = 5; @@ -213,19 +213,20 @@ derivatives() double ex_normthird = DerivativeApproximation::derivative_norm(ex_third); // output of all values for comparison - deallog << "cell " << cell << endl; - deallog << "approx. gradient: " << grad << " , norm: " << normgrad << endl + deallog << "cell " << cell << std::endl; + deallog << "approx. gradient: " << grad << " , norm: " << normgrad + << std::endl << " exact gradient: " << ex_grad << " , norm: " << ex_normgrad - << endl; + << std::endl; deallog << "approx. second derivative (hessian): " << second - << " , norm: " << normsecond << endl + << " , norm: " << normsecond << std::endl << " exact second derivative (hessian): " << ex_second - << " , norm: " << ex_normsecond << endl; + << " , norm: " << ex_normsecond << std::endl; deallog << "approx. third derivative: " << third - << " , norm: " << normthird << endl + << " , norm: " << normthird << std::endl << " exact third derivative: " << ex_third - << " , norm: " << ex_normthird << endl - << endl; + << " , norm: " << ex_normthird << std::endl + << std::endl; } } @@ -235,8 +236,10 @@ main() { initlog(); - deallog << "------------ 2D ------------" << endl << endl; + deallog << "------------ 2D ------------" << std::endl << std::endl; derivatives<2>(); - deallog << endl << "------------ 3D ------------" << endl << endl; + deallog << std::endl + << "------------ 3D ------------" << std::endl + << std::endl; derivatives<3>(); } diff --git a/tests/numerics/derivative_approximation_03.cc b/tests/numerics/derivative_approximation_03.cc index 851ccce36f..602329111d 100644 --- a/tests/numerics/derivative_approximation_03.cc +++ b/tests/numerics/derivative_approximation_03.cc @@ -39,7 +39,7 @@ #include #include "../tests.h" -using namespace std; + const double a = 4, b = 5; @@ -211,19 +211,20 @@ derivatives() double ex_normthird = DerivativeApproximation::derivative_norm(ex_third); // output of all values for comparison - deallog << "cell " << cell << endl; - deallog << "approx. gradient: " << grad << " , norm: " << normgrad << endl + deallog << "cell " << cell << std::endl; + deallog << "approx. gradient: " << grad << " , norm: " << normgrad + << std::endl << " exact gradient: " << ex_grad << " , norm: " << ex_normgrad - << endl; + << std::endl; deallog << "approx. second derivative (hessian): " << second - << " , norm: " << normsecond << endl + << " , norm: " << normsecond << std::endl << " exact second derivative (hessian): " << ex_second - << " , norm: " << ex_normsecond << endl; + << " , norm: " << ex_normsecond << std::endl; deallog << "approx. third derivative: " << third - << " , norm: " << normthird << endl + << " , norm: " << normthird << std::endl << " exact third derivative: " << ex_third - << " , norm: " << ex_normthird << endl - << endl; + << " , norm: " << ex_normthird << std::endl + << std::endl; } } @@ -233,8 +234,10 @@ main() { initlog(); - deallog << "------------ 2D ------------" << endl << endl; + deallog << "------------ 2D ------------" << std::endl << std::endl; derivatives<2>(); - deallog << endl << "------------ 3D ------------" << endl << endl; + deallog << std::endl + << "------------ 3D ------------" << std::endl + << std::endl; derivatives<3>(); } diff --git a/tests/numerics/interpolate_to_different_mesh_01.cc b/tests/numerics/interpolate_to_different_mesh_01.cc index 29bd9c69d2..53aeb1f396 100644 --- a/tests/numerics/interpolate_to_different_mesh_01.cc +++ b/tests/numerics/interpolate_to_different_mesh_01.cc @@ -31,7 +31,7 @@ #include "../tests.h" -using namespace std; + template class F1 : public Function @@ -75,9 +75,9 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) dof_handler_2, u_2); - Point support_point, unit_support_point; - vector local_dof_indices(fe.n_dofs_per_cell()); - deallog << "dof values of dof_handler_1:" << endl; + Point support_point, unit_support_point; + std::vector local_dof_indices(fe.n_dofs_per_cell()); + deallog << "dof values of dof_handler_1:" << std::endl; for (const auto &cell : dof_handler_1.active_cell_iterators()) { cell->get_dof_indices(local_dof_indices); @@ -89,11 +89,11 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) support_point = mapping.transform_unit_to_real_cell(cell, unit_support_point); deallog << ' ' << support_point << ":\n " - << u_1[local_dof_indices[shapefun]] << endl - << endl; + << u_1[local_dof_indices[shapefun]] << std::endl + << std::endl; } } - deallog << endl << "dof values of dof_handler_2:" << endl; + deallog << std::endl << "dof values of dof_handler_2:" << std::endl; for (const auto &cell : dof_handler_2.active_cell_iterators()) { @@ -106,8 +106,8 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) support_point = mapping.transform_unit_to_real_cell(cell, unit_support_point); deallog << ' ' << support_point << ":\n " - << u_2[local_dof_indices[shapefun]] << endl - << endl; + << u_2[local_dof_indices[shapefun]] << std::endl + << std::endl; } } } @@ -122,30 +122,30 @@ main(int argc, char **argv) deallog << "### 2D-Case, first cell refined once, second cell unrefined###\n\n"; check<2>(1, 0); - deallog << endl; + deallog << std::endl; deallog << "### 2D-Case, first cell unrefined, second cell refined once###\n\n"; check<2>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 2D-Case, first cell refined once, second cell refined once###\n\n"; check<2>(1, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell refined once, second cell unrefined###\n\n"; check<3>(1, 0); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell unrefined, second cell refined once###\n\n"; check<3>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell refined once, second cell refined once###\n\n"; check<3>(1, 1); - deallog << endl; + deallog << std::endl; } diff --git a/tests/numerics/interpolate_to_different_mesh_02.cc b/tests/numerics/interpolate_to_different_mesh_02.cc index eaa9a2ad36..0e0e0bd114 100644 --- a/tests/numerics/interpolate_to_different_mesh_02.cc +++ b/tests/numerics/interpolate_to_different_mesh_02.cc @@ -33,7 +33,7 @@ #include "../tests.h" -using namespace std; + template class F1 : public Function @@ -86,12 +86,12 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) dof_handler_2, u_2); - Point support_point, unit_support_point; - vector local_dof_indices_1( + Point support_point, unit_support_point; + std::vector local_dof_indices_1( fe_collection[0].n_dofs_per_cell()); - vector local_dof_indices_2( + std::vector local_dof_indices_2( fe_collection[1].n_dofs_per_cell()); - deallog << "dof values of dof_handler_1:" << endl; + deallog << "dof values of dof_handler_1:" << std::endl; for (const auto &cell : dof_handler_1.active_cell_iterators()) { cell->get_dof_indices(local_dof_indices_1); @@ -103,11 +103,11 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) support_point = mapping.transform_unit_to_real_cell(cell, unit_support_point); deallog << ' ' << support_point << ":\n " - << u_1[local_dof_indices_1[shapefun]] << endl - << endl; + << u_1[local_dof_indices_1[shapefun]] << std::endl + << std::endl; } } - deallog << endl << "dof values of dof_handler_2:" << endl; + deallog << std::endl << "dof values of dof_handler_2:" << std::endl; for (const auto &cell : dof_handler_2.active_cell_iterators()) { cell->get_dof_indices(local_dof_indices_2); @@ -119,8 +119,8 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) support_point = mapping.transform_unit_to_real_cell(cell, unit_support_point); deallog << ' ' << support_point << ":\n " - << u_2[local_dof_indices_2[shapefun]] << endl - << endl; + << u_2[local_dof_indices_2[shapefun]] << std::endl + << std::endl; } } } @@ -135,30 +135,30 @@ main(int argc, char **argv) deallog << "### 2D-Case, first cell refined once, second cell unrefined###\n\n"; check<2>(1, 0); - deallog << endl; + deallog << std::endl; deallog << "### 2D-Case, first cell unrefined, second cell refined once###\n\n"; check<2>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 2D-Case, first cell refined once, second cell refined once###\n\n"; check<2>(1, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell refined once, second cell unrefined###\n\n"; check<3>(1, 0); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell unrefined, second cell refined once###\n\n"; check<3>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell refined once, second cell refined once###\n\n"; check<3>(1, 1); - deallog << endl; + deallog << std::endl; } diff --git a/tests/numerics/interpolate_to_different_mesh_03.cc b/tests/numerics/interpolate_to_different_mesh_03.cc index dbeabc131c..c60f544f8c 100644 --- a/tests/numerics/interpolate_to_different_mesh_03.cc +++ b/tests/numerics/interpolate_to_different_mesh_03.cc @@ -35,7 +35,7 @@ #include "../tests.h" -using namespace std; + template void @@ -74,7 +74,7 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) d = u_1; d.sadd(-1.0, u_1_back); - deallog << "distance=" << d.l2_norm() << endl; + deallog << "distance=" << d.l2_norm() << std::endl; } int @@ -89,20 +89,20 @@ main(int argc, char **argv) deallog << "### 2D-Case, first cell unrefined, second cell refined once###\n\n"; check<2>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 2D-Case, first cell refined once, second cell refined three times###\n\n"; check<2>(1, 3); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell unrefined, second cell refined once###\n\n"; check<3>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell refined once, second cell refined three times###\n\n"; check<3>(1, 3); - deallog << endl; + deallog << std::endl; } diff --git a/tests/numerics/interpolate_to_different_mesh_04.cc b/tests/numerics/interpolate_to_different_mesh_04.cc index faf3e3a51c..d6c4c5d67e 100644 --- a/tests/numerics/interpolate_to_different_mesh_04.cc +++ b/tests/numerics/interpolate_to_different_mesh_04.cc @@ -37,7 +37,7 @@ #include "../tests.h" -using namespace std; + template void @@ -85,7 +85,7 @@ check(const unsigned int refinement_1, const unsigned int refinement_2) d = u_1; d.sadd(-1.0, u_1_back); - deallog << "distance=" << d.l2_norm() << endl; + deallog << "distance=" << d.l2_norm() << std::endl; } int @@ -100,34 +100,34 @@ main(int argc, char **argv) deallog << "### 2D-Case, first cell unrefined, second cell refined once###\n\n"; check<2>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 2D-Case, first cell refined once, second cell refined three times###\n\n"; check<2>(1, 3); - deallog << endl; + deallog << std::endl; // this should still be an identity operation although interpolation is from // fine to coarse mesh because second mesh uses quadratic elements deallog << "### 2D-Case, first cell refined twice, second cell refined once###\n\n"; check<2>(2, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell unrefined, second cell refined once###\n\n"; check<3>(0, 1); - deallog << endl; + deallog << std::endl; deallog << "### 3D-Case, first cell refined once, second cell refined three times###\n\n"; check<3>(1, 3); - deallog << endl; + deallog << std::endl; // this should still be an identity operation although interpolation is from // fine to coarse mesh because second mesh uses quadratic elements deallog << "### 3D-Case, first cell refined twice, second cell refined once###\n\n"; check<3>(2, 1); - deallog << endl; + deallog << std::endl; } diff --git a/tests/trilinos/mg_transfer_prebuilt_01.cc b/tests/trilinos/mg_transfer_prebuilt_01.cc index 780ec11ca3..e920cb8fad 100644 --- a/tests/trilinos/mg_transfer_prebuilt_01.cc +++ b/tests/trilinos/mg_transfer_prebuilt_01.cc @@ -39,7 +39,7 @@ #include "../tests.h" -using namespace std; + template void -- 2.39.5