Skip to content

Commit 72a421f

Browse files
为soc.cpp提供了更详细的错误信息 (#7048)
1 parent 62894b1 commit 72a421f

File tree

1 file changed

+13
-0
lines changed
  • source/source_pw/module_pwdft

1 file changed

+13
-0
lines changed

source/source_pw/module_pwdft/soc.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ void Fcoef::create(const int i1, const int i2, const int i3)
2828
else
2929
{
3030
std::cout << "not allowed!" << std::endl;
31+
if (!(i1 * i2 * i3 > 0)){
32+
std::cout << "i1*i2*i3 must be positive! i1*i2*i3 is " << i1 * i2 * i3 << std::endl;
33+
}
34+
if (!(i1 > 0)){
35+
std::cout << "i1 must be positive! i1 is " << i1 << std::endl;
36+
}
37+
if (!(i2 > 0)){
38+
std::cout << "i2 must be positive! i2 is " << i2 << std::endl;
39+
}
40+
if (!(i3 > 0)){
41+
std::cout << "i3 must be positive! i3 is " << i3 << std::endl;
42+
}
43+
3144
}
3245

3346
return;

0 commit comments

Comments
 (0)