DFT-EFE
 
Loading...
Searching...
No Matches
ChebyshevFilteredEigenSolver.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 dftefeChebyshevFilteredEigenSolver_h
27#define dftefeChebyshevFilteredEigenSolver_h
28
38#include <memory>
39
40namespace dftefe
41{
42 namespace linearAlgebra
43 {
55 template <typename ValueTypeOperator,
56 typename ValueTypeOperand,
57 utils::MemorySpace memorySpace>
59 : public HermitianIterativeEigenSolver<ValueTypeOperator,
60 ValueTypeOperand,
61 memorySpace>
62 {
63 public:
70 using ValueType =
73 using OpContext =
74 typename HermitianIterativeEigenSolver<ValueTypeOperator,
75 ValueTypeOperand,
76 memorySpace>::OpContext;
77
78 public:
83 const double wantedSpectrumLowerBound,
84 const double wantedSpectrumUpperBound,
85 const double unWantedSpectrumUpperBound,
86 const double polynomialDegree,
87 const double illConditionTolerance,
89 const size_type eigenVectorBlockSize = 0);
90
96
97 void
98 reinit(const double wantedSpectrumLowerBound,
99 const double wantedSpectrumUpperBound,
100 const double unWantedSpectrumUpperBound,
101 const double polynomialDegree,
102 const double illConditionTolerance,
104 const size_type eigenVectorBlockSize);
105
107 solve(const OpContext & A,
108 std::vector<RealType> & eigenValues,
110 bool computeEigenVectors = false,
111 const OpContext &B = IdentityOperatorContext<ValueTypeOperator,
112 ValueTypeOperand,
113 memorySpace>(),
114 const OpContext &BInv =
115 IdentityOperatorContext<ValueTypeOperator,
116 ValueTypeOperand,
117 memorySpace>()) override;
118
121
124
125 private:
133
134 std::shared_ptr<MultiVector<ValueType, memorySpace>>
136 std::shared_ptr<MultiVector<ValueType, memorySpace>> d_filteredSubspace;
137
138 std::shared_ptr<
141
142 }; // end of class ChebyshevFilteredEigenSolver
143 } // end of namespace linearAlgebra
144} // end of namespace dftefe
146#endif // dftefeChebyshevFilteredEigenSolver_h
A derived class of OperatorContext to encapsulate the action of a discrete operator on vectors,...
Definition: ChebyshevFilteredEigenSolver.h:62
std::shared_ptr< RayleighRitzEigenSolver< ValueTypeOperator, ValueType, memorySpace > > d_rr
Definition: ChebyshevFilteredEigenSolver.h:140
MultiVector< ValueTypeOperand, memorySpace > * d_eigenSubspaceGuess
Definition: ChebyshevFilteredEigenSolver.h:131
std::shared_ptr< MultiVector< ValueType, memorySpace > > d_filteredSubspace
Definition: ChebyshevFilteredEigenSolver.h:136
double d_polynomialDegree
Definition: ChebyshevFilteredEigenSolver.h:129
std::shared_ptr< MultiVector< ValueType, memorySpace > > d_filteredSubspaceOrtho
Definition: ChebyshevFilteredEigenSolver.h:135
double d_wantedSpectrumUpperBound
Definition: ChebyshevFilteredEigenSolver.h:127
MultiVector< ValueType, memorySpace > & getFilteredSubspace()
Definition: ChebyshevFilteredEigenSolver.t.cpp:240
MultiVector< ValueType, memorySpace > & getOrthogonalizedFilteredSubspace()
Definition: ChebyshevFilteredEigenSolver.t.cpp:253
size_type d_eigenVectorBlockSize
Definition: ChebyshevFilteredEigenSolver.h:132
void reinit(const double wantedSpectrumLowerBound, const double wantedSpectrumUpperBound, const double unWantedSpectrumUpperBound, const double polynomialDegree, const double illConditionTolerance, MultiVector< ValueTypeOperand, memorySpace > &eigenSubspaceGuess, const size_type eigenVectorBlockSize)
Definition: ChebyshevFilteredEigenSolver.t.cpp:74
double d_unWantedSpectrumUpperBound
Definition: ChebyshevFilteredEigenSolver.h:128
blasLapack::real_type< ValueType > RealType
Definition: ChebyshevFilteredEigenSolver.h:72
double d_wantedSpectrumLowerBound
Definition: ChebyshevFilteredEigenSolver.h:126
typename HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::OpContext OpContext
Definition: ChebyshevFilteredEigenSolver.h:76
EigenSolverError solve(const OpContext &A, std::vector< RealType > &eigenValues, MultiVector< ValueType, memorySpace > &eigenVectors, bool computeEigenVectors=false, const OpContext &B=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >(), const OpContext &BInv=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >()) override
Definition: ChebyshevFilteredEigenSolver.t.cpp:111
double d_illConditionTolerance
Definition: ChebyshevFilteredEigenSolver.h:130
blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e....
Definition: ChebyshevFilteredEigenSolver.h:71
Abstract class to encapsulate the action of a discrete operator on vectors, matrices,...
Definition: IdentityOperatorContext.h:53
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
A derived class of OperatorContext to encapsulate the action of a discrete operator on vectors,...
Definition: RayleighRitzEigenSolver.h:57
blas::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:70
blas::real_type< ValueType > real_type
Definition: BlasLapackTypedef.h:64
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
Definition: LinearAlgebraTypes.h:127