DFT-EFE
 
Loading...
Searching...
No Matches
CGLinearSolver.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Bikash Kanungo
24 */
25
26#ifndef dftefeCGLinearSolver_h
27#define dftefeCGLinearSolver_h
28
29#include <utils/TypeConfig.h>
35
36namespace dftefe
37{
38 namespace linearAlgebra
39 {
64 template <typename ValueTypeOperator,
65 typename ValueTypeOperand,
66 utils::MemorySpace memorySpace>
67 class CGLinearSolver : public LinearSolverImpl<ValueTypeOperator,
68 ValueTypeOperand,
69 memorySpace>
70 {
71 public:
91 const double absoluteTol,
92 const double relativeTol,
93 const double divergenceTol,
95
99 ~CGLinearSolver() = default;
100
115 LinearSolverFunction<ValueTypeOperator, ValueTypeOperand, memorySpace>
116 &linearSolverFunction) override;
117
118 private:
124 }; // end of class CGLinearSolver
125 } // end of namespace linearAlgebra
126} // end of namespace dftefe
128#endif // dftefeCGLinearSolver_h
Definition: LinearAlgebraProfiler.h:42
double d_relativeTol
Definition: CGLinearSolver.h:122
LinearSolverError solve(LinearSolverFunction< ValueTypeOperator, ValueTypeOperand, memorySpace > &linearSolverFunction) override
Function that initiates the linear solve.
size_type d_maxIter
Definition: CGLinearSolver.h:120
double d_absoluteTol
Definition: CGLinearSolver.h:121
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...
LinearAlgebraProfiler d_profiler
Definition: CGLinearSolver.h:119
double d_divergenceTol
Definition: CGLinearSolver.h:123
~CGLinearSolver()=default
Default Destructor.
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
Definition: LinearAlgebraTypes.h:120