DFT-EFE
 
Loading...
Searching...
No Matches
ChebyshevFilter.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 Avirup Sircar
24 */
25
26#ifndef dftefeChebyshevFilter_h
27#define dftefeChebyshevFilter_h
28
35#include <memory>
36
37namespace dftefe
38{
39 namespace linearAlgebra
40 {
54 template <typename ValueTypeOperator,
55 typename ValueTypeOperand,
56 utils::MemorySpace memorySpace>
57 void
59 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
60 &A,
61 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
62 & BInv,
63 MultiVector<ValueTypeOperand, memorySpace> &eigenSubspaceGuess,
64 const size_type polynomialDegree,
65 const double wantedSpectrumLowerBound,
66 const double wantedSpectrumUpperBound,
67 const double unWantedSpectrumUpperBound,
68 MultiVector<blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>,
69 memorySpace> & filteredSubspace);
70
71 template <typename ValueTypeOperator,
72 typename ValueTypeOperand,
73 utils::MemorySpace memorySpace>
74 void
76 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
77 &A,
78 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
79 &B,
80 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
81 & BInv,
82 MultiVector<ValueTypeOperand, memorySpace> &eigenSubspaceGuess,
83 const size_type polynomialDegree,
84 const double wantedSpectrumLowerBound,
85 const double wantedSpectrumUpperBound,
86 const double unWantedSpectrumUpperBound,
87 MultiVector<blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>,
88 memorySpace> & filteredSubspace);
89
90 template <typename ValueTypeOperator,
91 typename ValueTypeOperand,
92 utils::MemorySpace memorySpace>
93 void
95 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
96 &A,
97 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
98 &B,
99 const OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>
100 &BInv,
101 std::vector<blasLapack::real_type<
102 blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>>>
103 & eigenvalues,
104 MultiVector<ValueTypeOperand, memorySpace> &eigenSubspaceGuess,
105 const size_type polynomialDegree,
106 const double wantedSpectrumLowerBound,
107 const double wantedSpectrumUpperBound,
108 const double unWantedSpectrumUpperBound,
109 MultiVector<blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>,
110 memorySpace> & filteredSubspace);
111
112 } // end of namespace linearAlgebra
113} // end of namespace dftefe
115#endif // dftefeChebyshevFilter_h
blas::real_type< ValueType > real_type
Definition: BlasLapackTypedef.h:64
void ResidualChebyshevFilterGEP(const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &A, const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &B, const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &BInv, std::vector< blasLapack::real_type< blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > > > &eigenvalues, MultiVector< ValueTypeOperand, memorySpace > &eigenSubspaceGuess, const size_type polynomialDegree, const double wantedSpectrumLowerBound, const double wantedSpectrumUpperBound, const double unWantedSpectrumUpperBound, MultiVector< blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >, memorySpace > &filteredSubspace)
Definition: ChebyshevFilter.t.cpp:240
void ChebyshevFilterGEP(const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &A, const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &B, const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &BInv, MultiVector< ValueTypeOperand, memorySpace > &eigenSubspaceGuess, const size_type polynomialDegree, const double wantedSpectrumLowerBound, const double wantedSpectrumUpperBound, const double unWantedSpectrumUpperBound, MultiVector< blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >, memorySpace > &filteredSubspace)
Definition: ChebyshevFilter.t.cpp:142
void ChebyshevFilter(const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &A, const OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > &BInv, MultiVector< ValueTypeOperand, memorySpace > &eigenSubspaceGuess, const size_type polynomialDegree, const double wantedSpectrumLowerBound, const double wantedSpectrumUpperBound, const double unWantedSpectrumUpperBound, MultiVector< blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >, memorySpace > &filteredSubspace)
A class to get chebyshevFiletered subspace "filteredSubspace" from original subspace "eigenSubspaceGu...
Definition: ChebyshevFilter.t.cpp:39
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8