Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(DGModel3D_t), | intent(inout) | :: | this | |||
character, | intent(in) | :: | fileName |
subroutine Read_DGModel3D_t(this,fileName)
implicit none
class(DGModel3D_t),intent(inout) :: this
character(*),intent(in) :: fileName
! Local
integer(HID_T) :: fileId
integer(HID_T) :: solOffset(1:4)
integer :: firstElem,ivar
if(this%mesh%decomp%mpiEnabled) then
call Open_HDF5(fileName,H5F_ACC_RDWR_F,fileId, &
this%mesh%decomp%mpiComm)
else
call Open_HDF5(fileName,H5F_ACC_RDWR_F,fileId)
endif
if(this%mesh%decomp%mpiEnabled) then
firstElem = this%mesh%decomp%offsetElem(this%mesh%decomp%rankId+1)
solOffset(1:4) = (/0,0,0,firstElem/)
do ivar = 1,this%solution%nvar
call ReadArray_HDF5(fileId, &
'/controlgrid/solution/'//trim(this%solution%meta(ivar)%name), &
this%solution%interior(:,:,:,:,ivar),solOffset)
enddo
else
do ivar = 1,this%solution%nvar
call ReadArray_HDF5(fileId, &
'/controlgrid/solution/'//trim(this%solution%meta(ivar)%name), &
this%solution%interior(:,:,:,:,ivar))
enddo
endif
call Close_HDF5(fileId)
endsubroutine Read_DGModel3D_t