Skip to content

Commit

Permalink
(radiation-implicit) fix compiler warning
Browse files Browse the repository at this point in the history
themikelau committed Jul 6, 2023
1 parent 9e77708 commit 7155196
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/radiation_implicit.f90
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ subroutine do_radiation_implicit(dt,npart,rad,xyzh,vxyzu,radprop,drad,ierr)
moresweep = .false.
dtsub = dt/nsubsteps
over_substeps: do i = 1,nsubsteps
call do_radiation_onestep(dtsub,rad,xyzh,vxyzu,radprop,origEU,EU0,failed,nit,errorE,errorU,moresweep,ierr)
call do_radiation_onestep(dtsub,npart,rad,xyzh,vxyzu,radprop,origEU,EU0,failed,nit,errorE,errorU,moresweep,ierr)
if (failed .or. moresweep) then
ierr = ierr_failed_to_converge
call warning('radiation_implicit','integration failed - using U and E values anyway')
@@ -136,18 +136,19 @@ end subroutine save_radiation_energies
! perform single iteration
!+
!---------------------------------------------------------
subroutine do_radiation_onestep(dt,rad,xyzh,vxyzu,radprop,origEU,EU0,failed,nit,errorE,errorU,moresweep,ierr)
subroutine do_radiation_onestep(dt,npart,rad,xyzh,vxyzu,radprop,origEU,EU0,failed,nit,errorE,errorU,moresweep,ierr)
use io, only:fatal,error,iverbose,warning
use part, only:hfact
use physcon, only:pi
use kernel, only:radkern
real, intent(in) :: dt,xyzh(:,:),origEU(:,:)
integer, intent(in) :: npart
real, intent(inout) :: radprop(:,:),rad(:,:),vxyzu(:,:)
logical, intent(out) :: failed,moresweep
integer, intent(out) :: nit,ierr
real, intent(out) :: errorE,errorU,EU0(:,:)
real, intent(out) :: errorE,errorU,EU0(2,npart)
integer, allocatable :: ivar(:,:),ijvar(:)
integer :: ncompact,ncompactlocal,npart,icompactmax,nneigh_average,its
integer :: ncompact,ncompactlocal,icompactmax,nneigh_average,its
real, allocatable :: vari(:,:),varij(:,:),varij2(:,:),varinew(:,:)
real :: maxerrE2,maxerrU2,maxerrE2last,maxerrU2last
logical :: converged
@@ -157,7 +158,6 @@ subroutine do_radiation_onestep(dt,rad,xyzh,vxyzu,radprop,origEU,EU0,failed,nit,
errorU = 0.
ierr = 0

npart = size(xyzh(1,:))
nneigh_average = int(4./3.*pi*(radkern*hfact)**3) + 1
icompactmax = int(1.2*nneigh_average*npart)
allocate(ivar(3,npart),stat=ierr)

0 comments on commit 7155196

Please sign in to comment.