OpenVDB: openvdb::v12_1::math::pcg Namespace Reference

OpenVDB 12.1.0

Loading...
Searching...
No Matches
openvdb::v12_1::math::pcg Namespace Reference

## Namespaces
namespace | internal

## Classes
class | IncompleteCholeskyPreconditioner
| Preconditioner using incomplete Cholesky factorization. More...
class | JacobiPreconditioner
| Diagonal preconditioner. More...
class | Preconditioner
| Base class for conjugate gradient preconditioners. More...
class | SparseStencilMatrix
| Sparse, square matrix representing a 3D stencil operator of size STENCIL_SIZE. More...
struct | State
| Information about the state of a conjugate gradient solution. More...
class | Vector
| Lightweight, variable-length vector. 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.
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.
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.
std::ostream & | operator<< (std::ostream &os, const State &state)

## Typedef Documentation

## ◆ SizeRange

using SizeRange = tbb::blocked_range<SizeType>

## ◆ SizeType

using SizeType = Index32

## ◆ VectorD

using VectorD = Vector<double>

## ◆ VectorS

using VectorS = Vector<float>

## Function Documentation

## ◆ operator<<()

std::ostream & operator<< | ( | std::ostream & | os,
|  | const State & | state )
| inline

## ◆ solve() [1/2]

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>() )
| inline

Solve Ax = b via the preconditioned conjugate gradient method.

Parameters

  A | a symmetric, positive-definite, N x N matrix
  b | a vector of size N
  x | a vector of size N
  preconditioner | a Preconditioner matrix
  termination | termination 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 ||b − Ax|| / ||b|| that denotes convergence absoluteError the absolute error ||b − Ax|| that denotes convergence

Exceptions

  ArithmeticError | if either x or b is not of the appropriate size.

## ◆ solve() [2/2]

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>() )
| inline

Solve Ax = b via the preconditioned conjugate gradient method.

Parameters

  A | a symmetric, positive-definite, N x N matrix
  b | a vector of size N
  x | a vector of size N
  preconditioner | a Preconditioner matrix
  termination | termination 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 ||b − Ax|| / ||b|| that denotes convergence absoluteError the absolute error ||b − Ax|| that denotes convergence
  interrupter | an object adhering to the util::NullInterrupter interface with which computation can be interrupted

Exceptions

  ArithmeticError | if either x or b is not of the appropriate size.
  RuntimeError | if the computation is interrupted.

## ◆ terminationDefaults()

template<typename ValueType>

State terminationDefaults | ( |  | ) |
| inline

Return default termination conditions for a conjugate gradient solver.