Write Eulerian data using SILO.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
impure subroutine eulerian_set_WriteSILO(this,iter,time,list) !> Write Eulerian data using SILO. implicit none class(eulerian_set), intent(inout):: this !! An Eulerian Set integer, intent(in) :: iter !! Iteration at write real(wp), intent(in) :: time !! Time at write character(str8), intent(in), & optional :: list(:) !! Names of fields to write ! Work variables type(silo_obj) :: silo integer :: n, ind ! Nothing to write, if empty if (.not.allocated(this%field)) return call silo%Initialize(trim(adjustl(this%write_file)),"W",this%parallel) ! Add new timestep call silo%NewTimeStep(time) ! Write grid associate (lo => this%block%lo, hi => this%block%hi) call silo%WriteGrid( "mesh_0", & this%block%x (lo(1):hi(1)+1), & this%block%y (lo(2):hi(2)+1), & this%block%z (lo(3):hi(3)+1), & iter,time) call silo%WriteGrid( "mesh_1", & this%block%xm(lo(1)-1:hi(1)), & this%block%y (lo(2):hi(2)+1), & this%block%z (lo(3):hi(3)+1), & iter,time) call silo%WriteGrid( "mesh_2", & this%block%x (lo(1):hi(1)+1), & this%block%ym(lo(2)-1:hi(2)), & this%block%z (lo(3):hi(3)+1), & iter,time) call silo%WriteGrid( "mesh_3", & this%block%x (lo(1):hi(1)+1), & this%block%y (lo(2):hi(2)+1), & this%block%zm(lo(3)-1:hi(3)), & iter,time) end associate ! Write grid attributes if (.not.present(list)) then ! Write all fields do n=1,size(this%field) call this%WriteSingle(silo,n) end do else do n=1,size(list) ! Get index of this Eulerian_obj ind = this%GetIndex(list(n)) if (ind.ge.1) call this%WriteSingle(silo,ind) end do end if call silo%Finalize() return end subroutine eulerian_set_WriteSILO