anchor.diff:    use mathlib_bouncer
     use numerical_constants
   #ifdef HDF5
  +  use mod_alloc
     use hdf5_output
   #endif
   
  
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: ! =================================================================================================
  !  K. Sjobak, V.K. Berglyd Olsen, BE-ABP-HSS
  !  Created: 2017-08
  !  Updated: 2019-11-20
  ! =================================================================================================
  subroutine scatter_thin(iStru, iElem, nTurn)
  
    use crcoall
    use mod_time
    use mod_units
    use mod_ranecu
    use mod_common
  