Skip to content

Commit a8c1164

Browse files
committed
remove map
1 parent a12ccf8 commit a8c1164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/module_elecstate/elecstate_lcao.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void ElecStateLCAO<double>::psiToRho(const psi::Psi<double>& psi)
131131
template <typename TK>
132132
void ElecStateLCAO<TK>::init_DM(const K_Vectors* kv, const Parallel_Orbitals* paraV, const int nspin)
133133
{
134-
const int nspin_dm = std::map<int, int>({ {1, 1}, {2, 2}, {4, 1} })[nspin];
134+
const int nspin_dm = nspin == 2 ? 2 : 1;
135135
this->DM = new DensityMatrix<TK, double>(paraV, nspin_dm, kv->kvec_d, kv->get_nks() / nspin_dm);
136136
}
137137

0 commit comments

Comments
 (0)