Skip to content

Commit

Permalink
Merge pull request #255 from rjleveque/close_fortb
Browse files Browse the repository at this point in the history
close fort.b and fort.a files properly in valout
  • Loading branch information
mandli authored Dec 29, 2019
2 parents 0bfa7b0 + 08c23f4 commit c248699
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/1d/valout.f90
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
end do
end do

close(out_unit)
if (output_format == 3) then
close(unit=out_unit + 1)
end if


! ==========================================================================
! Write out fort.a file
if (out_aux) then
Expand Down Expand Up @@ -244,6 +250,11 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
grid_ptr = node(levelptr, grid_ptr)
end do
end do

if ((output_format == 1) .or. (output_format == 3)) then
close(out_unit)
end if

end if

! ==========================================================================
Expand Down
11 changes: 11 additions & 0 deletions src/2d/valout.f90
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
grid_ptr = node(levelptr, grid_ptr)
end do
end do

close(out_unit)
if (output_format == 3) then
close(unit=out_unit + 1)
end if

#ifdef HDF5
if (output_format == 4) then
call h5gclose_f(q_group, hdf_error)
Expand Down Expand Up @@ -316,7 +321,13 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
grid_ptr = node(levelptr, grid_ptr)
end do
end do

if ((output_format == 1) .or. (output_format == 3)) then
close(out_unit)
end if

end if

#ifdef HDF5
if (out_aux) then
call h5gclose_f(aux_group, hdf_error)
Expand Down
11 changes: 11 additions & 0 deletions src/3d/valout.f90
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
end do
end do

close(out_unit)
if (output_format == 3) then
close(unit=out_unit + 1)
end if


! ==========================================================================
! Write out fort.a file
if (out_aux) then
Expand Down Expand Up @@ -283,6 +289,11 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux)
grid_ptr = node(levelptr, grid_ptr)
end do
end do

if ((output_format == 1) .or. (output_format == 3)) then
close(out_unit)
end if

end if

! ==========================================================================
Expand Down

0 comments on commit c248699

Please sign in to comment.