ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hsolver_supplementary_mock.h
Go to the documentation of this file.
1#pragma once
3
4namespace elecstate
5{
6
7const double* ElecState::getRho(int spin) const
8{
9 // hamilt::MatrixBlock<double> temp{&(this->charge->rho[spin][0]), 1, this->charge->nrxx}; //
10 // this->chr->get_nspin(), this->chr->get_nrxx()};
11 return &(this->charge->rho[spin][0]);
12}
13
14
16{
17 return;
18}
20
21
22void ElecState::init_scf(const int istep,
23 const UnitCell& ucell,
24 const Parallel_Grid& pgrid,
25 const ModuleBase::ComplexMatrix& strucfac,
26 const bool*,
28 const void*)
29{
30 return;
31}
32
33void ElecState::init_ks(Charge* chg_in, // pointer for class Charge
34 const K_Vectors* klist_in,
35 int nk_in,
36 ModulePW::PW_Basis* rhopw_in,
37 const ModulePW::PW_Basis_Big* bigpw_in)
38{
39 return;
40}
41
42template <typename T, typename Device>
44 Charge* chg_in,
45 K_Vectors* pkv_in,
46 UnitCell* ucell_in,
47 pseudopot_cell_vnl* ppcell_in,
48 ModulePW::PW_Basis* rhodpw_in,
49 ModulePW::PW_Basis* rhopw_in,
50 ModulePW::PW_Basis_Big* bigpw_in)
51 : basis(wfc_basis_in)
52{
53}
54
55template <typename T, typename Device>
56ElecStatePW<T, Device>::~ElecStatePW()
57{
58}
59
60template <typename T, typename Device>
61void ElecStatePW<T, Device>::psiToRho(const psi::Psi<T, Device>& psi)
62{
63}
64
65template <typename T, typename Device>
66void ElecStatePW<T, Device>::cal_tau(const psi::Psi<T, Device>& psi)
67{
68}
69
70template <typename T, typename Device>
71void ElecStatePW<T, Device>::cal_becsum(const psi::Psi<T, Device>& psi)
72{
73}
74
75template class ElecStatePW<std::complex<float>, base_device::DEVICE_CPU>;
76template class ElecStatePW<std::complex<double>, base_device::DEVICE_CPU>;
77#if ((defined __CUDA) || (defined __ROCM))
78template class ElecStatePW<std::complex<float>, base_device::DEVICE_GPU>;
79template class ElecStatePW<std::complex<double>, base_device::DEVICE_GPU>;
80#endif
81
82Potential::~Potential()
83{
84}
85
86void Potential::cal_v_eff(const Charge* const chg, const UnitCell* const ucell, ModuleBase::matrix& v_eff)
87{
88}
89
90void Potential::cal_fixed_v(double* vl_pseudo)
91{
92}
93
94} // namespace elecstate
95
96// mock of Stochastic_WF
98template <typename T, typename Device>
100{
101 chiortho = nullptr;
102 chi0 = nullptr;
103 shchi = nullptr;
104 nchip = nullptr;
105}
106
107template <typename T, typename Device>
109{
110 delete[] chi0;
111 delete[] shchi;
112 delete[] chiortho;
113 delete[] nchip;
114}
115
116template <typename T, typename Device>
117void Stochastic_WF<T, Device>::init(K_Vectors* p_kv, const int npwx_in)
118{
119 /*chi0 = new ModuleBase::ComplexMatrix[nks_in];
120 shchi = new ModuleBase::ComplexMatrix[nks_in];
121 chiortho = new ModuleBase::ComplexMatrix[nks_in];
122 nchip = new int[nks_in];
123 this->nks = nks_in;*/
124}
125
126#include "source_cell/klist.h"
Definition charge.h:20
double ** rho
Definition charge.h:38
Definition klist.h:13
Definition complexmatrix.h:14
Definition matrix.h:19
Definition pw_basis_big.h:16
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:57
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:56
Definition symmetry.h:16
Definition parallel_grid.h:8
~Stochastic_WF()
Definition hsolver_supplementary_mock.h:108
Stochastic_WF()
Definition hsolver_supplementary_mock.h:99
void init(K_Vectors *p_kv, const int npwx_in)
Definition hsolver_supplementary_mock.h:117
Definition unitcell.h:16
ElecStatePW(ModulePW::PW_Basis_K *wfc_basis_in, Charge *chg_in, K_Vectors *pkv_in, UnitCell *ucell_in, pseudopot_cell_vnl *ppcell_in, ModulePW::PW_Basis *rhodpw_in, ModulePW::PW_Basis *rhopw_in, ModulePW::PW_Basis_Big *bigpw_in)
Definition elecstate_pw.cpp:15
void init_scf(const int istep, const UnitCell &ucell, const Parallel_Grid &pgrid, const ModuleBase::ComplexMatrix &strucfac, const bool *numeric, ModuleSymmetry::Symmetry &symm, const void *wfcpw=nullptr)
Init rho_core, init rho, renormalize rho, init pot.
Definition elecstate.cpp:30
virtual const double * getRho(int spin) const
Definition elecstate.cpp:13
void init_ks(Charge *chg_in, const K_Vectors *klist_in, int nk_in, ModulePW::PW_Basis *rhopw_in, const ModulePW::PW_Basis_Big *bigpw_in)
Definition elecstate.cpp:57
Charge * charge
pointer to charge density
Definition elecstate.h:124
void init_nelec_spin()
Definition elecstate.cpp:20
Definition VNL_in_pw.h:21
Definition psi.h:37
Definition cal_dm.h:10
Definition exx_lip.h:23