anchor.diff:           Allocate (S(n, noldstepsmax), Y(n, noldstepsmax))
            Allocate (YY(noldstepsmax, noldstepsmax))
            Allocate (broydenstep(n))
  -         residual(1:n) = potential - last_outputp
  +         residual(1:n) = potential - last_outputp(1:n)
            SCharge = chgir
            TCharge = chgtot
            Call check_msecparameters ()
  
positive.code:       If (iscl .Le. 2) Then
  !
           If (iscl .Ge. 2) Then
              residual(1:n) = potential - last_outputp
              Call write_current_to_broyden_file (n, iscl, potential, &
             & residual)
           End If
  
negative.code:         & residual)
  		!write(*,210)':PLANE:  INTERSTITIAL TOTAL ',Tplane, ' DISTAN ',Splane
       	! write(*,210)':CHARG:  CLM CHARGE   TOTAL ',TCharge,' DISTAN ',SCharge
           Call stepbound (sreduction)
           Write (60, 4141) sreduction, qmx
           Call rescaleYS (noldsteps, n, S, Y, potential, residual)
  