tem_spacetime_vector_for_treeIDs Function

private function tem_spacetime_vector_for_treeIDs(me, treeIDs, time, tree, n, ncomp) result(res)

This function compute space time function that give bach a table of results for given list of treeIDs

Todo

pass subtree with treeIDs lists instead of treeIds and tree

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

integer(kind=long_k), intent(in) :: treeIDs(n)

TreeIDs where to evaluate the function

type(tem_time_type), intent(in) :: time

timer object incl. the current time information

type(treelmesh_type), intent(in) :: tree

Global treelmesh to look for positions in

integer, intent(in) :: n

Number of tables to return

integer, intent(in) :: ncomp

Number of values in a Table

Return Value real(kind=rk), (n,ncomp)

return value of the function


Calls

proc~~tem_spacetime_vector_for_treeids~~CallsGraph proc~tem_spacetime_vector_for_treeids tem_spacetime_vector_for_treeIDs interface~tem_spacetime_lua_for tem_spacetime_lua_for proc~tem_spacetime_vector_for_treeids->interface~tem_spacetime_lua_for interface~tem_spatial_for tem_spatial_for proc~tem_spacetime_vector_for_treeids->interface~tem_spatial_for proc~tem_abort tem_abort proc~tem_spacetime_vector_for_treeids->proc~tem_abort proc~tem_temporal_for tem_temporal_for proc~tem_spacetime_vector_for_treeids->proc~tem_temporal_for proc~tem_spacetime_lua_for_coord tem_spacetime_lua_for_coord interface~tem_spacetime_lua_for->proc~tem_spacetime_lua_for_coord proc~tem_spacetime_lua_for_treeids tem_spacetime_lua_for_treeIds interface~tem_spacetime_lua_for->proc~tem_spacetime_lua_for_treeids proc~tem_spacetime_lua_vector_for_coord tem_spacetime_lua_vector_for_coord interface~tem_spacetime_lua_for->proc~tem_spacetime_lua_vector_for_coord proc~tem_spacetime_lua_vector_for_treeids tem_spacetime_lua_vector_for_treeIds interface~tem_spacetime_lua_for->proc~tem_spacetime_lua_vector_for_treeids proc~tem_spatial_for_coord tem_spatial_for_coord interface~tem_spatial_for->proc~tem_spatial_for_coord proc~tem_spatial_for_treeids tem_spatial_for_treeIDs interface~tem_spatial_for->proc~tem_spatial_for_treeids proc~tem_spatial_scalar_for_index tem_spatial_scalar_for_index interface~tem_spatial_for->proc~tem_spatial_scalar_for_index proc~tem_spatial_vector_for_coord tem_spatial_vector_for_coord interface~tem_spatial_for->proc~tem_spatial_vector_for_coord proc~tem_spatial_vector_for_index tem_spatial_vector_for_index interface~tem_spatial_for->proc~tem_spatial_vector_for_index proc~tem_spatial_vector_for_treeids tem_spatial_vector_for_treeIDs interface~tem_spatial_for->proc~tem_spatial_vector_for_treeids mpi_abort mpi_abort proc~tem_abort->mpi_abort proc~tem_temporal_for->proc~tem_abort proc~temporal_from_file_periodic_for temporal_from_file_periodic_for proc~tem_temporal_for->proc~temporal_from_file_periodic_for proc~temporal_linear_for temporal_linear_for proc~tem_temporal_for->proc~temporal_linear_for proc~temporal_lua_for temporal_lua_for proc~tem_temporal_for->proc~temporal_lua_for proc~temporal_smooth_for temporal_smooth_for proc~tem_temporal_for->proc~temporal_smooth_for

Called by

