anchor.diff:  ! =================================================================================================
   !  K. Sjobak, V.K. Berglyd Olsen, BE-ABP-HSS
   !  Created: 2017-08
  -!  Updated: 2019-07-19
  +!  Updated: 2019-11-20
   ! =================================================================================================
   subroutine scatter_thin(iStru, iElem, nTurn)
   
     use crcoall
     use mod_time
  -  use mod_alloc
     use mod_units
     use mod_ranecu
     use mod_common
  
positive.code:   integer, intent(in) :: iElem
    integer, intent(in) :: nTurn
  
    integer          idElem, idPro, iGen, nGen, idGen, iError
    integer          i, j, k
    integer          tmpSeed1, tmpSeed2, unitDens
    logical          updateE, autoRatio, isDiff, isExact, densDump, beamDump
    integer          iLost, procID, fixedID
    real(kind=fPrec) t, dEE, dPP, theta, phi, pVec(3), pNew, xRot, yRot
    real(kind=fPrec) elemScale, sigmaTot, ratioTot, crossSection, scatterProb, targetDensity, scRatio, brRatio
  
    real(kind=fPrec), allocatable :: brThreshold(:)
    real(kind=fPrec), allocatable :: rndVals(:)
    logical,          allocatable :: pScattered(:)
    logical,          allocatable :: hasProc(:,:)
    integer,          allocatable :: nLost(:,:)
    integer,          allocatable :: nScattered(:,:)
  
  #ifdef HDF5
    ! For HDF5 it is best to write in chuncks, so we will make arrays of size napx to cache everything
  
negative.code:   call recuut(tmpSeed1,tmpSeed2)
    call recuin(scatter_seed1,scatter_seed2)
  
    allocate(hasProc(nGen,scatter_nProc))
    allocate(nLost(nGen,scatter_nProc))
    allocate(nScattered(nGen,scatter_nProc))
  
    hasProc(:,:)    = .false.
    nLost(:,:)      = 0
    nScattered(:,:) = 0
  
  #ifdef HDF5
    if(h5_useForSCAT) then
      call alloc(iRecords,         3,napx,    0,      "iRecords")
  