ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
gint_fvl_meta_gpu.h
Go to the documentation of this file.
1#ifndef ABACUS_SOURCE_HAMILT_MODULE_GINT_GINT_FVL_META_GPU_H
2#define ABACUS_SOURCE_HAMILT_MODULE_GINT_GINT_FVL_META_GPU_H
3
4#include "gint.h"
5#include "gint_info.h"
9#include <memory>
10#include <vector>
11
12namespace ModuleGint
13{
14class Gint_fvl_meta_gpu : public Gint
15{
16 public:
18 const int nspin,
19 const std::vector<const double *> &vr_eff,
20 const std::vector<const double *> &vofk,
21 const std::vector<HContainer<double> *> &dm_vec,
22 const bool isforce,
23 const bool isstress,
26 : nspin_(nspin), vr_eff_(vr_eff), vofk_(vofk), dm_vec_(dm_vec), isforce_(isforce), isstress_(isstress),
27 fvl_(fvl), svl_(svl), dr3_(gint_info_->get_mgrid_volume())
28 {
29 }
30
31 void cal_gint();
32
33 private:
34 void init_dm_gint_();
35
37
39
40 void cal_fvl_svl_();
41
42 // input
43 const int nspin_;
44 std::vector<const double *> vr_eff_;
45 std::vector<const double *> vofk_;
46 std::vector<HContainer<double> *> dm_vec_;
47 const bool isforce_;
48 const bool isstress_;
49
50 // output
53
54 // intermediate variables
55 std::vector<HContainer<double>> dm_gint_vec_;
56
57 double dr3_;
58
59 std::vector<CudaMemWrapper<double>> vr_eff_d_vec_;
60 std::vector<CudaMemWrapper<double>> vofk_d_vec_;
61 std::vector<CudaMemWrapper<double>> dm_gint_d_vec_;
64};
65
66} // namespace ModuleGint
67
68#endif // ABACUS_SOURCE_HAMILT_MODULE_GINT_GINT_FVL_META_GPU_H
Definition cuda_mem_wrapper.h:10
Definition matrix.h:15
std::vector< CudaMemWrapper< double > > vr_eff_d_vec_
Definition gint_fvl_meta_gpu.h:59
ModuleBase::matrix * svl_
Definition gint_fvl_meta_gpu.h:52
std::vector< const double * > vofk_
Definition gint_fvl_meta_gpu.h:45
CudaMemWrapper< double > svl_d_
Definition gint_fvl_meta_gpu.h:63
std::vector< CudaMemWrapper< double > > vofk_d_vec_
Definition gint_fvl_meta_gpu.h:60
std::vector< CudaMemWrapper< double > > dm_gint_d_vec_
Definition gint_fvl_meta_gpu.h:61
void init_dm_gint_()
Definition gint_fvl_meta_gpu.cpp:21
std::vector< HContainer< double > * > dm_vec_
Definition gint_fvl_meta_gpu.h:46
ModuleBase::matrix * fvl_
Definition gint_fvl_meta_gpu.h:51
std::vector< const double * > vr_eff_
Definition gint_fvl_meta_gpu.h:44
CudaMemWrapper< double > fvl_d_
Definition gint_fvl_meta_gpu.h:62
void cal_fvl_svl_()
Definition gint_fvl_meta_gpu.cpp:85
double dr3_
Definition gint_fvl_meta_gpu.h:57
Gint_fvl_meta_gpu(const int nspin, const std::vector< const double * > &vr_eff, const std::vector< const double * > &vofk, const std::vector< HContainer< double > * > &dm_vec, const bool isforce, const bool isstress, ModuleBase::matrix *fvl, ModuleBase::matrix *svl)
Definition gint_fvl_meta_gpu.h:17
const bool isforce_
Definition gint_fvl_meta_gpu.h:47
void transfer_cpu_to_gpu_()
Definition gint_fvl_meta_gpu.cpp:30
void cal_gint()
Definition gint_fvl_meta_gpu.cpp:11
std::vector< HContainer< double > > dm_gint_vec_
Definition gint_fvl_meta_gpu.h:55
void transfer_gpu_to_cpu_()
Definition gint_fvl_meta_gpu.cpp:60
const bool isstress_
Definition gint_fvl_meta_gpu.h:48
const int nspin_
Definition gint_fvl_meta_gpu.h:43
static GintInfo * gint_info_
Definition gint.h:31
Definition batch_biggrid.cpp:4
hamilt::HContainer< T > HContainer
Definition gint_type.h:15