Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::CGState< Scalar, XVector, RVector, PVector, ApVector > Class Template Reference

The CG solve state: the x/r/p/Ap vectors and the iteration scalars. More...

#include <linear_system.hpp>

Public Types

using value_type = Scalar

Public Member Functions

 CGState (XVector &&x, RVector &&r, PVector &&p, ApVector &&ap)
auto & x ()
const auto & x () const
auto & r ()
const auto & r () const
auto & p ()
const auto & p () const
auto & Ap ()
const auto & Ap () const
unsigned & iter ()
unsigned iter () const
bool & converged ()
bool converged () const
value_typeresidual ()
value_type residual () const
value_typer_dot_r ()
value_type r_dot_r () const

Detailed Description

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
class mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >

r_dot_r() (the exact dot(r,r)) and residual() (whatever ResidualPolicy reports) are tracked separately and must not be conflated: the recurrence always needs dot(r,r) for alpha/beta regardless of which norm the caller convergence-tests against; only residual() is pluggable.

Member Typedef Documentation

◆ value_type

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
using mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::value_type = Scalar

Constructor & Destructor Documentation

◆ CGState()

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::CGState ( XVector && x,
RVector && r,
PVector && p,
ApVector && ap )
inline

Member Function Documentation

◆ x() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::x ( )
inline

◆ x() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
const auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::x ( ) const
inline

◆ r() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::r ( )
inline

◆ r() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
const auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::r ( ) const
inline

◆ p() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::p ( )
inline

◆ p() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
const auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::p ( ) const
inline

◆ Ap() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::Ap ( )
inline

◆ Ap() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
const auto & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::Ap ( ) const
inline

◆ iter() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
unsigned & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::iter ( )
inline

◆ iter() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
unsigned mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::iter ( ) const
inline

◆ converged() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
bool & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::converged ( )
inline

◆ converged() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
bool mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::converged ( ) const
inline

◆ residual() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
value_type & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::residual ( )
inline

◆ residual() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
value_type mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::residual ( ) const
inline

◆ r_dot_r() [1/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
value_type & mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::r_dot_r ( )
inline

◆ r_dot_r() [2/2]

template<class Scalar, class XVector, class RVector, class PVector, class ApVector>
value_type mundy::CGState< Scalar, XVector, RVector, PVector, ApVector >::r_dot_r ( ) const
inline