anchor.diff:    implicit none
   
   ! interface variables
  -  integer iEl
  -  logical lInsUp
  +  integer, intent(inout) ::  iEl
  +  logical, intent(in)    ::  lInsUp
   ! temporary variables
     integer i,ix,iSrcUp,iSrcDw,iApeUp,ixApeUp,iApeDw,ixApeDw,jj,itmpape,iNew,ixNew,ixApeNewFrom,ixEl
     real(kind=fPrec) tmpape(11), ddcum
  
positive.code: subroutine contour_aperture_markers( itElUp, itElDw, lInsUp )
  !-----------------------------------------------------------------------
  ! by A.Mereghetti
  ! last modified: 20-12-2016
  ! check elements itElUp (upstream) and itElDw (downstream) and
  !   assign them (or insert) an aperture marker, in case;
  ! lInsUp: force the insertion of an aperture marker upstream
  
negative.code: subroutine contour_aperture_marker( iEl, lInsUp )
  !-----------------------------------------------------------------------
  !     by A.Mereghetti
  !     last modified: 25-07-2019
  !     put an aperture marker at iEl
  !     NB: it can be either a brand new entry in lattice sequence or
  !         updating an existing one
  