From f16c9980c1910c1218c97539f06c83b901834ec4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 28 Mar 2001 16:11:43 +0000 Subject: [PATCH] Change the way the LogStream class uses endl, so that we now use std::endl instead of our own version. The latter is removed. git-svn-id: https://svn.dealii.org/trunk@4317 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/logstream.h | 208 +++++++++--------- deal.II/base/source/log.cc | 9 - deal.II/base/source/parameter_handler.cc | 4 +- deal.II/doc/news/2001/c-3-1.html | 16 +- .../lac/precondition_block.templates.h | 2 +- deal.II/lac/include/lac/solver_bicgstab.h | 2 +- deal.II/lac/include/lac/solver_cg.h | 2 +- deal.II/lac/source/full_matrix.double.cc | 4 +- deal.II/lac/source/solver_control.cc | 10 +- tests/base/logtest.cc | 12 +- tests/base/polynomial_test.cc | 30 +-- tests/base/quadrature_test.cc | 6 +- tests/base/reference.cc | 8 +- tests/base/tensor.cc | 24 +- tests/base/tensor.checked | 4 +- tests/base/timer.cc | 4 +- tests/deal.II/block_matrices.cc | 12 +- tests/deal.II/constraints.cc | 4 +- tests/deal.II/constraints.checked | 36 +-- tests/deal.II/data_out.cc | 6 +- tests/deal.II/derivatives.cc | 6 +- tests/deal.II/dof_test.cc | 30 +-- tests/deal.II/dof_test.checked | 24 +- tests/deal.II/fe_tables.cc | 28 +-- tests/deal.II/gradients.cc | 4 +- tests/deal.II/grid_test.cc | 8 +- tests/deal.II/intergrid_constraints.cc | 10 +- tests/deal.II/intergrid_map.cc | 8 +- tests/deal.II/mg.cc | 4 +- tests/deal.II/mglocal.cc | 8 +- tests/deal.II/second_derivatives.cc | 10 +- tests/deal.II/second_derivatives.checked | 24 +- tests/fe/derivatives.cc | 4 +- tests/fe/fe_data_test.cc | 28 +-- tests/fe/fe_data_test.checked | 6 +- tests/fe/internals.cc | 14 +- tests/fe/mapping.cc | 16 +- tests/fe/mapping_c1.cc | 6 +- tests/fe/performance.cc | 8 +- tests/fe/shapes.cc | 18 +- tests/fe/show_transfer.cc | 4 +- tests/lac/benchmark.cc | 10 +- tests/lac/block_matrices.cc | 32 +-- tests/lac/block_vector.cc | 36 +-- tests/lac/full_matrix.cc | 16 +- tests/lac/mg.cc | 8 +- tests/lac/mgbase.cc | 10 +- tests/lac/solver.cc | 4 +- tests/lac/sparse_ilu.cc | 6 +- tests/lac/testmatrix.cc | 6 +- tests/lac/vector-vector.cc | 26 +-- 51 files changed, 408 insertions(+), 417 deletions(-) diff --git a/deal.II/base/include/base/logstream.h b/deal.II/base/include/base/logstream.h index ab00e14db6..21843f725b 100644 --- a/deal.II/base/include/base/logstream.h +++ b/deal.II/base/include/base/logstream.h @@ -46,78 +46,6 @@ */ class LogStream { - private: - - /** - * Stack of strings which are printed - * at the beginning of each line to - * allow identification where the - * output was generated. - */ - std::stack prefixes; - - /** - * Default stream, where the output - * is to go to. This stream defaults - * to @p{std::cerr}, but can be set to another - * stream through the constructor. - */ - std::ostream *std_out; - - /** - * Pointer to a stream, where a copy of - * the output is to go to. Usually, this - * will be a file stream. - * - * You can set and reset this stream - * by the @p{attach} function. - */ - std::ostream *file; - - /** - * Flag which stores whether the - * last operation was a - * newline-generation. We use this flag - * to generate the list of prefixes at - * the next output, rather than - * immediately after the newline, since - * this might disturb the screen lay-out. - */ - bool was_endl; - - /** - * Value denoting the number of - * prefixes to be printed to the - * standard output. If more than - * this number of prefixes is - * pushed to the stack, then no - * output will be generated until - * the number of prefixes shrinks - * back below this number. - */ - unsigned int std_depth; - - /** - * Same for the maximum depth of - * prefixes for output to a file. - */ - unsigned int file_depth; - - /** - * Flag for printing execution time. - */ - bool print_utime; - - /** - * Flag for printing time differences. - */ - bool diff_utime; - - /** - * Time of last output line. - */ - double last_time; - public: /** * Standard constructor, since we @@ -224,24 +152,20 @@ class LogStream LogStream & operator << (const T &t); /** - * Output a function. This really is not - * to output the function, but calls the - * function on the present object. It - * works the same way as it is possible - * to output the stream manipulators - * (like @p{std::endl}, etc) work on standard - * streams: @p{stream << std::endl;}. We need - * to overload this function in order - * to know when we have to print the - * prefixes, since a user may use several - * calls to @p{operator <<} before the - * line is complete. The overloaded - * function @p{void std::endl(LogStream &)} - * tells the @p{LogStream} that the end of - * the line is reached. + * Treat ostream + * manipulators. This passes on + * the whole thing to the + * template function with the + * exception of the @p{std::endl} + * manipulator, for which special + * action is performed: set the + * @p{was_endl} variable that + * forces this object to generate + * a line head the next time + * something is written by this + * stream. */ - LogStream & operator << (void (f)(LogStream &)); - + LogStream & operator<< (std::ostream& (*p) (std::ostream&)); /** * Determine an estimate for @@ -267,17 +191,83 @@ class LogStream DeclException0 (ExcNoFileStreamGiven); private: + + /** + * Stack of strings which are printed + * at the beginning of each line to + * allow identification where the + * output was generated. + */ + std::stack prefixes; + + /** + * Default stream, where the output + * is to go to. This stream defaults + * to @p{std::cerr}, but can be set to another + * stream through the constructor. + */ + std::ostream *std_out; + + /** + * Pointer to a stream, where a copy of + * the output is to go to. Usually, this + * will be a file stream. + * + * You can set and reset this stream + * by the @p{attach} function. + */ + std::ostream *file; + + /** + * Flag which stores whether the + * last operation was a + * newline-generation. We use this flag + * to generate the list of prefixes at + * the next output, rather than + * immediately after the newline, since + * this might disturb the screen lay-out. + */ + bool was_endl; + + /** + * Value denoting the number of + * prefixes to be printed to the + * standard output. If more than + * this number of prefixes is + * pushed to the stack, then no + * output will be generated until + * the number of prefixes shrinks + * back below this number. + */ + unsigned int std_depth; + + /** + * Same for the maximum depth of + * prefixes for output to a file. + */ + unsigned int file_depth; + + /** + * Flag for printing execution time. + */ + bool print_utime; + + /** + * Flag for printing time differences. + */ + bool diff_utime; + + /** + * Time of last output line. + */ + double last_time; + /** * Print head of line. This prints * optional time information and * the contents of the prefix stack. */ void print_line_head(); - - /** - * Declare this function as a friend. - */ - friend void endl (LogStream &); }; @@ -309,28 +299,26 @@ LogStream::operator<< (const T& t) } -/** - * Replacement of @p{std::endl} for @p{LogStream}. - * - * Overloaded version of the stream manipulator function @p{std::endl} which - * results in calling the original version of @p{std::endl} for each of the - * two streams, if the present prefix number does not exceed the - * specified maximal number. - * - * @author Guido Kanschat, 1999 - */ -inline void endl(LogStream& s) + +inline +LogStream & +LogStream::operator<< (std::ostream& (*p) (std::ostream&)) { - if (s.prefixes.size() <= s.std_depth) - *s.std_out << std::endl; + // first pass on to the other + // (templatized function) + this->template operator<< (p); - if (s.file && (s.prefixes.size() <= s.file_depth)) - *s.file << std::endl; + // next check whether this is the + // @p{endl} manipulator, and if so + // set a flag + if (p == &std::endl) + was_endl = true; - s.was_endl = true; + return *this; }; + /** * The standard log object of DEAL. * diff --git a/deal.II/base/source/log.cc b/deal.II/base/source/log.cc index 2627e38a59..7a79a3ae23 100644 --- a/deal.II/base/source/log.cc +++ b/deal.II/base/source/log.cc @@ -151,15 +151,6 @@ LogStream::print_line_head() } -LogStream& -LogStream::operator << (void (f)(LogStream &)) -{ - f(*this); - return *this; -} - - - unsigned int LogStream::memory_consumption () const { diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index d981557b16..ea695925b8 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -817,10 +817,10 @@ void ParameterHandler::log_parameters_section (LogStream &out) // in the Changed tree and actually // differs from the default value out << ptr->first << ": " - << pc->entries[ptr->first].first << endl; + << pc->entries[ptr->first].first << std::endl; else out << ptr->first << ": " - << ptr->second.first << endl; + << ptr->second.first << std::endl; }; diff --git a/deal.II/doc/news/2001/c-3-1.html b/deal.II/doc/news/2001/c-3-1.html index bd5a1e9621..10141bb268 100644 --- a/deal.II/doc/news/2001/c-3-1.html +++ b/deal.II/doc/news/2001/c-3-1.html @@ -126,7 +126,19 @@ documentation, etc.
  1. - The Threads now has a barrier + Changed: The LogStream class was + changed such that it understand the usual std::endl manipulator instead of the + special one needed previously. There is therefore no more need + to write std::endl at some places + and endl at others. The special + function endl has gone. +
    + (WB 2001/03/28) +

    + +
  2. + New: The Threads now has a barrier class in order to synchronise multiple threads. In multithreaded mode, this is an alias to the ACE_Barrier class of the ACE library, if @@ -137,7 +149,7 @@ documentation, etc.

  3. - We now support the output format of the Visualization Toolkit (Vtk) from the DataOutBase class and all derived classes. diff --git a/deal.II/lac/include/lac/precondition_block.templates.h b/deal.II/lac/include/lac/precondition_block.templates.h index c8c1c5ce38..be574a4add 100644 --- a/deal.II/lac/include/lac/precondition_block.templates.h +++ b/deal.II/lac/include/lac/precondition_block.templates.h @@ -135,7 +135,7 @@ void PreconditionBlock::invert_diagblocks() if (same_diagonal) { - deallog << "PreconditionBlock uses only one diagonal block" << endl; + deallog << "PreconditionBlock uses only one diagonal block" << std::endl; // Invert only the first block // This is a copy of the code in the // 'else' part, stripped of the outer loop diff --git a/deal.II/lac/include/lac/solver_bicgstab.h b/deal.II/lac/include/lac/solver_bicgstab.h index 98b6c475a2..c1ba84be95 100644 --- a/deal.II/lac/include/lac/solver_bicgstab.h +++ b/deal.II/lac/include/lac/solver_bicgstab.h @@ -358,7 +358,7 @@ SolverBicgstab::solve(const MATRIX &A, do { if (step) - deallog << "Restart step " << step << endl; + deallog << "Restart step " << step << std::endl; if (start(A) == SolverControl::success) break; state = iterate(A, precondition); } diff --git a/deal.II/lac/include/lac/solver_cg.h b/deal.II/lac/include/lac/solver_cg.h index 577da83699..79c4369aca 100644 --- a/deal.II/lac/include/lac/solver_cg.h +++ b/deal.II/lac/include/lac/solver_cg.h @@ -256,7 +256,7 @@ SolverCG::solve (const MATRIX &A, print_vectors(it, x, g, d); if (additional_data.log_coefficients) - deallog << "alpha-beta:" << alpha << '\t' << beta << endl; + deallog << "alpha-beta:" << alpha << '\t' << beta << std::endl; conv = control().check(it,res); if (conv) diff --git a/deal.II/lac/source/full_matrix.double.cc b/deal.II/lac/source/full_matrix.double.cc index f4530c99f3..8120750d4f 100644 --- a/deal.II/lac/source/full_matrix.double.cc +++ b/deal.II/lac/source/full_matrix.double.cc @@ -133,9 +133,9 @@ FullMatrix::invert (const FullMatrix &M) // double condition = s[0]/s[dim_range-1]; if (info!=0) - deallog << "inverting error " << info << ' ' << erg << endl; + deallog << "inverting error " << info << ' ' << erg << std::endl; if (rank<(int)dim_range) - deallog << "rank deficiency " << rank << endl; + deallog << "rank deficiency " << rank << std::endl; delete[] work; delete[] s; delete[] matrix; diff --git a/deal.II/lac/source/solver_control.cc b/deal.II/lac/source/solver_control.cc index e8e48ea025..e9c2e9c6c4 100644 --- a/deal.II/lac/source/solver_control.cc +++ b/deal.II/lac/source/solver_control.cc @@ -50,7 +50,7 @@ SolverControl::check (const unsigned int step, const double check_value) { if (_log_history && ((step % _log_frequency) == 0)) - deallog << "Check " << step << "\t" << check_value << endl; + deallog << "Check " << step << "\t" << check_value << std::endl; lstep = step; lvalue = check_value; @@ -61,7 +61,7 @@ SolverControl::check (const unsigned int step, failure_residual=relative_failure_residual*check_value; if (_log_result) - deallog << "Starting value " << check_value << endl; + deallog << "Starting value " << check_value << std::endl; } @@ -80,7 +80,7 @@ SolverControl::check (const unsigned int step, { if (_log_result) deallog << "Failure step " << step - << " value " << check_value << endl; + << " value " << check_value << std::endl; return failure; } @@ -88,7 +88,7 @@ SolverControl::check (const unsigned int step, { if (_log_result) deallog << "Convergence step " << step - << " value " << check_value << endl; + << " value " << check_value << std::endl; return success; } @@ -180,7 +180,7 @@ ReductionControl::check (const unsigned int step, { if (_log_result) deallog << "Convergence step " << step - << " value " << check_value << endl; + << " value " << check_value << std::endl; return success; } else diff --git a/tests/base/logtest.cc b/tests/base/logtest.cc index c34c198846..0d8aa3db45 100644 --- a/tests/base/logtest.cc +++ b/tests/base/logtest.cc @@ -21,17 +21,17 @@ int main() deallog.attach(logfile); deallog.depth_console(0); - deallog << "Test" << endl; + deallog << "Test" << std::endl; deallog.push("l1"); - deallog << "Test1" << endl; + deallog << "Test1" << std::endl; deallog.push("l2"); - deallog << "Test2" << "Test3" << endl; + deallog << "Test2" << "Test3" << std::endl; deallog.push("l3"); deallog << "Test4"; deallog.pop(); - deallog << "Test5" << endl; + deallog << "Test5" << std::endl; deallog.pop(); - deallog << "Test6" << endl; + deallog << "Test6" << std::endl; deallog.pop(); - deallog << "Test7" << endl; + deallog << "Test7" << std::endl; } diff --git a/tests/base/polynomial_test.cc b/tests/base/polynomial_test.cc index d9330196a0..e20f98594f 100644 --- a/tests/base/polynomial_test.cc +++ b/tests/base/polynomial_test.cc @@ -42,10 +42,10 @@ int main(int, char) deallog.depth_console(0); vector values(1); - deallog << "LagrangeEquidistant polynoms:" << endl; + deallog << "LagrangeEquidistant polynoms:" << std::endl; for (unsigned int order=1; order<=4; ++order) { - deallog << "Polynomial p of order " << order << endl; + deallog << "Polynomial p of order " << order << std::endl; for (unsigned int s_point=0; s_point<=order; ++s_point) { LagrangeEquidistant polynom(order, s_point); @@ -61,7 +61,7 @@ int main(int, char) deallog << " ok"; else deallog << " false"; - deallog << endl; + deallog << std::endl; // now also check // whether the other @@ -71,14 +71,14 @@ int main(int, char) if (polynom.value(x) != values[0]) { deallog << "The two `value' functions return different results!" - << endl; + << std::endl; abort (); }; } } } - deallog << endl << "Test derivatives computed by the Horner scheme:" << endl; + deallog << std::endl << "Test derivatives computed by the Horner scheme:" << std::endl; LagrangeEquidistant pol(4, 2); vector v_horner(6); for (unsigned int i=0; i<=10; ++i) @@ -100,7 +100,7 @@ int main(int, char) for (unsigned int i=0; i > pols; @@ -144,17 +144,17 @@ int main(int, char) Q3_4th_shape_function_values_and_grads_dim2(point, v_exact, grad_exact, grad_grad_exact); unsigned int i=1; - deallog << "v_" << i << "=" << vs[i] << endl; - deallog << "v_exact=" << v_exact << endl; - deallog << "grad_v_" << i << "=" << grads[i] << endl; - deallog << "grad_exact=" << grad_exact << endl; + deallog << "v_" << i << "=" << vs[i] << std::endl; + deallog << "v_exact=" << v_exact << std::endl; + deallog << "grad_v_" << i << "=" << grads[i] << std::endl; + deallog << "grad_exact=" << grad_exact << std::endl; for (unsigned int j=0; j*>& quadratures) } if (!in_order) for (unsigned int x=0; x*>& quadratures, bool sub) while (err<5e-15); // Uncomment here for testing // deallog << " (Int " << quadrature_int << '-' << exact_int << '=' << err << ")"; - deallog << " is exact for polynomials of degree " << i-1 << endl; + deallog << " is exact for polynomials of degree " << i-1 << std::endl; } deallog.pop(); } diff --git a/tests/base/reference.cc b/tests/base/reference.cc index db99a8a6af..3c84db90fe 100644 --- a/tests/base/reference.cc +++ b/tests/base/reference.cc @@ -25,19 +25,19 @@ public: Test(const char* n) : name(n) { - deallog << "Construct " << name << endl; + deallog << "Construct " << name << std::endl; } ~Test() { - deallog << "Destruct " << name << endl; + deallog << "Destruct " << name << std::endl; } void f() { - deallog << "mutable" << endl; + deallog << "mutable" << std::endl; } void f() const { - deallog << "const" << endl; + deallog << "const" << std::endl; } }; diff --git a/tests/base/tensor.cc b/tests/base/tensor.cc index 61672a7cbb..9788f05a43 100644 --- a/tests/base/tensor.cc +++ b/tests/base/tensor.cc @@ -39,27 +39,27 @@ int main () deallog << "unrolled:"; for (unsigned i=0;i<9;i++) deallog << ' ' << unrolled(i); - deallog << endl; + deallog << std::endl; - deallog << "t=" << endl; + deallog << "t=" << std::endl; for (unsigned int i=0; i::make_grid_and_dofs () triangulation.refine_global (3); deallog << "Number of active cells: " << triangulation.n_active_cells() - << endl; + << std::endl; deallog << "Total number of cells: " << triangulation.n_cells() - << endl; + << std::endl; dof_handler.distribute_dofs (fe); deallog << "Number of degrees of freedom: " << dof_handler.n_dofs() - << endl; + << std::endl; reinit_sparsity (); DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern); @@ -344,7 +344,7 @@ void LaplaceProblem::run () //<< ' ' //<< typeid(Matrix).name () //<< '-' - << i << ' ' << solution(i) << endl; + << i << ' ' << solution(i) << std::endl; }; @@ -410,7 +410,7 @@ int main () }; const unsigned int n_datasets = solutions.size(); - deallog << "Checking " << n_datasets << " data sets." << endl; + deallog << "Checking " << n_datasets << " data sets." << std::endl; for (unsigned int i=1; i diff --git a/tests/deal.II/dof_test.cc b/tests/deal.II/dof_test.cc index 4f1ff2deb7..8a953dc505 100644 --- a/tests/deal.II/dof_test.cc +++ b/tests/deal.II/dof_test.cc @@ -226,10 +226,10 @@ template void TestCases::run (const unsigned int test_case) { deallog << "Dimension = " << dim - << ", Test case = " << test_case << endl - << endl; + << ", Test case = " << test_case << std::endl + << std::endl; - deallog << " Making grid..." << endl; + deallog << " Making grid..." << std::endl; switch (test_case) { @@ -295,11 +295,11 @@ void TestCases::run (const unsigned int test_case) }; - deallog << " Distributing degrees of freedom..." << endl; + deallog << " Distributing degrees of freedom..." << std::endl; FE_Q fe(1); dof->distribute_dofs (fe); - deallog << " Renumbering degrees of freedom..." << endl; + deallog << " Renumbering degrees of freedom..." << std::endl; DoFRenumbering::Cuthill_McKee (*dof); SparsityPattern sparsity (dof->n_dofs(), @@ -309,29 +309,29 @@ void TestCases::run (const unsigned int test_case) DoFTools::make_sparsity_pattern (*dof, sparsity); int unconstrained_bandwidth = sparsity.bandwidth(); - deallog << " Writing sparsity pattern..." << endl; + deallog << " Writing sparsity pattern..." << std::endl; sparsity.print_gnuplot (logfile); // computing constraints - deallog << " Computing constraints..." << endl; + deallog << " Computing constraints..." << std::endl; ConstraintMatrix constraints; DoFTools::make_hanging_node_constraints (*dof, constraints); constraints.close (); constraints.condense (sparsity); - deallog << " Writing condensed sparsity pattern..." << endl; + deallog << " Writing condensed sparsity pattern..." << std::endl; sparsity.print_gnuplot (logfile); - deallog << endl - << " Total number of cells = " << tria->n_cells() << endl - << " Total number of active cells = " << tria->n_active_cells() << endl - << " Number of DoFs = " << dof->n_dofs() << endl - << " Number of constraints = " << constraints.n_constraints() << endl - << " Unconstrained matrix bandwidth= " << unconstrained_bandwidth << endl + deallog << std::endl + << " Total number of cells = " << tria->n_cells() << std::endl + << " Total number of active cells = " << tria->n_active_cells() << std::endl + << " Number of DoFs = " << dof->n_dofs() << std::endl + << " Number of constraints = " << constraints.n_constraints() << std::endl + << " Unconstrained matrix bandwidth= " << unconstrained_bandwidth << std::endl << " Constrained matrix bandwidth = " << sparsity.bandwidth() - << endl << endl; + << std::endl << std::endl; // release the lock that dof has to the // finite element object diff --git a/tests/deal.II/dof_test.checked b/tests/deal.II/dof_test.checked index 939eb15172..9c515e79a7 100644 --- a/tests/deal.II/dof_test.checked +++ b/tests/deal.II/dof_test.checked @@ -1,6 +1,6 @@ DEAL::Dimension = 2, Test case = 1 - +DEAL:: DEAL:: Making grid... DEAL:: Distributing degrees of freedom... DEAL:: Renumbering degrees of freedom... @@ -967,16 +967,16 @@ DEAL:: Writing condensed sparsity pattern... 47 -58 48 -58 56 -58 - +DEAL:: DEAL:: Total number of cells = 53 DEAL:: Total number of active cells = 40 DEAL:: Number of DoFs = 59 DEAL:: Number of constraints = 20 DEAL:: Unconstrained matrix bandwidth= 30 DEAL:: Constrained matrix bandwidth = 36 - +DEAL:: DEAL::Dimension = 2, Test case = 2 - +DEAL:: DEAL:: Making grid... DEAL:: Distributing degrees of freedom... DEAL:: Renumbering degrees of freedom... @@ -2105,16 +2105,16 @@ DEAL:: Writing condensed sparsity pattern... 56 -72 70 -72 71 -72 - +DEAL:: DEAL:: Total number of cells = 69 DEAL:: Total number of active cells = 52 DEAL:: Number of DoFs = 73 DEAL:: Number of constraints = 8 DEAL:: Unconstrained matrix bandwidth= 34 DEAL:: Constrained matrix bandwidth = 34 - +DEAL:: DEAL::Dimension = 3, Test case = 1 - +DEAL:: DEAL:: Making grid... DEAL:: Distributing degrees of freedom... DEAL:: Renumbering degrees of freedom... @@ -11167,16 +11167,16 @@ DEAL:: Writing condensed sparsity pattern... 231 -234 232 -234 233 -234 - +DEAL:: DEAL:: Total number of cells = 137 DEAL:: Total number of active cells = 120 DEAL:: Number of DoFs = 235 DEAL:: Number of constraints = 90 DEAL:: Unconstrained matrix bandwidth= 175 DEAL:: Constrained matrix bandwidth = 200 - +DEAL:: DEAL::Dimension = 3, Test case = 2 - +DEAL:: DEAL:: Making grid... DEAL:: Distributing degrees of freedom... DEAL:: Renumbering degrees of freedom... @@ -15577,11 +15577,11 @@ DEAL:: Writing condensed sparsity pattern... 120 -124 122 -124 123 -124 - +DEAL:: DEAL:: Total number of cells = 73 DEAL:: Total number of active cells = 64 DEAL:: Number of DoFs = 125 DEAL:: Number of constraints = 0 DEAL:: Unconstrained matrix bandwidth= 85 DEAL:: Constrained matrix bandwidth = 85 - +DEAL:: diff --git a/tests/deal.II/fe_tables.cc b/tests/deal.II/fe_tables.cc index 812ee23b14..c0f17f5af0 100644 --- a/tests/deal.II/fe_tables.cc +++ b/tests/deal.II/fe_tables.cc @@ -34,14 +34,14 @@ ofstream logfile("fe_tables.output"); #define TEST_ELEMENT(e) { deallog.push(#e); e el;\ - print_fe_statistics(el); deallog.pop(); deallog << endl; } + print_fe_statistics(el); deallog.pop(); deallog << std::endl; } #define TEST_MULTIPLE(e,n,d) { deallog.push(#e "x" #n); e eb; FESystem el(eb,n); \ - print_fe_statistics(el); deallog.pop(); deallog << endl; } + print_fe_statistics(el); deallog.pop(); deallog << std::endl; } #define TEST_MIXED2(e1,n1,e2,n2,d) { deallog.push(#e1 "x" #n1 "-" #e2 "x" #n2);\ e1 eb1; e2 eb2; FESystem el(eb1,n1,eb2,n2);\ - print_fe_statistics(el); deallog.pop(); deallog << endl; } + print_fe_statistics(el); deallog.pop(); deallog << std::endl; } #define TEST_MATRIX(e1,e2) { deallog.push( #e1 " onto " #e2); e1 el1; e2 el2;\ - print_fe_matrices(el1,el2); deallog.pop(); deallog << endl; } + print_fe_matrices(el1,el2); deallog.pop(); deallog << std::endl; } template inline void @@ -66,9 +66,9 @@ print_fe_statistics(const FiniteElement& fe) deallog << "dofs_per_cell" << " " << fe.dofs_per_cell; deallog << ": vertex" << " " << fe.dofs_per_vertex; deallog << " line" << " " << fe.dofs_per_line; - deallog << " quad" << " " <& fe) << p.first << "," << p.second << ") -> " << fe.component_to_system_index(p.first, p.second) << " support " << support_points[i] << " unit: " << unit_points[i] - << endl; + << std::endl; } for (unsigned i=0;i& fe) << p.first << "," << p.second << ") -> " << fe.face_component_to_system_index(p.first, p.second) << " support " << face_support_points[i] - << endl; + << std::endl; } deallog.pop(); } @@ -98,7 +98,7 @@ print_fe_matrices(const FiniteElement& high, { FullMatrix interpolation(low.dofs_per_cell, high.dofs_per_cell); FETools::get_interpolation_matrix(high, low, interpolation); - deallog << "Interpolation" << endl; + deallog << "Interpolation" << std::endl; interpolation.print(logfile); } @@ -118,7 +118,7 @@ int main() << " lines: " << GeometryInfo<1>::lines_per_cell << " quads: " << GeometryInfo<1>::quads_per_cell << " hexes: " << GeometryInfo<1>::hexes_per_cell - << endl; + << std::endl; deallog.pop(); deallog.push("2D"); @@ -126,7 +126,7 @@ int main() << " lines: " << GeometryInfo<2>::lines_per_cell << " quads: " << GeometryInfo<2>::quads_per_cell << " hexes: " << GeometryInfo<2>::hexes_per_cell - << endl; + << std::endl; deallog.pop(); deallog.push("3D"); @@ -134,7 +134,7 @@ int main() << " lines: " << GeometryInfo<3>::lines_per_cell << " quads: " << GeometryInfo<3>::quads_per_cell << " hexes: " << GeometryInfo<3>::hexes_per_cell - << endl; + << std::endl; deallog.pop(); deallog.push("4D"); @@ -142,7 +142,7 @@ int main() << " lines: " << GeometryInfo<4>::lines_per_cell << " quads: " << GeometryInfo<4>::quads_per_cell << " hexes: " << GeometryInfo<4>::hexes_per_cell - << endl; + << std::endl; deallog.pop(); deallog.pop(); diff --git a/tests/deal.II/gradients.cc b/tests/deal.II/gradients.cc index 6537ce72f1..2af601e8b9 100644 --- a/tests/deal.II/gradients.cc +++ b/tests/deal.II/gradients.cc @@ -52,7 +52,7 @@ int main () Vector val(4); - deallog << "Testing transformation of gradients of shape function:" << endl; + deallog << "Testing transformation of gradients of shape function:" << std::endl; // test for each of the four // shape functions @@ -98,7 +98,7 @@ bool ok; deallog << " Shape function " << vertex << ": " << (ok ? "OK" : "WRONG!") - << endl; + << std::endl; if (!ok) testcase_succeeded = false; diff --git a/tests/deal.II/grid_test.cc b/tests/deal.II/grid_test.cc index 5fb8b9a95f..5c8af1719e 100644 --- a/tests/deal.II/grid_test.cc +++ b/tests/deal.II/grid_test.cc @@ -169,7 +169,7 @@ void test (const int test_case) sprintf(testname, "Test%d.dim%d", test_case , dim); deallog.push(testname); - deallog << "Start" << endl; + deallog << "Start" << std::endl; Triangulation tria; GridGenerator::hyper_cube(tria); @@ -178,7 +178,7 @@ void test (const int test_case) if ((dim==1) && ((test_case==2) || (test_case==3))) { - deallog << "Impossible for this dimension." << endl; + deallog << "Impossible for this dimension." << std::endl; return; }; @@ -258,8 +258,8 @@ switch (test_case) GridOut().write_ucd (tria, logfile); - deallog << " Total number of cells = " << tria.n_cells() << endl - << " Total number of active cells = " << tria.n_active_cells() << endl; + deallog << " Total number of cells = " << tria.n_cells() << std::endl + << " Total number of active cells = " << tria.n_active_cells() << std::endl; deallog.pop(); }; diff --git a/tests/deal.II/intergrid_constraints.cc b/tests/deal.II/intergrid_constraints.cc index 9324e43469..0d44d24caa 100644 --- a/tests/deal.II/intergrid_constraints.cc +++ b/tests/deal.II/intergrid_constraints.cc @@ -32,8 +32,8 @@ template void check () { deallog << "Checking in " << dim << " space dimensions" - << endl - << "---------------------------------------" << endl; + << std::endl + << "---------------------------------------" << std::endl; // create two grids Triangulation tria_1, tria_2; @@ -88,7 +88,7 @@ void check () // two grids for (unsigned int i=0; i<3; ++i) { - deallog << "Refinement step " << i << endl; + deallog << "Refinement step " << i << std::endl; DoFHandler dof_1 (tria_1); DoFHandler dof_2 (tria_2); @@ -99,9 +99,9 @@ void check () DoFRenumbering::Cuthill_McKee (dof_2); deallog << " Grid 1: " << tria_1.n_active_cells() << " cells, " - << dof_1.n_dofs() << " dofs" << endl; + << dof_1.n_dofs() << " dofs" << std::endl; deallog << " Grid 2: " << tria_2.n_active_cells() << " cells, " - << dof_2.n_dofs() << " dofs" << endl; + << dof_2.n_dofs() << " dofs" << std::endl; // now compute intergrid // constraints diff --git a/tests/deal.II/intergrid_map.cc b/tests/deal.II/intergrid_map.cc index abc3624ceb..91eb893352 100644 --- a/tests/deal.II/intergrid_map.cc +++ b/tests/deal.II/intergrid_map.cc @@ -23,8 +23,8 @@ template void check () { deallog << "Checking in " << dim << " space dimensions" - << endl - << "---------------------------------------" << endl; + << std::endl + << "---------------------------------------" << std::endl; // create two grids Triangulation tria_1, tria_2; @@ -39,7 +39,7 @@ void check () // two grids for (unsigned int i=0; i<3; ++i) { - deallog << "Refinement step " << i << endl; + deallog << "Refinement step " << i << std::endl; DoFHandler dof_1 (tria_1); DoFHandler dof_2 (tria_2); @@ -63,7 +63,7 @@ void check () << intergrid_map_1[cell] << "->" << intergrid_map_2[intergrid_map_1[cell]] - << endl; + << std::endl; // note that not necessarily intergrid_map_2[intergrid_map_1[cell]] == // cell, since the meshes have different refinement steps. }; diff --git a/tests/deal.II/mg.cc b/tests/deal.II/mg.cc index 06791fd042..3d63864fbd 100644 --- a/tests/deal.II/mg.cc +++ b/tests/deal.II/mg.cc @@ -108,8 +108,8 @@ int main() hanging_nodes.close(); const unsigned int size = dof.n_dofs(); - deallog << "DoFs " << size << endl; - deallog << "Levels: " << tr.n_levels() << endl; + deallog << "DoFs " << size << std::endl; + deallog << "Levels: " << tr.n_levels() << std::endl; SparsityPattern structure(size, dof.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern(dof, structure); diff --git a/tests/deal.II/mglocal.cc b/tests/deal.II/mglocal.cc index 417ee19f6f..ddde141e39 100644 --- a/tests/deal.II/mglocal.cc +++ b/tests/deal.II/mglocal.cc @@ -76,7 +76,7 @@ int main() // deallog.log_execution_time(true); deallog.depth_console(0); - deallog << "Test" << endl; + deallog << "Test" << std::endl; Helmholtz equation; RHSFunction<2> rhs; @@ -101,11 +101,11 @@ int main() dof.distribute_dofs(fe); const unsigned int size = dof.n_dofs(); - deallog << "DoFs " << size << endl; - deallog << "Levels: " << tr.n_levels() << endl; + deallog << "DoFs " << size << std::endl; + deallog << "Levels: " << tr.n_levels() << std::endl; for (unsigned int step=1;step < 3; ++step) { - deallog << "smoothing-steps" << step << endl; + deallog << "smoothing-steps" << step << std::endl; SparsityPattern structure(size, dof.max_couplings_between_dofs()); DoFTools::make_sparsity_pattern(dof, structure); diff --git a/tests/deal.II/second_derivatives.cc b/tests/deal.II/second_derivatives.cc index f5638c498d..4f7b79bc59 100644 --- a/tests/deal.II/second_derivatives.cc +++ b/tests/deal.II/second_derivatives.cc @@ -48,7 +48,7 @@ int main () Vector val(4); - deallog << "Testing transformation of 2nd derivatives of shape function:" << endl; + deallog << "Testing transformation of 2nd derivatives of shape function:" << std::endl; // test for each of the four // shape functions. first loop: @@ -56,7 +56,7 @@ Vector val(4); // one vertex moved for (unsigned int loop=0; loop<=2; ++loop) { - deallog << "Test loop: " << loop << endl; + deallog << "Test loop: " << loop << std::endl; // move one vertex of the only cell if (loop==1) @@ -81,12 +81,12 @@ Vector val(4); vector > derivs(4); fevalues.get_function_2nd_derivatives (val, derivs); - deallog << "Vertex " << vertex << ": " << endl; + deallog << "Vertex " << vertex << ": " << std::endl; for (unsigned int point=0; point<4; ++point) for (unsigned int component=0; component<2; ++component) - deallog << derivs[point][component] << endl; + deallog << derivs[point][component] << std::endl; - deallog << endl; + deallog << std::endl; }; }; }; diff --git a/tests/deal.II/second_derivatives.checked b/tests/deal.II/second_derivatives.checked index 5b3daf7db2..e4a6ca7992 100644 --- a/tests/deal.II/second_derivatives.checked +++ b/tests/deal.II/second_derivatives.checked @@ -10,7 +10,7 @@ DEAL::0.00 1.00 DEAL::1.00 0.00 DEAL::0.00 1.00 DEAL::1.00 0.00 - +DEAL:: DEAL::Vertex 1: DEAL::0.00 -1.00 DEAL::-1.00 0.00 @@ -20,7 +20,7 @@ DEAL::0.00 -1.00 DEAL::-1.00 0.00 DEAL::0.00 -1.00 DEAL::-1.00 0.00 - +DEAL:: DEAL::Vertex 2: DEAL::0.00 1.00 DEAL::1.00 0.00 @@ -30,7 +30,7 @@ DEAL::0.00 1.00 DEAL::1.00 0.00 DEAL::0.00 1.00 DEAL::1.00 0.00 - +DEAL:: DEAL::Vertex 3: DEAL::0.00 -1.00 DEAL::-1.00 0.00 @@ -40,7 +40,7 @@ DEAL::0.00 -1.00 DEAL::-1.00 0.00 DEAL::0.00 -1.00 DEAL::-1.00 0.00 - +DEAL:: DEAL::Test loop: 1 DEAL::Vertex 0: DEAL::0.00 0.50 @@ -51,7 +51,7 @@ DEAL::0.00 0.50 DEAL::0.50 0.00 DEAL::0.00 0.50 DEAL::0.50 0.00 - +DEAL:: DEAL::Vertex 1: DEAL::0.00 -0.50 DEAL::-0.50 0.00 @@ -61,7 +61,7 @@ DEAL::0.00 -0.50 DEAL::-0.50 0.00 DEAL::0.00 -0.50 DEAL::-0.50 0.00 - +DEAL:: DEAL::Vertex 2: DEAL::0.00 0.50 DEAL::0.50 0.00 @@ -71,7 +71,7 @@ DEAL::0.00 0.50 DEAL::0.50 0.00 DEAL::0.00 0.50 DEAL::0.50 0.00 - +DEAL:: DEAL::Vertex 3: DEAL::0.00 -0.50 DEAL::-0.50 0.00 @@ -81,7 +81,7 @@ DEAL::0.00 -0.50 DEAL::-0.50 0.00 DEAL::0.00 -0.50 DEAL::-0.50 0.00 - +DEAL:: DEAL::Test loop: 2 DEAL::Vertex 0: DEAL::0.00 1.75 @@ -92,7 +92,7 @@ DEAL::0.00 0.19 DEAL::0.19 -0.13 DEAL::-0.24 0.22 DEAL::0.22 -0.12 - +DEAL:: DEAL::Vertex 1: DEAL::0.00 -0.75 DEAL::-0.75 0.00 @@ -102,7 +102,7 @@ DEAL::0.00 -0.08 DEAL::-0.08 0.05 DEAL::0.10 -0.09 DEAL::-0.09 0.05 - +DEAL:: DEAL::Vertex 2: DEAL::0.00 0.50 DEAL::0.50 0.00 @@ -112,7 +112,7 @@ DEAL::0.00 0.05 DEAL::0.05 -0.03 DEAL::-0.07 0.06 DEAL::0.06 -0.03 - +DEAL:: DEAL::Vertex 3: DEAL::0.00 -1.50 DEAL::-1.50 0.00 @@ -122,4 +122,4 @@ DEAL::0.00 -0.16 DEAL::-0.16 0.11 DEAL::0.21 -0.19 DEAL::-0.19 0.10 - +DEAL:: diff --git a/tests/fe/derivatives.cc b/tests/fe/derivatives.cc index 2c09029543..9ebac57729 100644 --- a/tests/fe/derivatives.cc +++ b/tests/fe/derivatives.cc @@ -50,13 +50,13 @@ plot_derivatives(Mapping& mapping, { for (unsigned int mx=0;mx<=div;++mx) { - deallog << q.point(k) << endl; + deallog << q.point(k) << std::endl; for (unsigned int i=0;i(FE_Q (4), 2)); } - deallog << endl << "dim=" << dim << endl; + deallog << std::endl << "dim=" << dim << std::endl; for (unsigned int n=0; n *fe_data=fe_datas[n]; - deallog << "fe_data[" << n <<"]:" << endl; - deallog << "dofs_per_vertex=" << fe_data->dofs_per_vertex << endl; - deallog << "dofs_per_line=" << fe_data->dofs_per_line << endl; - deallog << "dofs_per_quad=" << fe_data->dofs_per_quad << endl; - deallog << "dofs_per_hex=" << fe_data->dofs_per_hex << endl; - deallog << "first_line_index=" << fe_data->first_line_index << endl; - deallog << "first_quad_index=" << fe_data->first_quad_index << endl; - deallog << "first_hex_index=" << fe_data->first_hex_index << endl; - deallog << "first_face_line_index=" << fe_data->first_face_line_index << endl; - deallog << "first_face_quad_index=" << fe_data->first_face_quad_index << endl; - deallog << "dofs_per_face=" << fe_data->dofs_per_face << endl; - deallog << "dofs_per_cell=" << fe_data->dofs_per_cell << endl; - deallog << "components=" << fe_data->components << endl; + deallog << "fe_data[" << n <<"]:" << std::endl; + deallog << "dofs_per_vertex=" << fe_data->dofs_per_vertex << std::endl; + deallog << "dofs_per_line=" << fe_data->dofs_per_line << std::endl; + deallog << "dofs_per_quad=" << fe_data->dofs_per_quad << std::endl; + deallog << "dofs_per_hex=" << fe_data->dofs_per_hex << std::endl; + deallog << "first_line_index=" << fe_data->first_line_index << std::endl; + deallog << "first_quad_index=" << fe_data->first_quad_index << std::endl; + deallog << "first_hex_index=" << fe_data->first_hex_index << std::endl; + deallog << "first_face_line_index=" << fe_data->first_face_line_index << std::endl; + deallog << "first_face_quad_index=" << fe_data->first_face_quad_index << std::endl; + deallog << "dofs_per_face=" << fe_data->dofs_per_face << std::endl; + deallog << "dofs_per_cell=" << fe_data->dofs_per_cell << std::endl; + deallog << "components=" << fe_data->components << std::endl; } // delete all FiniteElementDatas diff --git a/tests/fe/fe_data_test.checked b/tests/fe/fe_data_test.checked index d815999400..f840209e77 100644 --- a/tests/fe/fe_data_test.checked +++ b/tests/fe/fe_data_test.checked @@ -1,5 +1,5 @@ - +DEAL:: DEAL::dim=1 DEAL::fe_data[0]: DEAL::dofs_per_vertex=1 @@ -92,7 +92,7 @@ DEAL::first_face_quad_index=4 DEAL::dofs_per_face=2 DEAL::dofs_per_cell=10 DEAL::components=2 - +DEAL:: DEAL::dim=2 DEAL::fe_data[0]: DEAL::dofs_per_vertex=1 @@ -185,7 +185,7 @@ DEAL::first_face_quad_index=14 DEAL::dofs_per_face=10 DEAL::dofs_per_cell=50 DEAL::components=2 - +DEAL:: DEAL::dim=3 DEAL::fe_data[0]: DEAL::dofs_per_vertex=1 diff --git a/tests/fe/internals.cc b/tests/fe/internals.cc index 1c24df030b..fe00ea48a5 100644 --- a/tests/fe/internals.cc +++ b/tests/fe/internals.cc @@ -27,13 +27,13 @@ check_support (FiniteElement& finel, const char* name) DoFHandler dof (tr); dof.distribute_dofs (finel); - cout << name << '<' << dim << '>' << " cell support points" << endl; + cout << name << '<' << dim << '>' << " cell support points" << std::endl; vector > cell_points (finel.dofs_per_cell); finel.get_unit_support_points (cell_points); for (unsigned int k=0;k > face_points; finel.get_unit_face_support_points (face_points); @@ -45,11 +45,11 @@ check_support (FiniteElement& finel, const char* name) unsigned int j=0; for (unsigned int i=0;i::faces_per_cell;++i) { - cout << name << '<' << dim << '>' << " face " << i << " support points" << endl; + cout << name << '<' << dim << '>' << " face " << i << " support points" << std::endl; for (unsigned int k=0;k inline void check_matrices (FiniteElement& fe, const char* name) { - cout << name << '<' << dim << '>' << " constraint " << endl; + cout << name << '<' << dim << '>' << " constraint " << std::endl; fe.constraints().print_formatted (cout, 7, false, 10, "~"); for (unsigned int i=0;i::children_per_cell;++i) { - cout << name << '<' << dim << '>' << " restriction " << i << endl; + cout << name << '<' << dim << '>' << " restriction " << i << std::endl; fe.restrict(i).print_formatted (cout, 3, false, 6, "~"); - cout << name << '<' << dim << '>' << " embedding " << i << endl; + cout << name << '<' << dim << '>' << " embedding " << i << std::endl; fe.prolongate(i).print_formatted (cout, 3, false, 6, "~"); } } diff --git a/tests/fe/mapping.cc b/tests/fe/mapping.cc index 109d572729..6ddf32d3cf 100644 --- a/tests/fe/mapping.cc +++ b/tests/fe/mapping.cc @@ -189,7 +189,7 @@ compute_area(Mapping &mapping, double area=0; for (unsigned int i=0; i p_real=mapping.transform_unit_to_real_cell(cell, p_unit); Point p_re_unit=mapping.transform_real_to_unit_cell(cell, p_real); deallog << "p_unit=" << p_unit << ", p_real=" << p_real - << ", p_re_unit=" << p_re_unit << endl; + << ", p_re_unit=" << p_re_unit << std::endl; } delete[] st2; diff --git a/tests/fe/mapping_c1.cc b/tests/fe/mapping_c1.cc index ed7e7267a9..da0144071c 100644 --- a/tests/fe/mapping_c1.cc +++ b/tests/fe/mapping_c1.cc @@ -92,10 +92,10 @@ int main () { Point<2> radius = c1_values.quadrature_point(i); radius /= std::sqrt(radius.square()); - deallog << "Normalized radius=" << radius << endl; + deallog << "Normalized radius=" << radius << std::endl; - deallog << "C1 normal vector " << i << ": " << c1_values.normal_vector(i) << endl; - deallog << "Q3 normal vector " << i << ": " << q3_values.normal_vector(i) << endl; + deallog << "C1 normal vector " << i << ": " << c1_values.normal_vector(i) << std::endl; + deallog << "Q3 normal vector " << i << ": " << q3_values.normal_vector(i) << std::endl; }; diff --git a/tests/fe/performance.cc b/tests/fe/performance.cc index 36ef573456..54b0985532 100644 --- a/tests/fe/performance.cc +++ b/tests/fe/performance.cc @@ -29,23 +29,23 @@ void performance (Triangulation& tr, const Quadrature& quadrature, UpdateFlags flags) { - deallog << "Create dofs" << endl; + deallog << "Create dofs" << std::endl; DoFHandler dof (tr); dof.distribute_dofs (fe); - deallog << "Create FEValues" << endl; + deallog << "Create FEValues" << std::endl; FEValues val (mapping, fe, quadrature, flags); DoFHandler::active_cell_iterator cell = dof.begin_active(); DoFHandler::active_cell_iterator end = dof.end(); - deallog << "Loop" << endl; + deallog << "Loop" << std::endl; for (;cell != end ; ++cell) val.reinit(cell); - deallog << "End" << endl; + deallog << "End" << std::endl; } template diff --git a/tests/fe/shapes.cc b/tests/fe/shapes.cc index 3f164180b1..f11499616a 100644 --- a/tests/fe/shapes.cc +++ b/tests/fe/shapes.cc @@ -58,12 +58,12 @@ plot_shape_functions(Mapping& mapping, { gnuplot << " " << fe.shape_value(i,k) + 1.; } - gnuplot << endl; + gnuplot << std::endl; k++; } - gnuplot << endl; + gnuplot << std::endl; } - gnuplot << endl; + gnuplot << std::endl; } } @@ -118,12 +118,12 @@ plot_face_shape_functions(Mapping& mapping, { gnuplot << " " << fe.shape_value(i,k) + 1.; } - gnuplot << endl; + gnuplot << std::endl; k++; } - gnuplot << endl; + gnuplot << std::endl; } - gnuplot << endl; + gnuplot << std::endl; } else { for (unsigned int s=0;s::subfaces_per_face; ++s) { @@ -140,12 +140,12 @@ plot_face_shape_functions(Mapping& mapping, { gnuplot << " " << sub.shape_value(i,k) + 1.; } - gnuplot << endl; + gnuplot << std::endl; k++; } - gnuplot << endl; + gnuplot << std::endl; } - gnuplot << endl; + gnuplot << std::endl; } } } diff --git a/tests/fe/show_transfer.cc b/tests/fe/show_transfer.cc index 5d588a4058..bfbae100e7 100644 --- a/tests/fe/show_transfer.cc +++ b/tests/fe/show_transfer.cc @@ -54,7 +54,7 @@ print_matrix(ostream& of, Vector in(n_fine); Vector out(n_coarse); - of << name << endl; + of << name << std::endl; for (unsigned int i=0;i A(nx,nx); @@ -59,7 +59,7 @@ main() A.vmult(v,u); } diff = clock()-start; - deallog << "vmult: " << double(diff)/ITER << endl; + deallog << "vmult: " << double(diff)/ITER << std::endl; } } diff --git a/tests/lac/block_matrices.cc b/tests/lac/block_matrices.cc index acb0600740..60aa035922 100644 --- a/tests/lac/block_matrices.cc +++ b/tests/lac/block_matrices.cc @@ -91,7 +91,7 @@ void test () deallog << "Row " << row << " sparsity: "; for (unsigned int i=0; i<29; ++i) deallog << t[i]; - deallog << endl; + deallog << std::endl; const unsigned int c=count(t.begin(), t.end(), true); @@ -109,13 +109,13 @@ void test () deallog << "Row=" << row << ": expected length=" << c << ", actual length=" << ac - << endl; + << std::endl; total_nonzero_elements += ac; AssertThrow (c==ac, ExcInternalError()); }; deallog << total_nonzero_elements << "==" << bsp.n_nonzero_elements() - << endl; + << std::endl; AssertThrow (total_nonzero_elements == bsp.n_nonzero_elements(), ExcInternalError()); @@ -127,7 +127,7 @@ void test () BlockSparseMatrix bsm (bsp); deallog << total_nonzero_elements << "==" << bsm.n_nonzero_elements() - << endl; + << std::endl; AssertThrow (total_nonzero_elements == bsm.n_nonzero_elements(), ExcInternalError()); @@ -180,7 +180,7 @@ void test () // compare to vmult result Assert (row_sum == dst(row), ExcInternalError()); - deallog << "vmult " << row << ' ' << row_sum << ' ' << dst(row) << endl; + deallog << "vmult " << row << ' ' << row_sum << ' ' << dst(row) << std::endl; }; @@ -188,7 +188,7 @@ void test () const double msp1 = dst.norm_sqr (); const double msp2 = bsm.matrix_scalar_product (dst, src); Assert (msp1 == msp2, ExcInternalError()); - deallog << "matrix_scalar_product " << msp1 << ' ' << msp2 << endl; + deallog << "matrix_scalar_product " << msp1 << ' ' << msp2 << std::endl; }; @@ -202,25 +202,25 @@ int main () } catch (exception &e) { - cerr << endl << endl + cerr << std::endl << std::endl << "----------------------------------------------------" - << endl; - cerr << "Exception on processing: " << e.what() << endl - << "Aborting!" << endl + << std::endl; + cerr << "Exception on processing: " << e.what() << std::endl + << "Aborting!" << std::endl << "----------------------------------------------------" - << endl; + << std::endl; // abort return 2; } catch (...) { - cerr << endl << endl + cerr << std::endl << std::endl << "----------------------------------------------------" - << endl; - cerr << "Unknown exception!" << endl - << "Aborting!" << endl + << std::endl; + cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl << "----------------------------------------------------" - << endl; + << std::endl; // abort return 3; }; diff --git a/tests/lac/block_vector.cc b/tests/lac/block_vector.cc index ab4b087cc1..e6fc188342 100644 --- a/tests/lac/block_vector.cc +++ b/tests/lac/block_vector.cc @@ -35,12 +35,12 @@ void test () // no output expected here deallog.push("empty constructor"); for (unsigned int i=0 ; i 1.e-12) deallog << a << ' '; } - deallog << endl; + deallog << std::endl; } if (true) @@ -96,12 +96,12 @@ main () C(i,i+1) = -sin(i+1); C.print_formatted (logfile); - deallog << "l1-norm: " << C.l1_norm() << endl; + deallog << "l1-norm: " << C.l1_norm() << std::endl; D = C; D.gauss_jordan(); D.print_formatted (logfile); - deallog << "linfty-norm: " << D.linfty_norm() << endl - << "Frobenius-norm: " << D.norm2() << endl; + deallog << "linfty-norm: " << D.linfty_norm() << std::endl + << "Frobenius-norm: " << D.norm2() << std::endl; // Rotate original matrix A.mmult(H,C); @@ -122,7 +122,7 @@ main () von_Mises(control, mem, 0.); double eigen = 0.; von_Mises.solve(eigen, A, u); - deallog << "Eigenvalue: " << eigen << endl; + deallog << "Eigenvalue: " << eigen << std::endl; } if (true) { @@ -131,7 +131,7 @@ main () von_Mises(control, mem, -4.); double eigen = 0.; von_Mises.solve(eigen, A, u); - deallog << "Eigenvalue: " << eigen << endl; + deallog << "Eigenvalue: " << eigen << std::endl; } H = A; H.gauss_jordan(); @@ -143,7 +143,7 @@ main () von_Mises(control, mem, 0.); double eigen = 0.; von_Mises.solve(eigen, H, u); - deallog << "Eigenvalue: " << eigen << endl; + deallog << "Eigenvalue: " << eigen << std::endl; } if (true) { @@ -152,7 +152,7 @@ main () von_Mises(control, mem, -4.); double eigen = 0.; von_Mises.solve(eigen, H, u); - deallog << "Eigenvalue: " << eigen << endl; + deallog << "Eigenvalue: " << eigen << std::endl; } } } diff --git a/tests/lac/mg.cc b/tests/lac/mg.cc index fdf03630ac..fca71d6209 100644 --- a/tests/lac/mg.cc +++ b/tests/lac/mg.cc @@ -41,11 +41,11 @@ // for (unsigned int i=0;i structure(maxlevel+1); diff --git a/tests/lac/mgbase.cc b/tests/lac/mgbase.cc index 3aa316f284..4a88f11672 100644 --- a/tests/lac/mgbase.cc +++ b/tests/lac/mgbase.cc @@ -107,7 +107,7 @@ TransferTest::prolongate(unsigned l, Vector&, const Vector&) const { - deallog << "Prolongating " << l-1 << " to " << l << endl; + deallog << "Prolongating " << l-1 << " to " << l << std::endl; } void @@ -115,7 +115,7 @@ TransferTest::restrict_and_add (unsigned l, Vector&, const Vector&) const { - deallog << "Restricting " << l << " to " << l-1 << endl; + deallog << "Restricting " << l << " to " << l-1 << std::endl; } void @@ -123,7 +123,7 @@ SmoothTest::smooth (const unsigned int level, Vector &, const Vector&) const { - deallog << "Smoothing on " << level << endl; + deallog << "Smoothing on " << level << std::endl; } void @@ -132,7 +132,7 @@ MGTest::level_vmult(unsigned l, const Vector&, const Vector&) { - deallog << "Residual on " << l << endl; + deallog << "Residual on " << l << std::endl; } void @@ -148,5 +148,5 @@ MGCoarseGridTest::operator() (unsigned int level, Vector&, const Vector&) const { - deallog << "Solving on " << level << endl; + deallog << "Solving on " << level << std::endl; } diff --git a/tests/lac/solver.cc b/tests/lac/solver.cc index 5b621f12cc..8fab1b00a0 100644 --- a/tests/lac/solver.cc +++ b/tests/lac/solver.cc @@ -59,7 +59,7 @@ int main() { unsigned int dim = (size-1)*(size-1); - deallog << "Size " << size << " Unknowns " << dim << endl; + deallog << "Size " << size << " Unknowns " << dim << std::endl; // Make matrix FDMatrix testproblem(size, size); @@ -88,7 +88,7 @@ int main() A.SOR_step(u,f); res.add(-1.,u); - deallog << "SOR-diff:" << res*res << endl; + deallog << "SOR-diff:" << res*res << std::endl; deallog.push("no"); diff --git a/tests/lac/sparse_ilu.cc b/tests/lac/sparse_ilu.cc index d9cf0a67aa..01e5c9bc4d 100644 --- a/tests/lac/sparse_ilu.cc +++ b/tests/lac/sparse_ilu.cc @@ -40,7 +40,7 @@ int main() { unsigned int dim = (size-1)*(size-1); - deallog << "Size " << size << " Unknowns " << dim << endl; + deallog << "Size " << size << " Unknowns " << dim << std::endl; // Make matrix FDMatrix testproblem(size, size); @@ -53,7 +53,7 @@ int main() for (unsigned int test=0; test<2; ++test) { - deallog << "Test " << test << endl; + deallog << "Test " << test << std::endl; // generate sparse ILU. // @@ -112,7 +112,7 @@ int main() deallog << "Residual with test vector " << i << ": " << " left=" << left_residual << ", right=" << right_residual - << endl; + << std::endl; }; }; diff --git a/tests/lac/testmatrix.cc b/tests/lac/testmatrix.cc index 1890b47a0a..81b857fdc5 100644 --- a/tests/lac/testmatrix.cc +++ b/tests/lac/testmatrix.cc @@ -101,11 +101,11 @@ FDMatrix::gnuplot_print(ostream& s, const Vector& V) const { // Number of the row to be entered unsigned int row = j+(nx-1)*i; - s << (j+1)/(float)nx << '\t' << (i+1)/(float)ny << '\t' << V(row) << endl; + s << (j+1)/(float)nx << '\t' << (i+1)/(float)ny << '\t' << V(row) << std::endl; } - s << endl; + s << std::endl; } - s << endl; + s << std::endl; } diff --git a/tests/lac/vector-vector.cc b/tests/lac/vector-vector.cc index 1799acc847..b717e1f99e 100644 --- a/tests/lac/vector-vector.cc +++ b/tests/lac/vector-vector.cc @@ -29,12 +29,12 @@ unsigned int check_point = 0; template void print (const Vector &v) { -// deallog << "Check point " << check_point << endl; +// deallog << "Check point " << check_point << std::endl; // check_point++; for (unsigned int i=0; i &v) template void check_vectors (Vector &d1, Vector &d2) { - deallog << "Fill & Swap" << endl; + deallog << "Fill & Swap" << std::endl; Vector d3(d1.size()); print (d3); @@ -66,30 +66,30 @@ void check_vectors (Vector &d1, Vector &d2) d1 = 2.5; print (d1); - deallog << "Extract number" << endl; + deallog << "Extract number" << std::endl; // Each line should contain two equal numbers double sum = 0.; for (unsigned int i=0;i &d1, Vector &d2) double t = fabs(2.-.5*i); if (t>sum) sum = t; } - deallog << d3.linfty_norm() << '\t' << sum << endl; + deallog << d3.linfty_norm() << '\t' << sum << std::endl; - deallog << "add & sub" << endl; + deallog << "add & sub" << std::endl; d1 += d2; print (d1); @@ -116,7 +116,7 @@ void check_vectors (Vector &d1, Vector &d2) d1.add (2., d2, .5, d3); print (d1); - deallog << "sadd & scale" << endl; + deallog << "sadd & scale" << std::endl; d2.sadd (2., d1); print (d2); @@ -130,7 +130,7 @@ void check_vectors (Vector &d1, Vector &d2) d1.scale (4.); print (d1); - deallog << "equ" << endl; + deallog << "equ" << std::endl; d2.equ (.25, d1); print (d2); -- 2.39.5