tem_spacetime_for_stcoord Function

private function tem_spacetime_for_stcoord(me, stCoord, n) result(res)

This function computes the space time function for given list of space-time coordinates.

Todo

JZ: i added the subroutine for the space-time formulation. Below you see, that we create a tem_time_type variable in each loop. The code can be faster if we implement this routine in a nicer way.

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

real(kind=rk), intent(in) :: stCoord(n,4)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z,t coordinates

integer, intent(in) :: n

Number of values to return

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

return value of the function


Calls

proc~~tem_spacetime_for_stcoord~~CallsGraph proc~tem_spacetime_for_stcoord tem_spacetime_for_stcoord proc~tem_spacetime_for_coord tem_spacetime_for_coord proc~tem_spacetime_for_stcoord->proc~tem_spacetime_for_coord interface~tem_spacetime_lua_for tem_spacetime_lua_for proc~tem_spacetime_for_coord->interface~tem_spacetime_lua_for interface~tem_spatial_for tem_spatial_for proc~tem_spacetime_for_coord->interface~tem_spatial_for proc~tem_abort tem_abort proc~tem_spacetime_for_coord->proc~tem_abort proc~tem_eval_acoustic_pulse tem_eval_acoustic_pulse proc~tem_spacetime_for_coord->proc~tem_eval_acoustic_pulse proc~tem_eval_cylindricalwave tem_eval_cylindricalWave proc~tem_spacetime_for_coord->proc~tem_eval_cylindricalwave proc~tem_eval_miescatter_displz tem_eval_miescatter_displz proc~tem_spacetime_for_coord->proc~tem_eval_miescatter_displz proc~tem_eval_miescatter_magnx tem_eval_miescatter_magnx proc~tem_spacetime_for_coord->proc~tem_eval_miescatter_magnx proc~tem_eval_miescatter_magny tem_eval_miescatter_magny proc~tem_spacetime_for_coord->proc~tem_eval_miescatter_magny proc~tem_polygon_material_movement_multi tem_polygon_material_movement_multi proc~tem_spacetime_for_coord->proc~tem_polygon_material_movement_multi proc~tem_polygon_material_movement_single tem_polygon_material_movement_single proc~tem_spacetime_for_coord->proc~tem_polygon_material_movement_single proc~tem_temporal_for tem_temporal_for proc~tem_spacetime_for_coord->proc~tem_temporal_for

Called by

proc~~tem_spacetime_for_stcoord~~CalledByGraph proc~tem_spacetime_for_stcoord tem_spacetime_for_stcoord interface~tem_spacetime_for tem_spacetime_for interface~tem_spacetime_for->proc~tem_spacetime_for_stcoord 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_for_stcoord( me, stCoord, n  ) result(res)
    ! -------------------------------------------------------------------- !
    !> Spacetime function to evaluate
    type(tem_spacetime_fun_type) :: me
    !> Number of values to return
    integer, intent(in) :: n
    !> barycentric Ids of an elements.
    !! 1st index goes over number of elements and
    !! 2nd index goes over x,y,z,t coordinates
    real(kind=rk), intent(in) :: stCoord(n,4)
    !> return value of the function
    real(kind=rk) :: res(n)
    ! -------------------------------------------------------------------- !
    real(kind=rk) :: spaceCoord(1,3)
    integer :: iPoint
    type(tem_time_type) :: time
    ! -------------------------------------------------------------------- !

    !> @todo JZ: i added the subroutine for the space-time formulation.
    !! Below you see, that we create a tem_time_type variable in each loop.
    !! The code can be faster if we implement this routine in a nicer way.


    do iPoint = 1, n
      time%sim = stcoord(iPoint, 4)
      spaceCoord(1,1:3) = stcoord(iPoint, 1:3)
      res(iPoint:iPoint)                                                       &
        & = tem_spacetime_for_coord( me    = me,         &
        &                            coord = spaceCoord, &
        &                            time  = time,       &
        &                            n     = 1           )
    end do

  end function tem_spacetime_for_stcoord