tem_eval_cylindricalWave Function

public function tem_eval_cylindricalWave(me, coord, time, n) result(res)

Calculate the function values for the cylindrical wave.

Arguments

Type IntentOptional Attributes Name
type(tem_cylindricalWave_type) :: me

Spacetime function to evaluate

real(kind=rk), intent(in) :: coord(n,3)

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

real(kind=rk), intent(in) :: time

The current physical time

integer, intent(in) :: n

Number of arrays to return

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

return value


Calls

proc~~tem_eval_cylindricalwave~~CallsGraph proc~tem_eval_cylindricalwave tem_eval_cylindricalWave proc~cart2polar cart2polar proc~tem_eval_cylindricalwave->proc~cart2polar

Called by

proc~~tem_eval_cylindricalwave~~CalledByGraph proc~tem_eval_cylindricalwave tem_eval_cylindricalWave proc~tem_spatial_for_coord tem_spatial_for_coord proc~tem_spatial_for_coord->proc~tem_eval_cylindricalwave proc~tem_spacetime_for_coord tem_spacetime_for_coord proc~tem_spacetime_for_coord->proc~tem_eval_cylindricalwave proc~tem_spatial_scalar_for_index tem_spatial_scalar_for_index proc~tem_spatial_scalar_for_index->proc~tem_spatial_for_coord proc~tem_spacetime_for_stcoord tem_spacetime_for_stcoord proc~tem_spacetime_for_stcoord->proc~tem_spacetime_for_coord interface~tem_spatial_for tem_spatial_for interface~tem_spatial_for->proc~tem_spatial_for_coord interface~tem_spacetime_for tem_spacetime_for interface~tem_spacetime_for->proc~tem_spacetime_for_coord proc~tem_spacetime_scalar_for_index tem_spacetime_scalar_for_index proc~tem_spacetime_scalar_for_index->proc~tem_spacetime_for_coord

Contents


Source Code

  function tem_eval_cylindricalWave(me, coord, time, n) result(res)
    !> Spacetime function to evaluate
    type(tem_cylindricalWave_type) :: me
    !> Number of arrays 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 coordinates
    real(kind=rk), intent( in ) :: coord(n,3)
    !> The current physical time
    real(kind=rk), intent( in )  :: time
    !> return value
    real(kind=rk) :: res(n)
    ! ---------------------------------------------------------------------------
    real(kind=rk) :: polar(n,2)
    integer :: i
    ! ---------------------------------------------------------------------------

    polar = cart2polar(coord, n)

    do i = 1,n
      if(polar(i,1) <= me%radius) then
        res(i) = bessel_jn(me%order, me%radialConstant * polar(i,1) ) &
           & * cos(real(me%order,rk)*polar(i,2) + me%radialConstant*time)
      else
        res(i) = 0.0_rk
      end if
    end do

  end function tem_eval_cylindricalWave