mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Remove unused Fortran code
This commit is contained in:
parent
68e65ce2d1
commit
9bce2c357b
8 changed files with 2 additions and 125 deletions
|
|
@ -338,7 +338,6 @@ add_library(libopenmc SHARED
|
|||
src/stl_vector.F90
|
||||
src/string.F90
|
||||
src/surface_header.F90
|
||||
src/timer_header.F90
|
||||
src/tracking.F90
|
||||
src/track_output.F90
|
||||
src/vector_header.F90
|
||||
|
|
|
|||
|
|
@ -845,11 +845,6 @@ extern "C" {
|
|||
}
|
||||
model::n_cells = model::cells.size();
|
||||
}
|
||||
|
||||
int32_t universe_id(int i_univ) {return model::universes[i_univ]->id_;}
|
||||
|
||||
void universes_to_hdf5(hid_t universes_group)
|
||||
{for (Universe* u : model::universes) u->to_hdf5(universes_group);}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
module geometry
|
||||
|
||||
use constants
|
||||
use error, only: fatal_error, warning, write_message
|
||||
use geometry_header
|
||||
use particle_header
|
||||
use simulation_header
|
||||
use settings
|
||||
use surface_header
|
||||
use stl_vector, only: VectorInt
|
||||
use string, only: to_str
|
||||
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
|
|
|
|||
|
|
@ -8,12 +8,6 @@ module geometry_header
|
|||
implicit none
|
||||
|
||||
interface
|
||||
function universe_id(universe_ind) bind(C) result(id)
|
||||
import C_INT, C_INT32_T
|
||||
integer(C_INT), intent(in), value :: universe_ind
|
||||
integer(C_INT32_T) :: id
|
||||
end function universe_id
|
||||
|
||||
function cell_pointer(cell_ind) bind(C) result(ptr)
|
||||
import C_PTR, C_INT32_T
|
||||
integer(C_INT32_T), intent(in), value :: cell_ind
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ module output
|
|||
use, intrinsic :: ISO_FORTRAN_ENV
|
||||
|
||||
use constants
|
||||
use eigenvalue, only: openmc_get_keff
|
||||
use endf, only: reaction_name
|
||||
use error, only: fatal_error, warning
|
||||
use geometry_header
|
||||
|
|
@ -12,7 +11,7 @@ module output
|
|||
use message_passing, only: master, n_procs
|
||||
use mgxs_interface
|
||||
use nuclide_header
|
||||
use particle_header, only: LocalCoord, Particle
|
||||
use particle_header, only: Particle
|
||||
use settings
|
||||
use simulation_header
|
||||
use surface_header, only: surfaces
|
||||
|
|
@ -38,22 +37,6 @@ module output
|
|||
|
||||
contains
|
||||
|
||||
!===============================================================================
|
||||
! TIME_STAMP returns the current date and time in a formatted string
|
||||
!===============================================================================
|
||||
|
||||
function time_stamp() result(current_time)
|
||||
|
||||
character(19) :: current_time ! ccyy-mm-dd hh:mm:ss
|
||||
character(8) :: date_ ! ccyymmdd
|
||||
character(10) :: time_ ! hhmmss.sss
|
||||
|
||||
call date_and_time(DATE=date_, TIME=time_)
|
||||
current_time = date_(1:4) // "-" // date_(5:6) // "-" // date_(7:8) // &
|
||||
" " // time_(1:2) // ":" // time_(3:4) // ":" // time_(5:6)
|
||||
|
||||
end function time_stamp
|
||||
|
||||
!===============================================================================
|
||||
! HEADER displays a header block according to a specified level. If no level is
|
||||
! specified, it is assumed to be a minor header block.
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ module reaction_header
|
|||
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
|
||||
use constants, only: MAX_WORD_LEN
|
||||
use hdf5_interface
|
||||
use stl_vector, only: VectorInt
|
||||
use string, only: to_str, starts_with
|
||||
|
||||
implicit none
|
||||
private
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ module string
|
|||
use, intrinsic :: ISO_C_BINDING
|
||||
|
||||
use constants, only: ERROR_INT, ERROR_REAL
|
||||
use error, only: fatal_error, warning
|
||||
use stl_vector, only: VectorInt
|
||||
use error, only: fatal_error
|
||||
|
||||
implicit none
|
||||
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
module timer_header
|
||||
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
|
||||
use constants, only: ZERO
|
||||
|
||||
!===============================================================================
|
||||
! TIMER represents a timer that can be started and stopped to measure how long
|
||||
! different routines run. The intrinsic routine system_clock is used to measure
|
||||
! time rather than cpu_time.
|
||||
!===============================================================================
|
||||
|
||||
type Timer
|
||||
private
|
||||
logical :: running = .false. ! is timer running?
|
||||
integer(8) :: start_counts = 0 ! counts when started
|
||||
real(8), public :: elapsed = ZERO ! total time elapsed in seconds
|
||||
contains
|
||||
procedure :: start => timer_start
|
||||
procedure :: get_value => timer_get_value
|
||||
procedure :: stop => timer_stop
|
||||
procedure :: reset => timer_reset
|
||||
end type Timer
|
||||
|
||||
contains
|
||||
|
||||
!===============================================================================
|
||||
! TIMER_START starts running a timer and measures the current time
|
||||
!===============================================================================
|
||||
|
||||
subroutine timer_start(self)
|
||||
class(Timer), intent(inout) :: self
|
||||
|
||||
! Turn timer on and measure starting time
|
||||
self % running = .true.
|
||||
call system_clock(self % start_counts)
|
||||
end subroutine timer_start
|
||||
|
||||
!===============================================================================
|
||||
! TIMER_GET_VALUE returns the current value of the timer
|
||||
!===============================================================================
|
||||
|
||||
function timer_get_value(self) result(elapsed)
|
||||
class(Timer), intent(in) :: self ! the timer
|
||||
real(8) :: elapsed ! total elapsed time
|
||||
|
||||
integer(8) :: end_counts ! current number of counts
|
||||
integer(8) :: count_rate ! system-dependent counting rate
|
||||
real(8) :: elapsed_time ! elapsed time since last start
|
||||
|
||||
if (self % running) then
|
||||
call system_clock(end_counts, count_rate)
|
||||
elapsed_time = real(end_counts - self % start_counts, 8) / &
|
||||
real(count_rate, 8)
|
||||
elapsed = self % elapsed + elapsed_time
|
||||
else
|
||||
elapsed = self % elapsed
|
||||
end if
|
||||
end function timer_get_value
|
||||
|
||||
!===============================================================================
|
||||
! TIMER_STOP stops the timer and sets the elapsed time
|
||||
!===============================================================================
|
||||
|
||||
subroutine timer_stop(self)
|
||||
class(Timer), intent(inout) :: self
|
||||
|
||||
! Check to make sure timer was running
|
||||
if (.not. self % running) return
|
||||
|
||||
! Stop timer and add time
|
||||
self % elapsed = self % get_value()
|
||||
self % running = .false.
|
||||
end subroutine timer_stop
|
||||
|
||||
!===============================================================================
|
||||
! TIMER_RESET resets a timer to have a zero value
|
||||
!===============================================================================
|
||||
|
||||
pure subroutine timer_reset(self)
|
||||
class(Timer), intent(inout) :: self
|
||||
|
||||
self % running = .false.
|
||||
self % start_counts = 0
|
||||
self % elapsed = ZERO
|
||||
end subroutine timer_reset
|
||||
|
||||
end module timer_header
|
||||
Loading…
Add table
Add a link
Reference in a new issue