Writes all solids to disk using HDF5. Add some attributes
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solid_set), | intent(inout) | :: | this |
A collection of solids |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
impure subroutine solid_set_WriteHDF5(this,iter,time) use leapUtils, only: stringtool_obj !> Writes all solids to disk using HDF5. implicit none class(solid_set), intent(inout) :: this !! A collection of solids integer, intent(in) :: iter !! Iteration at write real(wp), intent(in) :: time !! Time at write ! Work variables integer :: n type(stringtool_obj) :: stringtool character(len=str64) :: tmpC character(len=:), & allocatable :: filename type(hdf5_obj) :: hdf5 do n=1,this%count call this%p(n)%WriteHDF5(iter,time) ! Initialize HDF5 call hdf5%Initialize(this%parallel) filename = 'HDF5/'//stringtool%RemoveExtension(this%p(n)%write_file) ! Open the file if (this%overwrite) then write(tmpC,'(ES12.4)') time filename = filename//"_"//trim(adjustl(tmpC)) call hdf5%Open(filename,"W") else call hdf5%Open(filename,"RW") end if !> Add some attributes call hdf5%WriteAttributes("/","Motion",this%p(n)%motion) call hdf5%WriteAttributes("/","X_c", this%p(n)%xc ) call hdf5%WriteAttributes("/","V_c", this%p(n)%vc ) call hdf5%WriteAttributes("/","A_c", this%p(n)%Ac ) call hdf5%WriteAttributes("/","Freq", this%p(n)%fr ) call hdf5%Close() call hdf5%Finalize() end do return end subroutine solid_set_WriteHDF5