Skip to content
  • Gregor Michalicek's avatar
    Fixed "floating invalid" error in broyden.F90 (together with Markus B.) · 83116e8b
    Gregor Michalicek authored
    In broyden.F90 sometimes the error floating invalid occured when extensive
    runtime checks were enabled. The error occurs in the line were the arrays
    sm and sm1 are subtracted from each other.
    
    The conjectured cause for this is that only a part of the arrays is really
    used. Their size is larger. The part that is not used is never initialized.
    So it may occur that subtracting the arrays from each other results in
    an invalid operation in the part of the array that is not used.
    
    We could not directly verify this conjecture. But reducing the subtraction
    to the used part seems to cure the problem. We did that and additionally
    initialized the local arrays to 0.0.
    83116e8b