proc~~tem_spacetime_vector_for_treeids~~CalledByGraph proc~tem_spacetime_vector_for_treeids tem_spacetime_vector_for_treeIDs interface~tem_spacetime_for tem_spacetime_for interface~tem_spacetime_for->proc~tem_spacetime_vector_for_treeids proc~evaluate_add_spacetime_scalarbycoordinate evaluate_add_spacetime_scalarByCoordinate proc~evaluate_add_spacetime_scalarbycoordinate->interface~tem_spacetime_for proc~evaluate_add_spacetime_scalarbytreeid evaluate_add_spacetime_scalarByTreeID proc~evaluate_add_spacetime_scalarbytreeid->interface~tem_spacetime_for proc~evaluate_add_spacetime_vectorbycoordinate evaluate_add_spacetime_vectorByCoordinate proc~evaluate_add_spacetime_vectorbycoordinate->interface~tem_spacetime_for proc~evaluate_add_spacetime_vectorbytreeid evaluate_add_spacetime_vectorByTreeID proc~evaluate_add_spacetime_vectorbytreeid->interface~tem_spacetime_for proc~evaluate_first_spacetime_scalarbycoordinate evaluate_first_spacetime_scalarByCoordinate proc~evaluate_first_spacetime_scalarbycoordinate->interface~tem_spacetime_for proc~evaluate_first_spacetime_scalarbytreeid evaluate_first_spacetime_scalarByTreeID proc~evaluate_first_spacetime_scalarbytreeid->interface~tem_spacetime_for proc~evaluate_first_spacetime_vectorbycoordinate evaluate_first_spacetime_vectorByCoordinate proc~evaluate_first_spacetime_vectorbycoordinate->interface~tem_spacetime_for proc~evaluate_first_spacetime_vectorbytreeid evaluate_first_spacetime_vectorByTreeID proc~evaluate_first_spacetime_vectorbytreeid->interface~tem_spacetime_for proc~evaluate_foag_spacetime_scalarbycoordinate evaluate_FOAG_spacetime_scalarByCoordinate proc~evaluate_foag_spacetime_scalarbycoordinate->interface~tem_spacetime_for proc~evaluate_foag_spacetime_scalarbytreeid evaluate_FOAG_spacetime_scalarByTreeID proc~evaluate_foag_spacetime_scalarbytreeid->interface~tem_spacetime_for proc~evaluate_foag_spacetime_vectorbycoordinate evaluate_FOAG_spacetime_vectorByCoordinate proc~evaluate_foag_spacetime_vectorbycoordinate->interface~tem_spacetime_for proc~evaluate_foag_spacetime_vectorbytreeid evaluate_FOAG_spacetime_vectorByTreeID proc~evaluate_foag_spacetime_vectorbytreeid->interface~tem_spacetime_for proc~get_valofindex_add_scalar_spacetime get_valOfIndex_add_scalar_spacetime proc~get_valofindex_add_scalar_spacetime->interface~tem_spacetime_for proc~get_valofindex_add_vector_spacetime get_valOfIndex_add_vector_spacetime proc~get_valofindex_add_vector_spacetime->interface~tem_spacetime_for proc~get_valofindex_first_scalar_spacetime get_valOfIndex_first_scalar_spacetime proc~get_valofindex_first_scalar_spacetime->interface~tem_spacetime_for proc~get_valofindex_first_vector_spacetime get_valOfIndex_first_vector_spacetime proc~get_valofindex_first_vector_spacetime->interface~tem_spacetime_for proc~get_valofindex_foag_scalar_spacetime get_valOfIndex_FOAG_scalar_spacetime proc~get_valofindex_foag_scalar_spacetime->interface~tem_spacetime_for proc~get_valofindex_foag_vector_spacetime get_valOfIndex_FOAG_vector_spacetime proc~get_valofindex_foag_vector_spacetime->interface~tem_spacetime_for proc~tem_update_surfpos tem_update_surfPos proc~tem_update_surfpos->interface~tem_spacetime_for

Source Code

  function tem_spacetime_vector_for_treeIDs( me, treeIDs, time, &
    &                                        tree, n, ncomp) result(res)
    ! -------------------------------------------------------------------- !
    !> Spacetime function to evaluate
    type(tem_spacetime_fun_type) :: me
    !> Global treelmesh to look for positions in
    type(treelmesh_type), intent(in) ::tree
    !> Number of tables to return
    integer, intent(in) :: n
    !> Number of values in a Table
    integer, intent(in) :: ncomp
    !> TreeIDs where to evaluate the function
    integer(kind=long_k), intent(in) :: treeIDs(n)
    !> timer object incl. the current time information
    type(tem_time_type), intent(in)  :: time
    !> return value of the function
    real(kind=rk) :: res(n,ncomp)
    ! -------------------------------------------------------------------- !
    ! counter
    integer :: i
    ! -------------------------------------------------------------------- !


    select case(trim(adjustl(me%fun_kind)))
    case('none')
      res = 0.0_rk
    case('const')
      do i = 1, nComp
        res(:,i) = me%const(i)
      end do
    case('lua_fun')
      res = tem_spacetime_lua_for( fun_ref = me%lua_fun_ref, &
        &                          treeIDs = treeIDs,        &
        &                          time    = time,           &
        &                          tree    = tree,           &
        &                          n       = n,              &
        &                          nComp   = nComp,          &
        &                          conf    = me%conf         )
    case('combined')
      res = tem_spatial_for( me      = me%spatial,    &
        &                    treeIDs = treeIDs,       &
        &                    tree    = tree,          &
        &                    n       = n,             &
        &                    ncomp   = nComp     )    &
        & * tem_temporal_for( temporal = me%temporal, &
        &                     time     = time         )
    case default
      call tem_abort('ERROR: Unknown spatial function in' &
        & // 'tem_spacetime_vector_for_treeIDs.'          )
    end select
  end function tem_spacetime_vector_for_treeIDs