Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cenit committed Apr 12, 2016
1 parent fc5e126 commit 37b9650
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 51 deletions.
10 changes: 6 additions & 4 deletions src/ALaDyn.F90
Expand Up @@ -118,7 +118,7 @@ subroutine ENV_cycle
dt_loc=dt
t_ind=0
do while (tnow < tmax)
call ENV_run(tnow,dt_loc,iter,LPf_ord)
call ENV_run(tnow,dt_loc,iter)

call timing
call data_out(jump)
Expand Down Expand Up @@ -176,7 +176,7 @@ subroutine PBUNCH_cycle
t_ind=0

do while (tnow < tmax)
call PBUNCH_run(tnow,dt_loc,iter)
call PBUNCH_run(tnow,dt_loc)

call timing
call pbdata_out(jump)
Expand Down Expand Up @@ -1175,8 +1175,10 @@ end subroutine submem

subroutine max_pmemory_check()

integer :: ndv1,ndv2,np
real(dp) :: mem_loc(1),max_mem(1),adr
integer :: ndv1,ndv2
!integer :: np
real(dp) :: mem_loc(1),max_mem(1)
!real(dp) :: adr

mem_loc=0.
max_mem=0.
Expand Down
7 changes: 1 addition & 6 deletions src/ALaDyn_cpp_dependencies.vcxproj
Expand Up @@ -124,12 +124,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="cpp_folder_tree.cpp" />
<ClCompile Include="find_last_addr.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="find_last_addr.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
2 changes: 1 addition & 1 deletion src/ALaDyn_cpp_dependencies.vcxproj.filters
Expand Up @@ -48,7 +48,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\lib\native\src\boost_system.error_code.cpp">
<Filter>Source Files\boost</Filter>
</ClCompile>
<ClCompile Include="find_last_addr.c">
<ClCompile Include="find_last_addr.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
18 changes: 10 additions & 8 deletions src/grid_fields.f90
Expand Up @@ -938,9 +938,8 @@ subroutine pp_lapl(&

integer,intent(in) :: ic1,ic2,i1,n1p,j1,n2p,k1,n3p
real(dp),intent(in) :: dhy,dhz
integer :: i,j,k,jj,kk,ic,jj0,j01,j02,kk0,k01,k02
integer :: i,j,k,ic,j01,j02,k01,k02
real(dp) :: dy2_inv,dz2_inv
real(dp) :: sdy,sdz,sdym,sdzm
!==========================
dy2_inv=dhy*dhy
dz2_inv=dhz*dhz
Expand Down Expand Up @@ -1352,14 +1351,14 @@ subroutine env_grad(envg,i1,n1p,j1,n2p,k1,n3p,ider,dhx,dhy,dhz)
endif
end subroutine env_grad
!==============================
subroutine env0_field(curr,st_ind,cmp,ib,i1,n1p,j1,n2p,k1,n3p,&
subroutine env0_field(curr,ib,i1,n1p,j1,n2p,k1,n3p,&
om0,dhx,dhy,dhz,dt_loc)
real(dp),intent(inout) :: curr(:,:,:,:)
integer,intent(in) :: st_ind,cmp,ib,i1,n1p,j1,n2p,k1,n3p
integer,intent(in) :: ib,i1,n1p,j1,n2p,k1,n3p
real(dp),intent(in) :: om0,dhx,dhy,dhz,dt_loc
integer :: i,j,k,ii,ic,n1
real(dp) :: dx1_inv,om2,aph1
real(dp) :: adv,a,c,b1,c1,an,bn,der2_norm,kern
real(dp) :: adv,a,c,b1,c1,an,bn,der2_norm
!==========================
! EXPLICIT INTEGRATION of ENVELOPE EVOLUTION OPERATOR
!============================
Expand Down Expand Up @@ -1512,13 +1511,13 @@ subroutine env0_field(curr,st_ind,cmp,ib,i1,n1p,j1,n2p,k1,n3p,&
end subroutine env0_field

subroutine env0_rk_field(&
curr,st_ind,cmp,d2_ord,ib,i1,n1p,j1,n2p,k1,n3p,om0,dhx,dhy,dhz)
curr,d2_ord,ib,i1,n1p,j1,n2p,k1,n3p,om0,dhx,dhy,dhz)
real(dp),intent(inout) :: curr(:,:,:,:)
integer,intent(in) :: st_ind,cmp,d2_ord,ib,i1,n1p,j1,n2p,k1,n3p
integer,intent(in) :: d2_ord,ib,i1,n1p,j1,n2p,k1,n3p
real(dp),intent(in) :: om0,dhx,dhy,dhz
integer :: n1,i,j,k,ii,ic
real(dp) :: dx1_inv,om2,aph1,aph2
real(dp) :: alp2,b2,a,adv,c,c1,b1,an,bn,kern
real(dp) :: alp2,b2,a,adv,c,c1,b1,an,bn
real(dp),parameter :: alp=0.25, a1=0.75
!==========================

Expand Down Expand Up @@ -3018,6 +3017,9 @@ subroutine ef_bds(ef,i1,n1p,j1,n2p,k1,n3p,dt_loc,imbd)
integer :: i,j,k,ii
real(dp) :: aphx,aphy,aphz

aphx=1
aphy=1
aphz=1

! Enter ebf(1:3)=[Ex,Ey,Ez]
! DATA: ef[1:n1p][1:n2p+1][1:n3p+1] bds are on the right
Expand Down
4 changes: 2 additions & 2 deletions src/particles.F90
Expand Up @@ -1120,7 +1120,7 @@ subroutine set_part2d_hcell_acc(ef,sp_loc,pt,np,ndf,s_ind,xmn,ymn)
integer,intent(in) :: np,ndf,s_ind
real(dp),intent(in) :: xmn,ymn

real(dp) :: xx,sx,sx2,dvol,dvol1
real(dp) :: sx,dvol,dvol1
real(dp) :: axh(3),ayh(3),xp1(3)
real(dp) :: ax1(3),ay1(3),ap(6)
integer :: i,ih,j,jh,i1,j1,i2,j2,n
Expand Down Expand Up @@ -4185,7 +4185,7 @@ subroutine ncdef_2d_curr(loc_sp,pt,n0,np,s_ind,njc,ndm,xmn,ymn)
real(dp) :: ax,sx,sx2,wgh,gam_inv
real(dp) :: axh0(2),axh1(2),ayh0(2),ayh1(2)
real(dp) :: ax0(3),ay0(3),xp1(3),xp0(3)
real(dp) :: ax1(3),ay1(3),vp(3),dvolh,dvol(3)
real(dp) :: ax1(3),ay1(3),vp(3),dvol(3)
integer :: i,j,i0,j0,i1,j1,i2,j2,n
integer :: ih0,jh0,ih,jh
logical :: set_den
Expand Down
2 changes: 1 addition & 1 deletion src/pdf_moments.f90
Expand Up @@ -508,7 +508,7 @@ SUBROUTINE bunch_sliced_diagnostics(bunch_number,moments,number_slices)
do islice=0,number_slices-1 ! change string format in output file for more than 9 slices

nSigmaCut = 5.0
delta_cut=2.D0*nSigmaCut/number_slices
delta_cut=2.0*nSigmaCut/number_slices
nInside_loc=0
do ip=1,np_local
mask(ip)=( (bunch(bunch_number)%part(ip,1)-moments(1,1) )>( real(islice-number_slices/2)*delta_cut )*moments(2,1) ) &
Expand Down
4 changes: 2 additions & 2 deletions src/pic_dump.f90
Expand Up @@ -34,7 +34,7 @@ subroutine dump_data(it_loc,tloc)
integer,intent(in) :: it_loc
real(dp),intent(in) :: tloc
character(13) :: fname=' '
integer :: np,i,ic
integer :: np,ic
integer :: nxf,nyf,nzf,nf
integer :: i2b,j2b,k2b,nbf,nd_pot
real(dp) :: rdata(10)
Expand Down Expand Up @@ -140,7 +140,7 @@ subroutine restart(it_loc,tloc)
real(dp),intent(out) :: tloc
character(13) :: fname=' '
integer :: np,nps_loc(4),np_max,ic
integer :: ix,n1_old
integer :: n1_old
integer :: nxf,nyf,nzf,nf
integer :: i2b,j2b,k2b,nbf,nd_pot
integer :: n1_loc,n2_loc,n3_loc,nf_loc
Expand Down
28 changes: 13 additions & 15 deletions src/pic_evolve_in_time.f90
Expand Up @@ -150,7 +150,7 @@ subroutine add_particles(np,i1,i2,ic)
else
do ix=i1,i2
do j=1,j2
wch(1)=loc_wghy(j,ic)*wghpt(ix,ic)
wch(1)=real(loc_wghy(j,ic)*wghpt(ix,ic),sp)
n=n+1
spec(ic)%part(n,1)=xpt(ix,ic)
spec(ic)%part(n,2)=loc_ypt(j,ic)
Expand Down Expand Up @@ -1627,7 +1627,7 @@ subroutine advance_lpf_envelope(dt_loc,i1,nxp,j1,nyp,k1,nzp)
end do
end do
! jc(1:2)=ompe*rho/<gamp>*env(1:2) the source term
call env0_field(jc,nst,cind,ib,i1,nxp,j1,nyp,k1,nzp,ap,&
call env0_field(jc,ib,i1,nxp,j1,nyp,k1,nzp,ap,&
dtx,dty,dtz,dt_loc)
do ic=1,2
jc(:,:,:,ic)=0.0
Expand Down Expand Up @@ -1690,7 +1690,7 @@ subroutine advance_rk4_env_field(&
end do
end do
cind=1 !cind=0 FFT =1 grid matrix inversion
call env0_rk_field(curr,nst,cind,ord,ib,i1,nxp,j1,nyp,k1,nzp,oml,dtx,dty,dtz)
call env0_rk_field(curr,ord,ib,i1,nxp,j1,nyp,k1,nzp,oml,dtx,dty,dtz)
!=============
do ik=1,nc
do iz=k1,nzp
Expand Down Expand Up @@ -1840,10 +1840,10 @@ subroutine lpf_momenta_and_positions(sp_loc,pt,n0,np,dt_lp,vb,Lfact)
!========================================
dth_lp=0.5*dt_lp
alp=dth_lp*Lfact
ch=5
!==========================
select case(curr_ndim)
case(2)
ch=5
do p=n0,np
pp(1:2)=sp_loc%part(p,3:4) !p_{n-1/2}
wgh=sp_loc%part(p,ch)
Expand Down Expand Up @@ -2423,9 +2423,8 @@ subroutine env_pfields_prepare(ef,ef0,av,i1,i2,j1,j2,k1,k2,nc,spl_in,spr_in)
end subroutine env_pfields_prepare
!=======================================

subroutine env_lpf2_evolve(dt_loc,it_loc)
subroutine env_lpf2_evolve(dt_loc)
real(dp),intent(in) :: dt_loc
integer,intent(in) :: it_loc
integer :: np,ic,nyf,nzf,n_st
integer :: i1,j1,k1,i2
real(dp) :: Ltz,xm,ym,zm
Expand Down Expand Up @@ -2505,10 +2504,10 @@ subroutine env_lpf2_evolve(dt_loc,it_loc)
end subroutine env_lpf2_evolve
!=====================================
!=======================
subroutine ENV_run(t_loc,dt_loc,iter_loc,t_ord)
subroutine ENV_run(t_loc,dt_loc,iter_loc)

real(dp),intent(in) :: t_loc,dt_loc
integer,intent(in) :: iter_loc,t_ord
integer,intent(in) :: iter_loc
logical,parameter :: mw=.false.
!+++++++++++++++++++++++++++++++++
!for vbeam >0 uses the xw=(x+vbeam*t)
Expand All @@ -2525,7 +2524,7 @@ subroutine ENV_run(t_loc,dt_loc,iter_loc,t_ord)
if(iter_loc>0)call coordinate_xshift(vbeam,dt_loc)
endif
!=========================
call env_lpf2_evolve(dt_loc,iter_loc)
call env_lpf2_evolve(dt_loc)
if(Part)call cell_part_dist(mw)
!
end subroutine ENV_run
Expand Down Expand Up @@ -2718,10 +2717,10 @@ subroutine lpf_advect_positions(pb_loc,nb0,nb,vbx)
end subroutine lpf_advect_positions


subroutine lpf2_pb_evolve(dt_loc,iter_loc,pb_mod,initial_time)
subroutine lpf2_pb_evolve(dt_loc,pb_mod,initial_time)

real,intent(in) :: dt_loc
integer,intent(in) :: iter_loc,pb_mod
integer,intent(in) :: pb_mod
logical,intent(in) :: initial_time
integer :: np,ic
integer :: i1,i2,i1b,i2b,j1,j2,k1,k2,n_st,nbr,nbl
Expand Down Expand Up @@ -2787,10 +2786,9 @@ subroutine lpf2_pb_evolve(dt_loc,iter_loc,pb_mod,initial_time)
!=========================
end subroutine lpf2_pb_evolve

subroutine PBUNCH_run(t_loc,dt_loc,iter_loc)
subroutine PBUNCH_run(t_loc,dt_loc)

real,intent(in) :: t_loc,dt_loc
integer,intent(in) :: iter_loc
real :: ts
logical :: init_time
logical,parameter :: mw=.false.
Expand All @@ -2799,9 +2797,9 @@ subroutine PBUNCH_run(t_loc,dt_loc,iter_loc)
!x=xi=(xw-vbeam*t) fixed
ts=t_loc
init_time=.false.
if(t_loc==0.0)init_time=.true.
if(t_loc<EPSILON)init_time=.true.
!=========================
call lpf2_pb_evolve(dt_loc,iter_loc,ibeam,init_time)
call lpf2_pb_evolve(dt_loc,ibeam,init_time)
!
if(ibeam >0)call cell_part_dist(mw)
call cell_bpart_dist(mw)
Expand Down
6 changes: 2 additions & 4 deletions src/pic_in.f90
Expand Up @@ -303,7 +303,6 @@ subroutine one_layer_multisp(layer_mod,nyh,xf0)
loc_nptx=0
loc_nptx(1:nsp)=(nxl(1)+nxl(2)+nxl(3)+nxl(4)+nxl(5))*np_per_xc(1:nsp)


nptx_max=maxval(loc_nptx(1:nsp))
allocate(xpt(nptx_max,nsp))
allocate(wghpt(nptx_max,nsp))
Expand All @@ -312,15 +311,14 @@ subroutine one_layer_multisp(layer_mod,nyh,xf0)
! mulltispecies y-z distribution in a uniform target
yp_min=ymin_t
yp_max=ymax_t
!------------------------
zp_min=zmin_t
zp_max=zmax_t
!----------------------
npty=maxval(np_per_yc(1:nsp))
npty=nyh*npty
nptz=1
if(ndim==3)then
np_per_zcell(1:nsp)=np_per_zc(1:nsp)
zp_min=zmin_t !-Lz
zp_max=zmax_t !+Lz
nptz=maxval(np_per_zc(1:nsp))
nptz=nyh*nptz
endif
Expand Down
4 changes: 2 additions & 2 deletions src/pic_out.f90
Expand Up @@ -1565,7 +1565,7 @@ subroutine envar(nst,tnow)
real(dp),intent(in) :: tnow

integer :: np,ik,ix,iy,iz,ic,i1,i2,i2b,ndv
integer :: j1,k1,nyp,nzp,ii,jj,kk,j,k,l,i0_lp
integer :: j1,k1,nyp,nzp,ii,jj,kk,j,k,l
real(dp) :: ek_max(1),ekt(7),ekm(7),ekmax(1)
real(dp) :: pmass,dvol,dgvol,sgz,sg,ef2
real(dp) :: np_norm,p_energy_norm
Expand Down Expand Up @@ -1615,7 +1615,7 @@ subroutine envar(nst,tnow)
ekt(1)=real(np,dp)
call allreduce_dpreal(SUMV,ekt,ekm,1)
np_norm=1.
if(ekm(1)>0.0)np_norm=1.d0/ekm(1)
if(ekm(1)>0.0)np_norm=1.0/ekm(1)
pmass=electron_mass*mass(ic) !In MeV
ekt(1)=0.0
ekm(1)=0.0
Expand Down
6 changes: 3 additions & 3 deletions src/pstruct_data.F90
Expand Up @@ -39,7 +39,7 @@ module pstruct_data
subroutine p_realloc(pdata,npt_new,ndv)
type(species),intent(inout) :: pdata
integer,intent(in) :: npt_new,ndv
integer :: i,AllocStatus, DeallocStatus
integer :: AllocStatus, DeallocStatus

if(allocated(pdata%part))then
if(size(pdata%part,1) < npt_new)then
Expand All @@ -55,7 +55,7 @@ end subroutine p_realloc
subroutine v_realloc(vdata,npt_new,ndv)
real(dp),allocatable,intent(inout) :: vdata(:,:)
integer,intent(in) :: npt_new,ndv
integer :: i,AllocStatus, DeallocStatus
integer :: AllocStatus, DeallocStatus

if(allocated(vdata))then
if(size(vdata,1) < npt_new)then
Expand All @@ -73,8 +73,8 @@ subroutine p_alloc(npt_max,ncmp,np_s,ns,lp,mid,r_type,msize)
integer,intent(in) :: npt_max,ncmp,np_s(:),ns,lp,mid,r_type
integer,intent(inout) :: msize
integer :: nsize,ic,npt,AllocStatus
integer :: i

npt=1
select case(r_type)
case(1) !Plasma particles
nsize=0
Expand Down
6 changes: 3 additions & 3 deletions src/read_input.f90
Expand Up @@ -458,9 +458,9 @@ subroutine nml_consistency_check_grid
yx_rat = zx_rat
write(6,'(A)') "force yx_rat equal to zx_rat"
else if ( zx_rat < 0. .and. yx_rat < 0. ) then
yx_rat = 1.
zx_rat = 1.
write(6,'(A)') "force yx_rat=1 and zx_rat=1"
yx_rat = 1.
zx_rat = 1.
write(6,'(A)') "force yx_rat=1 and zx_rat=1"
endif
end subroutine nml_consistency_check_grid

Expand Down

0 comments on commit 37b9650

Please sign in to comment.