tem_load_output Subroutine

public subroutine tem_load_output(me, conf, key, parent, default_active)

Read in the output table to output VTK file from the Lua parameter file

Arguments

Type IntentOptional Attributes Name
type(tem_output_type), intent(inout) :: me
type(flu_State) :: conf
character(len=*), intent(in), optional :: key
integer, intent(in), optional :: parent
logical, intent(in), optional :: default_active

Calls

proc~~tem_load_output~~CallsGraph proc~tem_load_output tem_load_output aot_get_val aot_get_val proc~tem_load_output->aot_get_val aot_table_close aot_table_close proc~tem_load_output->aot_table_close aot_table_open aot_table_open proc~tem_load_output->aot_table_open proc~tem_horizontalspacer tem_horizontalSpacer proc~tem_load_output->proc~tem_horizontalspacer proc~tem_timecontrol_load tem_timeControl_load proc~tem_load_output->proc~tem_timecontrol_load proc~tem_timecontrol_load->aot_get_val proc~tem_timecontrol_load->aot_table_close proc~tem_timecontrol_load->aot_table_open proc~tem_time_default_zero tem_time_default_zero proc~tem_timecontrol_load->proc~tem_time_default_zero proc~tem_time_load tem_time_load proc~tem_timecontrol_load->proc~tem_time_load proc~tem_time_needs_reduce tem_time_needs_reduce proc~tem_timecontrol_load->proc~tem_time_needs_reduce proc~tem_time_never tem_time_never proc~tem_timecontrol_load->proc~tem_time_never proc~tem_time_load->aot_get_val proc~tem_time_load->aot_table_close proc~tem_time_load->aot_table_open mpi_wtime mpi_wtime proc~tem_time_load->mpi_wtime

Source Code

  subroutine tem_load_output( me, conf, key, parent, default_active )
    ! ---------------------------------------------------------------------------
    !>
    type(tem_output_type), intent(inout) :: me
    !>
    type(flu_state) :: conf
    !>
    integer, optional, intent(in) :: parent
    !>
    character(len=*), optional, intent(in) :: key
    !>
    logical, optional, intent(in) :: default_active
    ! ---------------------------------------------------------------------------
    logical  :: def_active
    character(len=32) :: localKey
    integer :: out_table
    integer :: iError
    ! ---------------------------------------------------------------------------

    if( present( default_active )) then
      def_active = default_active
    else
      def_active = .false.
    endif

    me%active = def_active
    ! if the restart is part of another table, like e.g. with the debugStates
    if( present( key )) then
      localKey = key
    else
      localKey = 'output'
    endif

    call aot_table_open( L       = conf,                                       &
      &                  thandle = out_table,                                  &
      &                  parent  = parent,                                     &
      &                  key     = trim(localKey) )

    ! Need to look for:
    ! * active (mandatory)
    ! * boundary_type (default 1)
    ! * fileformat (default binary)
    if (out_table .ne. 0) then
      write(logUnit(1),*)"Loading DEPRECATED output information"
      call aot_get_val( L       = conf,                                        &
        &               thandle = out_table,                                   &
        &               key     = 'active',                                    &
        &               val     = me%active,                                   &
        &               default = def_active,                                  &
        &               ErrCode = iError )
      ! load output parameters only when active=true
      write(logUnit(1),*)'output: ', me%active
      if( me%active ) then
        write(logUnit(1),*)"Output parameters "
        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'folder',                                  &
          &               val     = me%folder,                                 &
          &               default = 'output/',                                 &
          &               ErrCode = iError )
        write(logUnit(1),*)" where to store:       "//trim(me%folder)

        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'ascii',                                   &
          &               val     = me%format_ascii,                           &
          &               default = .false.,                                   &
          &               ErrCode = iError )
        write(logUnit(1),*)" ascii:                ", me%format_ascii
        if(me%format_ascii)then
          me%vtk_bin=.false.
        end if

        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'wss',                                     &
          &               val     = me%wss,                                    &
          &               default = .false.,                                   &
          &               ErrCode = iError )
        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'shearstress',                             &
          &               val     = me%shearstress,                            &
          &               default = .false.,                                   &
          &               ErrCode = iError )
        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'dumpGhosts',                              &
          &               val     = me%dumpGhosts,                             &
          &               default = .false.,                                   &
          &               ErrCode = iError )
        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'dumpHalos',                               &
          &               val     = me%dumpHalos,                              &
          &               default = .false.,                                   &
          &               ErrCode = iError )

        if(me%dumpHalos) me%dumpGhosts = .true.

        call aot_get_val( L       = conf,                                      &
          &               thandle = out_table,                                 &
          &               key     = 'vertex',                                  &
          &               val     = me%vertex,                                 &
          &               default = .false.,                                   &
          &               ErrCode = iError )
        ! load time control to output tracking
        call tem_timeControl_load( conf           = conf,                      &
          &                        parent         = out_table,                 &
          &                        me             = me%timeControl )
      endif
    endif
    call aot_table_close(L=conf, thandle=out_table)
    call tem_horizontalSpacer(fUnit=logUnit(1))

  end subroutine tem_load_output