IO: Store an attribute indicating the domain periodicity.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
88434201bf
commit
198e6db77c
11
src/io.F90
11
src/io.F90
@ -1274,7 +1274,7 @@ module io
|
|||||||
use evolution , only : step, time, dt, dtn
|
use evolution , only : step, time, dt, dtn
|
||||||
use hdf5 , only : hid_t
|
use hdf5 , only : hid_t
|
||||||
use hdf5 , only : h5gcreate_f, h5gclose_f
|
use hdf5 , only : h5gcreate_f, h5gclose_f
|
||||||
use mpitools , only : nprocs, nproc
|
use mpitools , only : nprocs, nproc, periodic
|
||||||
use random , only : nseeds, get_seeds
|
use random , only : nseeds, get_seeds
|
||||||
|
|
||||||
! local variables are not implicit by default
|
! local variables are not implicit by default
|
||||||
@ -1290,6 +1290,10 @@ module io
|
|||||||
integer(hid_t) :: gid
|
integer(hid_t) :: gid
|
||||||
integer :: err
|
integer :: err
|
||||||
|
|
||||||
|
! local vectors
|
||||||
|
!
|
||||||
|
integer, dimension(3) :: per
|
||||||
|
|
||||||
! local allocatable arrays
|
! local allocatable arrays
|
||||||
!
|
!
|
||||||
integer(kind=4), dimension(:), allocatable :: seeds
|
integer(kind=4), dimension(:), allocatable :: seeds
|
||||||
@ -1318,6 +1322,10 @@ module io
|
|||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
! convert periodic(:) to an integer vector
|
||||||
|
!
|
||||||
|
per(:) = merge(1, 0, periodic(:))
|
||||||
|
|
||||||
! store string attributes
|
! store string attributes
|
||||||
!
|
!
|
||||||
call write_attribute(gid, 'eqsys' , eqsys )
|
call write_attribute(gid, 'eqsys' , eqsys )
|
||||||
@ -1340,6 +1348,7 @@ module io
|
|||||||
call write_attribute(gid, 'nseeds' , nseeds )
|
call write_attribute(gid, 'nseeds' , nseeds )
|
||||||
call write_attribute(gid, 'step' , step )
|
call write_attribute(gid, 'step' , step )
|
||||||
call write_attribute(gid, 'isnap' , isnap )
|
call write_attribute(gid, 'isnap' , isnap )
|
||||||
|
call write_attribute(gid, 'periodic', per(:) )
|
||||||
|
|
||||||
! store the real attributes
|
! store the real attributes
|
||||||
!
|
!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user