ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hsolver::HSolverLinear< T, Device > Class Template Reference

Method selection and reusable numerical workspace, independent of physics. More...

#include <hsolver_linear.h>

Collaboration diagram for hsolver::HSolverLinear< T, Device >:

Public Member Functions

 HSolverLinear (const LinearControls &linear_ctrl, const diag_comm_info &comm)
double tolerance () const
 Return the effective tolerance after resolving the precision-dependent default.
LinearSolveResult solve (const LinearOperator< T, Device > &op, const LinearOperator< T, Device > &preconditioner, int ld, int nvec, int dim, T *x, const T *b, const T *initial_residual, bool force_check)
 Reuse an optional CN residual and control independent GMRES verification.
LinearSolveResult solve (const LinearOperator< T, Device > &op, const LinearOperator< T, Device > &preconditioner, int ld, int nvec, int dim, T *x, const T *b, const T *initial_residual, bool force_check, int max_iter, bool reconstruct)
 Reuse solver storage with an explicit per-call budget and reconstruction policy.

Private Attributes

std::unique_ptr< LinearBiCGSTAB< T, Device > > bicgstab_
std::unique_ptr< LinearCGS< T, Device > > cgs_
std::unique_ptr< LinearGMRES< T, Device > > gmres_
double tolerance_ = 0.0
const int max_iter_
const bool reconstruct_

Detailed Description

template<typename T, typename Device = base_device::DEVICE_CPU>
class hsolver::HSolverLinear< T, Device >

Method selection and reusable numerical workspace, independent of physics.

Constructor & Destructor Documentation

◆ HSolverLinear()

template<typename T, typename Device>
hsolver::HSolverLinear< T, Device >::HSolverLinear ( const LinearControls & linear_ctrl,
const diag_comm_info & comm )
Here is the call graph for this function:

Member Function Documentation

◆ solve() [1/2]

template<typename T, typename Device>
LinearSolveResult hsolver::HSolverLinear< T, Device >::solve ( const LinearOperator< T, Device > & op,
const LinearOperator< T, Device > & preconditioner,
int ld,
int nvec,
int dim,
T * x,
const T * b,
const T * initial_residual,
bool force_check )

Reuse an optional CN residual and control independent GMRES verification.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve() [2/2]

template<typename T, typename Device>
LinearSolveResult hsolver::HSolverLinear< T, Device >::solve ( const LinearOperator< T, Device > & op,
const LinearOperator< T, Device > & preconditioner,
int ld,
int nvec,
int dim,
T * x,
const T * b,
const T * initial_residual,
bool force_check,
int max_iter,
bool reconstruct )

Reuse solver storage with an explicit per-call budget and reconstruction policy.

Here is the call graph for this function:

◆ tolerance()

template<typename T, typename Device = base_device::DEVICE_CPU>
double hsolver::HSolverLinear< T, Device >::tolerance ( ) const
inline

Return the effective tolerance after resolving the precision-dependent default.

Member Data Documentation

◆ bicgstab_

template<typename T, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<LinearBiCGSTAB<T, Device> > hsolver::HSolverLinear< T, Device >::bicgstab_
private

◆ cgs_

template<typename T, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<LinearCGS<T, Device> > hsolver::HSolverLinear< T, Device >::cgs_
private

◆ gmres_

template<typename T, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<LinearGMRES<T, Device> > hsolver::HSolverLinear< T, Device >::gmres_
private

◆ max_iter_

template<typename T, typename Device = base_device::DEVICE_CPU>
const int hsolver::HSolverLinear< T, Device >::max_iter_
private

◆ reconstruct_

template<typename T, typename Device = base_device::DEVICE_CPU>
const bool hsolver::HSolverLinear< T, Device >::reconstruct_
private

◆ tolerance_

template<typename T, typename Device = base_device::DEVICE_CPU>
double hsolver::HSolverLinear< T, Device >::tolerance_ = 0.0
private

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