Interface Preconditioner
- All Known Implementing Classes:
IdentityPreconditioner, JacobiPreconditioner, SSORPreconditioner
public interface Preconditioner
Pluggable preconditioner for iterative linear system solvers.
Contract:
- Call
prepare(List, int)once per system before iterations to (re)initialise internal state. apply(Access1D, PhysicalStore)should approximateM^{-1}applied to a vector. Solvers that use left-preconditioning will apply this to residuals or intermediate vectors.applyTranspose(Access1D, PhysicalStore)should approximate(M^T)^{-1}. By default it delegates toapply(Access1D, PhysicalStore); override if the preconditioner is not symmetric.
- Left preconditioning: solver forms
M^{-1} A x = M^{-1} band callsapply(Access1D, PhysicalStore)on vectors. - Right preconditioning: solver forms
A M^{-1} y = b, then recoversx = M^{-1} y; may require bothapply(Access1D, PhysicalStore)andapplyTranspose(Access1D, PhysicalStore). - Symmetric preconditioners (
M = M^T): implementations can usually provide onlyapply(Access1D, PhysicalStore)and rely on the default transpose behaviour.
- Methods requiring symmetric positive-definite preconditioning (e.g., for SPD systems) expect
Mto be symmetric positive-definite. - Methods for general nonsymmetric systems that use right-preconditioning may require a meaningful
transpose action; override
applyTranspose(Access1D, PhysicalStore)whenMis not symmetric. - Some stationary (fixed-point) methods ignore preconditioners entirely and instead use a relaxation factor.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(Access1D<Double> src, PhysicalStore<Double> dst) Apply M^{-1} to a vector.default voidapplyTranspose(Access1D<Double> src, PhysicalStore<Double> dst) Apply (M^T)^{-1} to a vector.static Supplier<Preconditioner> getSSOR(double omega) Returns a factory method for a Symmetric Successive Over-Relaxation (SSOR) preconditioner with the specified relaxation factor.static PreconditionerAn identity (no-op) preconditioner.static PreconditionerA Jacobi (diagonal) preconditioner.static PreconditionernewSSOR(double omega) A Symmetric Successive Over-Relaxation (SSOR) preconditioner with a specified relaxation factorstatic PreconditionerA symmetric Gauss-Seidel preconditioner (SSOR with omega=1).voidPrepare internal structures for a specific system.
-
Field Details
-
IDENTITY
A no-op preconditioner.
-
-
Method Details
-
getSSOR
Returns a factory method for a Symmetric Successive Over-Relaxation (SSOR) preconditioner with the specified relaxation factor. -
newIdentity
An identity (no-op) preconditioner. -
newJacobi
A Jacobi (diagonal) preconditioner. -
newSSOR
A Symmetric Successive Over-Relaxation (SSOR) preconditioner with a specified relaxation factor -
newSymmetricGaussSeidel
A symmetric Gauss-Seidel preconditioner (SSOR with omega=1). -
apply
Apply M^{-1} to a vector. src and dst may alias. -
applyTranspose
Apply (M^T)^{-1} to a vector. Defaults toapply(Access1D, PhysicalStore). -
prepare
Prepare internal structures for a specific system. Implementations may analyse sparsity or extract diagonals/factors here.- Parameters:
equations- The active set of rows constituting the system body.dimension- The vector dimension (number of variables / size of solution vector).
-