tem_shape_load_bcLabels Subroutine

private subroutine tem_shape_load_bcLabels(bcLabels, conf, thandle)

Loading bc labels from the config file, save those labels for further use.

Arguments

Type IntentOptional AttributesName
character(len=labelLen), allocatable:: bcLabels(:)

bc labels

type(flu_state) :: conf

lua config handle

integer, intent(in) :: thandle

table handle from which to read


Calls

proc~~tem_shape_load_bclabels~~CallsGraph proc~tem_shape_load_bclabels tem_shape_load_bcLabels proc~aot_table_open aot_table_open proc~tem_shape_load_bclabels->proc~aot_table_open proc~aot_table_close aot_table_close proc~tem_shape_load_bclabels->proc~aot_table_close proc~aot_table_length aot_table_length proc~tem_shape_load_bclabels->proc~aot_table_length interface~aot_get_val aot_get_val proc~tem_shape_load_bclabels->interface~aot_get_val

Called by

proc~~tem_shape_load_bclabels~~CalledByGraph proc~tem_shape_load_bclabels tem_shape_load_bcLabels proc~tem_load_shape_single tem_load_shape_single proc~tem_load_shape_single->proc~tem_shape_load_bclabels proc~tem_load_shapes tem_load_shapes proc~tem_load_shapes->proc~tem_load_shape_single interface~tem_load_shape tem_load_shape interface~tem_load_shape->proc~tem_load_shape_single interface~tem_load_shape->proc~tem_load_shapes proc~tem_load_spacetime_single tem_load_spacetime_single proc~tem_load_spacetime_single->interface~tem_load_shape proc~tem_load_spacetime_single->proc~tem_load_spacetime_single proc~tem_load_convergenceheader tem_load_convergenceHeader proc~tem_load_convergenceheader->interface~tem_load_shape proc~tem_load_trackingconfig tem_load_trackingConfig proc~tem_load_trackingconfig->interface~tem_load_shape proc~load_spatial_parabol load_spatial_parabol proc~load_spatial_parabol->interface~tem_load_shape interface~tem_load_spacetime tem_load_spacetime interface~tem_load_spacetime->proc~tem_load_spacetime_single proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->proc~load_spatial_parabol proc~tem_load_tracking tem_load_tracking proc~tem_load_tracking->proc~tem_load_trackingconfig proc~tem_convergence_load tem_convergence_load proc~tem_convergence_load->proc~tem_load_convergenceheader proc~tem_load_spacetime_table tem_load_spacetime_table proc~tem_load_spacetime_table->proc~tem_load_spacetime_single

Contents


Source Code

  subroutine tem_shape_load_bcLabels( bcLabels, conf, thandle )
    !---------------------------------------------------------------------------
    !> bc labels
    character(len=labelLen), allocatable :: bcLabels(:)
    !> lua config handle
    type(flu_state) :: conf
    !> table handle from which to read
    integer, intent(in) :: thandle
    !---------------------------------------------------------------------------
    ! lua handles
    integer :: bcLabel_handle, nBCLabels
    character(len=labelLen) :: labelBuff
    integer :: iLabel, iErr
    !---------------------------------------------------------------------------

    call aot_table_open( L       = conf,            &
      &                  parent  = thandle,         &
      &                  thandle = bcLabel_handle,  &
      &                  key     = 'boundary' )

    ! get the number of property labels
    nBCLabels = aot_table_length( L = conf, thandle = bcLabel_handle )

    if ( nBCLabels == 0 ) then
      write(logUnit(3),*) ' Boundary label table is empty!'
      allocate( bcLabels(0) )
    else
      allocate( bcLabels( nBCLabels ) )

      do iLabel = 1, nBCLabels

        ! Now read in BC labels
        call aot_get_val( L       = conf,             &
          &               thandle = bcLabel_handle, &
          &               val     = labelBuff,        &
          &               ErrCode = iErr,             &
          &               pos     = iLabel )


        ! set propBits according to property labels
        if( iErr == 0 ) then
          write(logUnit(3),*) '  name of boundary label: '//trim(labelBuff)
          bcLabels( iLabel ) = trim(labelBuff)
        else
          write(logUnit(3),*) '  failed to read boundary label!'
          bcLabels( iLabel ) = ''
        end if

      enddo
    end if ! nBCLabels == 0

    call aot_table_close( L = conf, thandle = bcLabel_handle )

  end subroutine tem_shape_load_bcLabels