Advanced
The Advanced node () is an attribute node that handles advanced settings for solver nodes, such as a Stationary Solver, Eigenvalue Solver, and Time-Dependent Solver. Also see About the Advanced Attribute Settings.
General
Matrix Symmetry
Use the Matrix symmetry list to control how the solver handles matrix symmetry of linear system matrices. Select:
Automatic to perform automatic symmetry detection. Both symmetric and Hermitian matrices can be detected.
Nonsymmetric to override the automatic symmetry detection and force the solver to assume that matrices are nonsymmetric.
Symmetric to override the automatic symmetry detection and force the solver to assume that matrices are symmetric.
Selecting Symmetric for a problem that does not result in symmetric matrices leads to an incorrect solution. See Which Problems are Symmetric? for information.
Hermitian to override the automatic symmetry detection and force the solver to assume that matrices are Hermitian.
Matrix Format
Jacobian matrices requested by the solvers during solution can be stored in a sparse or a filled format, which you choose as Sparse or Filled, respectively, from the Matrix format list. In addition, you can choose a matrix-free format, which you choose as Free. The matrix-free representation allows evaluation of matrix-vector products without assembling the matrix. This can reduce the memory usage significantly for solver algorithms that only use the matrix to multiply a vector, specifically:
A warning is issued when the matrix-free format is used with other solvers. COMSOL Multiphysics then assembles the matrix when needed but does not store it between repeated requests from the solver algorithm. This may reduce peak memory usage at the cost of multiple assembly calls.
The default setting is Automatic. This setting chooses a sparse, filled, or matrix-free representation based on the equations being assembled and the solver used.
Row Equilibration
Even if variables are well scaled, equations can have very different scales. The Row equilibration check box is selected to balance the equations using row equilibration. Even when this check box is selected, row equilibration is not used in the following situations in order to preserve matrix symmetry:
Symmetric or Hermitian is selected in the Matrix symmetry list.
Null-Space Function
Use the Null-space function list to select a method for the computation of matrices needed for constraint handling (see Elimination Constraint Handling). Select:
Automatic to let the software automatically determine the most appropriate method, which uses an explicit handling of nodal constraints and the Hybrid method for the remaining constraints.
Orthonormal to compute the needed matrices using singular value decomposition.
Sparse to handle constraint matrices with nonlocal couplings using a sparse algorithm.
Explicit — Orthonormal to handle constraints by explicitly eliminating the DOFs on the destination side of the explicit constraints. The remaining constraints are handled using the Orthonormal method.
Explicit — Sparse to handle constraints by explicitly eliminating the DOFs on the destination side of the explicit constraints. The remaining constraints are handled using the Sparse method.
Hybrid to sort constraints into mutually independent constraint blocks first. The blocks that exceed the Orthonormal Block Limit are handled with a sparse algorithm while the remaining blocks are handled by SVD.
Explicit constraints are obtained when the Nodal constraint method is used for boundary conditions like Periodicity and Continuity on boundary pairs.
Orthonormal Block Limit
For the Automatic and Hybrid null-space function methods, you can specify an Orthonormal block limit, which is used in the automatic choice between Orthonormal and Sparse handling for constraint blocks. If an estimate of the complexity (the number of operations) needed to SVD factorize a constraint block exceeds this limit, the Sparse method is used. Else the Orthonormal method is used. The limit is 107 per default. To SVD factorize a block with this complexity is usually fast, so you might want to increase this limit for increased constraint handling stability. To change the value of the orthonormal block limit, use the slider or enter a value in the text field. A small value is more efficient while a large value is more robust.
Store Last Residual
You can store the last residual while solving and also in the solver output, if you want to access it using the residual operator during postprocessing. Storing the residual in the output increases the memory requirements for the simulations. From the Store last residual list, choose
Off (the default), to not store any data for the latest assembled residual.
While solving, to make the last residual available while solving.
While solving and in output, to make the last residual available while solving and also in the solver’s output so that you can access it during postprocessing.
Solver Log
The solver log contains information about the progress and convergence of the solvers (see The Log Window). From the Solver log list, choose one of the following formats:
Minimal, which reports a minimal amount of information (for example, warnings and nonstandard feedback). The normal output (once per “step” and so forth) is turned off.
Normal (the default), which reports information about the main solver (the time-dependent solver, for example).
Detailed, which reports information about the main solver and also information about the solver on the level below (a nonlinear stationary solver, for example).
For the time-dependent solvers, you can also specify an interval for the log sampling (in seconds) in the Log sampling (wall-clock) field when the Solver log list is set to Normal. The default is 0.005 s, which means that the log is updated at most every 0.005 s. Increasing the sampling interval can reduce the overhead associated with the log when solving problems with many small time steps. Set the value to 0 to make the log contain every time step regardless of their size.
Recovery File Saving
From the Recovery saving list, choose From preferences (the default), On every iteration, or Saving ratio. If you chose Saving ratio, also enter a ratio in the Recovery saving ratio field (default: 0.1; that is, saving every 10:th iteration). The recovery saving ratio is a number between 0 and 1.
From the Force save of recovery file list, choose From preferences (the default) or Manual. If you chose Manual you can specify a time interval (in seconds) for how often to force a save of the recover file in the Save every field (default: 1800 s; that is, once every half hour). This time interval is the longest time that is allowed to pass before the recovery file is saved while computing.
Other Settings
When the Automatic rescaling of linear equations check box is selected, then under certain circumstances the scaling of the equations for the linear solvers can be changed to scales that are taken from the current solution. These circumstances are the following:
When this happens, COMSOL Multiphysics adds a printout of the new scales to the solver log.
Assembly Settings
This section contains some settings related to the assembly process when computing a solution.
By default, the solver chooses the number of mesh elements that are processed together during the assembly process (the block size). Select the Assembly block size check box for manual specification of a block size for all null-space function methods except Automatic.
If Use distributed solution for assembly is set On, the assembly will rely on a local subset of data from the distributed solution vector when running in a distributed mode. This is suitable for models with only local contributions in assembly because it reduces the communication overhead. Evaluation of nonlocal terms (such as a spatial at operator or extrusion coupling operators) during assembly with this option activated can result in an error message requesting disabling of this option. The default setting, Automatic, sets this functionality to on or off depending on the type of model.
Select the Reuse sparsity pattern check box to store the sparsity patterns of the assembled matrices and try to reuse them for successive assembly processes within the same solution process. In many cases, the sparsity pattern of the system matrices does not change from one nonlinear iteration or time step to the others. Reusing the sparsity pattern from the previous iteration or step can then improve the solution performance at the cost of a usually small amount of memory. This functionality is enabled by default when using physics interfaces that can benefit from it. When active, the functionality can also detect whether the stored pattern cannot be used in the current assembly process (that is, when a “pattern mismatch” occurs) and reassemble it. If such a mismatch occurs, a message is added to the solver log. Pattern mismatches have no consequence on the solution process except for a small impact on the assembly performance during the current step or iteration due to the reassembling. Pattern mismatches can occur, for example, when solving a model with identity pairs and sliding meshes. If you know an expression for which the sparsity pattern needs to be recomputed when it is changed, you can switch from using the default Automatic method to using Keep while expression is constant instead, from the Method list. The expression that you enter in the Expression field for the Keep while expression is constant option is expected to be possible to evaluate globally and is not allowed to be solution dependent. For instance, in some time-dependent problem with many nonlinear iterations at each time step, t could be such an expression. Using the Keep while expression is constant method, the pattern will be recomputed when the expression has changed value more than 1012.
When the Optimize data locality on cluster check box is selected (the default), the mesh element assignment for processing on different cluster nodes is optimized to reduce data communication.
Select the Use thread scheduling for matrix assembly check box to assign the same blocks of elements to the same core each time a matrix is assembled. This type of assembling can have advantages for data management.
Select the Use static distribution of assembly blocks check box to force the assembly blocks to have a deterministic distribution between threads. This leads to numerically more stable results. For certain types of models, the load balancing can be worse, so use this option mainly when you run simulations where computing multiple times results in indeterministic behavior.
Select the Allow complex-valued output from functions with real input check box to control whether the solver treats such complex-valued output as an error or not.
The Stop when undefined mathematical operation is detected check box controls how the solver handles undefined mathematical operations such as division by zero. It is selected by default.
Select the Check for undefined numerical values after each operation check box to make COMSOL Multiphysics check intermediate results for undefined numerical values (Inf or NaN) when numerical overflow occurs, for example. Selecting this option gives more accurate error messages when such undefined numerical values occur.
The Optimize element data initialization check box is selected by default to make some elements (components of the discretization of the problem) try to optimize parallelization of their initialization. Currently, this is only implemented for contact problems and reduced-order modeling. The optimization can be turned off by clearing the Optimize element data initialization check box.
If desired, modify the drop tolerance in the Drop tolerance for local matrix contributions field (default value: 1·1012). For semiconductor simulations, the default solver settings will use 0 as a value for the drop tolerance for local matrix contributions, which is a drop tolerance that is better suited for such simulations.
Select the Manual control of reassembly check box to be able to override the solver mechanism that automatically detects which quantities need to be reassembled. This can be useful to improve efficiency in situations when the automatic mechanism is too sensitive and reassembles quantities that do not need to be reassembled.
Constant Load
If the Manual control of reassembly check box is selected, the Constant load is On by default.
The load (residual vector) is constant if the PDE and the Neumann boundary conditions are linear with time-independent coefficients and right-hand sides. For the discretized model, this means that the residual vector L depends linearly on U:
and that L0, K, D, and the mass matrix E are constant.
If you choose to turn Off the Constant load, it instructs the solver to perform a reassembly process for the computation of the residual vector (when Off) or not. However, even if it is off, you might still want to treat some of the matrices as constant. Manual control of reassembly of these quantities can be controlled with the available check boxes, which makes the assembly only occur once for the corresponding matrix.
Select the Constant stiffness check box to treat the stiffness matrix K as constant.
Select the Constant damping or mass check box if you want to treat the coefficients of the first-order time-derivative terms or the second-order time-derivative terms as constant. In the discretized model, this means that the damping (sometimes called mass) matrix D or the mass matrix E is treated as constant.
Select the Constant mass check box to treat the mass matrix E as constant.
Constant Constraint
If the Manual control of reassembly check box is selected, you can control reassembly of the constraint residual. By default the Constant constraint is On. The constraint is constant if the Dirichlet boundary conditions (constraints) are linear and time independent. For the discretized model, this means that the constraint residual M depends linearly on U (M = M0 NU) and that M0 and N are constant. It is also assumed that the constraint Jacobian N is correct.
If you choose to turn Off the Constant constraint, it instructs the solver to perform a reassembly process for the computation of the constraint residual vector (when Off) or not. However, even if it is off, the constraint Jacobian might still be constant. To control the reassembly of this quantity, select the Constant constraint Jacobian check box if the Dirichlet boundary conditions are linear with time-independent coefficients (not right-hand side). For the discretized model this means that N is constant.