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. The smoothed aggregation AMG (SAAMG) solver is mainly intended 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).
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 coarse level check box to assemble the discrete differential operators on the coarse multigrid level (selected by default).
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.
Select the Prefer the free matrix format check box to automatically choose the matrix free format, which can save memory.
See alsoThe 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.
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.
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 top 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.
The Compact aggregation check box is selected by default 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 top assemble on all level. Using this setting is equivalent to using GMG with SAAMG as a coarse grid solver.
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. Specif a Shift coefficient relaxation factor (default: 1). The Automatic option is only supported for the Helmholtz equation. 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. 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.