Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(DGModel2D_t), | intent(inout) | :: | this | |||
character, | intent(in) | :: | fileName |
subroutine Read_DGModel2D_t(this,fileName)
implicit none
class(DGModel2D_t),intent(inout) :: this
character(*),intent(in) :: fileName
! Local
integer(HID_T) :: fileId
integer(HID_T) :: solOffset(1:3)
integer :: firstElem
integer :: N,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:3) = (/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_DGModel2D_t