Skip to content

Commit

Permalink
Removed debugging for PPM_CW
Browse files Browse the repository at this point in the history
  • Loading branch information
adcroft committed Oct 7, 2024
1 parent 2c1ad11 commit 1e287ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/ALE/MOM_remapping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,7 @@ logical function remapping_unit_tests(verbose, num_comp_samp)
type(PPM_CW) :: PPM_CW

call test%set( verbose=verbose ) ! Sets the verbosity flag in test
call test%set( stop_instantly=.true. ) ! While debugging
! call test%set( stop_instantly=.true. ) ! While debugging

answer_date = 20190101 ! 20181231
h_neglect = hNeglect_dflt
Expand Down
14 changes: 2 additions & 12 deletions src/ALE/Recon1d_PPM_CW.F90
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ subroutine reconstruct(this, h, u)
this%ur(k) = u1
elseif ( du * a6 > du * du ) then ! Extrema on right
edge = 3.0 * u1 - 2.0 * this%ur(k) ! Subject to round off
edge = u1 + 2.0 * ( u1 - this%ur(k) )
edge = u1 + 2.0 * ( u1 - this%ur(k) ) ! Passes consistency tests - AJA
! u_min = min( u0, u1 )
! u_max = max( u0, u1 )
! edge = max( min( edge, u_max), u_min )
this%ul(k) = edge
elseif ( du * a6 < - du * du ) then ! Extrema on left
edge = 3.0 * u1 - 2.0 * this%ul(k) ! Subject to round off
edge = u1 + 2.0 * ( u1 - this%ul(k) )
edge = u1 + 2.0 * ( u1 - this%ul(k) ) ! Passes consistency tests - AJA
! u_min = min( u1, u2 )
! u_max = max( u1, u2 )
! edge = max( min( edge, u_max), u_min )
Expand Down Expand Up @@ -286,37 +286,27 @@ logical function check_reconstruction(this, h, u)
! If (u - ul) has the opposite sign from (ur - u), then this cell has an interior extremum
do k = 1, this%n
if ( ( this%u_mean(k) - this%ul(k) ) * ( this%ur(k) - this%u_mean(k) ) < 0. ) check_reconstruction = .true.
if ( ( this%u_mean(k) - this%ul(k) ) * ( this%ur(k) - this%u_mean(k) ) < 0. ) print *,'C',k
enddo

! Check bounding of right edges, w.r.t. the cell means
do K = 1, this%n-1
if ( ( this%ur(k) - this%u_mean(k) ) * ( this%u_mean(k+1) - this%ur(k) ) < 0. ) check_reconstruction = .true.
if ( ( this%ur(k) - this%u_mean(k) ) * ( this%u_mean(k+1) - this%ur(k) ) < 0. ) print *,'R',k
enddo

! Check bounding of left edges, w.r.t. the cell means
do K = 2, this%n
if ( ( this%u_mean(k) - this%ul(k) ) * ( this%ul(k) - this%u_mean(k-1) ) < 0. ) check_reconstruction = .true.
if ( ( this%u_mean(k) - this%ul(k) ) * ( this%ul(k) - this%u_mean(k-1) ) < 0. ) print *,'L',k
enddo

! Check bounding of right edges, w.r.t. this cell mean and the next cell left edge
do K = 1, this%n-1
if ( ( this%ur(k) - this%u_mean(k) ) * ( this%ul(k+1) - this%ur(k) ) < 0. ) check_reconstruction = .true.
if ( ( this%ur(k) - this%u_mean(k) ) * ( this%ul(k+1) - this%ur(k) ) < 0. ) print *,'r',k
enddo

! Check bounding of left edges, w.r.t. this cell mean and the previous cell right edge
do K = 2, this%n
if ( ( this%u_mean(k) - this%ul(k) ) * ( this%ul(k) - this%ur(k-1) ) < 0. ) check_reconstruction = .true.
if ( ( this%u_mean(k) - this%ul(k) ) * ( this%ul(k) - this%ur(k-1) ) < 0. ) print *,'l',k
enddo
if (check_reconstruction) then
do k = 1, this%n
print *,k,this%ul(k),this%u_mean(k),this%ur(k)
enddo
endif

end function check_reconstruction

Expand Down

0 comments on commit 1e287ae

Please sign in to comment.