The Log Window
The Log window () contains information from previous solver runs, including convergence information, solution time, and memory use. When a solver starts, the log window displays logs from all solver calls. This window is always available. For progress information during a solver or mesher process, see The Progress Window.
A horizontal divider (===============) indicates the start of a new solver progress log. To differentiate logs from different models, the log contains a horizontal divider displaying the name of the Model MPH-file each time a model is opened. For example,
================ Opened thin_layer_diffusion.mph =================
It also contains a similar divide when you save a model to a new file (using Save As):
================= Saved thin_layer_diffusion.mph =================
Arrows indicate the beginning and the end of the compile equation stage and the solver stage.
When the COMSOL Multiphysics software starts to compile the equations for the study, it prints the following information:
When a solver starts working, it prints the name of the solvers used and then prints the number of degrees of freedom in the linear systems to be solved to the log. For certain problems, there are additional degrees of freedom involved in the discrete problem formulation that do not affect the size of the matrices assembled by the solver. These are called internal degrees of freedom and are displayed separately from the actual degrees of freedom in the log. For example, when solving plasticity problems in structural mechanics, plastic strains are represented by internal degrees of freedom. The log then contains information about if symmetric or nonsymmetric matrices are found and about the scales of the dependent variables. Depending on the solver and the detail level of the solver log (see the Solver log settings for the Advanced node), additional information is printed. With a detailed solver log, the log also contains information about the type of null-space function that is used.
When a solver has finished it reports the following information:
If used, the log reports the out-of-core memory used in addition to the core (physical) memory.
For parallel and distributed simulations, the log also contains the memory used per node, and sections that are separated by
<<<<< Node X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
… some log information here
>>>>> Node X >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
contain log information obtained from other nodes than Node 0 (or use the head node if that is used elsewhere). Log information without separators is log information from Node 0 (or the head node). This is the only log information that is updated live. All other log information is obtained after the logging operation is finished.
In addition, the log includes the following information that is specific to the type of solver:
Also, see Pseudo Time Stepping for information about the CFL ratio in the log.
Scrolling in the Log Window
You can scroll the contents of the Log window to display information from earlier runs.
Click the Scroll Lock button () to stop the window from scrolling the log during a solver call, for example.
Click the Scroll Lock button again to resume scrolling.
Click the Clear button () to clear the Log window from all information.
Buffer Size of the Log Window
By default, the buffer size of the Log window is limited to 300,000 characters.
To change the size of the buffer, go to the Preferences dialog box, choose the General page, and, under Log and messages, then enter a maximum buffer size (in characters) in the Log window size (characters) field. The default is 300,000 characters. This buffer size also applies to the Log stored in the solvers for the last run.
The Adaptive and Parametric Solver Log
The Adaptive Mesh Refinement Solver prints a section in the log for each adaptive generation containing the current number of elements and a global error indicator value. The Parametric solver similarly outputs one section to the log for each parameter value.
The Stationary Solver, Time-Dependent Solver, and Eigenvalue Solver log their iterations.
The Nonlinear Solver Log
The log from the nonlinear solver contains the following information:
-
The solution error (SolEst), if Solution is selected from the Termination criterion list for the solver.
-
The residual error (ResEst), if Residual is selected from the Termination criterion list for the solver.
-
Both the solution error and the residual error (SolEst and ResEst), if Solution or residual or Solution and residual is selected from the Termination criterion list for the solver. The convergence is then based on the minimum of the solution error or the residual error multiplied by the residual factor.
If the solver log detail is set to Detailed from the Solver log list in the Advanced node’s Settings window, the residual error and the solution error (depending on the selected termination criterion) from each individual field in the model appear in the solver log.
The size of the undamped Newton step (Stepsize) in the error estimate norm.
The numbers of residuals (#Res), Jacobians (#Jac), and linear-system solutions computed (#Sol) so far.
The Direct Linear System Solver Logs
The direct linear system solvers produce a log that additionally contains a relative error estimate (LinErr) and the relative residual (LinRes). The relative error is estimated by deferred correction (also called iterative improvement) — that is, by solving A·dx = r(x) for dx and setting LinErr = rhoB · norm(dx)/norm(x), where rhoB is the factor in error estimate value from the direct solver, and r(x) = Ax  b. The relative residual is the Euclidean norm of the residual divided by the norm of the linear system’s right-hand side; that is, LinRes = norm(r(x))/norm(b).
The Iterative Linear System Solver Logs
The iterative linear system solvers produce a log that additionally contains the total number of linear iterations (LinIt), a relative error estimate (LinErr), and the relative residual (LinRes). The relative error estimate is a factor times the relative (preconditioned) residual. The relative residual is the Euclidean norm of the residual divided by the norm, |b|, of the linear system’s right-hand side.
The Time-Dependent Solver Log
For the Time-Dependent Solver, the time-stepping algorithm produces a log that contains:
Time (Time; output times are indicated with out).
The step size (Stepsize).
The number of residuals (Res), Jacobians (Jac), and linear system solutions (Sol) computed.
You can see also the order of accuracy of the method (Order), the number of error test failures in time stepping (Tfail), and the number of failures in the nonlinear iterations (NLfail). For iterative linear system solvers, the log also contains the total number of linear iterations, a linear error estimate, and a relative residual (see above). Failures in the nonlinear iterations (NLfail), for example, can affect the time stepping so that the solver takes smaller time steps.
If an iterative solver is used, the log includes the total number of iteration (LinIt), the relative residual (LinRes), and the linear error estimate (LinEst).
If you use the Runge-Kutta time-stepping methods with local time stepping, the log includes the local error (LocError). It is a weighted root mean square norm of the difference of the fourth-order and fifth-order solutions, or, for RK34, the difference of the third-order and fourth-order solutions. More specifically, it is the relative tolerance times the norm described in Absolute Tolerance Settings for the Time-Dependent Solver.
Also, for the detailed solver log, the time-dependent solver lists any algebraic variables at the start of the solution process.
The Eigenvalue Solver Log
The Eigenvalue Solver produces a log that contains the iteration number (Iter), an error estimate (ErrEst), the number of converged eigenvalues (Nconv), and — if you are using an iterative linear solver — the number of linear iterations (LinIt).
The Optimization Solver Log
SNOPT
The Optimization Solver (which requires the Optimization Module) algorithm used by the solver SNOPT is an iterative procedure that involves major and minor iterations. A major iteration results in a new solution candidate. For each major iteration, the optimization solver solves a quadratic-programming subproblem using an iterative procedure; these iterations are the minor iterations.
The log produced by the optimization solver SNOPT has the following data:
The number of minor iterations for the current major iteration (Minor). This value should be 1 when the solver is close to the solution.
The step length taken in the current search direction (Step). This value should be 1 when the solver is close to the solution.
The maximum complementarity gap (Error). It is an estimate of the degree of nonoptimality of the reduced costs. For convergence, this value should be smaller than the Optimality tolerance.
MMA
The MMA solver implements another general-purpose optimization algorithm. The method is based on solving a sequence of approximating subproblems, one for each inner iteration. The subproblem is constructed from function values and gradients, which are evaluated once per outer iteration only. Each outer iteration requires one or more inner iterations, depending on whether the last subproblem was found to be conservative or not. Once a feasible point is found, outer iterates stay feasible. If the initial guess is infeasible or the feasible set is empty, nonzero infeasibilities may be reported.
The log produced by the MMA solver contains the following data:
The cumulative number of outer iterations (Iter). One outer iteration per line is reported in the log.
The number of inner iterations for the current outer iteration (Inner). This is the number of attempts needed to find a conservative approximating subproblem, which in some sense measures the nonlinearity of the problem.
The cumulative number of model evaluations (nPDE). Each inner iteration requires a model evaluation in order to check the conservativeness of the approximation. Gradients are only computed once for each outer iteration.
The estimated error (Error). The error is defined as the maximum relative change in any control variable since last outer iteration, computed as a percentage of the distance between the control variable’s bounds.
The maximum violation of any constraint (MaxInfeas). For a feasible solution, this number must be zero. It may be nonzero in the first outer iterations if the initial guess is infeasible.
Levenberg-Marquardt
The optimization solver Levenberg-Marquardt is an iterative procedure used to solve least-squares problems. The log produced by the Levenberg-Marquardt solver contains the following data:
The current Levenberg-Marquardt factor (lmFact). A small factor typically indicates fast convergence.
The estimated error based on the gradient, the objective function, and the control variables (Error). For convergence, this value should be smaller than the Optimality tolerance.