From: bangerth Date: Wed, 6 Jan 2010 17:14:25 +0000 (+0000) Subject: Suppress output unless specifically directed. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9143a7805e434cee219de2b20a745a4cd5224399;p=dealii-svn.git Suppress output unless specifically directed. git-svn-id: https://svn.dealii.org/trunk@20323 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 2d35914611..f83de766a8 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -276,6 +276,7 @@ void InverseMatrix::vmult (Vector &dst, abort (); } +#ifdef STEP_42_TEST if (name == "in schur") std::cout << " " << solver_control.last_step() << " inner CG steps inside the Schur complement "; @@ -290,6 +291,7 @@ void InverseMatrix::vmult (Vector &dst, std::cout << solver_control.initial_value() << "->" << solver_control.last_value() << std::endl; +#endif } template @@ -669,7 +671,6 @@ void StokesProblem::assemble_multigrid () mg_A_preconditioner.resize (triangulation.n_levels()); for (unsigned int level=0; level::type>(new typename InnerPreconditioner::type()); mg_A_preconditioner[level] @@ -724,7 +725,9 @@ SchurComplementSmoother:: vmult (BlockVector &dst, const BlockVector &src) const { +#ifdef STEP_42_TEST std::cout << "Entering smoother with " << dst.size() << " unknowns" << std::endl; +#endif const InverseMatrix,InnerPreconditioner> A_inverse (system_matrix->block(0,0), *A_preconditioner); @@ -750,9 +753,11 @@ vmult (BlockVector &dst, 1e-1*schur_rhs.l2_norm()); SolverGMRES<> cg (solver_control); +#ifdef STEP_42_TEST std::cout << " Starting Schur complement solver -- " << schur_complement.m() << " unknowns" << std::endl; +#endif /* FullMatrix full_schur(schur_complement.n(),schur_complement.m()); copy(schur_complement, full_schur); @@ -777,12 +782,13 @@ vmult (BlockVector &dst, } // no constraints to be taken care of here - +#ifdef STEP_42_TEST std::cout << " " << solver_control.last_step() << " CG Schur complement iterations in smoother " << solver_control.initial_value() << "->" << solver_control.last_value() << std::endl; +#endif } @@ -795,8 +801,9 @@ vmult (BlockVector &dst, A_inverse.vmult (dst.block(0), tmp); // no constraints here either } - +#ifdef STEP_42_TEST std::cout << "Exiting smoother with " << dst.size() << " unknowns" << std::endl; +#endif } @@ -885,7 +892,9 @@ void StokesProblem::solve () gmres_data); // PreconditionIdentity precondition_identity; +#ifdef STEP_42_TEST std::cout << "Starting outer GMRES complement solver" << std::endl; +#endif try { gmres.solve(system_matrix, solution, system_rhs, @@ -899,9 +908,8 @@ void StokesProblem::solve () constraints.distribute (solution); - std::cout << std::endl << " " - << solver_control.last_step() - << " outer GMRES iterations"; + std::cout << solver_control.last_step() + << " outer GMRES iterations"; }