tem_load_trackingConfig Subroutine

private subroutine tem_load_trackingConfig(config, conf, sub_handle)

Read the tracker variables from tracking subtables defined in configuration from the main lua file

If tracking is just a single table with single tracking entry then load only one tracking log exists with one or more variables using tem_load_trackingHeader_single. Else if tracking is table of many log then allocate log and load each log type using tem_load_trackingHeader_single Setup the values for the tracking entities

Arguments

Type IntentOptional Attributes Name
type(tem_tracking_config_type), intent(out) :: config

list of the tracking entities to create

type(flu_State) :: conf

handle of the lua config file

integer, intent(in) :: sub_handle

table sub-handle for the tracking table


Calls

proc~~tem_load_trackingconfig~~CallsGraph proc~tem_load_trackingconfig tem_load_trackingConfig aot_get_val aot_get_val proc~tem_load_trackingconfig->aot_get_val interface~tem_load_shape tem_load_shape proc~tem_load_trackingconfig->interface~tem_load_shape proc~hvs_output_load hvs_output_load proc~tem_load_trackingconfig->proc~hvs_output_load proc~tem_abort tem_abort proc~tem_load_trackingconfig->proc~tem_abort proc~tem_load_reduction_spatial tem_load_reduction_spatial proc~tem_load_trackingconfig->proc~tem_load_reduction_spatial proc~tem_timecontrol_dump tem_timeControl_dump proc~tem_load_trackingconfig->proc~tem_timecontrol_dump proc~tem_timecontrol_load tem_timeControl_load proc~tem_load_trackingconfig->proc~tem_timecontrol_load proc~tem_load_shape_single tem_load_shape_single interface~tem_load_shape->proc~tem_load_shape_single proc~tem_load_shapes tem_load_shapes interface~tem_load_shape->proc~tem_load_shapes proc~hvs_output_load->aot_get_val proc~hvs_output_load->proc~tem_abort aot_table_close aot_table_close proc~hvs_output_load->aot_table_close aot_table_open aot_table_open proc~hvs_output_load->aot_table_open proc~hvs_vtk_config_load hvs_vtk_config_load proc~hvs_output_load->proc~hvs_vtk_config_load proc~upper_to_lower upper_to_lower proc~hvs_output_load->proc~upper_to_lower mpi_abort mpi_abort proc~tem_abort->mpi_abort proc~tem_load_reduction_spatial->aot_table_close aot_table_length aot_table_length proc~tem_load_reduction_spatial->aot_table_length proc~tem_load_reduction_spatial->aot_table_open proc~tem_load_reduction_single tem_load_reduction_single proc~tem_load_reduction_spatial->proc~tem_load_reduction_single proc~tem_time_dump tem_time_dump proc~tem_timecontrol_dump->proc~tem_time_dump 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

Called by

proc~~tem_load_trackingconfig~~CalledByGraph proc~tem_load_trackingconfig tem_load_trackingConfig proc~tem_load_tracking tem_load_tracking proc~tem_load_tracking->proc~tem_load_trackingconfig

Source Code

  subroutine tem_load_trackingConfig(config, conf, sub_handle)
    ! -------------------------------------------------------------------- !
    !> list of the tracking entities to create
    type( tem_tracking_config_type ), intent(out) :: config
    !> handle of the lua config file
    type( flu_state ) :: conf
    !> table sub-handle for the tracking table
    integer, intent(in) :: sub_handle
    ! -------------------------------------------------------------------- !
    integer :: iError            ! error flag handle
    integer, allocatable :: vError(:)
    !> number of requested variables
    integer :: nRequestedVars
    ! -------------------------------------------------------------------- !

    call aot_get_val( L       = conf,           &
      &               thandle = sub_handle,     &
      &               val     = config%label,   &
      &               ErrCode = iError,         &
      &               key     = 'label',        &
      &               default = 'unnamed_track' )

    write(logUnit(1),*) 'Tracking label: '//trim( config%label )

    call aot_get_val( val       = config%varName, &
      &               ErrCode   = vError,         &
      &               maxLength = 100,            &
      &               L         = conf,           &
      &               thandle   = sub_handle,     &
      &               key       = 'variable'      )

    if ( any(btest(vError, aoterr_Fatal)) ) then
      write(logUnit(1),*) 'FATAL Error occured, while retrieving'
      write(logUnit(1),*) 'list of variables to track in '//trim(config%label)
      call tem_abort()
    end if

    nRequestedVars = size(config%varName)

    ! load time control to output tracking
    call tem_timeControl_load( conf   = conf,              &
      &                        parent = sub_handle,        &
      &                        me     = config%timeControl )
    call tem_timeControl_dump(config%timeControl, logUnit(2))

    ! Where to store the tracking file?
    call aot_get_val( L       = conf,          &
      &               thandle = sub_handle,    &
      &               val     = config%prefix, &
      &               ErrCode = iError,        &
      &               key     = 'folder',      &
      &               default = ''             )

    ! Load SPATIAL reductions
    call tem_load_reduction_spatial(                                   &
      &                   conf              = conf,                    &
      &                   parent            = sub_handle,              &
      &                   redSpatial_config = config%redSpatial_config )

    if( config%redSpatial_config%active ) then
      ! Check if the number of reductions correspond to the number of variables
      ! in the system
      if( size( config%redSpatial_config%reduceType ) /= nRequestedVars ) then
        write(logUnit(1),*) 'The number of defined reductions does not ' &
          &                 //'correspond to the '
        write(logUnit(1),*)'number of variables in the system. '
        call tem_abort()
      end if
    end if

    ! Load output table for vis_kind
    call hvs_output_load( me       = config%output_config,           &
      &                   conf     = conf,                           &
      &                   parent   = sub_handle,                     &
      &                   isReduce = config%redSpatial_config%active )

    ! load tracking object shapes like point, line, plane
    call tem_load_shape( conf        = conf,                            &
      &                  parent      = sub_handle,                      &
      &                  me          = config%geometry,                 &
      &                  reqSegments = config%output_config%useGetPoint )

    if( size( config%geometry) < 1) then
      write(logUnit(1),*)'The geometrical objects for the tracker are not '//  &
        &                'defined correctly.'
      call tem_abort()
    end if

  end subroutine tem_load_trackingConfig