[Q-e-developers] Yet another way to avoid overflow in ESM.

nisihara225 at gmail.com nisihara225 at gmail.com
Mon Nov 2 13:58:12 CET 2015


Dear Minoru Otani,


I am trying to use ESM implemented in Q.E. and reading your code (esm.f90).

In ESM calculation, terms of “exp(x) * erfc(y)” often become overflow because of huge exp(x).


Thus, you prepare a special subroutine “exp_erfc(x, y)” to avoid the overflow.


Now, I have another idea to avoid the overflow, as following:


Operating an unit “exp(log( ))” to “exp(x) * erfc(y)”, one can obtain

    exp(x) * erfc(y) = exp( x + log(erfc(y)) ) .

For boundary condition bc1, bc2, and bc3, it is easy to prove “x + log(erfc(y))” has 

finite upper-bound. Thus, “exp( x + log(erfc(y)) )” does not become overflow.

Using “exp( x + log(erfc(y)) )” instead of “exp(x) * erfc(y)” in ESM calculation,

the overflow will be avoided. This method is accurate, not including numerical approximations.


Unfortunately, I have not ensured that this method is reliable for 

exponential attenuated metal medium (bc4).

It would be great if my idea could help you to develop ESM code.




Regards,

Satomichi Nishihara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20151102/bc343739/attachment.html>


More information about the developers mailing list