From 69a8b0e4c6c04375bc48aa8c10d3b3826b55766d Mon Sep 17 00:00:00 2001 From: ZST <2143382614@qq.com> Date: Wed, 25 Mar 2026 11:12:27 +0800 Subject: [PATCH] Improve error message in Fcoef::create --- source/source_pw/module_pwdft/soc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/source_pw/module_pwdft/soc.cpp b/source/source_pw/module_pwdft/soc.cpp index a44a0b6a48..f5837f8e32 100644 --- a/source/source_pw/module_pwdft/soc.cpp +++ b/source/source_pw/module_pwdft/soc.cpp @@ -27,7 +27,9 @@ void Fcoef::create(const int i1, const int i2, const int i3) } else { - std::cout << "not allowed!" << std::endl; + std::cout << "Fcoef::create received invalid dimensions: " + << "i1=" << i1 << ", i2=" << i2 << ", i3=" << i3 + << ". All dimensions must be positive." << std::endl; } return; @@ -188,4 +190,4 @@ void Soc::set_fcoef(const int &l1, coeff += rotylm(m1, mi) * spinor(l1, j1, m, is1) * conj(rotylm(m2, mj)) * spinor(l2, j2, m, is2); } this->fcoef(it, is1, is2, ip1, ip2) = coeff; -} \ No newline at end of file +}