Adds grid information to the xdmf object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(xdmf_obj), | intent(inout) | :: | this |
XDMF object |
||
| character(len=*), | intent(in) | :: | name |
Grid name |
||
| integer, | intent(in) | :: | dims(3) |
Grid size |
||
| character(len=*), | intent(in) | :: | path |
Path to block_obj containing grid data |
||
| character(len=*), | intent(in) | :: | x1name |
Name of x1 axis in block_obj |
||
| character(len=*), | intent(in) | :: | x2name |
Name of x2 axis in block_obj |
||
| character(len=*), | intent(in) | :: | x3name |
Name of x3 axis in block_obj |
pure subroutine xdmf_obj_AddGrid(this,name,dims,path,x1name,x2name,x3name) !> Adds grid information to the xdmf object. implicit none class(xdmf_obj), intent(inout) :: this !! XDMF object character(len=*), intent(in) :: name !! Grid name integer, intent(in) :: dims(3) !! Grid size character(len=*), intent(in) :: path !! Path to block_obj containing grid data character(len=*), intent(in) :: x1name !! Name of x1 axis in block_obj character(len=*), intent(in) :: x2name !! Name of x2 axis in block_obj character(len=*), intent(in) :: x3name !! Name of x3 axis in block_obj ! Work variables character(len=str8) :: tmp integer :: dir ! Store grid info this%grid%name = trim(adjustl(name)) this%grid%dims = dims this%grid%path = trim(adjustl(path)) ! Store axes names this%grid%axis(1)%name = trim(adjustl(x1name)) this%grid%axis(2)%name = trim(adjustl(x2name)) this%grid%axis(3)%name = trim(adjustl(x3name)) do dir=1,3 this%grid%axis(dir)%type = 'Float' write(tmp , fmt='(i8)') WP this%grid%axis(dir)%precision = trim(adjustl(tmp)) this%grid%axis(dir)%format = 'HDF' write(tmp , fmt='(i8)') this%grid%dims(dir)+1 this%grid%axis(dir)%dimensions = trim(adjustl(tmp)) this%grid%axis(dir)%path = this%grid%path//':/'//this%grid%axis(dir)%name end do this%grid%NumberOfElements=this%grid%axis(1)%dimensions//' '//this%grid%axis(2)%dimensions//' '//this%grid%axis(3)%dimensions return end subroutine xdmf_obj_AddGrid