Skip to content

Commit 4463fe4

Browse files
committed
rename spinsize as n_component
1 parent eea2271 commit 4463fe4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/module_lr/potentials/pot_hxc_lrtd.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ namespace LR
3636
{
3737
const std::set<std::string> lda_xc = { "lda", "pwlda" };
3838
assert(lda_xc.count(this->xc_kernel_));
39-
const int spinsize = (1 == nspin) ? 1 : 3;
40-
std::vector<double> v2rho2(spinsize * nrxx);
39+
const int n_component = (1 == nspin) ? 1 : 3;
40+
std::vector<double> v2rho2(n_component * nrxx);
4141
// read fxc adn add to xc_kernel_components
42-
assert(lr_init_xc_kernel.size() >= spinsize + 1);
43-
for (int is = 0;is < spinsize;++is)
42+
assert(lr_init_xc_kernel.size() >= n_component + 1);
43+
for (int is = 0;is < n_component;++is)
4444
{
4545
double ef = 0.0;
4646
int prenspin = 1;
4747
std::vector<double> v2rho2_tmp(nrxx);
4848
ModuleIO::read_vdata_palgrid(pgrid, GlobalV::MY_RANK, GlobalV::ofs_running, lr_init_xc_kernel[is + 1],
4949
v2rho2_tmp.data(), ucell->nat);
50-
for (int ir = 0;ir < nrxx;++ir) { v2rho2[ir * spinsize + is] = v2rho2_tmp[ir]; }
50+
for (int ir = 0;ir < nrxx;++ir) { v2rho2[ir * n_component + is] = v2rho2_tmp[ir]; }
5151
}
5252
this->xc_kernel_components_.set_kernel("v2rho2", std::move(v2rho2));
5353
return;

0 commit comments

Comments
 (0)