HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::math::pcg Namespace Reference

Namespaces

 internal
 

Classes

class  Vector
 Lightweight, variable-length vector. More...
 
class  SparseStencilMatrix
 Sparse, square matrix representing a 3D stencil operator of size STENCIL_SIZE. More...
 
class  Preconditioner
 Base class for conjugate gradient preconditioners. More...
 
class  JacobiPreconditioner
 Diagonal preconditioner. More...
 
class  IncompleteCholeskyPreconditioner
 Preconditioner using incomplete Cholesky factorization. More...
 
struct  State
 Information about the state of a conjugate gradient solution. More...
 

Typedefs

using SizeType = Index32
 
using SizeRange = tbb::blocked_range< SizeType >
 
using VectorS = Vector< float >
 
using VectorD = Vector< double >
 

Functions

template<typename ValueType >
State terminationDefaults ()
 Return default termination conditions for a conjugate gradient solver. More...
 
template<typename PositiveDefMatrix >
State solve (const PositiveDefMatrix &A, const Vector< typename PositiveDefMatrix::ValueType > &b, Vector< typename PositiveDefMatrix::ValueType > &x, Preconditioner< typename PositiveDefMatrix::ValueType > &preconditioner, const State &termination=terminationDefaults< typename PositiveDefMatrix::ValueType >())
 Solve Ax = b via the preconditioned conjugate gradient method. More...
 
template<typename PositiveDefMatrix , typename Interrupter >
State solve (const PositiveDefMatrix &A, const Vector< typename PositiveDefMatrix::ValueType > &b, Vector< typename PositiveDefMatrix::ValueType > &x, Preconditioner< typename PositiveDefMatrix::ValueType > &preconditioner, Interrupter &interrupter, const State &termination=terminationDefaults< typename PositiveDefMatrix::ValueType >())
 Solve Ax = b via the preconditioned conjugate gradient method. More...
 
std::ostream & operator<< (std::ostream &os, const State &state)
 

Typedef Documentation

Definition at line 35 of file ConjGradient.h.

Definition at line 33 of file ConjGradient.h.

Definition at line 228 of file ConjGradient.h.

Function Documentation

std::ostream& openvdb::OPENVDB_VERSION_NAME::math::pcg::operator<< ( std::ostream &  os,
const State &  state 
)
inline

Definition at line 545 of file ConjGradient.h.

template<typename PositiveDefMatrix >
State openvdb::OPENVDB_VERSION_NAME::math::pcg::solve ( const PositiveDefMatrix &  A,
const Vector< typename PositiveDefMatrix::ValueType > &  b,
Vector< typename PositiveDefMatrix::ValueType > &  x,
Preconditioner< typename PositiveDefMatrix::ValueType > &  preconditioner,
const State &  termination = terminationDefaults<typename PositiveDefMatrix::ValueType>() 
)
inline

Solve Ax = b via the preconditioned conjugate gradient method.

Parameters
Aa symmetric, positive-definite, N x N matrix
ba vector of size N
xa vector of size N
preconditionera Preconditioner matrix
terminationtermination conditions given as a State object with the following fields:
success
ignored
iterations
the maximum number of iterations, with or without convergence
relativeError
the relative error ||bAx|| / ||b|| that denotes convergence
absoluteError

the absolute error ||bAx|| that denotes convergence

Exceptions
ArithmeticErrorif either x or b is not of the appropriate size.

Definition at line 1608 of file ConjGradient.h.

template<typename PositiveDefMatrix , typename Interrupter >
State openvdb::OPENVDB_VERSION_NAME::math::pcg::solve ( const PositiveDefMatrix &  A,
const Vector< typename PositiveDefMatrix::ValueType > &  b,
Vector< typename PositiveDefMatrix::ValueType > &  x,
Preconditioner< typename PositiveDefMatrix::ValueType > &  preconditioner,
Interrupter &  interrupter,
const State &  termination = terminationDefaults<typename PositiveDefMatrix::ValueType>() 
)
inline

Solve Ax = b via the preconditioned conjugate gradient method.

Parameters
Aa symmetric, positive-definite, N x N matrix
ba vector of size N
xa vector of size N
preconditionera Preconditioner matrix
terminationtermination conditions given as a State object with the following fields:
success
ignored
iterations
the maximum number of iterations, with or without convergence
relativeError
the relative error ||bAx|| / ||b|| that denotes convergence
absoluteError
the absolute error ||bAx|| that denotes convergence
interrupteran object adhering to the util::NullInterrupter interface with which computation can be interrupted
Exceptions
ArithmeticErrorif either x or b is not of the appropriate size.
RuntimeErrorif the computation is interrupted.

Definition at line 1622 of file ConjGradient.h.

template<typename ValueType >
State openvdb::OPENVDB_VERSION_NAME::math::pcg::terminationDefaults ( )
inline

Return default termination conditions for a conjugate gradient solver.

Definition at line 57 of file ConjGradient.h.