Skip to content

Commit

Permalink
remove map
Browse files Browse the repository at this point in the history
  • Loading branch information
maki49 committed Oct 14, 2024
1 parent a12ccf8 commit a8c1164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/module_elecstate/elecstate_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void ElecStateLCAO<double>::psiToRho(const psi::Psi<double>& psi)
template <typename TK>
void ElecStateLCAO<TK>::init_DM(const K_Vectors* kv, const Parallel_Orbitals* paraV, const int nspin)
{
const int nspin_dm = std::map<int, int>({ {1, 1}, {2, 2}, {4, 1} })[nspin];
const int nspin_dm = nspin == 2 ? 2 : 1;
this->DM = new DensityMatrix<TK, double>(paraV, nspin_dm, kv->kvec_d, kv->get_nks() / nspin_dm);
}

Expand Down

0 comments on commit a8c1164

Please sign in to comment.