Added a check to stop the code if dr2 is negative.

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5619 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
dalcorso 2009-06-19 13:33:54 +00:00
parent 0fa226ed83
commit eed6d8ce91
1 changed files with 2 additions and 0 deletions

View File

@ -139,6 +139,8 @@ SUBROUTINE mix_rho( input_rhout, rhoin, alphamix, dr2, tr2_min, iter, n_iter, co
!
dr2 = rho_ddot( rhout_m, rhout_m, ngms ) !!!! this used to be ngm NOT ngms
!
IF (dr2 < 0.0_DP) CALL errore('mix_pot','negative dr2',1)
!
conv = ( dr2 < tr2 )
!
IF ( conv .OR. dr2 < tr2_min ) THEN