[cig-commits] commit 2021 by bangerth to /var/svn/dealii/aspect

dealii.demon at gmail.com dealii.demon at gmail.com
Wed Nov 20 14:46:36 PST 2013


Revision 2021

Improve screen output formatting. Add some more commentary.

U   trunk/aspect/source/simulator/core.cc


http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2021&peg=2021

Diff:
Modified: trunk/aspect/source/simulator/core.cc
===================================================================
--- trunk/aspect/source/simulator/core.cc	2013-11-20 15:42:00 UTC (rev 2020)
+++ trunk/aspect/source/simulator/core.cc	2013-11-20 22:46:07 UTC (rev 2021)
@@ -1021,10 +1021,15 @@
         case NonlinearSolver::Stokes_only:
         {
           // the Stokes matrix depends on the viscosity. if the viscosity
-          // depends on other solution variables, then after we need to
+          // depends on other solution variables, then we need to
           // update the Stokes matrix in every time step and so need to set
-          // the following flag. if we change the Stokes matrix we also
+          // the rebuild_stokes_matrix flag. if we change the Stokes matrix we also
           // need to update the Stokes preconditioner.
+          //
+          // there is a similar case where this solver can be used, namely for
+          // compressible models. in that case, the matrix does not depend on
+          // the previous solution, but we still need to iterate since the right
+          // hand side depends on it
           unsigned int iteration = 0;
 
           do
@@ -1037,8 +1042,8 @@
               const double stokes_residual = solve_stokes();
               current_linearization_point = solution;
 
-              pcout << "stokes residual: " << stokes_residual << std::endl;
-              if (stokes_residual <1e-8)
+              pcout << "      Nonlinear Stokes residual: " << stokes_residual << std::endl;
+              if (stokes_residual < 1e-8)
                 break;
 
               ++iteration;
@@ -1046,6 +1051,8 @@
           while (iteration < parameters.max_nonlinear_iterations);
           break;
         }
+
+
         case NonlinearSolver::iterated_IMPES:
         {
           double initial_temperature_residual = 0;
@@ -1096,7 +1103,7 @@
 
               current_linearization_point = solution;
 
-              pcout << "   Nonlinear residuals: " << temperature_residual
+              pcout << "      Nonlinear residuals: " << temperature_residual
                     << ", " << stokes_residual;
 
               for (unsigned int c=0; c<parameters.n_compositional_fields; ++c)


More information about the CIG-COMMITS mailing list