diff --git a/src/AFQMC/Hamiltonians/KPFactorizedHamiltonian.cpp b/src/AFQMC/Hamiltonians/KPFactorizedHamiltonian.cpp index 157d6ef3b0..74b63d3d78 100644 --- a/src/AFQMC/Hamiltonians/KPFactorizedHamiltonian.cpp +++ b/src/AFQMC/Hamiltonians/KPFactorizedHamiltonian.cpp @@ -1245,15 +1245,13 @@ HamiltonianOperations KPFactorizedHamiltonian::getHamiltonianOperations_batched( {nmo_max,nmo_max*nchol_max}); using ma::H; #if MIXED_PRECISION - boost::multi::array v1_({nmo_per_kp[K],nmo_per_kp[K]}); + boost::multi::array v1_({nmo_max,nmo_max}); ma::product(SPComplexType(-0.5),Likn,H(Likn),SPComplexType(1.0),v1_); using std::copy_n; boost::multi::array v2_(v1_); - ma::add(ComplexType(1.0),v2_, - ComplexType(1.0),vn0_[K]({0,nmo_per_kp[K]},{0,nmo_per_kp[K]}), - vn0_[K]({0,nmo_per_kp[K]},{0,nmo_per_kp[K]})); + ma::add(ComplexType(1.0),v2_,ComplexType(1.0),vn0_[K],vn0_[K]); #else - ma::product(-0.5,Likn,H(Likn),1.0,vn0_[K]({0,nmo_per_kp[K]},{0,nmo_per_kp[K]})); + ma::product(-0.5,Likn,H(Likn),1.0,vn0_[K]); #endif } else { int QmK = QKtok2[Qm][K]; @@ -1269,13 +1267,11 @@ HamiltonianOperations KPFactorizedHamiltonian::getHamiltonianOperations_batched( {nmo_max,nmo_max*nchol_max}); using ma::H; #if MIXED_PRECISION - boost::multi::array v1_({nmo_per_kp[K],nmo_per_kp[K]}); + boost::multi::array v1_({nmo_max,nmo_max}); ma::product(SPComplexType(-0.5),L_,H(L_), SPComplexType(1.0),v1_); boost::multi::array v2_(v1_); - ma::add(ComplexType(1.0),v2_, - ComplexType(1.0),vn0_[K]({0,nmo_per_kp[K]},{0,nmo_per_kp[K]}), - vn0_[K]({0,nmo_per_kp[K]},{0,nmo_per_kp[K]})); + ma::add(ComplexType(1.0),v2_,ComplexType(1.0),vn0_[K],vn0_[K]); #else ma::product(-0.5,L_,H(L_),1.0,vn0_[K]); #endif