Reads one Eulerian object based on name with H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(h5hut_obj), | intent(inout) | :: | h5 |
H5hut structure |
||
| integer, | intent(in) | :: | ind |
Index of Eulerian object |
impure subroutine eulerian_set_ReadSingleH5HUT(this,h5,ind) !> Reads one Eulerian object based on name with H5HUT. implicit none class(eulerian_set), intent(inout) :: this !! An Eulerian Set type(h5hut_obj), intent(inout) :: h5 !! H5hut structure integer, intent(in) :: ind !! Index of Eulerian object ! Work variables real(wp),allocatable :: buff_r(:,:,:) !! Buffer to write integer, allocatable :: buff_i(:,:,:) !! Buffer to write ! Read field associate (lo => this%block%lo, hi => this%block%hi, ngc=> this%block%ngc) select type (my_field => this%field(ind)%p) type is (eulerian_obj_r) ! Allocate buffer allocate(buff_r(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3))) ! Read data call h5%read(my_field%name,buff_r,lo,hi) my_field%cell(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3))=buff_r ! Clean deallocate(buff_r) type is (eulerian_obj_i) ! Allocate buffer allocate(buff_i(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3))) ! Read data call h5%read(my_field%name,buff_i,lo,hi) my_field%cell(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3))=buff_i ! Clean deallocate(buff_i) end select call this%field(ind)%p%UpdateGhostCells end associate return end subroutine eulerian_set_ReadSingleH5HUT