tem_load_stlHead_single Subroutine

private subroutine tem_load_stlHead_single(me, conf, thandle)

This routine load stl_files table from configuration file Need to look for: * filename (mandatory) * fileformat (default binary)

Arguments

Type IntentOptional Attributes Name
type(tem_stlHead_type), intent(inout) :: me

contain stl files information from config file

type(flu_State) :: conf
integer, intent(in) :: thandle

Calls

proc~~tem_load_stlhead_single~~CallsGraph proc~tem_load_stlhead_single tem_load_stlHead_single aot_get_val aot_get_val proc~tem_load_stlhead_single->aot_get_val proc~tem_abort tem_abort proc~tem_load_stlhead_single->proc~tem_abort mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~tem_load_stlhead_single~~CalledByGraph proc~tem_load_stlhead_single tem_load_stlHead_single proc~tem_load_stlhead tem_load_stlHead proc~tem_load_stlhead->proc~tem_load_stlhead_single proc~tem_load_stl tem_load_stl proc~tem_load_stl->proc~tem_load_stlhead proc~tem_load_shape_single tem_load_shape_single proc~tem_load_shape_single->proc~tem_load_stl interface~tem_load_shape tem_load_shape interface~tem_load_shape->proc~tem_load_shape_single proc~tem_load_shapes tem_load_shapes proc~tem_load_shapes->proc~tem_load_shape_single

Source Code

  subroutine tem_load_stlHead_single( me, conf, thandle )
    ! --------------------------------------------------------------------------!
    !> contain stl files information from config file
    type(tem_stlHead_type), intent(inout) :: me
    type(flu_State) :: conf !< lua state
    integer, intent(in) :: thandle !< stl object handle
    ! --------------------------------------------------------------------------!
    integer :: iError
    character(len=6) :: formString
    ! --------------------------------------------------------------------------!

    me%fileformat = stl_bin

    call aot_get_val(L=conf, thandle=thandle, &
      &              val=me%filename, ErrCode=iError, &
      &              key='filename', pos=1)
    if (btest(iError, aoterr_Fatal)) then
      write(logunit(0),*) 'FATAL Error occured, while retrieving filename:'
      if (btest(iError, aoterr_NonExistent)) &
        &  write(logunit(0),*) 'Variable not existent!'
      if (btest(iError, aoterr_WrongType)) &
        &  write(logunit(0),*) 'Variable has wrong type!'
      call tem_abort()
    end if

    call aot_get_val(L=conf, thandle=thandle, &
      &              val=formString, ErrCode=iError, &
      &              key='format', pos=3, default='binary')
    if (btest(iError, aoterr_Fatal)) then
      write(logunit(0),*) 'FATAL Error occured, while retrieving fileformat:'
      if (btest(iError, aoterr_NonExistent)) &
        &  write(logunit(0),*) 'Variable not existent!'
      if (btest(iError, aoterr_WrongType)) &
        &  write(logunit(0),*) 'Variable has wrong type!'
      call tem_abort()
    else
      if (btest(iError, aoterr_NonExistent)) &
        & write(logunit(5),*) 'Variable fileformat not set in configuration, ' &
        &                     // 'using default value!'
    end if
    if (formString(1:1) == 'a') me%fileformat = stl_ascii


    select case(me%fileformat)
      case(stl_bin)
        formstring = 'binary'
      case(stl_ascii)
        formstring = 'ascii'
    end select

    write(logunit(1),"(A)") '       STL file: '//trim(me%filename)
    write(logunit(1),"(A)") '         format: '//trim(formstring)

  end subroutine tem_load_stlHead_single