Preconditioners
preconditioners
This module contains classes that augment default Firedrake preconditioners.
FreeSurfaceMassInvPC
Bases: MassInvPC
Version of MassInvPC that includes free surface variables.
form(pc, tests, trials)
Sets the form.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pc
|
PC
|
PETSc preconditioner |
required |
tests
|
list[Argument | Indexed]
|
List of Firedrake test functions |
required |
trials
|
list[Argument | Indexed | Function]
|
List of Firedrake trial functions |
required |
Source code in g-adopt/gadopt/preconditioners.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
SPDAssembledPC
Bases: AssembledPC
Version of AssembledPC that sets the SPD flag for the matrix.
For use in the velocity fieldsplit_0 block in combination with gamg. Setting PETSc MatOption MAT_SPD (for Symmetric Positive Definite matrices) at the moment only changes the Krylov method for the eigenvalue estimate in the Chebyshev smoothers to CG.
Users can provide this class as a pc_python_type
entry to a PETSc solver option dictionary.
initialize(pc)
Initialises the preconditioner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pc
|
PC
|
PETSc preconditioner. |
required |
Source code in g-adopt/gadopt/preconditioners.py
57 58 59 60 61 62 63 64 65 |
|