Multigrid
The Multigrid solver () is used to set up a geometric multigrid (GMG) solver or an algebraic multigrid (AMG) solver. Right-click the Iterative, Krylov Preconditioner, Presmoother, Postsmoother, or Coarse Solver attribute node to add a Multigrid solver.
Linear in the COMSOL Multiphysics Programming Reference Manual
General
Select a multigrid Solver: Geometric multigrid (the default), Algebraic multigrid, or Smoothed aggregation AMG. You can use the smoothed aggregation AMG (SAAMG) solver for linear elasticity problems when geometric multigrid cannot be used or when classical algebraic multigrid performs poorly. That method works by clustering nodes of degrees of freedoms into aggregates based on a connection criterion. Each aggregate then becomes a new node on the next multigrid level, and the algorithm proceeds until a certain number of levels has been reached or until the number of degrees of freedoms is sufficiently small.
For either choice, enter the:
Number of iterations. The default is 2.
Select a Multigrid cycle: V-cycle (the default), W-cycle, or F-cycle. For Multigrid cycle, the settings are the same as for the geometric multigrid (GMG) and algebraic multigrid (AMG) solvers.
Enter the Number of multigrid levels to generate (the default is 1 for Geometric multigrid and 5 for Algebraic multigrid).
Select the Prefer the free matrix format check box to automatically choose the matrix free format, which can save memory.
Geometric Multigrid
Select an option from the Hierarchy generation method list to specify how to generate the multigrid levels:
Lower element order first (any). The default. Generates first a multigrid level by lowering the order (by one) of any of the used shape functions. If there are no shape functions that can be lowered, the mesh is coarsened.
Coarsen mesh and lower order. Combines lowering of the used shape function order and a coarsening of the mesh.
Lower element order first (all). Generates a multigrid level by lowering the order (by one) of all the used shape functions. If this is not possible, the mesh is coarsened.
Coarsen mesh. Does not change the order.
Lower element order and refine (all). Generates a multigrid level by lowering the order (by one) of all the used shape functions. If this is not possible, the mesh is refined a number of times. The mesh solved for can, with this method, be a finer one than the one selected under the study node.
Lower element order and refine (any). Generates a multigrid level by lowering the order (by one) of any of the used shape functions. If there are no shape functions that can be lowered, the mesh is refined. The mesh solved for can, with this method, be a finer one than the one selected under the Study node.
Refine mesh. Does not change the order.
Manual. Use this setting to select a multigrid level from the existing ones. You then specify the multigrid level to use in the Use multigrid level list. Use the Move Up (), Move Down (), Delete (), and Add () buttons to configure the list of multigrid levels. Use the Assemble on multigrid levels list to specify for which multigrid levels to assemble the discrete differential operators. See also The Geometric Multigrid Solver with Several Meshes.
For any Hierarchy generation method (except Manual), additional settings are available:
In the Use hierarchy in geometries list, select the geometries to apply the multigrid level to. Use the Move Up (), Move Down (), Delete (), and Add () buttons to configure the list of geometries.
The Assemble on all levels check box is selected by default to assemble the discrete differential operators. Otherwise, these operators are formed using the restriction and prolongation operators. Click to clear the check box as needed.
When Coarsen mesh and lower order, Lower element order first (all), Lower element order first (any), or Coarsen mesh are selected from the Coarse level generation method list, select the Keep generated multigrid levels check box to save the meshes for all levels under the mesh node.
See also The Geometric Multigrid Solver/Preconditioner for more information.
The Coarse Level options are described for the Direct node.
If None is selected, no coarse mesh is used in addition to the fine mesh. This can lead to severe reduction in convergence rate but saves memory.
Algebraic Multigrid
For Algebraic multigrid, see The Algebraic Multigrid Solvers/Preconditioners for more information. In addition to the settings above, the following settings control the automatic construction of the multigrid hierarchy:
Enter a Maximum number of DOFs at coarsest level. The default is 5000. Coarse levels are added until the number of DOFs at the coarsest level is less than the max DOFs at coarsest level or until it has reached the number of multigrid levels. Also, you can specify the Maximum number of DOFs per thread on multigrid level for AMG on a parallel multithreaded system. The default is 5000.
Choose a Coarsening method: Parallel modified independent set (the default) or Classical. The Parallel modified independent set method makes the algebraic multigrid solver more efficient in distributed computing using the method described in Ref. 13. The Classical method corresponds to the implementation of AMG in COMSOL versions before version 6.0 (that is, Ruge–Steuben coarsening). See below for the settings for each coarsening method.
If you chose Classical:
Enter a value or use the slider to set the Quality of multigrid hierarchy. Higher quality means faster convergence at the expense of a more time-consuming setup phase. For instance, if the linear solver does not converge or if it uses too many iterations, try a higher value to increase the accuracy in each iteration, meaning fewer iterations. If the algebraic multigrid algorithm runs into memory problems, try a lower value to use less memory. The range goes from 1 to 10, where 10 gives the best quality. The default is 3.
If you chose Parallel modified independent set:
Enter a value for the Strength of connections is a positive number, typically between 0.25 and 0.75 (default value: 0.25). This is a strength threshold used to determine the relation of strong influence dependence between the points. There is some indication that you should use a lower number, such as 0.25, for problems with denser matrices, whereas for other problems with sparser matrices you should use larger values, such as 0.75.
Let A denote the system matrix and θ the strength threshold; a point i then depends strongly on j, or j strongly influences i if .
The Sparser prolongator check box is selected by default. When interpolating the value of the error in a specific fine point “i”, only the coarse points that strongly influencing “i” are used. If you clear the check box, all the coarse points that are influencing “i” are used.
The interpolation formula, referred to as “direct interpolation”, is given in equation 7 in Ref. 15. The prolongator is the matrix defining the interpolation operator between the coarse and fine grid. By selecting the Sparser prolongator check box, you achieve better performance per iteration (less memory and computation time) but the solver may require more iterations to converge.
Use the Prolongator truncation factor (default: 0.1) to control the fill-in of the prolongator. Small elements from the prolongator are removed. More precisely, let P denote the prolongator and M the truncation factor, the element pij is removed if
The rows of the truncated prolongator are rescaled afterward by following the reasoning in Section 7.2 of Ref. 16. More precisely, the sum of the ith row before and after truncation should not change.
The Lower element order first (any) check box is selected by default. This setting provides the combination of GMG with lower order until order 1 is reached and then uses AMG to generate the coarser levels. The Assemble on the order-lowered levels check box, which is selected by default, then corresponds to the GMG option to assemble on all level. Using this setting is equivalent to using GMG with AMG as a coarse grid solver.
Smoothed Aggregation AMG
For Smoothed aggregation AMG (SAAMG), which is a version of AMG that works well alternative for CFD and other problems where GMG works well but is more robust in the sense that only one valid mesh is needed.
The following settings control the aggregation algorithm:
Enter a Maximum number of DOFs at coarsest level. The default is 5000. Coarse levels are added until the number of DOFs at the coarsest level is less than the max DOFs at coarsest level or until it has reached the number of multigrid levels.
The aggregation algorithm is based on a connection criterion, which you specify as a coefficient in the Strength of connections field. A node j is connected to another node i, if where ε is the strength of connection coefficient, and Aij is the submatrix of the stiffness matrix defined by the degrees of freedoms on node i and j, respectively. Loosely speaking, the strength of connection value determines how strongly the aggregation should follow the direction of anisotropy in the problem. The default value is 0.01.
From the Null-space vectors list, choose Constant (the default) or Rigid body modes. For linear elasticity problems, always select Rigid body modes because it enhances the convergence properties significantly.
Select the Construct prolongators componentwise check box for CFD applications and other not strongly coupled physics. It is selected by default in predefined solver suggestions for CFD. This setting is only available when the Null-space vectors settings is set to Constant.
Select the Compact aggregation check box to use an aggregation algorithm that forms, on average, smaller aggregates, which leads to a less rapid coarsening.
By default, the Reuse prolongators check box is selected to avoid computing the prolongator matrix P when an old prolongator can be reused.
Choose how to control the prolongator smoothing using the Smoothing list, which is active when the Prolongator smoothing check box (selected by default) is selected. The Auto option postpones the smoothing for sdim-1 levels, where sdim is the space dimension of the problem. If you choose Manual, enter the level to start smoothing at in the Start smoothing at multigrid level field.
The final transfer operator, P, between the fine and coarse problems are smoothed by one application of Jacobi smoothing:
where ω is the Jacobi damping factor, AF is the filtered stiffness matrix, and D is the diagonal of AF. Specify ω in the Jacobi damping factor field. The default value is 2/3.
By default, the Use filtering check box is selected. Filtering means that entries in the stiffness matrix have been dropped if they correspond to degrees of freedoms on a node that has no strong connections. Loosely speaking, filtering highlights anisotropy in the problem and results in a sparser coarse level problem.
The Lower element order first (any) check box is selected by default. This setting provides the combination of GMG with lower order until order 1 is reached and then uses SAAMG to generate the coarser levels. The Assemble on the order-lowered levels check box, which is selected by default, then corresponds to the GMG option to assemble on all level. Using this setting is equivalent to using GMG with SAAMG as a coarse grid solver.
Equations
Shifted Laplace Contribution (CSL)
If you have selected the Shifted Laplace contribution check box to use CSL, then select:
The Physics from the list.
Add a weak contribution method from the Add weak contribution list:
-
Automatic: The code internally creates a weak contribution for the selected physics. Specify a Shift coefficient relaxation factor, which is a scalar value (default: 1). The shift coefficient multiplies the expression for the shifted Laplace contribution. You can think of it as the β coefficient in the Complex Shifted Laplacian for Large Helmholtz Problems section. It might be the case that you need more or less damping than what the original equation provides; you can then choose another value for this factor. The Automatic option is only supported for Helmholtz-type equations. In that case, the meaning of the shift coefficient is the factor α in the term i α  kru, where r is 1.5. Select the Keep generated weak contribution check box in order to keep the CSL weak contribution feature in the Physics node.
-
Manual: Specify the complete weak-form expression in the Weak expression field. This expression can be applied to any Physics available in the list above. Select the Keep generated weak contribution check box to keep the CSL weak contribution feature in the Physics node.
-
From physics: the CSL weak contribution is taken from the Physics node. Only use this option if a weak contribution feature was previously added by selecting the Keep generated weak contribution check box together with the Automatic or Manual options as described above.
-
Off: No CSL is added for the selected Physics.
The CSL can be applied on the fine grid and on the multigrid levels independently Select the Shifted Laplace contribution on multigrid levels check box to use CSL on the multigrid levels. The CSL group for the fine grid can be used only if the Prefer the free matrix format check box is active. When CSL is used together with GMG, it is possible to specify the Minimum multigrid level and Maximum multigrid level on which CSL is to be applied. By default, the latter is set to the maximum multigrid level.
Hybridization
Use the settings in the Hybridization section to set up a hybrid preconditioner. See Hybrid Preconditioners for more information.