eulerian_set_WriteSILO Subroutine

private impure subroutine eulerian_set_WriteSILO(this, iter, time, list)

Write Eulerian data using SILO.

Type Bound

eulerian_set

Arguments

Type IntentOptional 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


Calls

proc~~eulerian_set_writesilo~~CallsGraph proc~eulerian_set_writesilo eulerian_set%eulerian_set_WriteSILO none~writesingle eulerian_set%WriteSingle proc~eulerian_set_writesilo->none~writesingle proc~eulerian_set_getindex eulerian_set%eulerian_set_GetIndex proc~eulerian_set_writesilo->proc~eulerian_set_getindex proc~silo_obj_final silo_obj%silo_obj_Final proc~eulerian_set_writesilo->proc~silo_obj_final proc~silo_obj_init silo_obj%silo_obj_Init proc~eulerian_set_writesilo->proc~silo_obj_init proc~silo_obj_newtimestep silo_obj%silo_obj_NewTimeStep proc~eulerian_set_writesilo->proc~silo_obj_newtimestep proc~silo_obj_writegrid silo_obj%silo_obj_WriteGrid proc~eulerian_set_writesilo->proc~silo_obj_writegrid proc~eulerian_set_writesingleh5hut eulerian_set%eulerian_set_WriteSingleH5HUT none~writesingle->proc~eulerian_set_writesingleh5hut proc~eulerian_set_writesinglehdf5 eulerian_set%eulerian_set_WriteSingleHDF5 none~writesingle->proc~eulerian_set_writesinglehdf5 proc~eulerian_set_writesinglesilo eulerian_set%eulerian_set_WriteSingleSILO none~writesingle->proc~eulerian_set_writesinglesilo none~get~3 hashtbl_obj%Get proc~eulerian_set_getindex->none~get~3 proc~hashtbl_obj_hashstring hashtbl_obj%hashtbl_obj_HashString proc~eulerian_set_getindex->proc~hashtbl_obj_hashstring dbclose dbclose proc~silo_obj_final->dbclose proc~parallel_obj_rankisroot parallel_obj%parallel_obj_RankIsRoot proc~silo_obj_final->proc~parallel_obj_rankisroot dbsetemptyok dbsetemptyok proc~silo_obj_init->dbsetemptyok proc~silo_obj_init->proc~parallel_obj_rankisroot proc~silo_obj_creategroups silo_obj%silo_obj_CreateGroups proc~silo_obj_init->proc~silo_obj_creategroups proc~stringtool_obj_removeextension stringtool_obj%stringtool_obj_RemoveExtension proc~silo_obj_init->proc~stringtool_obj_removeextension proc~sysutils_obj_createdirectory sysutils_obj%sysutils_obj_CreateDirectory proc~silo_obj_init->proc~sysutils_obj_createdirectory dbcreate dbcreate proc~silo_obj_newtimestep->dbcreate dbset2dstrlen dbset2dstrlen proc~silo_obj_newtimestep->dbset2dstrlen mpi_barrier mpi_barrier proc~silo_obj_newtimestep->mpi_barrier proc~silo_obj_newtimestep->proc~parallel_obj_rankisroot proc~silo_obj_setupgroupfiles silo_obj%silo_obj_SetupGroupFiles proc~silo_obj_newtimestep->proc~silo_obj_setupgroupfiles proc~silo_obj_newtimestep->proc~sysutils_obj_createdirectory dbaddiopt dbaddiopt proc~silo_obj_writegrid->dbaddiopt proc~silo_obj_writegrid->dbclose dbfreeoptlist dbfreeoptlist proc~silo_obj_writegrid->dbfreeoptlist dbmkoptlist dbmkoptlist proc~silo_obj_writegrid->dbmkoptlist dbopen dbopen proc~silo_obj_writegrid->dbopen dbputmmesh dbputmmesh proc~silo_obj_writegrid->dbputmmesh dbputqm dbputqm proc~silo_obj_writegrid->dbputqm dbsetdir dbsetdir proc~silo_obj_writegrid->dbsetdir proc~silo_obj_writegrid->mpi_barrier proc~silo_obj_writegrid->proc~parallel_obj_rankisroot proc~hashtbl_obj_get_int4 hashtbl_obj%hashtbl_obj_Get_int4 none~get~3->proc~hashtbl_obj_get_int4 proc~hashtbl_obj_get_int8 hashtbl_obj%hashtbl_obj_Get_int8 none~get~3->proc~hashtbl_obj_get_int8 proc~hashtbl_obj_get_real_dp hashtbl_obj%hashtbl_obj_Get_real_dp none~get~3->proc~hashtbl_obj_get_real_dp proc~hashtbl_obj_get_real_sp hashtbl_obj%hashtbl_obj_Get_real_sp none~get~3->proc~hashtbl_obj_get_real_sp cell cell proc~eulerian_set_writesingleh5hut->cell proc~h5hut_obj_writegrid h5hut_obj%h5hut_obj_WriteGrid proc~eulerian_set_writesingleh5hut->proc~h5hut_obj_writegrid proc~eulerian_set_writesinglehdf5->cell proc~eulerian_set_writesinglesilo->cell mpi_comm_rank mpi_comm_rank proc~silo_obj_creategroups->mpi_comm_rank mpi_comm_split mpi_comm_split proc~silo_obj_creategroups->mpi_comm_split proc~silo_obj_setupgroupfiles->dbclose proc~silo_obj_setupgroupfiles->dbcreate proc~silo_obj_setupgroupfiles->mpi_barrier dbmkdir dbmkdir proc~silo_obj_setupgroupfiles->dbmkdir mpi_comm_size mpi_comm_size proc~silo_obj_setupgroupfiles->mpi_comm_size none~writeattributes hdf5_obj%WriteAttributes proc~h5hut_obj_writegrid->none~writeattributes proc~hdf5_obj_creategroup hdf5_obj%hdf5_obj_CreateGroup proc~h5hut_obj_writegrid->proc~hdf5_obj_creategroup none~get~2 sllist_obj%Get proc~hashtbl_obj_get_int4->none~get~2 proc~hashtbl_obj_get_int8->none~get~2 proc~hashtbl_obj_get_real_dp->none~get~2 proc~hashtbl_obj_get_real_sp->none~get~2 proc~sllist_obj_get_int4 sllist_obj%sllist_obj_Get_int4 none~get~2->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8 sllist_obj%sllist_obj_Get_int8 none~get~2->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp sllist_obj%sllist_obj_Get_real_dp none~get~2->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp sllist_obj%sllist_obj_Get_real_sp none~get~2->proc~sllist_obj_get_real_sp proc~hdf5_obj_writeattributes0d hdf5_obj%hdf5_obj_WriteAttributes0D none~writeattributes->proc~hdf5_obj_writeattributes0d proc~hdf5_obj_writeattributes1d hdf5_obj%hdf5_obj_WriteAttributes1D none~writeattributes->proc~hdf5_obj_writeattributes1d proc~hdf5_obj_creategroup->proc~hashtbl_obj_hashstring h5gcreate_f h5gcreate_f proc~hdf5_obj_creategroup->h5gcreate_f proc~hashtbl_obj_put hashtbl_obj%hashtbl_obj_Put proc~hdf5_obj_creategroup->proc~hashtbl_obj_put proc~hdf5_obj_closegroup hdf5_obj%hdf5_obj_CloseGroup proc~hdf5_obj_creategroup->proc~hdf5_obj_closegroup proc~hdf5_obj_fixgroupname hdf5_obj%hdf5_obj_FixGroupName proc~hdf5_obj_creategroup->proc~hdf5_obj_fixgroupname proc~sllist_obj_put sllist_obj%sllist_obj_Put proc~hashtbl_obj_put->proc~sllist_obj_put proc~hdf5_obj_closegroup->proc~hashtbl_obj_hashstring proc~hdf5_obj_closegroup->proc~hdf5_obj_fixgroupname h5gclose_f h5gclose_f proc~hdf5_obj_closegroup->h5gclose_f proc~hashtbl_obj_remove hashtbl_obj%hashtbl_obj_Remove proc~hdf5_obj_closegroup->proc~hashtbl_obj_remove proc~hdf5_obj_getgroupobject hdf5_obj%hdf5_obj_GetGroupObject proc~hdf5_obj_closegroup->proc~hdf5_obj_getgroupobject proc~hdf5_obj_writeattributes0d->proc~hdf5_obj_closegroup h5aclose_f h5aclose_f proc~hdf5_obj_writeattributes0d->h5aclose_f h5acreate_f h5acreate_f proc~hdf5_obj_writeattributes0d->h5acreate_f h5awrite_f h5awrite_f proc~hdf5_obj_writeattributes0d->h5awrite_f h5sclose_f h5sclose_f proc~hdf5_obj_writeattributes0d->h5sclose_f h5screate_simple_f h5screate_simple_f proc~hdf5_obj_writeattributes0d->h5screate_simple_f proc~hdf5_obj_writeattributes0d->proc~hdf5_obj_getgroupobject proc~hdf5_obj_opengroup hdf5_obj%hdf5_obj_OpenGroup proc~hdf5_obj_writeattributes0d->proc~hdf5_obj_opengroup proc~hdf5_obj_writeattributes1d->proc~hdf5_obj_closegroup proc~hdf5_obj_writeattributes1d->h5aclose_f proc~hdf5_obj_writeattributes1d->h5acreate_f proc~hdf5_obj_writeattributes1d->h5awrite_f proc~hdf5_obj_writeattributes1d->h5sclose_f proc~hdf5_obj_writeattributes1d->h5screate_simple_f proc~hdf5_obj_writeattributes1d->proc~hdf5_obj_getgroupobject proc~hdf5_obj_writeattributes1d->proc~hdf5_obj_opengroup proc~sllist_obj_get_int4->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp->proc~sllist_obj_get_real_sp proc~sllist_obj_remove sllist_obj%sllist_obj_Remove proc~hashtbl_obj_remove->proc~sllist_obj_remove proc~hdf5_obj_getgroupobject->none~get~3 proc~hdf5_obj_getgroupobject->proc~hashtbl_obj_hashstring proc~hdf5_obj_getgroupobject->proc~hdf5_obj_fixgroupname proc~hdf5_obj_opengroup->proc~hashtbl_obj_hashstring proc~hdf5_obj_opengroup->proc~hashtbl_obj_put proc~hdf5_obj_opengroup->proc~hdf5_obj_fixgroupname proc~hdf5_obj_opengroup->proc~hdf5_obj_getgroupobject h5oopen_f h5oopen_f proc~hdf5_obj_opengroup->h5oopen_f proc~sllist_obj_put->proc~sllist_obj_put

Source Code

    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