Adds field information to the xdmf object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(xdmf_obj), | intent(inout) | :: | this |
XDMF object |
||
| character(len=*), | intent(in) | :: | name |
Field name in the HDF5 dataset |
||
| character(len=*), | intent(in) | :: | type |
Type is 'Float' or 'Int" |
||
| character(len=*), | intent(in) | :: | precision |
8 or 4 depending on type and working precision |
||
| character(len=*), | intent(in) | :: | path |
Path to the HDF5 dataset |
pure subroutine xdmf_obj_AddField(this,name,type,precision,path) !> Adds field information to the xdmf object. implicit none class(xdmf_obj), intent(inout) :: this !! XDMF object character(len=*), intent(in) :: name !! Field name in the HDF5 dataset character(len=*), intent(in) :: type !! Type is 'Float' or 'Int" character(len=*), intent(in) :: precision !! 8 or 4 depending on type and working precision character(len=*), intent(in) :: path !! Path to the HDF5 dataset character(len=str8) :: tmp(3) call this%Resize(this%fields_count + 1) associate (last => this%fields_count) this%fields(last)%name = trim(adjustl(name)) this%fields(last)%type = trim(adjustl(type)) this%fields(last)%precision = trim(adjustl(precision)) this%fields(last)%format = 'HDF' this%fields(last)%path = trim(adjustl(path))//':/'//trim(adjustl(name)) write(tmp(1), fmt='(i8)') this%grid%dims(1) write(tmp(2), fmt='(i8)') this%grid%dims(2) write(tmp(3), fmt='(i8)') this%grid%dims(3) this%fields(last)%dimensions = trim(adjustl(tmp(1)))//' '//trim(adjustl(tmp(2)))//' '//trim(adjustl(tmp(3))) end associate return end subroutine xdmf_obj_AddField