EvaluateSSP2D Subroutine

public subroutine EvaluateSSP2D(x2D, t2D, c, cimag, gradc, crr, crz, czz, rho, xs, tradial, freq)

Converts cartesian gradients to polar

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x2D(2)
real(kind=8), intent(in) :: t2D(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho
real(kind=8), intent(in) :: xs(3)
real(kind=8), intent(in) :: tradial(2)
real(kind=8), intent(in) :: freq

Calls

proc~~evaluatessp2d~~CallsGraph proc~evaluatessp2d EvaluateSSP2D proc~evaluatessp3d EvaluateSSP3D proc~evaluatessp2d->proc~evaluatessp3d proc~analytic3d Analytic3D proc~evaluatessp3d->proc~analytic3d proc~ccubic cCubic proc~evaluatessp3d->proc~ccubic proc~clinear cLinear proc~evaluatessp3d->proc~clinear proc~errout ERROUT proc~evaluatessp3d->proc~errout proc~hexahedral Hexahedral proc~evaluatessp3d->proc~hexahedral proc~n2linear n2Linear proc~evaluatessp3d->proc~n2linear proc~readssp ReadSSP proc~ccubic->proc~readssp proc~splineall SPLINEALL proc~ccubic->proc~splineall proc~updatedepthsegmentt UpdateDepthSegmentT proc~ccubic->proc~updatedepthsegmentt proc~clinear->proc~readssp proc~clinear->proc~updatedepthsegmentt proc~hexahedral->proc~errout interface~monotonic monotonic proc~hexahedral->interface~monotonic proc~hexahedral->proc~readssp proc~update3dxsegmentt Update3DXSegmentT proc~hexahedral->proc~update3dxsegmentt proc~update3dysegmentt Update3DYSegmentT proc~hexahedral->proc~update3dysegmentt proc~update3dzsegmentt Update3DZSegmentT proc~hexahedral->proc~update3dzsegmentt proc~n2linear->proc~readssp proc~n2linear->proc~updatedepthsegmentt proc~monotonic_dble monotonic_dble interface~monotonic->proc~monotonic_dble proc~monotonic_sngl monotonic_sngl interface~monotonic->proc~monotonic_sngl proc~readssp->proc~errout proc~crci CRCI proc~readssp->proc~crci proc~crci->proc~errout proc~franc_garr Franc_Garr proc~crci->proc~franc_garr

Called by

proc~~evaluatessp2d~~CalledByGraph proc~evaluatessp2d EvaluateSSP2D proc~reflect2d Reflect2D proc~reflect2d->proc~evaluatessp2d proc~step2d~2 Step2D proc~step2d~2->proc~evaluatessp2d proc~traceray2d TraceRay2D proc~traceray2d->proc~reflect2d proc~traceray2d->proc~step2d~2 proc~bellhopcore BellhopCore proc~bellhopcore->proc~traceray2d program~bellhop3d BELLHOP3D program~bellhop3d->proc~bellhopcore

Source Code

SUBROUTINE EvaluateSSP2D( x2D, t2D, c, cimag, gradc, crr, crz, czz, rho, xs, tradial, freq )
  !! Converts cartesian gradients to polar

  ! Called from BELLHOP3D to get a 2D slice out of the 3D SSP

  REAL (KIND=8), INTENT( IN  ) :: x2D( 2 ), t2D( 2 ), xs( 3 ), tradial( 2 ), freq
  REAL (KIND=8), INTENT( OUT ) :: c, cimag, gradc( 2 ), czz, crz, crr, rho
  REAL (KIND=8)                :: x( 3 ), t( 3 ), gradc3D(3 ), cxx, cyy, cxy, cxz, cyz

  ! convert polar coordinate to cartesian
  x = [ xs( 1 ) + x2D( 1 ) * tradial( 1 ), xs( 2 ) + x2D( 1 ) * tradial( 2 ), x2D( 2 ) ]
  t = [           t2D( 1 ) * tradial( 1 ),           t2D( 1 ) * tradial( 2 ), t2D( 2 ) ]

  CALL EvaluateSSP3D( x, t, c, cimag, gradc3D, cxx, cyy, czz, cxy, cxz, cyz, rho, freq, 'TAB' )

  gradc( 1 )  = DOT_PRODUCT( tradial, gradc3D( 1 : 2 ) )  ! r derivative
  gradc( 2 )  = gradc3D( 3 )                              ! z derivative

  crz = tradial( 1 ) * cxz + tradial( 2 ) * cyz
  crr = cxx * ( tradial( 1 ) )**2 + 2.0 * cxy * tradial( 1 ) * tradial( 2 ) + cyy * ( tradial( 2 ) )**2

  RETURN
END SUBROUTINE EvaluateSSP2D