IO: Store an attribute indicating the domain periodicity.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2017-12-30 14:25:49 -02:00
parent 88434201bf
commit 198e6db77c

View File

@ -1274,7 +1274,7 @@ module io
use evolution , only : step, time, dt, dtn
use hdf5 , only : hid_t
use hdf5 , only : h5gcreate_f, h5gclose_f
use mpitools , only : nprocs, nproc
use mpitools , only : nprocs, nproc, periodic
use random , only : nseeds, get_seeds
! local variables are not implicit by default
@ -1290,6 +1290,10 @@ module io
integer(hid_t) :: gid
integer :: err
! local vectors
!
integer, dimension(3) :: per
! local allocatable arrays
!
integer(kind=4), dimension(:), allocatable :: seeds
@ -1318,6 +1322,10 @@ module io
end if
! convert periodic(:) to an integer vector
!
per(:) = merge(1, 0, periodic(:))
! store string attributes
!
call write_attribute(gid, 'eqsys' , eqsys )
@ -1326,12 +1334,12 @@ module io
! store the integer attributes
!
call write_attribute(gid, 'ndims' , NDIMS )
call write_attribute(gid, 'last_id', get_last_id())
call write_attribute(gid, 'mblocks', get_mblocks())
call write_attribute(gid, 'dblocks', get_dblocks())
call write_attribute(gid, 'last_id' , get_last_id())
call write_attribute(gid, 'mblocks' , get_mblocks())
call write_attribute(gid, 'dblocks' , get_dblocks())
call write_attribute(gid, 'nleafs' , get_nleafs() )
call write_attribute(gid, 'ncells' , nc )
call write_attribute(gid, 'nghosts', ng )
call write_attribute(gid, 'nghosts' , ng )
call write_attribute(gid, 'minlev' , minlev )
call write_attribute(gid, 'maxlev' , maxlev )
call write_attribute(gid, 'toplev' , toplev )
@ -1340,6 +1348,7 @@ module io
call write_attribute(gid, 'nseeds' , nseeds )
call write_attribute(gid, 'step' , step )
call write_attribute(gid, 'isnap' , isnap )
call write_attribute(gid, 'periodic', per(:) )
! store the real attributes
!