Skip to content

Commit db23a2b

Browse files
authored
add PW_DIAG_NDIM parameter for users to adjust efficiency. (#3998)
1 parent 324e36f commit db23a2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/module_hsolver/diago_dav_subspace.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void Diago_DavSubspace<T, Device>::diag_once(hamilt::Hamilt<T, Device>* phm_in,
7272
this->n_band = psi.get_nbands();
7373

7474
// maximum dimension of the reduced basis set
75-
this->nbase_x = 2 * this->n_band;
75+
this->nbase_x = Diago_DavSubspace::PW_DIAG_NDIM * this->n_band;
7676

7777
psi::Psi<T, Device> basis(1, this->nbase_x, this->dim, &(psi.get_ngk(0)));
7878
ModuleBase::Memory::record("DAV::basis", this->nbase_x * this->dim * sizeof(T));
@@ -916,4 +916,4 @@ template class Diago_DavSubspace<double, psi::DEVICE_GPU>;
916916
#endif
917917

918918
#endif
919-
} // namespace hsolver
919+
} // namespace hsolver

0 commit comments

Comments
 (0)