HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
+ Include dependency graph for ConjGradient.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::math
 
 openvdb::OPENVDB_VERSION_NAME::math::pcg
 
 openvdb::OPENVDB_VERSION_NAME::math::pcg::internal
 

Typedefs

using openvdb::OPENVDB_VERSION_NAME::math::pcg::SizeType = Index32
 
using openvdb::OPENVDB_VERSION_NAME::math::pcg::SizeRange = tbb::blocked_range< SizeType >
 
using openvdb::OPENVDB_VERSION_NAME::math::pcg::VectorS = Vector< float >
 
using openvdb::OPENVDB_VERSION_NAME::math::pcg::VectorD = Vector< double >
 

Functions

template<typename ValueType >
State openvdb::OPENVDB_VERSION_NAME::math::pcg::terminationDefaults ()
 Return default termination conditions for a conjugate gradient solver. More...
 
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 >())
 Solve Ax = b via the preconditioned conjugate gradient method. More...
 
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 >())
 Solve Ax = b via the preconditioned conjugate gradient method. More...
 
std::ostream & openvdb::OPENVDB_VERSION_NAME::math::pcg::operator<< (std::ostream &os, const State &state)
 
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::math::pcg::internal::axpy (const T &a, const T *xVec, const T *yVec, T *resultVec, SizeType size)
 Compute ax + y. More...
 
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::math::pcg::internal::axpy (const T &a, const Vector< T > &xVec, const Vector< T > &yVec, Vector< T > &result)
 Compute ax + y. More...
 
template<typename MatrixOperator , typename VecValueType >
void openvdb::OPENVDB_VERSION_NAME::math::pcg::internal::computeResidual (const MatrixOperator &A, const VecValueType *x, const VecValueType *b, VecValueType *r)
 Compute r = bAx. More...
 
template<typename MatrixOperator , typename T >
void openvdb::OPENVDB_VERSION_NAME::math::pcg::internal::computeResidual (const MatrixOperator &A, const Vector< T > &x, const Vector< T > &b, Vector< T > &r)
 Compute r = bAx. More...
 

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

Definition in file ConjGradient.h.