Skip to content

Commit

Permalink
Move num_dim determination futher up"
Browse files Browse the repository at this point in the history
  • Loading branch information
mandli committed Jun 17, 2018
1 parent fc882fd commit 273ca22
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/2d/valout.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
! Output timing
call system_clock(clock_start,clock_rate)
call cpu_time(cpu_start)

! Handle special case of using 2D AMR to do 1D AMR
if (num_cells(2) > 1) then
num_dim = 2
else
num_dim = 1
end if

! Count how many aux components requested
output_aux_num = 0
Expand Down Expand Up @@ -351,13 +358,6 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
! Write fort.t file
open(unit=out_unit, file=file_name(2), status='unknown', form='formatted')

! Handle special case of using 2D AMR to do 1D AMR
if (num_cells(2) > 1) then
num_dim = 2
else
num_dim = 1
end if

! Note: We need to print out num_ghost too in order to strip ghost cells
! from q array when reading in pyclaw.io.binary
write(out_unit, t_file_format) time, num_eqn, num_grids, num_aux, num_dim, &
Expand Down

0 comments on commit 273ca22

Please sign in to comment.