Skip to content

Commit 7314cef

Browse files
committed
Add explicitly types variables and function
1 parent ef7b9e4 commit 7314cef

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

examples/advection_2d_inflow/qinit.f90

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@ subroutine qinit(meqn,mbc,mx,my,xlower,ylower,dx,dy,q,maux,aux)
55
! q = 1.0 if 0.1 < x < 0.6 and 0.1 < y < 0.6
66
! 0.1 otherwise
77

8+
implicit none
9+
810
integer, intent(in) :: meqn, mbc, mx, my, maux
911
real(kind=8), intent(in) :: xlower, ylower, dx, dy
1012
real(kind=8), intent(in out) :: q(meqn, 1-mbc:mx+mbc, 1-mbc:my+mbc)
1113
real(kind=8), intent(in out) :: aux(maux, 1-mbc:mx+mbc, 1-mbc:my+mbc)
1214

15+
integer :: i, j
1316
real(kind=8) :: xi, yj
14-
real(kind=8), external :: qtrue
17+
18+
! True solution for BCs
19+
interface
20+
real(kind=8) pure function qtrue(x, y ,t)
21+
implicit none
22+
real(kind=8), intent(in) :: x, y ,t
23+
end function qtrue
24+
end interface
1525

1626
! set concentration profile
1727
do j=1,my

0 commit comments

Comments
 (0)