Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(DGModel3D_t), | intent(inout) | :: | this | |||
character, | intent(in), | optional | :: | fileName |
subroutine Write_DGModel3D_t(this,fileName)
implicit none
class(DGModel3D_t),intent(inout) :: this
character(*),optional,intent(in) :: fileName
! Local
integer(HID_T) :: fileId
character(LEN=self_FileNameLength) :: pickupFile
character(13) :: timeStampString
if(present(filename)) then
pickupFile = filename
else
write(timeStampString,'(I13.13)') this%ioIterate
pickupFile = 'solution.'//timeStampString//'.h5'
endif
print*,__FILE__//" : Writing pickup file : "//trim(pickupFile)
if(this%mesh%decomp%mpiEnabled) then
call Open_HDF5(pickupFile,H5F_ACC_TRUNC_F,fileId,this%mesh%decomp%mpiComm)
! Write the interpolant to the file
call this%solution%interp%WriteHDF5(fileId)
! In this section, we write the solution and geometry on the control (quadrature) grid
! which can be used for model pickup runs or post-processing
! Write the model state to file
call CreateGroup_HDF5(fileId,'/controlgrid')
call this%solution%WriteHDF5(fileId,'/controlgrid/solution', &
this%mesh%decomp%offsetElem(this%mesh%decomp%rankId+1),this%mesh%decomp%nElem)
! Write the geometry to file
call this%geometry%x%WriteHDF5(fileId,'/controlgrid/geometry', &
this%mesh%decomp%offsetElem(this%mesh%decomp%rankId+1),this%mesh%decomp%nElem)
! -- END : writing solution on control grid -- !
call Close_HDF5(fileId)
else
call Open_HDF5(pickupFile,H5F_ACC_TRUNC_F,fileId)
! Write the interpolant to the file
call this%solution%interp%WriteHDF5(fileId)
! In this section, we write the solution and geometry on the control (quadrature) grid
! which can be used for model pickup runs or post-processing
! Write the model state to file
call CreateGroup_HDF5(fileId,'/controlgrid')
call this%solution%WriteHDF5(fileId,'/controlgrid/solution')
! Write the geometry to file
call this%geometry%x%WriteHDF5(fileId,'/controlgrid/geometry')
! -- END : writing solution on control grid -- !
call Close_HDF5(fileId)
endif
endsubroutine Write_DGModel3D_t