13#ifndef CD_KRYLOVBICGSTAB_H
14#define CD_KRYLOVBICGSTAB_H
22#include <CD_NamespaceHeader.H>
118 solve(Vector<LevelData<T>*>& a_phi, const Vector<LevelData<T>*>& a_rhs) noexcept;
134 Vector<LevelData<T>*>
m_r;
144 Vector<LevelData<T>*>
m_e;
149 Vector<LevelData<T>*>
m_p;
164 Vector<LevelData<T>*>
m_t;
169 Vector<LevelData<T>*>
m_v;
172#include <CD_NamespaceFooter.H>
Linear-operator adapter that exposes an AMR-multigrid cycle as a Krylov preconditioner.
Implementation of CD_KrylovBiCGStab.H.
Adapter presenting an already-defined AMRMultiGrid as a LinearOp over the AMR hierarchy.
Definition CD_AMRMultigridKrylovOp.H:78
Preconditioned BiCGStab solver acting on an AMR hierarchy through AMRMultigridKrylovOp.
Definition CD_KrylovBiCGStab.H:36
KrylovBiCGStab() noexcept=default
Default constructor. Call define() before use.
Vector< LevelData< T > * > m_p
Search direction.
Definition CD_KrylovBiCGStab.H:149
int m_exitStatus
Exit status after solve(): 1 = converged, 2 = breakdown, 3 = max iterations, -1 = not run.
Definition CD_KrylovBiCGStab.H:61
Vector< LevelData< T > * > m_pTilde
Preconditioned search direction.
Definition CD_KrylovBiCGStab.H:154
bool isDefined() const noexcept
Whether define() has been called and the work vectors are allocated.
Definition CD_KrylovBiCGStabImplem.H:73
Vector< LevelData< T > * > m_e
Accumulated correction (added to a_phi at the end).
Definition CD_KrylovBiCGStab.H:144
Real m_residualNorm
Final residual norm after solve() (in the adapter inner-product norm).
Definition CD_KrylovBiCGStab.H:66
bool solve(Vector< LevelData< T > * > &a_phi, const Vector< LevelData< T > * > &a_rhs) noexcept
Solve a_op(a_phi) = a_rhs (homogeneous operator) with preconditioned BiCGStab.
Definition CD_KrylovBiCGStabImplem.H:80
int m_maxIter
Maximum number of iterations.
Definition CD_KrylovBiCGStab.H:46
Vector< LevelData< T > * > m_t
A*s_tilde.
Definition CD_KrylovBiCGStab.H:164
int m_numRestarts
Maximum number of restarts on breakdown.
Definition CD_KrylovBiCGStab.H:51
void undefine() noexcept
Free the persistent work vectors.
Definition CD_KrylovBiCGStabImplem.H:55
Vector< LevelData< T > * > m_rTilde
Shadow residual.
Definition CD_KrylovBiCGStab.H:139
Real m_residualScale
Display normalization for printed residuals (set to the zero-residual by the driver; 1 = print absolu...
Definition CD_KrylovBiCGStab.H:78
Vector< LevelData< T > * > m_r
Residual / s.
Definition CD_KrylovBiCGStab.H:134
int m_verbosity
Verbosity; at >= 4 a terse one-line-per-iteration residual/rate history is printed.
Definition CD_KrylovBiCGStab.H:56
Real m_eps
Relative residual tolerance (against the initial residual norm).
Definition CD_KrylovBiCGStab.H:41
Vector< LevelData< T > * > m_sTilde
Preconditioned s.
Definition CD_KrylovBiCGStab.H:159
Vector< LevelData< T > * > m_v
A*p_tilde.
Definition CD_KrylovBiCGStab.H:169
int m_iterations
Number of iterations performed by the last solve().
Definition CD_KrylovBiCGStab.H:71
void define(AMRMultigridKrylovOp< T > *a_op, const Vector< LevelData< T > * > &a_template) noexcept
Allocate the persistent work vectors. Call once per regrid.
Definition CD_KrylovBiCGStabImplem.H:32
AMRMultigridKrylovOp< T > * m_op
Operator/adapter (not owned).
Definition CD_KrylovBiCGStab.H:124
bool m_isDefined
Whether the work vectors are allocated.
Definition CD_KrylovBiCGStab.H:129