Skip to content

Commit

Permalink
(apr) further issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljprice committed Oct 17, 2024
1 parent a15640c commit 1a6340c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/apr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ subroutine closest_neigh(i,next_door,rmin)
real :: dx,dy,dz,rtest
integer :: j

! DP note: this is not MPI safe...
rmin = huge(rmin)
next_door = 0
do j = 1,npart
Expand Down
6 changes: 6 additions & 0 deletions src/main/relaxem.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ module relaxem
! Subroutine to relax the new set of particles to a reference particle distribution
subroutine relax_particles(npart,n_ref,xyzh_ref,force_ref,nrelax,relaxlist)
use deriv, only:get_derivs_global
use dim, only:mpi
use io, only:error
integer, intent(in) :: npart,n_ref,nrelax
real, intent(in) :: force_ref(3,n_ref),xyzh_ref(4,n_ref)
integer, intent(in) :: relaxlist(1:nrelax)
Expand All @@ -33,6 +35,10 @@ subroutine relax_particles(npart,n_ref,xyzh_ref,force_ref,nrelax,relaxlist)
integer :: ishift,nshifts

write(*,"(/,70('-'),/,/,2x,a,/,/)") 'APR: time to relax ...'
if (mpi) then
call error('APR','relax_particles is not compatible with MPI')
return
endif

write(*,"(1x,1(a,i8,a,i8,a))") 'Relaxing',nrelax,' particles the heavenly way from',n_ref,' references.'

Expand Down

0 comments on commit 1a6340c

Please sign in to comment.