DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
chebyshevOrthogonalizedSubspaceIterationSolver.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17
18
19#ifndef chebyshevOrthogonalizedSubspaceIterationSolver_h
20#define chebyshevOrthogonalizedSubspaceIterationSolver_h
21
22#include "dftParameters.h"
23#include "eigenSolver.h"
24#include "operator.h"
25#include "elpaScalaManager.h"
26#include "dftParameters.h"
27#include "BLASWrapper.h"
28
29namespace dftfe
30{
31 /**
32 * @brief Concrete class implementing Chebyshev filtered orthogonalized subspace
33 * iteration solver.
34 * @author Phani Motamarri, Sambit Das
35 */
36
38 {
39 public:
40 /**
41 * @brief Constructor.
42 *
43 * @param mpi_comm_parent parent mpi communicator
44 * @param mpi_comm_domain domain decomposition mpi communicator
45 * @param lowerBoundWantedSpectrum Lower Bound of the Wanted Spectrum.
46 * @param lowerBoundUnWantedSpectrum Lower Bound of the UnWanted Spectrum.
47 */
49 const MPI_Comm & mpi_comm_parent,
50 const MPI_Comm & mpi_comm_domain,
51 double lowerBoundWantedSpectrum,
52 double lowerBoundUnWantedSpectrum,
53 double upperBoundUnWantedSpectrum,
54 const dftParameters &dftParams);
55
56
57 /**
58 * @brief Destructor.
59 */
61
62
63 /**
64 * @brief Solve a generalized eigen problem.
65 */
66 void
68 std::shared_ptr<
70 & BLASWrapperPtr,
71 elpaScalaManager & elpaScala,
72 dataTypes::number * eigenVectorsFlattened,
73 const unsigned int totalNumberWaveFunctions,
74 const unsigned int localVectorSize,
75 std::vector<double> &eigenValues,
76 std::vector<double> &residuals,
77 const MPI_Comm & interBandGroupComm,
78 const MPI_Comm & mpiCommDomain,
79 const bool isFirstFilteringCall,
80 const bool computeResidual,
81 const bool useMixedPrec = false,
82 const bool isFirstScf = false);
83
84 /**
85 * @brief Solve a generalized eigen problem.
86 */
87 void
89 std::vector<distributedCPUVec<double>> & eigenVectors,
90 std::vector<double> & eigenValues,
91 std::vector<double> & residuals);
92
93 /**
94 * @brief reinit spectrum bounds
95 */
96 void
97 reinitSpectrumBounds(double lowerBoundWantedSpectrum,
98 double lowerBoundUnWantedSpectrum,
99 double upperBoundUnWantedSpectrum);
100
101 private:
102 const MPI_Comm d_mpiCommParent;
103 //
104 // stores lower bound of wanted spectrum
105 //
107
108 //
109 // stores lower bound of unwanted spectrum
110 //
112
113
114 //
115 // stores upper bound of unwanted spectrum
116 //
118
119
121
122 //
123 // variables for printing out and timing
124 //
125 dealii::ConditionalOStream pcout;
126 dealii::TimerOutput computing_timer;
127 };
128} // namespace dftfe
129#endif
dealii::TimerOutput computing_timer
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:126
const dftParameters & d_dftParams
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:120
void solve(operatorDFTClass< dftfe::utils::MemorySpace::HOST > &operatorMatrix, std::vector< distributedCPUVec< double > > &eigenVectors, std::vector< double > &eigenValues, std::vector< double > &residuals)
Solve a generalized eigen problem.
void reinitSpectrumBounds(double lowerBoundWantedSpectrum, double lowerBoundUnWantedSpectrum, double upperBoundUnWantedSpectrum)
reinit spectrum bounds
chebyshevOrthogonalizedSubspaceIterationSolver(const MPI_Comm &mpi_comm_parent, const MPI_Comm &mpi_comm_domain, double lowerBoundWantedSpectrum, double lowerBoundUnWantedSpectrum, double upperBoundUnWantedSpectrum, const dftParameters &dftParams)
Constructor.
const MPI_Comm d_mpiCommParent
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:102
double d_lowerBoundUnWantedSpectrum
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:111
dealii::ConditionalOStream pcout
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:125
void solve(operatorDFTClass< dftfe::utils::MemorySpace::HOST > &operatorMatrix, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, elpaScalaManager &elpaScala, dataTypes::number *eigenVectorsFlattened, const unsigned int totalNumberWaveFunctions, const unsigned int localVectorSize, std::vector< double > &eigenValues, std::vector< double > &residuals, const MPI_Comm &interBandGroupComm, const MPI_Comm &mpiCommDomain, const bool isFirstFilteringCall, const bool computeResidual, const bool useMixedPrec=false, const bool isFirstScf=false)
Solve a generalized eigen problem.
double d_lowerBoundWantedSpectrum
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:106
double d_upperBoundUnWantedSpectrum
Definition chebyshevOrthogonalizedSubspaceIterationSolver.h:117
Namespace which declares the input parameters and the functions to parse them from the input paramete...
Definition dftParameters.h:35
eigenSolverClass()
Constructor.
Manager class for ELPA and ScaLAPACK.
Definition elpaScalaManager.h:38
Definition BLASWrapper.h:35
Base class for building the DFT operator and the action of operator on a vector.
Definition operator.h:43
double number
Definition dftfeDataTypes.h:44
Definition pseudoPotentialToDftfeConverter.cc:34
dealii::LinearAlgebra::distributed::Vector< elem_type, dealii::MemorySpace::Host > distributedCPUVec
Definition headers.h:92