Skip to content

Commit f14edcb

Browse files
committed
update pot_local
1 parent 8a08cd7 commit f14edcb

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

source/module_elecstate/potentials/pot_local.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ namespace elecstate
1111
//==========================================================
1212
// This routine computes the local potential in real space
1313
//==========================================================
14-
void PotLocal::cal_fixed_v(double *vl_pseudo // store the local pseudopotential
15-
)
14+
void PotLocal::cal_fixed_v(double *vl_pseudo) // store the local pseudopotential
1615
{
1716
ModuleBase::TITLE("PotLocal", "cal_fixed_v");
1817
ModuleBase::timer::tick("PotLocal", "cal_fixed_v");
@@ -46,4 +45,4 @@ void PotLocal::cal_fixed_v(double *vl_pseudo // store the local pseudopotential
4645
return;
4746
}
4847

49-
} // namespace elecstate
48+
} // namespace elecstate

source/module_elecstate/potentials/potential_new.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
namespace elecstate
2020
{
21+
2122
Potential::Potential(const ModulePW::PW_Basis* rho_basis_in,
2223
const ModulePW::PW_Basis* rho_basis_smooth_in,
2324
const UnitCell* ucell_in,
@@ -101,12 +102,14 @@ void Potential::allocate()
101102
ModuleBase::TITLE("Potential", "allocate");
102103
int nrxx = this->rho_basis_->nrxx;
103104
int nrxx_smooth = this->rho_basis_smooth_->nrxx;
104-
if (nrxx == 0) {
105-
return;
106-
}
107-
if (nrxx_smooth == 0) {
108-
return;
109-
}
105+
if (nrxx == 0)
106+
{
107+
return;
108+
}
109+
if (nrxx_smooth == 0)
110+
{
111+
return;
112+
}
110113

111114
this->v_effective_fixed.resize(nrxx);
112115
ModuleBase::Memory::record("Pot::veff_fix", sizeof(double) * nrxx);
@@ -363,4 +366,4 @@ double* Potential::get_vofk_smooth_data()
363366
return this->vofk_smooth.nc > 0 ? this->d_vofk_smooth : nullptr;
364367
}
365368

366-
} // namespace elecstate
369+
} // namespace elecstate

0 commit comments

Comments
 (0)