Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup compiler warnings #355

Merged
merged 24 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a2819cd
(cleanup) Remove swirl_ray.c from restart demo
donnaaboise Jul 19, 2024
7af2469
(cleanup) Remove unused variables
donnaaboise Jul 19, 2024
fd81346
(elliptic/heat) Fix 'uninitialized variable' warnings
donnaaboise Jul 21, 2024
9fee8e8
(heat_phasefield) Fix compiler warnings about unitialized variables
donnaaboise Jul 21, 2024
812ea2d
(elliptic/heat) Fix compiler warnings
donnaaboise Jul 21, 2024
1976d17
(elliptic/heat_phasefield) Fix compiler warnings
donnaaboise Jul 21, 2024
a660c5e
(elliptic/poisson) fix compiler warnings
donnaaboise Jul 21, 2024
126ae14
(elliptic/phasefield) Fix compiler warnings
donnaaboise Jul 21, 2024
2ec624d
(elliptic/heat_phasefield) Fix compiler warnings
donnaaboise Jul 21, 2024
06ce290
(fc2d_thunderegg) Fix compiler warnings
donnaaboise Jul 22, 2024
c109f1a
(clawpack/tranport/2d/all) Fix compiler warnings
donnaaboise Jul 22, 2024
40cde8b
(clawpack/euler/2d/quadrants) Fix compiler warnings
donnaaboise Jul 22, 2024
c118220
(clawpack/shallow/2d/sphere) Fix compiler warnings
donnaaboise Jul 22, 2024
fbf1cef
(elliptic/allencahn) Fix compiler warnings
donnaaboise Jul 22, 2024
cecb7cf
(elliptic/heat) Fix compiler warnings
donnaaboise Jul 22, 2024
c8efd68
(elliptic/poisson) Fix compiler warnings
donnaaboise Jul 22, 2024
2a24459
(fc3d_clawpack46) Fix compiler warnings
donnaaboise Jul 22, 2024
4688825
(clawpatch/fort3_4.6) Fix compiler warnings
donnaaboise Jul 22, 2024
cdc1fea
(clawpack/shallow/sphere) Fix compiler warnings
donnaaboise Jul 22, 2024
815aae4
(clawpack/euler/quadrants) Fix compiler warnings
donnaaboise Jul 22, 2024
e08232f
(euler/3dx/rp) Fix compiler warnings
donnaaboise Jul 22, 2024
0f1e2c1
Fix compiler warnings
donnaaboise Jul 22, 2024
8680197
(demo) Fix compiler warnings
donnaaboise Jul 22, 2024
402d204
(demo/restart) Remove swirl_ray file
donnaaboise Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions applications/clawpack/advection/2d/swirl/swirl_ray.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2012-2022 Carsten Burstedde, Donna Calhoun, Scott Aiton
Copyright (c) 2012-2024 Carsten Burstedde, Donna Calhoun, Scott Aiton
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -218,7 +218,8 @@ int swirl_intersect_ray (fclaw_domain_t *domain,
}
/* Four cases */
int found_intersection = 0;
point_t pstart, pend;
point_t pstart = {0,0};
point_t pend = {0,0};
if (istart < 0 && iend < 0)
{
/* No intersection found */
Expand Down
16 changes: 12 additions & 4 deletions applications/clawpack/euler/2d/quadrants/user_4.6/qinit.f
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,18 @@ subroutine clawpack46_qinit(maxmx,maxmy,meqn,mbc,mx,my,
xcell = xlower + (i-0.5d0)*dx
do j = 1-mbc,my+mbc
ycell = ylower + (j-0.5d0)*dy
if (xcell.ge.xs .and. ycell.ge.ys) iq = 1
if (xcell.lt.xs .and. ycell.ge.ys) iq = 2
if (xcell.lt.xs .and. ycell.lt.ys) iq = 3
if (xcell.ge.xs .and. ycell.lt.ys) iq = 4
if (xcell .ge. xs .and. ycell .ge. ys) then
iq = 1
elseif (xcell .lt. xs .and. ycell .ge. ys) then
iq = 2
elseif (xcell .lt. xs .and. ycell .lt. ys) then
iq = 3
elseif (xcell .ge. xs .and. ycell .lt. ys) then
iq = 4
else
write(6,*) "qinit.f : invalid point value"
stop
endif
q(i,j,1) = rpr(iq)
q(i,j,2) = rpr(iq)*rpu(iq)
q(i,j,3) = rpr(iq)*rpv(iq)
Expand Down
16 changes: 12 additions & 4 deletions applications/clawpack/euler/2d/quadrants/user_5.0/qinit.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@ SUBROUTINE clawpack5_qinit(meqn,mbc,mx,my, &
xcell = xlower + (i-0.5d0)*dx
DO j = 1-mbc,my+mbc
ycell = ylower + (j-0.5d0)*dy
IF (xcell.GE.xs .AND. ycell.GE.ys) iq = 1
IF (xcell.LT.xs .AND. ycell.GE.ys) iq = 2
IF (xcell.LT.xs .AND. ycell.LT.ys) iq = 3
IF (xcell.GE.xs .AND. ycell.LT.ys) iq = 4
IF (xcell.GE.xs .AND. ycell.GE.ys) then
iq = 1
ELSEIF (xcell.LT.xs .AND. ycell.GE.ys) then
iq = 2
ELSEIF (xcell.LT.xs .AND. ycell.LT.ys) then
iq = 3
ELSEIF (xcell.GE.xs .AND. ycell.LT.ys) then
iq = 4
ELSE
write(6,*) 'qinit : (xs,ys) not in domain'
stop
ENDIF
q(1,i,j) = rpr(iq)
q(2,i,j) = rpr(iq)*rpu(iq)
q(3,i,j) = rpr(iq)*rpv(iq)
Expand Down
4 changes: 0 additions & 4 deletions applications/clawpack/euler/3dx/rp/rpn3_euler.f90
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,4 @@ SUBROUTINE clawpack46_rpn3(ixyz,maxm,meqn,mwaves,maux,mbc,mx,ql,qr, &

END IF ! Entropy fix

108 format(A,'ixyz=',I2, '; imp = ',I2, '; i = ', I2)
109 format(5E24.16)


END SUBROUTINE clawpack46_rpn3
14 changes: 0 additions & 14 deletions applications/clawpack/euler/3dx/rp/rpn3_euler_mapped.f90
Original file line number Diff line number Diff line change
Expand Up @@ -312,22 +312,8 @@ subroutine clawpack46_rpn3_mapped(ixyz,maxm,meqn,mwaves,maux,mbc,mx,&
apdq_cart(m,i) = area*apdq(m)
amdq_cart(m,i) = area*amdq(m)
end do


!! do m=1,meqn
!! amdq_cart(m,i) = 0.d0
!! apdq_cart(m,i) = 0.d0
!! do mws = 1,mwaves
!! amdq_cart(m,i) = amdq_cart(m,i) + min(s(mws,i),0.d0)*wave(m,mws)
!! apdq_cart(m,i) = apdq_cart(m,i) + max(s(mws,i),0.d0)*wave(m,mws)
!! enddo
!! enddo

enddo !! end of i loop over 1d sweep array

108 format(A,'ixyz=',I2,'; i = ',I2)
109 format(5E24.16)

return
end subroutine clawpack46_rpn3_mapped

Expand Down
3 changes: 0 additions & 3 deletions applications/clawpack/euler/3dx/rp/rpt3_euler_mapped.f90
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ subroutine clawpack46_rpt3_mapped(ixyz,icoor,ilr,maxm,meqn,mwaves,maux,mbc, &

enddo !! end of i loop

108 format(A,'ixyz=',I2,'; icoor=',I2,'; ilr = ',I2,'; i=',I2)
109 format(5E24.16)

1001 format(A,3E24.16)
1002 format(A,I5)
1003 format('icom = ',I5,'; jcom = ',I5,'; kcom = ',I5)
Expand Down
18 changes: 1 addition & 17 deletions applications/clawpack/euler/3dx/rp/rptt3_euler_mapped.f90
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,12 @@ subroutine clawpack46_rptt3_mapped(ixyz,icoor,ilr,impt,maxm,meqn,mwaves,&
common /comxyzt/ dtcom,dxcom,dycom,dzcom,tcom,icom,jcom,kcom

double precision wave(5,3),s_rot(3), bsasdq(5), uvw(3)
double precision uvw_cart(3), rot(9), wave_cart(5,3)
double precision uvw_cart(3), rot(9)

integer i, j, mws, m, i1, info
double precision uvw2, pres, enth, area
integer locrot, locarea, irot

!! integer mv,mu,mw

!! IF(ixyz == 1)THEN
!! mu = 2
!! mv = 3
!! mw = 4
!! ELSE IF(ixyz == 2)THEN
!! mu = 3
!! mv = 4
!! mw = 2
!! ELSE
!! mu = 4
!! mv = 2
!! mw = 3
!! ENDIF

call get_aux_locations_tt(ixyz,icoor,mcapa,locrot,locarea,irot)

!! # Solve Riemann problem in the second coordinate direction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ SUBROUTINE clawpack46_rpn2_fwave(ixy,maxm,meqn,mwaves, &

integer :: i, m, mw, mq, ioff
double precision :: enx, eny, enz, etx,ety,etz
double precision :: hunl, hunr, hutl, hutr
double precision :: gamma, amn, apn, df, dy, qn
double precision :: hunl, hunr
double precision :: gamma, amn, apn, df, dy
double precision :: erx, ery, erz, h1, h3, hi, him1, hu1, hu3
double precision :: s0, s03, s1, s3, sfract

double precision :: hL, hR, huL, huR, bL, bR, hvL, hvR
double precision :: uL, vL, uR, vR, phiR, phiL, sL, sR
double precision :: uhat, chat
double precision :: sw(mwaves), fw(meqn,mwaves)
double precision szm(3), szp(3), z, sdk

Expand Down Expand Up @@ -327,8 +325,8 @@ SUBROUTINE simple_riemann(hR,huR,hvR, br, hL,huL,hvl,bL, s,fwave)
common /swe_model_parms/ grav

DOUBLE PRECISION :: fluxdiff(3),beta(3), hbar, fl(3), fr(3)
double precision :: psiL, psiR, sL, sR, vhat, ul, vl, ur, vr
double precision :: hsq, uhat, chat, phir, phil
double precision :: psiL, psiR, vhat, ul, vl, ur, vr
double precision :: uhat,chat

fwave = 0
s = 0
Expand Down
5 changes: 2 additions & 3 deletions applications/clawpack/shallow/2d/sphere/user_4.6/rpt2swq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ subroutine clawpack46_rpt2(ixy,maxm,meqn,mwaves,mbc,mx, &
common /comxyt/ dtcom,dxcom,dycom,tcom,icom,jcom

double precision delta(4)
double precision a1, a2, a3, dx, dy, bn
double precision erx, ery, erz
integer i, j, m, i1, mw, ioff, ix1, ixm1
double precision a1, a2, a3, dx
integer i, m, i1, mw, ioff, ix1, ixm1


if (ixy .eq. 1) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ subroutine clawpack46_rpt2_fwave(ixy,maxm,meqn,mwaves,mbc,mx, &
common /comxyt/ dtcom,dxcom,dycom,tcom,icom,jcom

double precision delta(4)
double precision a1, a2, a3, dx, dy, bn
double precision erx, ery, erz
integer i, j, m, i1, mw, ioff, ix1, ixm1
double precision a1, a2, a3, dx
integer i, m, i1, mw, ioff, ix1, ixm1


if (ixy .eq. 1) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ subroutine clawpack46_b4step2(maxmx,maxmy,mbc,mx,my,meqn,q, &
double precision q(1-mbc:maxmx+mbc,1-mbc:maxmy+mbc, meqn)
double precision aux(1-mbc:maxmx+mbc,1-mbc:maxmy+mbc, maux)

double precision xlow,ylow
double precision erx, ery, erz, qn

integer i,j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ subroutine sphere_setaux(mx,my,mbc,xlower,ylower, &
common /swe_example/ example

integer i,j,m
double precision dxdy, xc, yc, xp, yp,zp, rp
double precision dxdy, xc, yc
double precision bmount

integer blockno, fc2d_clawpack46_get_block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ subroutine clawpack5_rpn2(ixy,maxm,meqn,mwaves,maux, mbc,mx,&
double precision amn, erx, ery, erz, apn
integer ioff, m, mw, i

double precision dx, dy, qn
double precision dx, dy


double precision grav
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ SUBROUTINE clawpack5_rpn2_fwave(ixy,maxm,meqn,mwaves, maux, &

integer :: i, m, mw, mq, ioff
double precision :: enx, eny, enz, etx,ety,etz
double precision :: hunl, hunr, hutl, hutr
double precision :: gamma, amn, apn, df, dy, qn
double precision :: hunl, hunr
double precision :: gamma, amn, apn, df, dy
double precision :: erx, ery, erz, h1, h3, hi, him1, hu1, hu3
double precision :: s0, s03, s1, s3, sfract

double precision :: hL, hR, huL, huR, bL, bR, hvL, hvR
double precision :: uL, vL, uR, vR, phiR, phiL, sL, sR
double precision :: uhat, chat
double precision :: sw(mwaves), fw(meqn,mwaves)
double precision szm(3), szp(3), z, sdk

Expand Down
5 changes: 2 additions & 3 deletions applications/clawpack/shallow/2d/sphere/user_5.0/rpt2swq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ subroutine clawpack5_rpt2(ixy,imp,maxm,meqn,mwaves,maux, &
common /comxyt/ dtcom,dxcom,dycom,tcom,icom,jcom

double precision delta(4)
double precision a1, a2, a3, dx, dy, bn
double precision erx, ery, erz
integer i, j, m, i1, mw, ioff, ix1, ixm1
double precision a1, a2, a3, dx
integer i, m, i1, mw, ioff, ix1, ixm1


if (ixy .eq. 1) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ subroutine clawpack5_rpt2_fwave(ixy,imp,maxm,meqn,mwaves, maux,&
common /comxyt/ dtcom,dxcom,dycom,tcom,icom,jcom

double precision delta(4)
double precision a1, a2, a3, dx, dy, bn
double precision erx, ery, erz
integer i, j, m, i1, mw, ioff, ix1, ixm1
double precision a1, a2, a3, dx
integer i, m, i1, mw, ioff, ix1, ixm1


if (ixy .eq. 1) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ subroutine clawpack5_b4step2(mbc,mx,my,meqn,q, &
double precision q(meqn,1-mbc:mx+mbc,1-mbc:my+mbc)
double precision aux(maux,1-mbc:mx+mbc,1-mbc:my+mbc)

double precision xlow,ylow
double precision erx, ery, erz, qn

integer i,j

!! # We may not even need this if we project out the correct surface
!! # normal from the velocities.
return

do i=1,mx
do j=1,my
!! Surface normal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ subroutine clawpack5_qinit(meqn,mbc,mx,my, &
double precision xc,yc,xlow,ylow,xp,yp,zp, w, qval

double precision phi, phi0, width
double precision theta, q1, R, u0, Rsphere, d
double precision theta, q1, R, u0, d

integer blockno, fc2d_clawpack5_get_block
integer*8 cont, fclaw_map_get_context

character(len=12) :: fname


cont = fclaw_map_get_context()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ subroutine sphere5_setaux(mx,my,mbc,xlower,ylower, &
common /swe_example/ example

integer i,j,m
double precision dxdy, xc, yc, xp, yp,zp, rp
double precision dxdy, xc, yc
double precision bmount

integer blockno, fc2d_clawpack5_get_block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ subroutine clawpack46_rpt2cons_manifold(ixy,maxm,meqn,

implicit none

integer ixy, maxm, meqn,mwaves,mbc,mx,imp, maux
integer ixy, maxm, meqn,mwaves,mbc,mx,imp

double precision ql(1-mbc:maxm+mbc, meqn)
double precision qr(1-mbc:maxm+mbc, meqn)
Expand Down
4 changes: 2 additions & 2 deletions applications/demo/2d/filament_swirl/filament_swirl_split.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2012-2023 Carsten Burstedde, Donna Calhoun, Scott Aiton
Copyright (c) 2012-2024 Carsten Burstedde, Donna Calhoun, Scott Aiton
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -161,7 +161,7 @@ main (int argc, char **argv)

/* MPI COMMs */
int size, rank;
sc_MPI_Comm mpicomm = fclaw_app_get_mpi_size_rank (app, &size, &rank);
fclaw_app_get_mpi_size_rank (app, &size, &rank);

/* Globs */
fclaw_global_t *filament_glob = fclaw_global_new_comm (subcomm, size, rank);
Expand Down
Loading
Loading