OpenVDB 11.0.0

Loading...
Searching...
No Matches
ConjGradient.h File Reference

Preconditioned conjugate gradient solver (solves Ax = b using the conjugate gradient method with one of a selection of preconditioners) More...

`#include <openvdb/Exceptions.h>`
`#include <openvdb/Types.h>`
`#include <openvdb/util/logging.h>`
`#include <openvdb/util/NullInterrupter.h>`
`#include "Math.h"`
`#include <tbb/parallel_for.h>`
`#include <tbb/parallel_reduce.h>`
`#include <algorithm>`
`#include <cassert>`
`#include <cmath>`
`#include <limits>`
`#include <sstream>`
`#include <string>`

Go to the source code of this file.

## Classes
struct | State
| Information about the state of a conjugate gradient solution. More...
class | Vector< T >
| Lightweight, variable-length vector. More...
class | SparseStencilMatrix< ValueType_, STENCIL_SIZE >
| Sparse, square matrix representing a 3D stencil operator of size STENCIL_SIZE. More...
class | SparseStencilMatrix< ValueType_, STENCIL_SIZE >::ConstValueIter
| Iterator over the stored values in a row of this matrix. More...
class | SparseStencilMatrix< ValueType_, STENCIL_SIZE >::ConstRow
| Read-only accessor to a row of this matrix. More...
class | SparseStencilMatrix< ValueType_, STENCIL_SIZE >::RowEditor
| Read/write accessor to a row of this matrix. More...
class | Preconditioner< T >
| Base class for conjugate gradient preconditioners. More...
struct | CopyOp< T >
struct | FillOp< T >
struct | LinearOp< T >
struct | Vector< T >::DeterministicDotProductOp
struct | Vector< T >::InfNormOp
struct | Vector< T >::IsFiniteOp
struct | SparseStencilMatrix< ValueType_, STENCIL_SIZE >::MatrixCopyOp
struct | SparseStencilMatrix< ValueType_, STENCIL_SIZE >::IsFiniteOp
class | JacobiPreconditioner< MatrixType >
| Diagonal preconditioner. More...
class | IncompleteCholeskyPreconditioner< MatrixType >
| Preconditioner using incomplete Cholesky factorization. More...

## Namespaces
namespace | openvdb
namespace | openvdb::v11_0
namespace | openvdb::v11_0::math
namespace | openvdb::v11_0::math::pcg
namespace | openvdb::v11_0::math::pcg::internal

## 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)
template<typename T>
void | axpy (const T &a, const T *xVec, const T *yVec, T *resultVec, SizeType size)
| Compute ax + y.
template<typename T>
void | axpy (const T &a, const Vector< T > &xVec, const Vector< T > &yVec, Vector< T > &result)
| Compute ax + y.
template<typename MatrixOperator, typename VecValueType>
void | computeResidual (const MatrixOperator &A, const VecValueType *x, const VecValueType *b, VecValueType *r)
| Compute r = b − Ax.
template<typename MatrixOperator, typename T>
void | computeResidual (const MatrixOperator &A, const Vector< T > &x, const Vector< T > &b, Vector< T > &r)
| Compute r = b − Ax.

## Detailed Description

Preconditioned conjugate gradient solver (solves Ax = b using the conjugate gradient method with one of a selection of preconditioners)

Authors
  D.J. Hill, Peter Cucka