Skip to content

Commit

Permalink
(substepping.f90) dtextforce_min calculated inside if statement of np…
Browse files Browse the repository at this point in the history
…tmass>0 in GR case
  • Loading branch information
Megha Sharma committed Mar 1, 2025
1 parent 8548c5d commit 6fe4d36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/substepping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1542,17 +1542,17 @@ subroutine accrete_gr(xyzh,vxyzu,dens,fext,metrics,metricderivs,nlive,naccreted,
pri = pondensi*dens(i)

call get_grforce(xyzh(:,i),metrics(:,:,:,i),metricderivs(:,:,:,i),vxyzu(1:3,i),dens(i),vxyzu(4,i),pri,fext(1:3,i),dtf)
dtextforce_min = min(dtextforce_min,C_force*dtf)

if (nptmass > 0) then
!$omp critical
call get_accel_sink_gas(nptmass,xyzh(1,i),xyzh(2,i),xyzh(3,i),xyzh(4,i),xyzmh_ptmass, &
fext(1,i),fext(2,i),fext(3,i),poti,pmassi,fxyz_ptmass,&
dsdt_ptmass,fonrmax,dtphi2,bin_info)
dtextforce_min = min(dtextforce_min,C_force*sqrt(dtphi2))
!$omp end critical
endif

dtextforce_min = min(dtextforce_min,C_force*dtf,C_force*sqrt(dtphi2))

if (idamp > 0) then
call apply_damp(fext(1,i), fext(2,i), fext(3,i), vxyzu(1:3,i), xyzh(1:3,i), damp_fac)
endif
Expand Down

0 comments on commit 6fe4d36

Please sign in to comment.