@@ -61,15 +61,15 @@ namespace LR
6161 // \f[ \tilde{\rho}(r)=\sum_{\mu_j, \mu_b}\tilde{\rho}_{\mu_j,\mu_b}\phi_{\mu_b}(r)\phi_{\mu_j}(r) \f]
6262 double ** rho_trans;
6363 const int & nrxx = this ->pot .lock ()->nrxx ;
64- LR_Util::new_pointer_dim2 (rho_trans, 1 , nrxx); // currently gint_kernel_rho uses PARAM.inp.nspin, it needs refactor
64+ LR_Util::_allocate_2order_nested_ptr (rho_trans, 1 , nrxx); // currently gint_kernel_rho uses PARAM.inp.nspin, it needs refactor
6565 ModuleBase::GlobalFunc::ZEROS (rho_trans[0 ], nrxx);
6666 Gint_inout inout_rho (rho_trans, Gint_Tools::job_type::rho, 1 , false );
6767 this ->gint ->cal_gint (&inout_rho);
6868
6969 // 3. v_hxc = f_hxc * rho_trans
7070 ModuleBase::matrix vr_hxc (1 , nrxx); // grid
7171 this ->pot .lock ()->cal_v_eff (rho_trans, &GlobalC::ucell, vr_hxc, ispin_ks);
72- LR_Util::delete_pointer_dim2 (rho_trans, 1 );
72+ 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);
@@ -103,7 +103,7 @@ namespace LR
103103 double ** rho_trans;
104104 const int & nrxx = this ->pot .lock ()->nrxx ;
105105
106- LR_Util::new_pointer_dim2 (rho_trans, 1 , nrxx); // nspin=1 for transition density
106+ LR_Util::_allocate_2order_nested_ptr (rho_trans, 1 , nrxx); // nspin=1 for transition density
107107 ModuleBase::GlobalFunc::ZEROS (rho_trans[0 ], nrxx);
108108 Gint_inout inout_rho (rho_trans, Gint_Tools::job_type::rho, 1 , false );
109109 this ->gint ->cal_gint (&inout_rho);
@@ -114,7 +114,7 @@ namespace LR
114114 this ->pot .lock ()->cal_v_eff (rho_trans, &GlobalC::ucell, vr_hxc, ispin_ks);
115115 // print_grid_nonzero(vr_hxc.c, this->poticab->nrxx, 10, "vr_hxc");
116116
117- LR_Util::delete_pointer_dim2 (rho_trans, 1 );
117+ LR_Util::_deallocate_2order_nested_ptr (rho_trans, 1 );
118118
119119 // 4. V^{Hxc}_{\mu,\nu}=\int{dr} \phi_\mu(r) v_{Hxc}(r) \phi_\mu(r)
120120 Gint_inout inout_vlocal (vr_hxc.c , 0 , Gint_Tools::job_type::vlocal);
0 commit comments