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

Fix flag2refine #230

Merged
merged 2 commits into from
Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions examples/euler_1d_wcblast/flag2refine1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
!
! ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
subroutine flag2refine1(mx,mbc,mbuff,meqn,maux,xlower,dx,t,level, &
tolsp,q,aux,amrflags,DONTFLAG,DOFLAG)
tolsp,q,aux,amrflags)

use regions_module
use amr_module, only : DOFLAG, UNSET

implicit none

Expand All @@ -55,17 +56,16 @@ subroutine flag2refine1(mx,mbc,mbuff,meqn,maux,xlower,dx,t,level, &

! Flagging
real(kind=8),intent(inout) :: amrflags(1-mbuff:mx+mbuff)
real(kind=8), intent(in) :: DONTFLAG
real(kind=8), intent(in) :: DOFLAG

logical :: allowflag
external allowflag

! Locals
integer :: i

! Initialize flags
amrflags = DONTFLAG
! Don't initialize flags, since they were already
! flagged by flagregions2
! amrflags = DONTFLAG

! Loop over interior points on this grid
! (i) grid cell is [x_low,x_hi], cell center at (x_c)
Expand Down
6 changes: 3 additions & 3 deletions src/1d/flag2refine1.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ subroutine flag2refine1(mx,mbc,mbuff,meqn,maux,xlower,dx,t,level, &
! min_level and max_level specified in any regions.

x_loop: do i = 1,mx
x_low = xlower + (i - 1) * dx
x_c = xlower + (i - 0.5d0) * dx
x_hi = xlower + i * dx
!x_low = xlower + (i - 1) * dx
!x_c = xlower + (i - 0.5d0) * dx
!x_hi = xlower + i * dx

! -----------------------------------------------------------------
! Only check undivided differences if flag hasn't been set yet.
Expand Down
12 changes: 6 additions & 6 deletions src/2d/flag2refine2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ subroutine flag2refine2(mx,my,mbc,mbuff,meqn,maux,xlower,ylower,dx,dy,t,level, &
! min_level and max_level specified in any regions.

y_loop: do j=1,my
y_low = ylower + (j - 1) * dy
y_c = ylower + (j - 0.5d0) * dy
y_hi = ylower + j * dy
!y_low = ylower + (j - 1) * dy
!y_c = ylower + (j - 0.5d0) * dy
!y_hi = ylower + j * dy

x_loop: do i = 1,mx
x_low = xlower + (i - 1) * dx
x_c = xlower + (i - 0.5d0) * dx
x_hi = xlower + i * dx
!x_low = xlower + (i - 1) * dx
!x_c = xlower + (i - 0.5d0) * dx
!x_hi = xlower + i * dx

! -----------------------------------------------------------------
! Only check undivided differences if flag hasn't been set yet.
Expand Down