DFT-EFE
 
Loading...
Searching...
No Matches
JacobiPreconditioner.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 dftefeJacobiPreconditioner_h
27#define dftefeJacobiPreconditioner_h
28
32namespace dftefe
33{
34 namespace linearAlgebra
35 {
43 template <typename ValueType, utils::MemorySpace memorySpace>
44 class JacobiPreconditioner : public Preconditioner<ValueType, memorySpace>
45 {
46 public:
48
53
61 void
63
71 apply(const Vector<ValueType, memorySpace> &x) const override;
72
73 private:
75 };
76 } // end of namespace linearAlgebra
77} // end of namespace dftefe
78#endif // dftefeJacobiPreconditioner_h
A class to encapsulate the Jacobi preconditioner in a linear or non-linear solve.
Definition: JacobiPreconditioner.h:45
JacobiPreconditioner(const Vector< ValueType, memorySpace > &diagVector)
Vector< ValueType, memorySpace > d_invDiagVector
Definition: JacobiPreconditioner.h:74
Vector< ValueType, memorySpace > apply(const Vector< ValueType, memorySpace > &x) const override
Apply the preconditioner on a given vector and return the output vector.
void apply(Vector< ValueType, memorySpace > &x) const override
In-place apply the preconditioner on a given Vector (i.e., the input vector is modified to store the ...
~JacobiPreconditioner()=default
Default destructor.
Abstract class to encapsulate a preconditioner.
Definition: Preconditioner.h:54
A class that encapsulates a vector. This is a vector in the mathematical sense and not in the sense o...
Definition: Vector.h:122
dealii includes
Definition: AtomFieldDataSpherical.cpp:31