mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Complete rewrite of hdf5_interface with a flat API
This commit is contained in:
parent
dce020b59e
commit
205be92897
4 changed files with 1743 additions and 1681 deletions
|
|
@ -1,5 +1,7 @@
|
|||
module bank_header
|
||||
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
|
||||
implicit none
|
||||
|
||||
!===============================================================================
|
||||
|
|
@ -8,16 +10,11 @@ module bank_header
|
|||
! stored with less memory
|
||||
!===============================================================================
|
||||
|
||||
type Bank
|
||||
! The 'sequence' attribute is used here to ensure that the data listed
|
||||
! appears in the given order. This is important for MPI purposes when bank
|
||||
! sites are sent from one processor to another.
|
||||
sequence
|
||||
|
||||
real(8) :: wgt ! weight of bank site
|
||||
real(8) :: xyz(3) ! location of bank particle
|
||||
real(8) :: uvw(3) ! diretional cosines
|
||||
real(8) :: E ! energy
|
||||
type, bind(C) :: Bank
|
||||
real(C_DOUBLE) :: wgt ! weight of bank site
|
||||
real(C_DOUBLE) :: xyz(3) ! location of bank particle
|
||||
real(C_DOUBLE) :: uvw(3) ! diretional cosines
|
||||
real(C_DOUBLE) :: E ! energy
|
||||
end type Bank
|
||||
|
||||
end module bank_header
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ module global
|
|||
use trigger_header, only: KTrigger
|
||||
use timer_header, only: Timer
|
||||
|
||||
use hdf5_interface, only: HID_T
|
||||
#ifdef MPIF08
|
||||
use mpi_f08
|
||||
#endif
|
||||
|
|
@ -265,14 +264,6 @@ module global
|
|||
real(8) :: weight_cutoff = 0.25_8
|
||||
real(8) :: weight_survive = ONE
|
||||
|
||||
! ============================================================================
|
||||
! HDF5 VARIABLES
|
||||
|
||||
integer(HID_T) :: hdf5_output_file ! identifier for output file
|
||||
integer(HID_T) :: hdf5_tallyresult_t ! Compound type for TallyResult
|
||||
integer(HID_T) :: hdf5_bank_t ! Compound type for Bank
|
||||
integer(HID_T) :: hdf5_integer8_t ! type for integer(8)
|
||||
|
||||
! ============================================================================
|
||||
! MISCELLANEOUS VARIABLES
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2,6 +2,7 @@ module tally_header
|
|||
|
||||
use constants, only: NONE, N_FILTER_TYPES
|
||||
use trigger_header, only: TriggerObject
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
|
||||
implicit none
|
||||
|
||||
|
|
@ -39,10 +40,10 @@ module tally_header
|
|||
! TALLYRESULT provides accumulation of results in a particular tally bin
|
||||
!===============================================================================
|
||||
|
||||
type TallyResult
|
||||
real(8) :: value = 0.
|
||||
real(8) :: sum = 0.
|
||||
real(8) :: sum_sq = 0.
|
||||
type, bind(C) :: TallyResult
|
||||
real(C_DOUBLE) :: value = 0.
|
||||
real(C_DOUBLE) :: sum = 0.
|
||||
real(C_DOUBLE) :: sum_sq = 0.
|
||||
end type TallyResult
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue