All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class juice.solver.CGPrecondSolver

java.lang.Object
   |
   +----juice.solver.IterativeSlv
           |
           +----juice.solver.CGPrecondSolver

public class CGPrecondSolver
extends IterativeSlv
implements LinearSolver
Conjugate Gradient Solver.


By decomposing the calculations into several routines, CGPrecondSolver is made to be subclassed, so that slight modifications to the standard behavior can be made.


Variable Index

 o M
 o res
 o reset
 o rtrNew

Constructor Index

 o CGPrecondSolver(Iterator, Operator)
 o CGPrecondSolver(Operator)

Method Index

 o doOneStep(Vector, Vector, Vector)
 o getNormResidual()
 o getResidual()
 o setReset(int)
after each reset-th iteration I compute the exact residual to remove accumulated floating point error (default is 50).
 o solve(Operator, Vector, Vector)
Solves Ax = b for x
"Solve" is used in a loose sense.

Variables

 o M
 protected Operator M
 o res
 protected Vector res
 o rtrNew
 protected float rtrNew
 o reset
 protected int reset

Constructors

 o CGPrecondSolver
 public CGPrecondSolver(Operator preconditioner)
 o CGPrecondSolver
 public CGPrecondSolver(Iterator iterator,
                        Operator preconditioner)

Methods

 o setReset
 public void setReset(int reset)
after each reset-th iteration I compute the exact residual to remove accumulated floating point error (default is 50).

 o getResidual
 public Vector getResidual()
Overrides:
getResidual in class IterativeSlv
 o getNormResidual
 public float getNormResidual()
Overrides:
getNormResidual in class IterativeSlv
 o solve
 public void solve(Operator A,
                   Vector b,
                   Vector x)
Solves Ax = b for x
"Solve" is used in a loose sense.

Overrides:
solve in class IterativeSlv
 o doOneStep
 protected void doOneStep(Vector s,
                          Vector v,
                          Vector p)

All Packages  Class Hierarchy  This Package  Previous  Next  Index