Loading bc labels from the config file, save those labels for further use.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=labelLen), | allocatable | :: | bcLabels(:) |
bc labels |
||
type(flu_State) | :: | conf |
lua config handle |
|||
integer, | intent(in) | :: | thandle |
table handle from which to read |
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 end do end if ! nBCLabels == 0 call aot_table_close( L = conf, thandle = bcLabel_handle ) end subroutine tem_shape_load_bcLabels