Chi-Tech
lbs::AGSLinearSolver< MatType, VecType, SolverType > Class Template Reference

#include <ags_linear_solver.h>

Inheritance diagram for lbs::AGSLinearSolver< MatType, VecType, SolverType >:
chi_math::LinearSolver< MatType, VecType, SolverType >

Public Types

typedef std::shared_ptr< AGSContext< MatType, VecType, SolverType > > AGSContextPtr
 
- Public Types inherited from chi_math::LinearSolver< MatType, VecType, SolverType >
typedef LinearSolverContext< MatType, VecType > LinSolveContext
 
typedef std::shared_ptr< LinSolveContextLinSolveContextPtr
 

Public Member Functions

 AGSLinearSolver (std::string iterative_method, AGSContextPtr ags_context_ptr, int groupspan_first_id, int groupspan_last_id, bool verbose=true)
 
int GroupSpanFirstID () const
 
int GroupSpanLastID () const
 
bool IsVerbose () const
 
void SetVerbosity (bool verbose_y_n)
 
void Solve () override
 
virtual ~AGSLinearSolver () override
 
void Solve ()
 
 ~AGSLinearSolver ()
 
- Public Member Functions inherited from chi_math::LinearSolver< MatType, VecType, SolverType >
 LinearSolver (const std::string &iterative_method, LinSolveContextPtr context_ptr)
 
 LinearSolver (std::string solver_name, std::string iterative_method, LinSolveContextPtr context_ptr)
 
virtual ~LinearSolver ()
 
ToleranceOptionsToleranceOptions ()
 
void ApplyToleranceOptions ()
 
LinSolveContextPtrGetContext ()
 
void SetKSPSolveSuppressionFlag (bool flag)
 
bool GetKSPSolveSuppressionFlag () const
 
virtual void Setup ()
 
virtual void Solve ()
 
 ~LinearSolver ()
 
void ApplyToleranceOptions ()
 
void Setup ()
 
void Solve ()
 

Protected Member Functions

virtual void SetSystemSize () override
 
virtual void SetSystem () override
 
void SetPreconditioner () override
 
void SetRHS () override
 
void SetInitialGuess () override
 
void SetSystemSize ()
 
void SetSystem ()
 
void SetPreconditioner ()
 
void SetRHS ()
 
void SetInitialGuess ()
 
- Protected Member Functions inherited from chi_math::LinearSolver< MatType, VecType, SolverType >
bool IsSystemSet () const
 
virtual void PreSetupCallback ()
 
virtual void SetOptions ()
 
virtual void SetSolverContext ()
 
virtual void SetConvergenceTest ()
 
virtual void SetMonitor ()
 
virtual void SetPreconditioner ()
 
virtual void SetSystemSize ()=0
 
virtual void SetSystem ()=0
 
virtual void PostSetupCallback ()
 
virtual void PreSolveCallback ()
 
virtual void SetInitialGuess ()=0
 
virtual void SetRHS ()=0
 
virtual void PostSolveCallback ()
 
void PreSetupCallback ()
 
void SetOptions ()
 
void SetSolverContext ()
 
void SetConvergenceTest ()
 
void SetMonitor ()
 
void SetPreconditioner ()
 
void PostSetupCallback ()
 
void PreSolveCallback ()
 
void PostSolveCallback ()
 

Protected Attributes

int groupspan_first_id_ = 0
 
int groupspan_last_id_ = 0
 
bool verbose_ = false
 
- Protected Attributes inherited from chi_math::LinearSolver< MatType, VecType, SolverType >
const std::string solver_name_
 
const std::string iterative_method_
 
LinSolveContextPtr context_ptr_ = nullptr
 
MatType A_
 
VecType b_
 
VecType x_
 
SolverType solver_
 
int64_t num_local_dofs_ = 0
 
int64_t num_globl_dofs_ = 0
 
struct chi_math::LinearSolver::ToleranceOptions tolerance_options_
 

Detailed Description

template<class MatType, class VecType, class SolverType>
class lbs::AGSLinearSolver< MatType, VecType, SolverType >

Linear Solver specialization for Within GroupSet (WGS) solves.

Definition at line 13 of file ags_linear_solver.h.

Member Typedef Documentation

◆ AGSContextPtr

template<class MatType , class VecType , class SolverType >
typedef std::shared_ptr<AGSContext<MatType,VecType,SolverType> > lbs::AGSLinearSolver< MatType, VecType, SolverType >::AGSContextPtr

Definition at line 21 of file ags_linear_solver.h.

Constructor & Destructor Documentation

◆ AGSLinearSolver()

template<class MatType , class VecType , class SolverType >
lbs::AGSLinearSolver< MatType, VecType, SolverType >::AGSLinearSolver ( std::string  iterative_method,
AGSContextPtr  ags_context_ptr,
int  groupspan_first_id,
int  groupspan_last_id,
bool  verbose = true 
)
inline

