Skip to content

Commit 5d2fc35

Browse files
committed
fix bugs
1 parent 2cc87f9 commit 5d2fc35

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

source/source_esolver/esolver_ks_pw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#include <chrono>
3636

37-
#include "source/source_pw/module_pwdft/setup_pot.h" // mohan add 20250929
37+
#include "source_pw/module_pwdft/setup_pot.h" // mohan add 20250929
3838
#include "source_io/ctrl_output_pw.h" // mohan add 20250927
3939

4040
namespace ModuleESolver
@@ -257,7 +257,7 @@ void ESolver_KS_PW<T, Device>::before_scf(UnitCell& ucell, const int istep)
257257
//----------------------------------------------------------
258258
setup_pot(istep, ucell, this->kv, this->sf, this->pelec, this->Pgrid,
259259
this->chr, this->locpp, this->ppcell, this->vsep_cell,
260-
this->kspw_psi, this->pw_wfc, this->pw_rhod, inp);
260+
this->kspw_psi, this->pw_wfc, this->pw_rhod, PARAM.inp);
261261

262262
//----------------------------------------------------------
263263
//! 5) Initialize wave functions

source/source_pw/module_pwdft/setup_pot.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "source_lcao/module_dftu/dftu.h"
77
#include "source_pw/module_pwdft/VSep_in_pw.h"
88

9+
template <typename T, typename Device>
910
void setup_pot(const int istep,
1011
UnitCell& ucell, // unitcell
1112
const K_Vectors &kv, // kpoints
@@ -118,3 +119,36 @@ void setup_pot(const int istep,
118119

119120
return;
120121
}
122+
123+
template void setup_pot<std::complex<float>, base_device::DEVICE_CPU>(
124+
const int istep, // ionic step
125+
UnitCell& ucell, // unitcell
126+
const K_Vectors &kv, // kpoints
127+
Structure_Factor &sf, // structure factors
128+
elecstate::ElecState *pelec, // pointer of electrons
129+
const Parallel_Grid &para_grid, // parallel of FFT grids
130+
const Charge &chr, // charge density
131+
pseudopot_cell_vl &locpp, // local pseudopotentials
132+
pseudopot_cell_vnl &ppcell, // non-local pseudopotentials
133+
VSep* vsep_cell, // U-1/2 method
134+
psi::Psi<std::complex<float>, base_devcie::DEVICE_CPU>* kspw_psi, // electronic wave functions
135+
const ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
136+
const ModulePW::PW_Basis *pw_rhod, // pw for rhod
137+
const Input_para& inp); // input parameters
138+
139+
140+
template void setup_pot<std::complex<double>, base_device::DEVICE_CPU>(
141+
const int istep, // ionic step
142+
UnitCell& ucell, // unitcell
143+
const K_Vectors &kv, // kpoints
144+
Structure_Factor &sf, // structure factors
145+
elecstate::ElecState *pelec, // pointer of electrons
146+
const Parallel_Grid &para_grid, // parallel of FFT grids
147+
const Charge &chr, // charge density
148+
pseudopot_cell_vl &locpp, // local pseudopotentials
149+
pseudopot_cell_vnl &ppcell, // non-local pseudopotentials
150+
VSep* vsep_cell, // U-1/2 method
151+
psi::Psi<std::complex<double>, base_devcie::DEVICE_CPU>* kspw_psi, // electronic wave functions
152+
const ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
153+
const ModulePW::PW_Basis *pw_rhod, // pw for rhod
154+
const Input_para& inp); // input parameters

source/source_pw/module_pwdft/setup_pot.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#ifndef SETUP_POT_H
22
#define SETUP_POT_H
33

4+
#include "source_cell/unitcell.h"
5+
#include "source_cell/klist.h"
6+
#include "source_pw/module_pwdft/structure_factor.h"
7+
#include "source_estate/elecstate.h"
8+
#include "source_pw/module_pwdft/VL_in_pw.h"
49

10+
template <typename T, typename Device>
511
void setup_pot(const int istep,
612
UnitCell& ucell, // unitcell
713
const K_Vectors &kv, // kpoints

source/source_pw/module_pwdft/stress_pw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_STRESS_PW_H
2-
#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_STRESS_PW_H
1+
#ifndef STRESS_PW_H
2+
#define STRESS_PW_H
33

44
#include "source_estate/elecstate.h"
55
#include "source_pw/module_pwdft/VL_in_pw.h"

0 commit comments

Comments
 (0)