@@ -825,7 +825,7 @@ contains
825825 real (wp) :: charvol, charpres, charvol2, charpres2
826826 integer , dimension (3 ) :: cellaux
827827 integer :: i, j, k
828- integer :: smearGrid, smearGridz
828+ integer :: mapCells_pinf, smearGrid, smearGridz
829829 logical :: celloutside
830830
831831 scoord = mtn_s(bub_id, 1 :3 , 2 )
@@ -912,9 +912,14 @@ contains
912912
913913 else if (lag_params%cluster_type >= 2 ) then
914914 ! Bubble dynamic closure from Maeda and Colonius (2018 )
915+ if (lag_params%smooth_type == 1 ) then
916+ mapCells_pinf = mapCells
917+ else
918+ stop " lag_params%cluster_type: 2 requires lag_params%smooth_type: 1."
919+ end if
915920
916921 ! Include the cell that contains the bubble (mapCells+1 + mapCells)
917- smearGrid = mapCells - (- mapCells ) + 1
922+ smearGrid = mapCells_pinf - (- mapCells_pinf ) + 1
918923 smearGridz = smearGrid
919924 if (p == 0 ) smearGridz = 1
920925
@@ -988,9 +993,6 @@ contains
988993 f_pinfl = charpres2/ charvol2
989994 vol = charvol
990995 dc = (3._wp * abs (vol)/ (4._wp * pi))** (1._wp / 3._wp )
991- else
992-
993- print * , " Check cluterflag. Exiting."
994996
995997 end if
996998
0 commit comments