jvx.numeric
Class PnPreconditioner
- java.lang.Object
-
- jvx.numeric.PnPreconditioner
-
- Direct Known Subclasses:
- PnPreconditionerILU, PnPreconditionerJacobi
public class PnPreconditioner extends java.lang.ObjectIdentity Preconditioner used by conjugate gradient and biconjugate gradient solver, all other Preconditioners should inherit from this.Setting the parameter dim larger than 1, allow to handle more than one equation system with the same matrix in one run. The first equation system uses the 0-th, dim-th, 2*dim-th, 3*dim-th,... entries of b, the second the 1-th, (1+dim)-th, (1+2*dim)-th, ... and so on.
Works on PnSparseMatrix.
- Author:
- Jonas Hurrelmann
- Version:
- 02.12.05, 1.00 created (jh)
-
-
Field Summary
Fields Modifier and Type Field and Description PnSparseMatrixm_smat
-
Constructor Summary
Constructors Constructor and Description PnPreconditioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PdVectorapply(PdVector b, PdVector x)Apply the preconditioner to a given vector b storing the result in x This method has to be implementedPdVectorapply(PdVector b, PdVector x, int dim)Apply the preconditioner to a given vector b storing the result in x using given dimension of vectors This method has to be implementedPdVectorapplyTransposed(PdVector b, PdVector x)Apply the preconditioner transposed to a given vector b storing the result in x using given dimension of vectors This method has to be implementedPdVectorapplyTransposed(PdVector b, PdVector x, int dim)Apply the preconditioner transposed to a given vector b storing the result in x This method has to be implementedvoidsetSparseMatrix(PnSparseMatrix pm)Set the matrix to use in the preconditionert.
-
-
-
Field Detail
-
m_smat
public PnSparseMatrix m_smat
-
-
Method Detail
-
setSparseMatrix
public void setSparseMatrix(PnSparseMatrix pm)
Set the matrix to use in the preconditionert. The matrix has to be square.This method has to be implemented
- Parameters:
pm-
-
apply
public PdVector apply(PdVector b, PdVector x, int dim)
Apply the preconditioner to a given vector b storing the result in x using given dimension of vectorsThis method has to be implemented
- Parameters:
b-x-dim-- Returns:
- x
-
apply
public PdVector apply(PdVector b, PdVector x)
Apply the preconditioner to a given vector b storing the result in xThis method has to be implemented
- Parameters:
b-x-- Returns:
- x
-
applyTransposed
public PdVector applyTransposed(PdVector b, PdVector x)
Apply the preconditioner transposed to a given vector b storing the result in x using given dimension of vectorsThis method has to be implemented
- Parameters:
b-x-- Returns:
- x
-
-
"