Skip to content

Commit 8b54a0d

Browse files
committed
change ucell in module_lr
1 parent a363fdf commit 8b54a0d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

source/module_lr/esolver_lrtd_lcao.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ LR::ESolver_LR<T, TR>::ESolver_LR(const Input_para& inp, UnitCell& ucell) : inpu
255255
// necessary steps in ESolver_KS::before_all_runners : symmetry and k-points
256256
if (ModuleSymmetry::Symmetry::symm_flag == 1)
257257
{
258-
GlobalC::ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running);
258+
ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running);
259259
ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY");
260260
}
261261
this->kv.set(ucell,ucell.symm, PARAM.inp.kpoint_file, PARAM.inp.nspin, ucell.G, ucell.latvec, GlobalV::ofs_running);
@@ -318,12 +318,12 @@ LR::ESolver_LR<T, TR>::ESolver_LR(const Input_para& inp, UnitCell& ucell) : inpu
318318
this->init_pot(chg_gs);
319319

320320
// search adjacent atoms and init Gint
321-
std::cout << "ucell.infoNL.get_rcutmax_Beta(): " << GlobalC::ucell.infoNL.get_rcutmax_Beta() << std::endl;
321+
std::cout << "ucell.infoNL.get_rcutmax_Beta(): " << ucell.infoNL.get_rcutmax_Beta() << std::endl;
322322
double search_radius = -1.0;
323323
search_radius = atom_arrange::set_sr_NL(GlobalV::ofs_running,
324324
PARAM.inp.out_level,
325325
orb.get_rcutmax_Phi(),
326-
GlobalC::ucell.infoNL.get_rcutmax_Beta(),
326+
ucell.infoNL.get_rcutmax_Beta(),
327327
PARAM.globalv.gamma_only_local);
328328
atom_arrange::search(PARAM.inp.search_pbc,
329329
GlobalV::ofs_running,
@@ -341,7 +341,7 @@ LR::ESolver_LR<T, TR>::ESolver_LR(const Input_para& inp, UnitCell& ucell) : inpu
341341
std::vector<std::vector<double>> dpsi_u;
342342
std::vector<std::vector<double>> d2psi_u;
343343

344-
Gint_Tools::init_orb(dr_uniform, rcuts, GlobalC::ucell, orb, psi_u, dpsi_u, d2psi_u);
344+
Gint_Tools::init_orb(dr_uniform, rcuts, ucell, orb, psi_u, dpsi_u, d2psi_u);
345345
this->gt_.set_pbc_grid(this->pw_rho->nx,
346346
this->pw_rho->ny,
347347
this->pw_rho->nz,
@@ -357,7 +357,7 @@ LR::ESolver_LR<T, TR>::ESolver_LR(const Input_para& inp, UnitCell& ucell) : inpu
357357
this->pw_rho->ny,
358358
this->pw_rho->nplane,
359359
this->pw_rho->startz_current,
360-
GlobalC::ucell,
360+
ucell,
361361
GlobalC::GridD,
362362
dr_uniform,
363363
rcuts,

source/module_lr/operator_casida/operator_lr_exx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace LR
6565
for (auto cell : this->BvK_cells)
6666
{
6767
std::complex<double> frac = RI::Global_Func::convert<std::complex<double>>(std::exp(
68-
-ModuleBase::TWO_PI * ModuleBase::IMAG_UNIT * (this->kv.kvec_c.at(ik) * (RI_Util::array3_to_Vector3(cell) * GlobalC::ucell.latvec))));
68+
-ModuleBase::TWO_PI * ModuleBase::IMAG_UNIT * (this->kv.kvec_c.at(ik) * (RI_Util::array3_to_Vector3(cell) * ucell.latvec))));
6969
for (int it1 = 0;it1 < ucell.ntype;++it1)
7070
for (int ia1 = 0; ia1 < ucell.atoms[it1].na; ++ia1)
7171
for (int it2 = 0;it2 < ucell.ntype;++it2)

source/module_lr/operator_casida/operator_lr_hxc.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ namespace LR
6868

6969
// 3. v_hxc = f_hxc * rho_trans
7070
ModuleBase::matrix vr_hxc(1, nrxx); //grid
71-
this->pot.lock()->cal_v_eff(rho_trans, GlobalC::ucell, vr_hxc, ispin_ks);
71+
this->pot.lock()->cal_v_eff(rho_trans, ucell, vr_hxc, ispin_ks);
7272
LR_Util::_deallocate_2order_nested_ptr(rho_trans, 1);
7373

7474
// 4. V^{Hxc}_{\mu,\nu}=\int{dr} \phi_\mu(r) v_{Hxc}(r) \phi_\mu(r)
7575
Gint_inout inout_vlocal(vr_hxc.c, 0, Gint_Tools::job_type::vlocal);
7676
this->gint->get_hRGint()->set_zero();
7777
this->gint->cal_gint(&inout_vlocal);
7878
this->hR->set_zero(); // clear hR for each bands
79-
this->gint->transfer_pvpR(&*this->hR, &GlobalC::ucell); //grid to 2d block
79+
this->gint->transfer_pvpR(&*this->hR, &ucell); //grid to 2d block
8080
ModuleBase::timer::tick("OperatorLRHxc", "grid_calculation");
8181
}
8282

@@ -88,7 +88,7 @@ namespace LR
8888

8989
elecstate::DensityMatrix<std::complex<double>, double> DM_trans_real_imag(&pmat, 1, kv.kvec_d, kv.get_nks() / nspin);
9090
DM_trans_real_imag.init_DMR(*this->hR);
91-
hamilt::HContainer<double> HR_real_imag(GlobalC::ucell, &this->pmat);
91+
hamilt::HContainer<double> HR_real_imag(ucell, &this->pmat);
9292
LR_Util::initialize_HR<std::complex<double>, double>(HR_real_imag, ucell, gd, orb_cutoff_);
9393

9494
auto dmR_to_hR = [&, this](const char& type) -> void
@@ -111,7 +111,7 @@ namespace LR
111111

112112
// 3. v_hxc = f_hxc * rho_trans
113113
ModuleBase::matrix vr_hxc(1, nrxx); //grid
114-
this->pot.lock()->cal_v_eff(rho_trans, GlobalC::ucell, vr_hxc, ispin_ks);
114+
this->pot.lock()->cal_v_eff(rho_trans, ucell, vr_hxc, ispin_ks);
115115
// print_grid_nonzero(vr_hxc.c, this->poticab->nrxx, 10, "vr_hxc");
116116

117117
LR_Util::_deallocate_2order_nested_ptr(rho_trans, 1);
@@ -123,9 +123,9 @@ namespace LR
123123

124124
// LR_Util::print_HR(*this->gint->get_hRGint(), this->ucell.nat, "VR(grid)");
125125
HR_real_imag.set_zero();
126-
this->gint->transfer_pvpR(&HR_real_imag, &GlobalC::ucell, &GlobalC::GridD);
126+
this->gint->transfer_pvpR(&HR_real_imag, &ucell, &GlobalC::GridD);
127127
// LR_Util::print_HR(HR_real_imag, this->ucell.nat, "VR(real, 2d)");
128-
LR_Util::set_HR_real_imag_part(HR_real_imag, *this->hR, GlobalC::ucell.nat, type);
128+
LR_Util::set_HR_real_imag_part(HR_real_imag, *this->hR, ucell.nat, type);
129129
};
130130
this->hR->set_zero();
131131
dmR_to_hR('R'); //real

0 commit comments

Comments
 (0)