From: Wolfgang Bangerth Date: Sat, 5 Feb 2022 23:32:51 +0000 (-0700) Subject: Also replace single-character output for things other than newlines. X-Git-Tag: v9.4.0-rc1~520^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00a46eaa98c39af48f5707a082cc5d6ff75de86d;p=dealii.git Also replace single-character output for things other than newlines. --- diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index 72b0082c4a..7e66e6ce4f 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -614,7 +614,7 @@ namespace Step25 std::cout << std::endl << "Time step #" << timestep_number << "; " - << "advancing to t = " << time << "." << std::endl; + << "advancing to t = " << time << '.' << std::endl; // At the beginning of each time step we must solve the nonlinear // equation in the split formulation via Newton's method --- diff --git a/include/deal.II/algorithms/any_data.h b/include/deal.II/algorithms/any_data.h index 108ea37502..e163705715 100644 --- a/include/deal.II/algorithms/any_data.h +++ b/include/deal.II/algorithms/any_data.h @@ -210,7 +210,7 @@ public: int, std::string, << "Name at position " << arg1 << " is not equal to " << arg2 - << "."); + << '.'); private: /// The stored data diff --git a/include/deal.II/algorithms/general_data_storage.h b/include/deal.II/algorithms/general_data_storage.h index c6797d4dcb..cec456edda 100644 --- a/include/deal.II/algorithms/general_data_storage.h +++ b/include/deal.II/algorithms/general_data_storage.h @@ -351,7 +351,7 @@ public: const char *, const char *, << "The stored type for entry with name \"" << arg1 << "\" is " - << arg2 << " but you requested type " << arg3 << "."); + << arg2 << " but you requested type " << arg3 << '.'); private: /** diff --git a/include/deal.II/base/discrete_time.h b/include/deal.II/base/discrete_time.h index 5d6952a7fa..795eeaa82f 100644 --- a/include/deal.II/base/discrete_time.h +++ b/include/deal.II/base/discrete_time.h @@ -208,7 +208,7 @@ DEAL_II_NAMESPACE_OPEN * << "Timestep: " << time.get_step_number() << " -- " * << "Solving for the solution at " * << "t = " << time_of_simulation << " with " - * << "dt = " << timestep_size << "." << std::endl; + * << "dt = " << timestep_size << '.' << std::endl; * // } end snapshot stage * * // update stage { diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index c0ca35a6f0..60eab6d9bd 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -917,7 +917,7 @@ namespace StandardExceptions DeclException2(ExcDimensionMismatch, std::size_t, std::size_t, - << "Dimension " << arg1 << " not equal to " << arg2 << "."); + << "Dimension " << arg1 << " not equal to " << arg2 << '.'); /** * The first dimension should be either equal to the second or the third, @@ -928,7 +928,7 @@ namespace StandardExceptions std::size_t, std::size_t, << "Dimension " << arg1 << " neither equal to " << arg2 - << " nor to " << arg3 << "."); + << " nor to " << arg3 << '.'); /** * This exception indicates that an index is not within the expected range. @@ -993,7 +993,7 @@ namespace StandardExceptions int, int, << "Number " << arg1 << " must be larger than or equal " - << arg2 << "."); + << arg2 << '.'); /** * A generic exception definition for the ExcLowerRange above. @@ -1003,7 +1003,7 @@ namespace StandardExceptions T, T, << "Number " << arg1 << " must be larger than or equal " - << arg2 << "."); + << arg2 << '.'); /** * This exception indicates that the first argument should be an integer diff --git a/include/deal.II/base/function_cspline.h b/include/deal.II/base/function_cspline.h index 2c31db46aa..b518456162 100644 --- a/include/deal.II/base/function_cspline.h +++ b/include/deal.II/base/function_cspline.h @@ -51,7 +51,7 @@ namespace Functions << "The input interpolation points are not strictly ordered : " << std::endl << "x[" << arg1 << "] = " << arg2 << " >= x[" << (arg1 + 1) - << "] = " << arg3 << "."); + << "] = " << arg3 << '.'); DeclException3( ExcCSplineRange, diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index b98f216ec0..13a80cffab 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -1609,7 +1609,7 @@ public: */ DeclException1(ExcEntryAlreadyExists, std::string, - << "The following entry already exists: " << arg1 << "."); + << "The following entry already exists: " << arg1 << '.'); /** * Exception */ diff --git a/include/deal.II/base/partitioner.h b/include/deal.II/base/partitioner.h index dd0a021dd0..0e01619b71 100644 --- a/include/deal.II/base/partitioner.h +++ b/include/deal.II/base/partitioner.h @@ -655,7 +655,7 @@ namespace Utilities types::global_dof_index, unsigned int, << "Global index " << arg1 - << " neither owned nor ghost on proc " << arg2 << "."); + << " neither owned nor ghost on proc " << arg2 << '.'); /** * Exception diff --git a/include/deal.II/base/path_search.h b/include/deal.II/base/path_search.h index 1129a19e88..f105d4c624 100644 --- a/include/deal.II/base/path_search.h +++ b/include/deal.II/base/path_search.h @@ -190,7 +190,7 @@ public: std::string, std::string, << "The file \"" << arg1 << "\" was not found in the path for " - << "files of class " << arg2 << "."); + << "files of class " << arg2 << '.'); private: /** diff --git a/include/deal.II/fe/fe_tools.h b/include/deal.II/fe/fe_tools.h index 615bdb77c9..93140fd40b 100644 --- a/include/deal.II/fe/fe_tools.h +++ b/include/deal.II/fe/fe_tools.h @@ -1314,7 +1314,7 @@ namespace FETools int, << "The dimension " << arg1 << " in the finite element string must match " - << "the space dimension " << arg2 << "."); + << "the space dimension " << arg2 << '.'); /** * Exception diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index f5510b58a2..fe2a85a3dc 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -546,7 +546,7 @@ public: << arg1 << "] is distorted. The cell geometry or the " << "mapping are invalid, giving a non-positive volume " << "fraction of " << arg2 << " in quadrature point " << arg3 - << "."); + << '.'); /** * @} diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 7b117ccac0..5f5a5b9b91 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -3457,7 +3457,7 @@ namespace GridTools DeclException1(ExcScalingFactorNotPositive, double, << "The scaling factor must be positive, but it is " << arg1 - << "."); + << '.'); /** * Exception diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 3dba7a1f8d..8814bc8159 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -3463,7 +3463,7 @@ public: << arg1 << " of a triangulation, but this triangulation only has " << arg2 << " refinement levels. The given level " << arg1 - << " must be *less* than " << arg2 << "."); + << " must be *less* than " << arg2 << '.'); /** * The function raising this exception can only operate on an empty * Triangulation, i.e., a Triangulation without grid cells. diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index c6f9ff01e4..7134de41d3 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -268,7 +268,7 @@ namespace TriaAccessorExceptions ExcSetOnlyEvenChildren, int, << "You can only set the child index of an even numbered child." - << "The number of the child given was " << arg1 << "."); + << "The number of the child given was " << arg1 << '.'); } // namespace TriaAccessorExceptions diff --git a/include/deal.II/grid/tria_iterator.h b/include/deal.II/grid/tria_iterator.h index 340af33bd4..e2b82be21b 100644 --- a/include/deal.II/grid/tria_iterator.h +++ b/include/deal.II/grid/tria_iterator.h @@ -1126,7 +1126,7 @@ inline void TriaRawIterator::print(StreamType &out) const { if (Accessor::structure_dimension == Accessor::dimension) - out << accessor.level() << "." << accessor.index(); + out << accessor.level() << '.' << accessor.index(); else out << accessor.index(); } diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h index fd182c15bc..eaa2d95da8 100644 --- a/include/deal.II/lac/affine_constraints.h +++ b/include/deal.II/lac/affine_constraints.h @@ -1770,7 +1770,7 @@ public: << "The entry for the indices " << arg1 << " and " << arg2 << " already exists, but the values " << arg3 << " (old) and " << arg4 << " (new) differ " - << "by " << (arg4 - arg3) << "."); + << "by " << (arg4 - arg3) << '.'); /** * Exception * diff --git a/include/deal.II/lac/chunk_sparsity_pattern.h b/include/deal.II/lac/chunk_sparsity_pattern.h index db8d605c28..115f2224ae 100644 --- a/include/deal.II/lac/chunk_sparsity_pattern.h +++ b/include/deal.II/lac/chunk_sparsity_pattern.h @@ -768,7 +768,7 @@ public: size_type, size_type, << "The given index " << arg1 << " should be less than " - << arg2 << "."); + << arg2 << '.'); /** * Exception */ diff --git a/include/deal.II/lac/sparse_direct.h b/include/deal.II/lac/sparse_direct.h index 457d7d7efd..b51bc14900 100644 --- a/include/deal.II/lac/sparse_direct.h +++ b/include/deal.II/lac/sparse_direct.h @@ -322,7 +322,7 @@ public: ExcUMFPACKError, std::string, int, - << "UMFPACK routine " << arg1 << " returned error status " << arg2 << "." + << "UMFPACK routine " << arg1 << " returned error status " << arg2 << '.' << "\n\n" << ("A complete list of error codes can be found in the file " "." diff --git a/include/deal.II/numerics/data_out_dof_data.h b/include/deal.II/numerics/data_out_dof_data.h index f9b81f6427..be04a9a353 100644 --- a/include/deal.II/numerics/data_out_dof_data.h +++ b/include/deal.II/numerics/data_out_dof_data.h @@ -125,7 +125,7 @@ namespace Exceptions int, << "You have to give one name per component in your " << "data vector. The number you gave was " << arg1 - << ", but the number of components is " << arg2 << "."); + << ", but the number of components is " << arg2 << '.'); /** * Exception */ diff --git a/include/deal.II/physics/notation.h b/include/deal.II/physics/notation.h index d39e55119e..0410b0ad8e 100644 --- a/include/deal.II/physics/notation.h +++ b/include/deal.II/physics/notation.h @@ -293,7 +293,7 @@ namespace Physics int, << "The number of rows in the input matrix is " << arg1 << ", but needs to be either " << arg2 << " or " << arg3 - << "."); + << '.'); /** @@ -306,7 +306,7 @@ namespace Physics int, << "The number of rows in the input matrix is " << arg1 << ", but needs to be either " << arg2 << "," << arg3 - << ", or " << arg4 << "."); + << ", or " << arg4 << '.'); /** @@ -318,7 +318,7 @@ namespace Physics int, << "The number of columns in the input matrix is " << arg1 << ", but needs to be either " << arg2 << " or " << arg3 - << "."); + << '.'); /** @@ -331,7 +331,7 @@ namespace Physics int, << "The number of columns in the input matrix is " << arg1 << ", but needs to be either " << arg2 << "," << arg3 - << ", or " << arg4 << "."); + << ", or " << arg4 << '.'); /** diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 41d587b837..d78c072718 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -5516,7 +5516,7 @@ namespace DataOutBase << Utilities::System::get_time(); } else - out << "."; + out << '.'; out << '\n' << "ASCII" << '\n'; // now output the data header out << "DATASET UNSTRUCTURED_GRID\n" << '\n'; @@ -5730,7 +5730,7 @@ namespace DataOutBase << Utilities::System::get_date(); } else - out << "."; + out << '.'; out << "\n-->\n"; out << "> &p) std::max(1e-13, 1e-13 * std::fabs(value1))) deallog << "Error scale at x=" << x << ": p(t)=" << value1 << ", q(x)=" << value2 << std::endl; - deallog << "."; + deallog << '.'; } deallog << std::endl; } @@ -69,7 +69,7 @@ check_shift(const std::vector> &p) std::max(1e-13, 1e-13 * std::fabs(value1))) deallog << "Error shift at x=" << x << ": p(t)=" << value1 << ", q(x)=" << value2 << std::endl; - deallog << "."; + deallog << '.'; } deallog << std::endl; } @@ -92,7 +92,7 @@ check_mult_scalar(const std::vector> &p) std::max(1e-13, 1e-13 * std::fabs(value1))) deallog << "Error multiply at x=" << x << ": a*p(x)=" << value1 << ", q(x)=" << value2 << std::endl; - deallog << "."; + deallog << '.'; } deallog << std::endl; } @@ -118,7 +118,7 @@ check_mult(const std::vector> &p) << ": p_1(x)*p_2(x)=" << value1 << ", q(x)=" << value2 << std::endl; } - deallog << "."; + deallog << '.'; } deallog << std::endl; } @@ -152,7 +152,7 @@ check_expand(const std::vector> &p) std::max(1e-10, 1e-10 * std::fabs(value1))) deallog << "Error expansion at x=" << x << ": p(x)=" << value1 << ", q(x)=" << value2 << std::endl; - deallog << "."; + deallog << '.'; } deallog << std::endl; } @@ -182,7 +182,7 @@ check_mult_expand(const std::vector> &p) << j << "(x)=" << value1 << ", q(x)=" << value2 << std::endl; } - deallog << "."; + deallog << '.'; } deallog << std::endl; } diff --git a/tests/base/polynomial_lagrange_order.cc b/tests/base/polynomial_lagrange_order.cc index 11ed558d55..7eb48fed72 100644 --- a/tests/base/polynomial_lagrange_order.cc +++ b/tests/base/polynomial_lagrange_order.cc @@ -71,7 +71,7 @@ check_constant(const std::vector> &p) { value += p[i].value(x); } - deallog << "."; + deallog << '.'; if (std::fabs(1. - value) > 1e-13) deallog << "Error1 lg y=" << std::log10(std::fabs(1. - value)) << std::endl; diff --git a/tests/base/polynomial_lagrange_product.cc b/tests/base/polynomial_lagrange_product.cc index ca7cdd7ab1..a84281f950 100644 --- a/tests/base/polynomial_lagrange_product.cc +++ b/tests/base/polynomial_lagrange_product.cc @@ -50,7 +50,7 @@ check_derivatives(const std::vector> &p, q.value(x, values_ref); for (unsigned int i = 0; i < n_deriv; ++i) { - deallog << "."; + deallog << '.'; if (std::fabs(values[i] - values_ref[i]) > std::max(1e-11, 1e-11 * std::fabs(values[i]))) deallog << "Error deriv" << i << " lg y=" diff --git a/tests/distributed_grids/subdomain_id_01.cc b/tests/distributed_grids/subdomain_id_01.cc index fba9456e0e..a0ee2136b0 100644 --- a/tests/distributed_grids/subdomain_id_01.cc +++ b/tests/distributed_grids/subdomain_id_01.cc @@ -49,7 +49,7 @@ check(TRIA &tr) } catch (...) { - deallog << "."; + deallog << '.'; } deallog << std::endl; } diff --git a/tests/mpi/interpolate_to_different_mesh_01.cc b/tests/mpi/interpolate_to_different_mesh_01.cc index 262c4446f2..d9a879044c 100644 --- a/tests/mpi/interpolate_to_different_mesh_01.cc +++ b/tests/mpi/interpolate_to_different_mesh_01.cc @@ -84,7 +84,7 @@ output(DoFHandler & dh, data_out.add_data_vector(dh, v, "1"); data_out.build_patches(1); std::ostringstream filename; - filename << filename_ << Utilities::int_to_string(loop, 2) << "." + filename << filename_ << Utilities::int_to_string(loop, 2) << '.' << Utilities::int_to_string(myid, 2) << ".vtu"; std::ofstream output(filename.str().c_str()); diff --git a/tests/mpi/muelu_periodicity.cc b/tests/mpi/muelu_periodicity.cc index 536b31cb9f..d8ad6fb197 100644 --- a/tests/mpi/muelu_periodicity.cc +++ b/tests/mpi/muelu_periodicity.cc @@ -683,7 +683,7 @@ namespace Step22 std::ostringstream filename; filename - << "solution-" << Utilities::int_to_string(refinement_cycle, 2) << "." + << "solution-" << Utilities::int_to_string(refinement_cycle, 2) << '.' << Utilities::int_to_string(triangulation.locally_owned_subdomain(), 2) << ".vtu"; diff --git a/tests/mpi/periodicity_02.cc b/tests/mpi/periodicity_02.cc index fc2020280c..5a0ccd088b 100644 --- a/tests/mpi/periodicity_02.cc +++ b/tests/mpi/periodicity_02.cc @@ -701,7 +701,7 @@ namespace Step22 std::ostringstream filename; filename - << "solution-" << Utilities::int_to_string(refinement_cycle, 2) << "." + << "solution-" << Utilities::int_to_string(refinement_cycle, 2) << '.' << Utilities::int_to_string(triangulation.locally_owned_subdomain(), 2) << ".vtu"; diff --git a/tests/mpi/periodicity_03.cc b/tests/mpi/periodicity_03.cc index 01863565f6..9da4f7ddf1 100644 --- a/tests/mpi/periodicity_03.cc +++ b/tests/mpi/periodicity_03.cc @@ -784,7 +784,7 @@ namespace Step22 std::ostringstream filename; filename - << "solution-" << Utilities::int_to_string(refinement_cycle, 2) << "." + << "solution-" << Utilities::int_to_string(refinement_cycle, 2) << '.' << Utilities::int_to_string(triangulation.locally_owned_subdomain(), 2) << ".vtu"; diff --git a/tests/parameter_handler/parameter_handler_23.cc b/tests/parameter_handler/parameter_handler_23.cc index 3ae11794c4..7e4f8b8686 100644 --- a/tests/parameter_handler/parameter_handler_23.cc +++ b/tests/parameter_handler/parameter_handler_23.cc @@ -30,7 +30,7 @@ log_entry(const ParameterHandler & prm, { for (unsigned int i = 0; i < path.size(); ++i) { - deallog << path[i] << "."; + deallog << path[i] << '.'; } deallog << entry << " = "; diff --git a/tests/simplex/matrix_free_01.cc b/tests/simplex/matrix_free_01.cc index 41e9b08204..3a2da3276c 100644 --- a/tests/simplex/matrix_free_01.cc +++ b/tests/simplex/matrix_free_01.cc @@ -298,7 +298,7 @@ test(const unsigned int v, const unsigned int degree, const bool do_helmholtz) << " : "; deallog << "Convergence step " << result_mf.first << " value " - << result_mf.second << "." << std::endl; + << result_mf.second << '.' << std::endl; }; compare(mf_algo(), mb_algo()); diff --git a/tests/simplex/matrix_free_02.cc b/tests/simplex/matrix_free_02.cc index 491e479d54..48d3649edd 100644 --- a/tests/simplex/matrix_free_02.cc +++ b/tests/simplex/matrix_free_02.cc @@ -327,7 +327,7 @@ test(const unsigned version, const unsigned int degree, const bool do_helmholtz) deallog << "Convergence step " << std::get<0>(result_mf) << " value " << std::get<1>(result_mf) << " max " << std::get<2>(result_mf) - << " norm " << std::get<3>(result_mf) << "." << std::endl; + << " norm " << std::get<3>(result_mf) << '.' << std::endl; }; compare(mf_algo(), mb_algo());