DFT-EFE
 
Loading...
Searching...
No Matches
Preconditioner.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 dftefePreconditioner_h
27#define dftefePreconditioner_h
28
35namespace dftefe
36{
37 namespace linearAlgebra
38 {
49 template <typename ValueTypeOperator,
50 typename ValueTypeOperand,
51 utils::MemorySpace memorySpace>
53 : public OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
54 {
55 //
56 // typedefs
57 //
58 public:
59 //
60 // alias to define the union of ValueTypeOperator and ValueTypeOperand
61 // (e.g., the union of double and complex<double> is complex<double>)
62 //
65
66 public:
71 ~Preconditioner() = default;
72
73 /*
74 * @brief Function to apply the pre-conditoner on an input Vector \p x
75 * and store the output in \p y. A typical use case is that the
76 * pre-conditioner is a matrix (\f$A$\f) and we want to evaluate
77 * \f$y=Ax$\f
78 *
79 * @param[in] x Input Vector
80 * @param[out] y Output Vector that stores the action of the operator
81 * on \p x
82 *
83 * @note The input Vector \p x can be modified inside the function for
84 * performance reasons. If the user needs \p x to be constant
85 * (un-modified), we suggest the user to make a copy of \p x
86 * prior to calling this function
87 *
88 */
89 // virtual void
90 // apply(Vector<ValueTypeOperand, memorySpace> &x,
91 // Vector<ValueTypeUnion, memorySpace> & y) const = 0;
92
93 /*
94 * @brief Function to apply the pre-conditoner on an input Vector \p X
95 * and store the output in \p Y. A typical use case is that the
96 * pre-conditioner is a matrix (\f$A$\f) and we want to evaluate
97 * \f$Y=AX$\f
98 *
99 * @param[in] X Input Vector
100 * @param[out] Y Output Vector that stores the action of the operator
101 * on \p X
102 *
103 * @note The input Vector \p X can be modified inside the function for
104 * performance reasons. If the user needs \p X to be constant
105 * (un-modified), we suggest the user to make a copy of \p X
106 * prior to calling this function
107 *
108 */
109 virtual void
112
113 virtual PreconditionerType
115 };
116 } // end of namespace linearAlgebra
117} // end of namespace dftefe
118#endif // dftefePreconditioner_h
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
Abstract class to encapsulate the action of a discrete operator on vectors, matrices,...
Definition: OperatorContext.h:51
Abstract class to encapsulate a preconditioner.
Definition: Preconditioner.h:54
virtual void apply(MultiVector< ValueTypeOperand, memorySpace > &X, MultiVector< ValueTypeUnion, memorySpace > &Y) const =0
blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueTypeUnion
Definition: Preconditioner.h:64
virtual PreconditionerType getPreconditionerType() const =0
~Preconditioner()=default
Default Destructor.
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
PreconditionerType
Definition: LinearAlgebraTypes.h:41
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31