ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ekinetic.h
Go to the documentation of this file.
1#ifndef EKINETIC_H
2#define EKINETIC_H
9#include <vector>
10
11namespace hamilt
12{
13
14#ifndef __EKINETICTEMPLATE
15#define __EKINETICTEMPLATE
16
22template <class T>
23class EKinetic : public T
24{
25};
26
27#endif
28
36template <typename TK, typename TR>
37class EKinetic<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
38{
39 public:
44 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
45 HContainer<TR>* hR_in,
46 const UnitCell* ucell_in,
47 const std::vector<double>& orb_cutoff,
48 const Grid_Driver* GridD_in,
49 const TwoCenterIntegrator* intor);
50
55
60 virtual void contributeHR() override;
61
62 virtual void set_HR_fixed(void*) override;
63
72 void cal_force_stress(const bool cal_force,
73 const bool cal_stress,
74 const HContainer<double>* dmR,
75 ModuleBase::matrix& force,
76 ModuleBase::matrix& stress);
77
78 private:
79 const UnitCell* ucell = nullptr;
80 std::vector<double> orb_cutoff_;
81
82 hamilt::HContainer<TR>* HR_fixed = nullptr;
83
84 const TwoCenterIntegrator* intor_ = nullptr;
85
86 const Grid_Driver* gridD = nullptr;
87
88 bool allocated = false;
89
90 bool HR_fixed_done = false;
91
97 void initialize_HR(const Grid_Driver* GridD_in);
98
104
108 void cal_HR_IJR(const int& iat1,
109 const int& iat2,
110 const Parallel_Orbitals* paraV,
111 const ModuleBase::Vector3<double>& dtau,
112 TR* data_pointer);
113
117 void cal_force_IJR(const int& iat1,
118 const int& iat2,
119 const Parallel_Orbitals* paraV,
120 const std::unordered_map<int, std::vector<double>>& nlm1_all,
121 const std::unordered_map<int, std::vector<double>>& nlm2_all,
122 const hamilt::BaseMatrix<TR>* dmR_pointer,
123 double* force1,
124 double* force2);
125
129 void cal_stress_IJR(const int& iat1,
130 const int& iat2,
131 const Parallel_Orbitals* paraV,
132 const std::unordered_map<int, std::vector<double>>& nlm1_all,
133 const std::unordered_map<int, std::vector<double>>& nlm2_all,
134 const hamilt::BaseMatrix<TR>* dmR_pointer,
135 const ModuleBase::Vector3<double>& dis1,
136 const ModuleBase::Vector3<double>& dis2,
137 double* stress);
138
140 std::vector<AdjacentAtomInfo> adjs_all;
141};
142
143} // namespace hamilt
144#endif
Definition sltk_grid_driver.h:40
3 elements vector
Definition vector3.h:24
Definition matrix.h:18
Definition parallel_orbitals.h:9
A class to compute two-center integrals.
Definition two_center_integrator.h:35
Definition unitcell.h:15
Definition base_matrix.h:20
virtual void set_HR_fixed(void *) override
set_HR_fixed() is used for pass HR_fixed matrix to the next node in sub-chain table not used in base ...
void calculate_HR()
calculate the electronic kinetic matrix with specific <I,J,R> atom-pairs use the adjs_all to calculat...
void initialize_HR(const Grid_Driver *GridD_in)
initialize HR, search the nearest neighbor atoms HContainer is used to store the electronic kinetic m...
virtual void contributeHR() override
contributeHR() is used to calculate the HR matrix <phi_{\mu, 0}|-\Nabla^2|phi_{\nu,...
void cal_HR_IJR(const int &iat1, const int &iat2, const Parallel_Orbitals *paraV, const ModuleBase::Vector3< double > &dtau, TR *data_pointer)
calculate the HR local matrix of <I,J,R> atom pair
std::vector< AdjacentAtomInfo > adjs_all
exact the nearest neighbor atoms from all adjacent atoms
Definition ekinetic.h:140
std::vector< double > orb_cutoff_
Definition ekinetic.h:80
Definition ekinetic.h:24
Definition hcontainer.h:144
Definition hs_matrix_k.hpp:11
Definition operator_lcao.h:12
#define T
Definition exp.cpp:237
Definition hamilt.h:13