|
VMTK
|
Solve a linear system of equations using open NL. More...
#include <vtkvmtkOpenNLLinearSystemSolver.h>
Public Types | |
| enum | { VTK_VMTK_OPENNL_SOLVER_CG , VTK_VMTK_OPENNL_SOLVER_GMRES , VTK_VMTK_OPENNL_SOLVER_BICGSTAB } |
| enum | { VTK_VMTK_OPENNL_PRECONDITIONER_NONE , VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI , VTK_VMTK_OPENNL_PRECONDITIONER_SSOR } |
| typedef vtkvmtkLinearSystemSolver | Superclass |
| Public Types inherited from vtkvmtkLinearSystemSolver | |
| typedef vtkObject | Superclass |
Public Member Functions | |
| virtual int | IsA (const char *type) |
| vtkvmtkOpenNLLinearSystemSolver * | NewInstance () const |
| int | Solve () override |
| virtual void | SetSolverType (int) |
| virtual int | GetSolverType () |
| void | SetSolverTypeToCG () |
| void | SetSolverTypeToGMRES () |
| void | SetSolverTypeToBiCGStab () |
| virtual void | SetPreconditionerType (int) |
| virtual int | GetPreconditionerType () |
| void | SetPreconditionerTypeToNone () |
| void | SetPreconditionerTypeToJacobi () |
| void | SetPreconditionerTypeToSSOR () |
| virtual void | SetOmega (double) |
| virtual double | GetOmega () |
| Public Member Functions inherited from vtkvmtkLinearSystemSolver | |
| vtkvmtkLinearSystemSolver * | NewInstance () const |
| virtual void | SetLinearSystem (vtkvmtkLinearSystem *) |
| virtual vtkvmtkLinearSystem * | GetLinearSystem () |
| virtual void | SetMaximumNumberOfIterations (int) |
| virtual int | GetMaximumNumberOfIterations () |
| virtual void | SetConvergenceTolerance (double) |
| virtual double | GetConvergenceTolerance () |
Static Public Member Functions | |
| static vtkvmtkOpenNLLinearSystemSolver * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkvmtkOpenNLLinearSystemSolver * | SafeDownCast (vtkObjectBase *o) |
| Static Public Member Functions inherited from vtkvmtkLinearSystemSolver | |
| static vtkvmtkLinearSystemSolver * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkvmtkLinearSystemSolver * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
| virtual vtkObjectBase * | NewInstanceInternal () const |
| vtkvmtkOpenNLLinearSystemSolver () | |
| ~vtkvmtkOpenNLLinearSystemSolver () | |
| Protected Member Functions inherited from vtkvmtkLinearSystemSolver | |
| vtkvmtkLinearSystemSolver () | |
| ~vtkvmtkLinearSystemSolver () | |
Protected Attributes | |
| int | SolverType |
| int | PreconditionerType |
| double | Omega |
| Protected Attributes inherited from vtkvmtkLinearSystemSolver | |
| vtkvmtkLinearSystem * | LinearSystem |
| int | MaximumNumberOfIterations |
| double | ConvergenceTolerance |
| int | NumberOfIterations |
| double | Residual |
Solve a linear system of equations using open NL.
vtkvmtkOpenNLLinearSystemSolver implements vtkvmtkLinearSystemSolver::Solve() on top of the OpenNL (Open Numerical Library) sparse linear solver. It converts the vtkvmtkSparseMatrix / vtkvmtkDoubleVector representation held by LinearSystem (see the base class) into an OpenNL context, runs the requested iterative solver up to MaximumNumberOfIterations or ConvergenceTolerance (both inherited from vtkvmtkLinearSystemSolver), and copies the result back into the solution vector. It is used internally by finite-element/stencil based filters in this module (e.g. vtkvmtkPolyDataGradientFilter, vtkvmtkPolyDataHarmonicMappingFilter) to solve the sparse systems they assemble.
There are a number of different solver types that can be used:
and a number of different preconditioner types:
Definition at line 51 of file vtkvmtkOpenNLLinearSystemSolver.h.
Definition at line 55 of file vtkvmtkOpenNLLinearSystemSolver.h.
| anonymous enum |
| Enumerator | |
|---|---|
| VTK_VMTK_OPENNL_SOLVER_CG | |
| VTK_VMTK_OPENNL_SOLVER_GMRES | |
| VTK_VMTK_OPENNL_SOLVER_BICGSTAB | |
Definition at line 110 of file vtkvmtkOpenNLLinearSystemSolver.h.
| anonymous enum |
| Enumerator | |
|---|---|
| VTK_VMTK_OPENNL_PRECONDITIONER_NONE | |
| VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI | |
| VTK_VMTK_OPENNL_PRECONDITIONER_SSOR | |
Definition at line 119 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
protected |
Definition at line 33 of file vtkvmtkOpenNLLinearSystemSolver.cxx.
|
inlineprotected |
Definition at line 129 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
static |
|
static |
|
virtual |
Reimplemented from vtkvmtkLinearSystemSolver.
|
static |
|
protectedvirtual |
Reimplemented from vtkvmtkLinearSystemSolver.
| vtkvmtkOpenNLLinearSystemSolver * vtkvmtkOpenNLLinearSystemSolver::NewInstance | ( | ) | const |
|
overridevirtual |
Assemble and solve the linear system currently set on LinearSystem (see vtkvmtkLinearSystemSolver::SetLinearSystem) using OpenNL, with the solver and preconditioner selected by SolverType and PreconditionerType. Returns 0 on success, -1 if no linear system (or an incomplete one) has been set.
Reimplemented from vtkvmtkLinearSystemSolver.
Definition at line 40 of file vtkvmtkOpenNLLinearSystemSolver.cxx.
|
virtual |
Set/get the OpenNL iterative solver algorithm used by Solve(): VTK_VMTK_OPENNL_SOLVER_CG (conjugate gradient, the default), VTK_VMTK_OPENNL_SOLVER_GMRES (generalized minimal residual), or VTK_VMTK_OPENNL_SOLVER_BICGSTAB (biconjugate gradient stabilized). CG requires the system matrix to be symmetric positive definite; use GMRES or BiCGStab for non-symmetric systems.
|
virtual |
Set/get the OpenNL iterative solver algorithm used by Solve(): VTK_VMTK_OPENNL_SOLVER_CG (conjugate gradient, the default), VTK_VMTK_OPENNL_SOLVER_GMRES (generalized minimal residual), or VTK_VMTK_OPENNL_SOLVER_BICGSTAB (biconjugate gradient stabilized). CG requires the system matrix to be symmetric positive definite; use GMRES or BiCGStab for non-symmetric systems.
|
inline |
Set/get the OpenNL iterative solver algorithm used by Solve(): VTK_VMTK_OPENNL_SOLVER_CG (conjugate gradient, the default), VTK_VMTK_OPENNL_SOLVER_GMRES (generalized minimal residual), or VTK_VMTK_OPENNL_SOLVER_BICGSTAB (biconjugate gradient stabilized). CG requires the system matrix to be symmetric positive definite; use GMRES or BiCGStab for non-symmetric systems.
Definition at line 74 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
inline |
Set/get the OpenNL iterative solver algorithm used by Solve(): VTK_VMTK_OPENNL_SOLVER_CG (conjugate gradient, the default), VTK_VMTK_OPENNL_SOLVER_GMRES (generalized minimal residual), or VTK_VMTK_OPENNL_SOLVER_BICGSTAB (biconjugate gradient stabilized). CG requires the system matrix to be symmetric positive definite; use GMRES or BiCGStab for non-symmetric systems.
Definition at line 76 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
inline |
Set/get the OpenNL iterative solver algorithm used by Solve(): VTK_VMTK_OPENNL_SOLVER_CG (conjugate gradient, the default), VTK_VMTK_OPENNL_SOLVER_GMRES (generalized minimal residual), or VTK_VMTK_OPENNL_SOLVER_BICGSTAB (biconjugate gradient stabilized). CG requires the system matrix to be symmetric positive definite; use GMRES or BiCGStab for non-symmetric systems.
Definition at line 78 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
virtual |
Set/get the preconditioner applied by Solve(): VTK_VMTK_OPENNL_PRECONDITIONER_NONE (the default), VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI (diagonal scaling), or VTK_VMTK_OPENNL_PRECONDITIONER_SSOR (symmetric successive over-relaxation, using Omega as the relaxation factor). A suitable preconditioner can significantly reduce the number of iterations needed to reach ConvergenceTolerance.
|
virtual |
Set/get the preconditioner applied by Solve(): VTK_VMTK_OPENNL_PRECONDITIONER_NONE (the default), VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI (diagonal scaling), or VTK_VMTK_OPENNL_PRECONDITIONER_SSOR (symmetric successive over-relaxation, using Omega as the relaxation factor). A suitable preconditioner can significantly reduce the number of iterations needed to reach ConvergenceTolerance.
|
inline |
Set/get the preconditioner applied by Solve(): VTK_VMTK_OPENNL_PRECONDITIONER_NONE (the default), VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI (diagonal scaling), or VTK_VMTK_OPENNL_PRECONDITIONER_SSOR (symmetric successive over-relaxation, using Omega as the relaxation factor). A suitable preconditioner can significantly reduce the number of iterations needed to reach ConvergenceTolerance.
Definition at line 92 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
inline |
Set/get the preconditioner applied by Solve(): VTK_VMTK_OPENNL_PRECONDITIONER_NONE (the default), VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI (diagonal scaling), or VTK_VMTK_OPENNL_PRECONDITIONER_SSOR (symmetric successive over-relaxation, using Omega as the relaxation factor). A suitable preconditioner can significantly reduce the number of iterations needed to reach ConvergenceTolerance.
Definition at line 94 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
inline |
Set/get the preconditioner applied by Solve(): VTK_VMTK_OPENNL_PRECONDITIONER_NONE (the default), VTK_VMTK_OPENNL_PRECONDITIONER_JACOBI (diagonal scaling), or VTK_VMTK_OPENNL_PRECONDITIONER_SSOR (symmetric successive over-relaxation, using Omega as the relaxation factor). A suitable preconditioner can significantly reduce the number of iterations needed to reach ConvergenceTolerance.
Definition at line 96 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
virtual |
Set/get the relaxation factor used by the SSOR preconditioner (ignored for other PreconditionerType values). Default: 0.0.
|
virtual |
Set/get the relaxation factor used by the SSOR preconditioner (ignored for other PreconditionerType values). Default: 0.0.
|
protected |
Definition at line 131 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
protected |
Definition at line 132 of file vtkvmtkOpenNLLinearSystemSolver.h.
|
protected |
Definition at line 133 of file vtkvmtkOpenNLLinearSystemSolver.h.