tem_shape_load_propLabel Subroutine

private subroutine tem_shape_load_propLabel(propBits, conf, thandle)

Loading property labels from the config file, set the property bits accordingly

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k) :: propBits

propBits

type(flu_State) :: conf

lua config handle

integer, intent(in) :: thandle

table handle from which to read


Source Code

  subroutine tem_shape_load_propLabel( propBits, conf, thandle )
    !---------------------------------------------------------------------------
    !> propBits
    integer( kind=long_k ) :: propBits
    !> lua config handle
    type(flu_state) :: conf
    !> table handle from which to read
    integer, intent(in) :: thandle
    !---------------------------------------------------------------------------
    ! lua handles
    integer :: propLabel_handle, nPropLabels
    character(len=labelLen) :: labelBuff
    integer :: iLabel, iErr
    !---------------------------------------------------------------------------

    call aot_table_open( L       = conf,                                       &
      &                  parent  = thandle,                                    &
      &                  thandle = propLabel_handle,                           &
      &                  key     = 'property' )
    ! get the number of property labels
    nPropLabels = aot_table_length( L = conf, thandle = propLabel_handle )

    do iLabel = 1, nPropLabels

      ! Now read in property labels
      call aot_get_val( L       = conf,                                        &
        &               thandle = propLabel_handle,                            &
        &               val     = labelBuff,                                   &
        &               ErrCode = iErr,                                        &
        &               pos     = iLabel )
      write(logUnit(1),*) '  name of property label: '//labelBuff
      ! set propBits according to property labels
      if( iErr == 0 ) then
        select case( trim(labelBuff) )
        case( 'boundary' )
          propBits = ibset( propBits, prp_hasBnd )
        case( 'solidified' )
          propBits = ibset( propBits, prp_fluidify )
        case default
          write(logUnit(1),*) '  Unknown property label in a shape specified! '&
            &             //trim(labelBuff)
          write(logUnit(1),*) '  Ignored it. '
        endselect
      endif
    enddo

    call aot_table_close( L = conf, thandle = propLabel_handle )

  end subroutine tem_shape_load_propLabel