diff --git a/source/source_pw/module_pwdft/soc.cpp b/source/source_pw/module_pwdft/soc.cpp index a96c7ad235..dae307617c 100644 --- a/source/source_pw/module_pwdft/soc.cpp +++ b/source/source_pw/module_pwdft/soc.cpp @@ -27,18 +27,19 @@ void Fcoef::create(const int i1, const int i2, const int i3) } else { - std::cout << "not allowed!" << std::endl; + std::cout << "Fcoef::create: not allowed!" << std::endl; if (!(i1 * i2 * i3 > 0)){ - std::cout << "i1*i2*i3 must be positive! i1*i2*i3 is " << i1 * i2 * i3 << std::endl; + unsigned long long product = static_cast(i1) * static_cast(i2) * static_cast(i3); + std::cout << "Fcoef::create: possible integer overflow in product i1*i2*i3! i1 is " << i1 << ", i2 is " << i2 << ", i3 is " << i3 << ", product is " << product << std::endl; } if (!(i1 > 0)){ - std::cout << "i1 must be positive! i1 is " << i1 << std::endl; + std::cout << "Fcoef::create: i1 must be positive! i1 is " << i1 << std::endl; } if (!(i2 > 0)){ - std::cout << "i2 must be positive! i2 is " << i2 << std::endl; + std::cout << "Fcoef::create: i2 must be positive! i2 is " << i2 << std::endl; } if (!(i3 > 0)){ - std::cout << "i3 must be positive! i3 is " << i3 << std::endl; + std::cout << "Fcoef::create: i3 must be positive! i3 is " << i3 << std::endl; } }