Skip to content

Commit

Permalink
change get ucell tpiba in getters
Browse files Browse the repository at this point in the history
  • Loading branch information
A-006 committed Dec 13, 2024
1 parent b4583f1 commit 58f3353
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
4 changes: 0 additions & 4 deletions source/module_elecstate/elecstate_getters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ double get_ucell_omega()
return GlobalC::ucell.omega;
}

double get_ucell_tpiba()
{
return GlobalC::ucell.tpiba;
}

int get_xc_func_type()
{
Expand Down
2 changes: 0 additions & 2 deletions source/module_elecstate/elecstate_getters.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ namespace elecstate

/// @brief get the value of GlobalC::ucell.omega
double get_ucell_omega();
/// @brief get the value of GlobalC::ucell.tpiba
double get_ucell_tpiba();
/// @brief get the value of XC_Functional::func_type
int get_xc_func_type();

Expand Down
2 changes: 1 addition & 1 deletion source/module_elecstate/elecstate_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void ElecStatePW<T, Device>::rhoBandK(const psi::Psi<T, Device>& psi)
j,
npw,
this->basis->npwk_max,
static_cast<Real>(get_ucell_tpiba()),
static_cast<Real>(ucell->tpiba),
this->basis->template get_gcar_data<Real>(),
this->basis->template get_kvec_c_data<Real>(),
&psi(ibnd, 0),
Expand Down
2 changes: 1 addition & 1 deletion source/module_elecstate/elecstate_pw_cal_tau.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ElecStatePW<T, Device>::cal_tau(const psi::Psi<T, Device>& psi)
j,
npw,
this->basis->npwk_max,
static_cast<Real>(get_ucell_tpiba()),
static_cast<Real>(ucell->tpiba),
this->basis->template get_gcar_data<Real>(),
this->basis->template get_kvec_c_data<Real>(),
&psi(ibnd, 0),
Expand Down
5 changes: 1 addition & 4 deletions source/module_elecstate/test/elecstate_pw_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ double get_ucell_omega()
{
return 500.0;
}
double get_ucell_tpiba()
{
return 2.0;
}
int tmp_xc_func_type = 1;
int get_xc_func_type()
{
Expand Down Expand Up @@ -184,6 +180,7 @@ void Set_GlobalV_Default()
GlobalV::KPAR = 1;
GlobalV::NPROC_IN_POOL = 1;
PARAM.sys.use_uspp = false;
ucell.tpiba = 2.0;
}

/************************************************
Expand Down

0 comments on commit 58f3353

Please sign in to comment.