tem_load_canonicalND_vec Subroutine

private subroutine tem_load_canonicalND_vec(me, transform, conf, thandle, reqSegments)

Loading canonicalNDs from the config file valid definitions:

Arguments

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

the array of canonical objects which to read in (and first allocate)

type(tem_transformation_type), intent(in) :: transform

transformation for spatial object

type(flu_State) :: conf

lua config handle

integer, intent(in) :: thandle

table handle from which to read

logical, intent(in), optional :: reqSegments

Is true if use_get_point is true in output table


Calls

proc~~tem_load_canonicalnd_vec~~CallsGraph proc~tem_load_canonicalnd_vec tem_load_canonicalND_vec aot_table_close aot_table_close proc~tem_load_canonicalnd_vec->aot_table_close aot_table_length aot_table_length proc~tem_load_canonicalnd_vec->aot_table_length aot_table_open aot_table_open proc~tem_load_canonicalnd_vec->aot_table_open proc~tem_abort tem_abort proc~tem_load_canonicalnd_vec->proc~tem_abort proc~tem_load_onecanonicalnd tem_load_oneCanonicalND proc~tem_load_canonicalnd_vec->proc~tem_load_onecanonicalnd mpi_abort mpi_abort proc~tem_abort->mpi_abort proc~tem_load_onecanonicalnd->aot_table_close proc~tem_load_onecanonicalnd->aot_table_length proc~tem_load_onecanonicalnd->aot_table_open proc~tem_load_onecanonicalnd->proc~tem_abort aot_get_val aot_get_val proc~tem_load_onecanonicalnd->aot_get_val interface~tem_tostr tem_toStr proc~tem_load_onecanonicalnd->interface~tem_tostr interface~tem_transformcanond tem_transformCanoND proc~tem_load_onecanonicalnd->interface~tem_transformcanond proc~tem_createbox tem_createBox proc~tem_load_onecanonicalnd->proc~tem_createbox proc~tem_createplane tem_createPlane proc~tem_load_onecanonicalnd->proc~tem_createplane proc~upper_to_lower upper_to_lower proc~tem_load_onecanonicalnd->proc~upper_to_lower proc~tem_b2str tem_b2str interface~tem_tostr->proc~tem_b2str proc~tem_b2str_arr tem_b2str_arr interface~tem_tostr->proc~tem_b2str_arr proc~tem_d2str tem_d2str interface~tem_tostr->proc~tem_d2str proc~tem_d2str_arr tem_d2str_arr interface~tem_tostr->proc~tem_d2str_arr proc~tem_i2str tem_i2str interface~tem_tostr->proc~tem_i2str proc~tem_i2str_arr tem_i2str_arr interface~tem_tostr->proc~tem_i2str_arr proc~tem_l2str tem_l2str interface~tem_tostr->proc~tem_l2str proc~tem_l2str_arr tem_l2str_arr interface~tem_tostr->proc~tem_l2str_arr proc~tem_r2str tem_r2str interface~tem_tostr->proc~tem_r2str proc~tem_r2str_arr tem_r2str_arr interface~tem_tostr->proc~tem_r2str_arr proc~transformcanond transformCanoND interface~tem_transformcanond->proc~transformcanond proc~transformcanond_single transformCanoND_single interface~tem_transformcanond->proc~transformcanond_single proc~tem_createbox->proc~tem_createplane proc~cross_product3d cross_product3D proc~tem_createplane->proc~cross_product3d proc~transformcanond->proc~transformcanond_single

Called by

proc~~tem_load_canonicalnd_vec~~CalledByGraph proc~tem_load_canonicalnd_vec tem_load_canonicalND_vec interface~tem_load_canonicalnd tem_load_canonicalND interface~tem_load_canonicalnd->proc~tem_load_canonicalnd_vec proc~tem_load_shape_single tem_load_shape_single proc~tem_load_shape_single->interface~tem_load_canonicalnd interface~tem_load_shape tem_load_shape 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~tem_load_shapes->proc~tem_load_shape_single proc~load_spatial_parabol load_spatial_parabol proc~load_spatial_parabol->interface~tem_load_shape proc~tem_load_convergenceheader tem_load_convergenceHeader proc~tem_load_convergenceheader->interface~tem_load_shape proc~tem_load_spacetime_single tem_load_spacetime_single proc~tem_load_spacetime_single->interface~tem_load_shape proc~tem_load_trackingconfig tem_load_trackingConfig proc~tem_load_trackingconfig->interface~tem_load_shape

Source Code

  subroutine tem_load_canonicalND_vec(me, transform, conf, thandle, reqSegments)
    ! --------------------------------------------------------------------------
    !> the array of canonical objects which to read in (and first allocate)
    type(tem_canonicalND_type), allocatable, intent(out) :: me(:)
    !> transformation for spatial object
    type(tem_transformation_type), intent(in) :: transform
    !> lua config handle
    type(flu_state) :: conf
    !> table handle from which to read
    integer, intent(in) :: thandle
    !> Is true if use_get_point is true in output table
    logical, optional, intent(in) :: reqSegments
    ! --------------------------------------------------------------------------
    ! lua handles
    integer :: canonicalNDs_thandle, single_thandle
    integer :: canonicalND_entries
    integer :: iCan
    integer :: ncanonicalNDs
    ! --------------------------------------------------------------------------

    write(logUnit(5),*) 'Trying to read canoND shape...'


    call aot_table_open( L       = conf,                                       &
      &                  parent  = thandle,                                    &
      &                  thandle = canonicalNDs_thandle,                       &
      &                  key     = 'object' )
    canonicalND_entries = aot_table_length( L       = conf,                    &
      &                                     thandle = canonicalNDs_thandle )

    if (canonicalNDs_thandle == 0) then
      write(logUnit(1),*) 'Error: object table is not defined for canoND'
      call tem_abort()
    end if

    ! Now check, if the first entry is a table itself:
    call aot_table_open( L       = conf,                                       &
      &                  parent  = canonicalNDs_thandle,                       &
      &                  thandle = single_thandle,                             &
      &                  pos     = 1 )

    if (single_thandle == 0) then
      ! The entries are not tables themselves, try to interpret it as
      ! single canonical object.
      call aot_table_close( L = conf, thandle = single_thandle )
      ncanonicalNDs = 1
      allocate(me( ncanonicalNDs ))
      call tem_load_oneCanonicalND( me          = me(1),                &
        &                           conf        = conf,                 &
        &                           transform   = transform,            &
        &                           thandle     = canonicalNDs_thandle, &
        &                           reqSegments = reqSegments           )
    else
      ! First entry is a table, assume all others are also tables,
      ! and properly define canonicalNDs coordinates, go on reading them.
      call aot_table_close( L = conf, thandle = single_thandle )
      ncanonicalNDs = canonicalND_entries
      allocate( me( ncanonicalNDs ))
      do iCan=1, ncanonicalNDs
        write(logUnit(5),"(A,I0,A)") 'Read Object: ', iCan, ' with '
        call aot_table_open( L       = conf,                                   &
          &                  parent  = canonicalNDs_thandle,                   &
          &                  thandle = single_thandle,                         &
          &                  pos     = iCan )
        call tem_load_oneCanonicalND( me          = me( iCan ),     &
          &                           conf        = conf,           &
          &                           transform   = transform,      &
          &                           thandle     = single_thandle, &
          &                           reqSegments = reqSegments     )
        call aot_table_close( L = conf, thandle = single_thandle )
      end do
    end if

    call aot_table_close( L = conf, thandle = canonicalNDs_thandle )

  end subroutine tem_load_canonicalND_vec