Skip to content

Commit

Permalink
Address more @smharper comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Aug 3, 2017
1 parent cd8a297 commit 242d633
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/api.F90
Expand Up @@ -169,7 +169,7 @@ function openmc_cell_set_temperature(index, T, instance) result(err) bind(C)
end if
end associate

! assign error codes for outside of temperature bounds provided the
! Assign error codes for outside of temperature bounds provided the
! temperature was changed correctly. This needs to be done after
! changing the temperature based on the logical structure above.
if (err == 0) then
Expand Down Expand Up @@ -627,7 +627,7 @@ function openmc_material_set_densities(index, n, name, density) result(err) bind
real(C_DOUBLE), intent(in) :: density(n)
integer(C_INT) :: err

integer :: i, j, k
integer :: i
character(C_CHAR), pointer :: string(:)
character(len=:, kind=C_CHAR), allocatable :: name_

Expand Down Expand Up @@ -868,6 +868,11 @@ function openmc_tally_set_nuclides(index, n, nuclides) result(err) bind(C)
end if
end function openmc_tally_set_nuclides

!===============================================================================
! TO_F_STRING takes a null-terminated array of C chars and turns it into a
! deferred-length character string. Yay Fortran 2003!
!===============================================================================

function to_f_string(c_string) result(f_string)
character(kind=C_CHAR), intent(in) :: c_string(*)
character(:), allocatable :: f_string
Expand Down
4 changes: 2 additions & 2 deletions src/simulation.F90
Expand Up @@ -394,9 +394,9 @@ end subroutine initialize_simulation

subroutine finalize_simulation()

integer :: i ! loop index for tallies
integer :: n ! size of arrays
#ifdef MPI
integer :: i ! loop index for tallies
integer :: n ! size of arrays
integer :: mpi_err ! MPI error code
integer(8) :: temp
real(8) :: tempr(3) ! temporary array for communication
Expand Down

0 comments on commit 242d633

Please sign in to comment.