hvs_vtk_config_load Subroutine

public subroutine hvs_vtk_config_load(me, conf, thandle)

Read the VTK output configuration from a Lua script.

Arguments

Type IntentOptional Attributes Name
type(hvs_vtk_config_type), intent(out) :: me

The VTK configuration settings to fill.

type(flu_State) :: conf

Handle of the Lua script to load the configuration from.

integer, intent(in) :: thandle

Table handle to the table providing the VTK settings.


Calls

proc~~hvs_vtk_config_load~2~~CallsGraph proc~hvs_vtk_config_load~2 hvs_vtk_config_load proc~aot_get_val~2 aot_get_val proc~hvs_vtk_config_load~2->proc~aot_get_val~2 proc~tem_abort tem_abort proc~hvs_vtk_config_load~2->proc~tem_abort proc~upper_to_lower upper_to_lower proc~hvs_vtk_config_load~2->proc~upper_to_lower mpi_abort mpi_abort proc~tem_abort->mpi_abort

Contents

Source Code


Source Code

  subroutine hvs_vtk_config_load(me, conf, thandle)
    !> The VTK configuration settings to fill.
    type(hvs_vtk_config_type), intent(out) :: me

    !> Handle of the Lua script to load the configuration from.
    type(flu_state) :: conf

    !> Table handle to the table providing the VTK settings.
    integer, intent(in) :: thandle
    ! ----------------------------------------------------------------------!
    character(len=labelLen) :: dformat
    integer :: iError
    ! ----------------------------------------------------------------------!

    call aot_get_val( L       = conf,       &
      &               thandle = thandle,    &
      &               key     = 'dataform', &
      &               val     = dformat,    &
      &               default = 'binary',   &
      &               ErrCode = iError      )

    dformat = adjustl(dformat)
    dformat = upper_to_lower(dformat)
    select case(trim(dformat))
    case('ascii','binary')
      me%dataform = trim(dformat)
    case default
      write(logunit(0),*) 'ERROR in hvs_vtk_config_load: ' &
        &                 // 'unknown data format '        &
        &                 // trim(dformat)
      write(logunit(0),*) 'dataform has to be one of:'
      write(logunit(0),*) '* ascii'
      write(logunit(0),*) '* binary'
      write(logunit(0),*)
      call tem_abort()
    end select

    call aot_get_val( L       = conf,             &
      &               thandle = thandle,          &
      &               key     = 'iter_filename',  &
      &               val     = me%iter_filename, &
      &               default = .false.,          &
      &               ErrCode = iError            )

    call aot_get_val( L       = conf,         &
      &               thandle = thandle,      &
      &               key     = 'write_pvd',  &
      &               val     = me%write_pvd, &
      &               default = .true.,       &
      &               ErrCode = iError        )

  end subroutine hvs_vtk_config_load