tem_load_ellipsoid Subroutine

public subroutine tem_load_ellipsoid(me, transform, conf, thandle)

Load ellipsoid information from config file.

Arguments

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

array of ellipsoids

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

transformation for spatial object

type(flu_State) :: conf

lua state

integer, intent(in) :: thandle

Calls

proc~~tem_load_ellipsoid~~CallsGraph proc~tem_load_ellipsoid tem_load_ellipsoid proc~aot_table_open aot_table_open proc~tem_load_ellipsoid->proc~aot_table_open proc~aot_table_close aot_table_close proc~tem_load_ellipsoid->proc~aot_table_close proc~tem_load_ellipsoid_single tem_load_ellipsoid_single proc~tem_load_ellipsoid->proc~tem_load_ellipsoid_single proc~aot_table_length aot_table_length proc~tem_load_ellipsoid->proc~aot_table_length proc~aot_get_val~2 aot_get_val proc~tem_load_ellipsoid_single->proc~aot_get_val~2 proc~tem_abort tem_abort proc~tem_load_ellipsoid_single->proc~tem_abort mpi_abort mpi_abort proc~tem_abort->mpi_abort

Contents

Source Code


Source Code

  subroutine tem_load_ellipsoid(me, transform, conf, thandle)
    ! --------------------------------------------------------------------------!
    !inferface variables
    !> array of ellipsoids
    type(tem_ellipsoid_type), allocatable, intent(out) :: me(:)
    !> transformation for spatial object
    type(tem_transformation_type), intent(in) :: transform
    !> lua state
    type(flu_state) :: conf
    integer, intent(in) :: thandle !< handle for canonical objects
    ! --------------------------------------------------------------------------!
    ! local varaibles
    integer :: sph_handle, sph_subHandle
    integer :: iObj, nObjects
    ! --------------------------------------------------------------------------!

    write(logunit(1),*) 'Loading ellipsoid: '

    call aot_table_open(L = conf, parent = thandle, thandle = sph_handle, &
      &                 key = 'object')
    call aot_table_open(L=conf, parent = sph_handle, thandle = sph_subHandle, &
      & pos = 1 )

    if ( sph_subHandle .eq. 0) then
      !object is a single table
      allocate(me(1))
      call aot_table_close(L=conf, thandle=sph_subHandle)
      call tem_load_ellipsoid_single( me(1), transform, conf, sph_handle )
    else
      !object is a multiple table
      call aot_table_close(L=conf, thandle=sph_subHandle)
      nObjects = aot_table_length(L=conf, thandle=sph_handle)
      allocate(me(nObjects))
      do iObj=1,nObjects
        call aot_table_open(L=conf, parent=sph_handle, thandle=sph_suBHandle,&
          & pos=iObj)
        call tem_load_ellipsoid_single( me(iObj), transform, conf, &
          &                             sph_Subhandle )
        call aot_table_close(L=conf, thandle=sph_subHandle)
      end do
    end if

    call aot_table_close(L=conf, thandle=sph_Handle)


  end subroutine tem_load_ellipsoid