DFT-EFE
 
Loading...
Searching...
No Matches
CGLinearSolver.h File Reference
Include dependency graph for CGLinearSolver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  dftefe
 dealii includes
 
namespace  dftefe::linearAlgebra
 

Functions

 dftefe::linearAlgebra::CGLinearSolver (const size_type maxIter, const double absoluteTol, const double relativeTol, const double divergenceTol, LinearAlgebraProfiler profiler=LinearAlgebraProfiler())
 A class that implements the Conjugate-Gradient (CG) based Krylov subspace algorithm to solve a linear system of (i.e., solve for \( \mathbf{Ax}=\mathbf{b}$\f). @see <em>An Introduction to the Conjugate Gradient Method Without the Agonizing Pain</em>, Jonathan Richard Shewchuk (<a href="https://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf">Painless Conjugate-Gradient</a>) @see <em> Numerical Linear Algebra </em>, Trefethen, Lloyd N., and David Bau III., Vol. 50. Siam, 1997. @tparam ValueTypeOperator The datatype (float, double, complex<double>, etc.) for the operator (e.g. Matrix) associated with the linear solve @tparam ValueTypeOperand The datatype (float, double, complex<double>, etc.) of the vector, matrices, etc. on which the operator will act @tparam memorySpace The meory space (HOST, DEVICE, HOST_PINNED, etc.) in which the data of the operator and its operands reside */ template <typename ValueTypeOperator, typename ValueTypeOperand, utils::MemorySpace memorySpace> class CGLinearSolver : public LinearSolverImpl<ValueTypeOperator, ValueTypeOperand, memorySpace> { public: /** @brief Constructor @param[in] maxIter Maximum number of iterations to allow the solver to iterate. Generally, this determines the maximum size of the Krylov subspace that will be used. @param[in] absoluteTol Convergence tolerane on the absolute \) L_2 $\f norm of the residual (i.e., on \(||\mathbf{Ax}-\mathbf{b}||$\f) @param[in] relativeTol Convergence tolerane on the relative L2 norm of the residual (i.e., on \)||\mathbf{Ax}-\mathbf{b}||/||\mathbf{b}||$\f) More...
 
 dftefe::linearAlgebra::~CGLinearSolver ()=default
 Default Destructor. More...
 
LinearSolverError dftefe::linearAlgebra::solve (LinearSolverFunction< ValueTypeOperator, ValueTypeOperand, memorySpace > &linearSolverFunction) override
 Function that initiates the linear solve. More...
 

Variables

LinearAlgebraProfiler dftefe::linearAlgebra::d_profiler
 
size_type dftefe::linearAlgebra::d_maxIter
 
double dftefe::linearAlgebra::d_absoluteTol
 
double dftefe::linearAlgebra::d_relativeTol
 
double dftefe::linearAlgebra::d_divergenceTol