<commit_before>subroutine sponge(uout,uout_l1,uout_l2,uout_l3,&
                  uout_h1,uout_h2,uout_h3,lo,hi,time,dt, &
                  dx,dy,dz,domlo,domhi)

  use bl_constants_module, ONLY: M_PI, HALF, ZERO, ONE
  use meth_params_module , only : NVAR, URHO, UMX, UMY, UMZ, UEDEN
      

  implicit none
  integer          :: lo(3),hi(3)
  integer          :: uout_l1,uout_l2,uout_l3,uout_h1,uout_h2,uout_h3
  double precision :: uout(uout_l1:uout_h1,uout_l2:uout_h2,&
       uout_l3:uout_h3,NVAR)
  double precision :: time, dt
  double precision :: dx, dy, dz, domlo(3), domhi(3)
  
  double precision :: xx, yy, zz
  double precision :: xctr, yctr, zctr
  
  double precision :: ke_old, ke_new, sponge_mult, delta_sponge, radius, r_sponge, fac

  integer :: i,j,k

  xctr = HALF*(domlo(1) + domhi(1))
  yctr = HALF*(domlo(2) + domhi(2))
  zctr = HALF*(domlo(3) + domhi(3))
  
  r_sponge = 0.25*(domhi(1)-domlo(1))
  delta_sponge = 0.025*(domhi(1)-domlo(1))
  
  do k = lo(3),hi(3)
     zz = domlo(3) + dble(k + HALF)*dz 
     
     do j = lo(2),hi(2)
        yy = domlo(2) + dble(j + HALF)*dy
        
        do i = lo(1),hi(1)
           xx = domlo(1) + dble(i + HALF)*dx
           
           radius = sqrt((xx-xctr)**2 + (yy-yctr)**2 + (zz-zctr)**2)
           
           sponge_mult = ONE
           
           if (radius > r_sponge) then
              if (radius < r_sponge+delta_sponge) then
                 fac = HALF*(ONE - cos(M_PI*(radius-r_sponge)/delta_sponge))
              else
                 fac = ONE
              endif
              sponge_mult = ONE/(ONE+ dt*fac*100.0)
           endif<commit_msg>domlo/domhi were being used as if they were problo/probhi.  We now define problo/probhi from domlo/domhi.<commit_after>subroutine sponge(uout,uout_l1,uout_l2,uout_l3,&
                  uout_h1,uout_h2,uout_h3,lo,hi,time,dt, &
                  dx,dy,dz,domlo,domhi)

  use bl_constants_module, ONLY: M_PI, HALF, ZERO, ONE
  use meth_params_module , only : NVAR, URHO, UMX, UMY, UMZ, UEDEN
      

  implicit none
  integer          :: lo(3),hi(3),domlo(3),domhi(3)
  integer          :: uout_l1,uout_l2,uout_l3,uout_h1,uout_h2,uout_h3
  double precision :: uout(uout_l1:uout_h1,uout_l2:uout_h2,&
       uout_l3:uout_h3,NVAR)
  double precision :: time, dt
  double precision :: dx, dy, dz
  
  double precision :: xx, yy, zz
  double precision :: xctr, yctr, zctr
  
  double precision :: ke_old, ke_new, sponge_mult, delta_sponge, radius, r_sponge, fac
  double precision :: problo(3),probhi(3)

  integer :: i,j,k

  problo(1) =  domlo(1)   *dx
  problo(2) =  domlo(2)   *dy
  problo(3) =  domlo(3)   *dz
  probhi(1) = (domhi(1)+1)*dx
  probhi(2) = (domhi(2)+1)*dy
  probhi(3) = (domhi(3)+1)*dz

  xctr = HALF*(problo(1) + probhi(1))
  yctr = HALF*(problo(2) + probhi(2))
  zctr = HALF*(problo(3) + probhi(3))
  
  r_sponge = 0.25*(probhi(1)-problo(1))
  delta_sponge = 0.025*(probhi(1)-problo(1))
  
  do k = lo(3),hi(3)
     zz = problo(3) + dble(k + HALF)*dz 
     
     do j = lo(2),hi(2)
        yy = problo(2) + dble(j + HALF)*dy
        
        do i = lo(1),hi(1)
           xx = problo(1) + dble(i + HALF)*dx
           
           radius = sqrt((xx-xctr)**2 + (yy-yctr)**2 + (zz-zctr)**2)
           
           sponge_mult = ONE
           
           if (radius > r_sponge) then
              if (radius < r_sponge+delta_sponge) then
                 fac = HALF*(ONE - cos(M_PI*(radius-r_sponge)/delta_sponge))
              else
                 fac = ONE
              endif
              sponge_mult = ONE/(ONE+ dt*fac*100.0)
           endif
{'fraction_non_alphanumeric': 0.1441291040623261, 'fraction_numerical': 0.03533667223149694, 'mean_word_length': 2.259292837715322, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7505908', 'n_tokens_mistral': 1560, 'n_tokens_neox': 1506, 'n_words': 271}