Constructor.

Parameters
iterative_methodstring Across Groupset iterative method.
ags_context_ptrPointer Pointer to the context to use.
groupspan_first_idint First group index.
groupspan_last_idint Last group index.
verbosebool Flag to enable verbose output.

Definition at line 29 of file ags_linear_solver.h.

◆ ~AGSLinearSolver() [1/2]

template<class MatType , class VecType , class SolverType >
virtual lbs::AGSLinearSolver< MatType, VecType, SolverType >::~AGSLinearSolver ( )
overridevirtual

◆ ~AGSLinearSolver() [2/2]

Definition at line 129 of file ags_linear_solver.cc.

Member Function Documentation

◆ GroupSpanFirstID()

template<class MatType , class VecType , class SolverType >
int lbs::AGSLinearSolver< MatType, VecType, SolverType >::GroupSpanFirstID ( ) const
inline

Definition at line 41 of file ags_linear_solver.h.

◆ GroupSpanLastID()

template<class MatType , class VecType , class SolverType >
int lbs::AGSLinearSolver< MatType, VecType, SolverType >::GroupSpanLastID ( ) const
inline

Definition at line 42 of file ags_linear_solver.h.

◆ IsVerbose()

template<class MatType , class VecType , class SolverType >
bool lbs::AGSLinearSolver< MatType, VecType, SolverType >::IsVerbose ( ) const
inline

Definition at line 43 of file ags_linear_solver.h.

◆ SetInitialGuess() [1/2]

void lbs::AGSLinearSolver< Mat, Vec, KSP >::SetInitialGuess ( )
protectedvirtual

◆ SetInitialGuess() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::AGSLinearSolver< MatType, VecType, SolverType >::SetInitialGuess ( )
overrideprotectedvirtual

◆ SetPreconditioner() [1/2]

void lbs::AGSLinearSolver< Mat, Vec, KSP >::SetPreconditioner ( )
protectedvirtual

Reimplemented from chi_math::LinearSolver< MatType, VecType, SolverType >.

Definition at line 59 of file ags_linear_solver.cc.

◆ SetPreconditioner() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::AGSLinearSolver< MatType, VecType, SolverType >::SetPreconditioner ( )
overrideprotectedvirtual

◆ SetRHS() [1/2]

void lbs::AGSLinearSolver< Mat, Vec, KSP >::SetRHS ( )
protectedvirtual

◆ SetRHS() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::AGSLinearSolver< MatType, VecType, SolverType >::SetRHS ( )
overrideprotectedvirtual

◆ SetSystem() [1/2]

void lbs::AGSLinearSolver< Mat, Vec, KSP >::SetSystem ( )
protectedvirtual

◆ SetSystem() [2/2]

template<class MatType , class VecType , class SolverType >
virtual void lbs::AGSLinearSolver< MatType, VecType, SolverType >::SetSystem ( )
overrideprotectedvirtual

◆ SetSystemSize() [1/2]

void lbs::AGSLinearSolver< Mat, Vec, KSP >::SetSystemSize ( )
protectedvirtual

◆ SetSystemSize() [2/2]

template<class MatType , class VecType , class SolverType >
virtual void lbs::AGSLinearSolver< MatType, VecType, SolverType >::SetSystemSize ( )
overrideprotectedvirtual

◆ SetVerbosity()

template<class MatType , class VecType , class SolverType >
void lbs::AGSLinearSolver< MatType, VecType, SolverType >::SetVerbosity ( bool  verbose_y_n)
inline

Definition at line 44 of file ags_linear_solver.h.

◆ Solve() [1/2]

void lbs::AGSLinearSolver< Mat, Vec, KSP >::Solve ( )
virtual

Reimplemented from chi_math::LinearSolver< MatType, VecType, SolverType >.

Definition at line 77 of file ags_linear_solver.cc.

◆ Solve() [2/2]

template<class MatType , class VecType , class SolverType >
void lbs::AGSLinearSolver< MatType, VecType, SolverType >::Solve ( )
overridevirtual

Field Documentation

◆ groupspan_first_id_

template<class MatType , class VecType , class SolverType >
int lbs::AGSLinearSolver< MatType, VecType, SolverType >::groupspan_first_id_ = 0
protected

Definition at line 17 of file ags_linear_solver.h.

◆ groupspan_last_id_

template<class MatType , class VecType , class SolverType >
int lbs::AGSLinearSolver< MatType, VecType, SolverType >::groupspan_last_id_ = 0
protected

Definition at line 18 of file ags_linear_solver.h.

◆ verbose_

template<class MatType , class VecType , class SolverType >
bool lbs::AGSLinearSolver< MatType, VecType, SolverType >::verbose_ = false
protected

Definition at line 19 of file ags_linear_solver.h.


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