Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::GMRES_MV< T > Class Template Reference

#include <AMReX_GMRES_MV.H>

Public Types

using RT = Real
 
using VEC = AlgVector< T >
 
using MAT = SpMatrix< T >
 
using GM = amrex::GMRES< VEC, GMRES_MV< T > >
 
using PC = std::function< void(VEC &, VEC const &)>
 

Public Member Functions

 GMRES_MV (MAT const *a_mat)
 
void setPrecond (PC a_pc)
 
void solve (VEC &a_sol, VEC const &a_rhs, T a_tol_rel, T a_tol_abs)
 Solve the linear system.
 
void setVerbose (int v)
 Sets verbosity.
 
GMgetGMRES ()
 Get the GMRES object.
 
VEC makeVecRHS () const
 Make MultiFab without ghost cells.
 
VEC makeVecLHS () const
 Make MultiFab with ghost cells and set ghost cells to zero.
 
void apply (VEC &lhs, VEC &rhs) const
 lhs = L(rhs)
 
void precond (VEC &lhs, VEC const &rhs) const
 

Static Public Member Functions

static T norm2 (VEC const &vec)
 
static void scale (VEC &vec, T scale_factor)
 
static T dotProduct (VEC const &vec1, VEC const &vec2)
 
static void setToZero (VEC &lhs)
 lhs = 0
 
static void assign (VEC &lhs, VEC const &rhs)
 lhs = rhs
 
static void increment (VEC &lhs, VEC const &rhs, T a)
 lhs += a*rhs
 
static void linComb (VEC &lhs, T a, VEC const &rhs_a, T b, VEC const &rhs_b)
 lhs = a*rhs_a + b*rhs_b
 

Member Typedef Documentation

◆ GM

template<typename T >
using amrex::GMRES_MV< T >::GM = amrex::GMRES<VEC,GMRES_MV<T> >

◆ MAT

template<typename T >
using amrex::GMRES_MV< T >::MAT = SpMatrix<T>

◆ PC

template<typename T >
using amrex::GMRES_MV< T >::PC = std::function<void(VEC&,VEC const&)>

◆ RT

template<typename T >
using amrex::GMRES_MV< T >::RT = Real

◆ VEC

template<typename T >
using amrex::GMRES_MV< T >::VEC = AlgVector<T>

Constructor & Destructor Documentation

◆ GMRES_MV()

template<typename T >
amrex::GMRES_MV< T >::GMRES_MV ( MAT const *  a_mat)

Member Function Documentation

◆ apply()

template<typename T >
void amrex::GMRES_MV< T >::apply ( VEC lhs,
VEC rhs 
) const

lhs = L(rhs)

◆ assign()

template<typename T >
void amrex::GMRES_MV< T >::assign ( VEC lhs,
VEC const &  rhs 
)
static

lhs = rhs

◆ dotProduct()

template<typename T >
T amrex::GMRES_MV< T >::dotProduct ( VEC const &  vec1,
VEC const &  vec2 
)
static

◆ getGMRES()

template<typename T >
GM & amrex::GMRES_MV< T >::getGMRES ( )
inline

Get the GMRES object.

◆ increment()

template<typename T >
void amrex::GMRES_MV< T >::increment ( VEC lhs,
VEC const &  rhs,
a 
)
static

lhs += a*rhs

◆ linComb()

template<typename T >
void amrex::GMRES_MV< T >::linComb ( VEC lhs,
a,
VEC const &  rhs_a,
b,
VEC const &  rhs_b 
)
static

lhs = a*rhs_a + b*rhs_b

◆ makeVecLHS()

template<typename T >
auto amrex::GMRES_MV< T >::makeVecLHS ( ) const

Make MultiFab with ghost cells and set ghost cells to zero.

◆ makeVecRHS()

template<typename T >
auto amrex::GMRES_MV< T >::makeVecRHS ( ) const

Make MultiFab without ghost cells.

◆ norm2()

template<typename T >
T amrex::GMRES_MV< T >::norm2 ( VEC const &  vec)
static

◆ precond()

template<typename T >
void amrex::GMRES_MV< T >::precond ( VEC lhs,
VEC const &  rhs 
) const

◆ scale()

template<typename T >
void amrex::GMRES_MV< T >::scale ( VEC vec,
scale_factor 
)
static

◆ setPrecond()

template<typename T >
void amrex::GMRES_MV< T >::setPrecond ( PC  a_pc)
inline

◆ setToZero()

template<typename T >
void amrex::GMRES_MV< T >::setToZero ( VEC lhs)
static

lhs = 0

◆ setVerbose()

template<typename T >
void amrex::GMRES_MV< T >::setVerbose ( int  v)
inline

Sets verbosity.

◆ solve()

template<typename T >
void amrex::GMRES_MV< T >::solve ( VEC a_sol,
VEC const &  a_rhs,
a_tol_rel,
a_tol_abs 
)

Solve the linear system.

Parameters
a_solunknowns, i.e., x in A x = b.
a_rhsRHS, i.e., b in A x = b.
a_tol_relrelative tolerance.
a_tol_absabsolute tolerance.

The documentation for this class was generated from the following file: