DFT-FE 1.3.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
atomCenteredPostProcessing.h
Go to the documentation of this file.
1#ifndef ATOMCENTEREDOORBTIALPOSTPROCESING_H
2#define ATOMCENTEREDOORBTIALPOSTPROCESING_H
3
4#include "vector"
5#include "map"
12#include <memory>
13#include <MemorySpaceType.h>
14#include <headers.h>
15#include <TypeConfig.h>
16#include <dftUtils.h>
17#include "FEBasisOperations.h"
18#include <BLASWrapper.h>
19#include <xc.h>
20#include <excManager.h>
21#ifdef _OPENMP
22# include <omp.h>
23#else
24# define omp_get_thread_num() 0
25#endif
26namespace dftfe
27{
28 template <typename ValueType, dftfe::utils::MemorySpace memorySpace>
30 {
31 public:
32 atomCenteredOrbitalsPostProcessing(const MPI_Comm &mpi_comm_parent,
33 const MPI_Comm &mpi_comm_domain,
34 const std::string &scratchFolderName,
35 const std::set<dftfe::uInt> &atomTypes,
36 const bool reproducibleOutput,
37 const dftfe::Int verbosity,
38 const bool useDevice,
39 const dftParameters *dftParamsPtr);
40 /**
41 * @brief Initialises all the data members with addresses/values to/of dftClass.
42 * @param[in] numEigenValues number of eigenvalues
43 * @param[in] atomLocations atomic Coordinates
44 * @param[in] imageIds image IDs of periodic cell
45 * @param[in] periodicCoords coordinates of image atoms
46 */
47
48 void
50 std::shared_ptr<
52 FEBasisOperations<ValueType, double, dftfe::utils::MemorySpace::HOST>>
53 basisOperationsHostPtr,
54#if defined(DFTFE_WITH_DEVICE)
55 std::shared_ptr<
57 double,
59 basisOperationsDevicePtr,
60#endif
61 std::shared_ptr<
63 BLASWrapperPtrHost,
64#if defined(DFTFE_WITH_DEVICE)
65 std::shared_ptr<
67 BLASWrapperPtrDevice,
68#endif
69 dftfe::uInt sparsityPatternQuadratureId,
70 dftfe::uInt nlpspQuadratureId,
71 const std::vector<std::vector<double>> &atomLocations,
72 dftfe::uInt numEigenValues);
73
74
75 /**
76 * @brief Initialises all the data members with addresses/values to/of dftClass.
77 * @param[in] atomLocations atomic Coordinates
78 * @param[in] imageIds image IDs of periodic cell
79 * @param[in] periodicCoords coordinates of image atoms
80 */
81 void
83 const std::vector<dftfe::Int> &imageIds,
84 const std::vector<std::vector<double>> &periodicCoords,
85 const std::vector<double> &kPointWeights,
86 const std::vector<double> &kPointCoordinates,
87 const bool updateNonlocalSparsity);
88
89 void
91 const std::vector<std::vector<double>> &atomCoordinates);
92
93 const std::shared_ptr<
96
97 double
98 smearFunction(double x, const dftParameters *dftParamsPtr);
99
100 std::unordered_map<dftfe::uInt, std::string> LQnumToNameMap;
101
102 void
105 const dftfe::uInt totalNumWaveFunctions,
106 const std::vector<std::vector<double>> &eigenValues,
107 std::shared_ptr<
109 &basisOperationsPtr,
110#if defined(DFTFE_WITH_DEVICE)
111 std::shared_ptr<
113 BLASWrapperPtrDevice,
114#endif
115 std::shared_ptr<
117 BLASWrapperPtrHost,
118 const dftfe::uInt quadratureIndex,
119 const std::vector<double> &kPointWeights,
120 const MPI_Comm &interBandGroupComm,
121 const MPI_Comm &interpoolComm,
122 const dftParameters *dftParamsPtr,
123 double fermiEnergy,
124 dftfe::uInt highestStateNscfSolve);
125
126 private:
128 const MPI_Comm d_mpiCommDomain;
131 std::set<dftfe::uInt> d_atomTypes;
135 dealii::ConditionalOStream pcout;
139
140 void
142
143
144 std::vector<std::vector<double>> d_atomLocationsInterestPostProcessing;
145 std::map<dftfe::uInt, dftfe::uInt> d_atomIdPostProcessingInterestToGlobalId;
146
147 std::map<dftfe::uInt, std::vector<std::pair<dftfe::uInt, dftfe::uInt>>>
149 dealii::TimerOutput computing_timer;
150
151 std::shared_ptr<AtomCenteredSphericalFunctionContainer>
153
154 std::map<std::pair<dftfe::uInt, dftfe::uInt>,
155 std::shared_ptr<AtomCenteredSphericalFunctionBase>>
157
158 std::shared_ptr<AtomicCenteredNonLocalOperator<ValueType, memorySpace>>
160
161 std::shared_ptr<
162 dftfe::basis::
163 FEBasisOperations<ValueType, double, dftfe::utils::MemorySpace::HOST>>
165
166
167 std::shared_ptr<
170#if defined(DFTFE_WITH_DEVICE)
171 std::shared_ptr<
173 d_BLASWrapperDevicePtr;
174 std::shared_ptr<
175 dftfe::basis::
176 FEBasisOperations<ValueType, double, dftfe::utils::MemorySpace::DEVICE>>
177 d_BasisOperatorDevicePtr;
178#endif
179 };
180} // namespace dftfe
181
182#endif
Definition AtomicCenteredNonLocalOperator.h:66
void initialiseNonLocalContribution(const std::vector< dftfe::Int > &imageIds, const std::vector< std::vector< double > > &periodicCoords, const std::vector< double > &kPointWeights, const std::vector< double > &kPointCoordinates, const bool updateNonlocalSparsity)
Initialises all the data members with addresses/values to/of dftClass.
const MPI_Comm d_mpiCommParentPostProcessing
Definition atomCenteredPostProcessing.h:127
dftfe::uInt d_numEigenValues
Definition atomCenteredPostProcessing.h:138
std::unordered_map< dftfe::uInt, std::string > LQnumToNameMap
Definition atomCenteredPostProcessing.h:100
bool d_reproducible_output
Definition atomCenteredPostProcessing.h:132
bool d_useDevice
Definition atomCenteredPostProcessing.h:134
std::shared_ptr< AtomCenteredSphericalFunctionContainer > d_atomicOrbitalFnsContainer
Definition atomCenteredPostProcessing.h:152
void determineAtomsOfInterstPostProcessing(const std::vector< std::vector< double > > &atomCoordinates)
void initialise(std::shared_ptr< dftfe::basis::FEBasisOperations< ValueType, double, dftfe::utils::MemorySpace::HOST > > basisOperationsHostPtr, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > BLASWrapperPtrHost, dftfe::uInt sparsityPatternQuadratureId, dftfe::uInt nlpspQuadratureId, const std::vector< std::vector< double > > &atomLocations, dftfe::uInt numEigenValues)
Initialises all the data members with addresses/values to/of dftClass.
std::shared_ptr< AtomicCenteredNonLocalOperator< ValueType, memorySpace > > d_nonLocalOperator
Definition atomCenteredPostProcessing.h:159
std::map< dftfe::uInt, dftfe::uInt > d_atomIdPostProcessingInterestToGlobalId
Definition atomCenteredPostProcessing.h:145
std::vector< std::vector< double > > d_atomLocationsInterestPostProcessing
Definition atomCenteredPostProcessing.h:144
const std::shared_ptr< AtomicCenteredNonLocalOperator< ValueType, memorySpace > > getNonLocalOperator()
std::map< dftfe::uInt, std::vector< std::pair< dftfe::uInt, dftfe::uInt > > > nlNumsMap
Definition atomCenteredPostProcessing.h:148
std::shared_ptr< dftfe::basis::FEBasisOperations< ValueType, double, dftfe::utils::MemorySpace::HOST > > d_BasisOperatorHostPtr
Definition atomCenteredPostProcessing.h:164
dealii::ConditionalOStream pcout
Definition atomCenteredPostProcessing.h:135
void createAtomCenteredSphericalFunctionsForOrbitals()
dealii::TimerOutput computing_timer
Definition atomCenteredPostProcessing.h:149
atomCenteredOrbitalsPostProcessing(const MPI_Comm &mpi_comm_parent, const MPI_Comm &mpi_comm_domain, const std::string &scratchFolderName, const std::set< dftfe::uInt > &atomTypes, const bool reproducibleOutput, const dftfe::Int verbosity, const bool useDevice, const dftParameters *dftParamsPtr)
std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > d_BLASWrapperHostPtr
Definition atomCenteredPostProcessing.h:169
dftfe::uInt d_sparsityPatternQuadratureId
Definition atomCenteredPostProcessing.h:136
const dftfe::uInt d_this_mpi_process
Definition atomCenteredPostProcessing.h:129
std::set< dftfe::uInt > d_atomTypes
Definition atomCenteredPostProcessing.h:131
void computeAtomCenteredEntries(const dftfe::utils::MemoryStorage< ValueType, memorySpace > *X, const dftfe::uInt totalNumWaveFunctions, const std::vector< std::vector< double > > &eigenValues, std::shared_ptr< dftfe::basis::FEBasisOperations< ValueType, double, memorySpace > > &basisOperationsPtr, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > BLASWrapperPtrHost, const dftfe::uInt quadratureIndex, const std::vector< double > &kPointWeights, const MPI_Comm &interBandGroupComm, const MPI_Comm &interpoolComm, const dftParameters *dftParamsPtr, double fermiEnergy, dftfe::uInt highestStateNscfSolve)
const MPI_Comm d_mpiCommDomain
Definition atomCenteredPostProcessing.h:128
double smearFunction(double x, const dftParameters *dftParamsPtr)
dftfe::uInt d_verbosity
Definition atomCenteredPostProcessing.h:133
std::string d_dftfeScratchFolderName
Definition atomCenteredPostProcessing.h:130
std::map< std::pair< dftfe::uInt, dftfe::uInt >, std::shared_ptr< AtomCenteredSphericalFunctionBase > > d_atomicOrbitalFnsMap
Definition atomCenteredPostProcessing.h:156
dftfe::uInt d_nlpspQuadratureId
Definition atomCenteredPostProcessing.h:137
Definition FEBasisOperations.h:85
Namespace which declares the input parameters and the functions to parse them from the input paramete...
Definition dftParameters.h:36
Definition BLASWrapper.h:35
Definition MemoryStorage.h:33
Definition FEBasisOperations.h:30
@ DEVICE
Definition MemorySpaceType.h:36
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10
std::int32_t Int
Definition TypeConfig.h:11