FinalPhase Subroutine

public subroutine FinalPhase(isGaussian)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: isGaussian

Calls

proc~~finalphase~~CallsGraph proc~finalphase FinalPhase proc~isatcaustic IsAtCaustic proc~finalphase->proc~isatcaustic

Called by

proc~~finalphase~~CalledByGraph proc~finalphase FinalPhase proc~influencegeogaussiancart InfluenceGeoGaussianCart proc~influencegeogaussiancart->proc~finalphase proc~influencegeohatcart InfluenceGeoHatCart proc~influencegeohatcart->proc~finalphase proc~influencegeohatraycen InfluenceGeoHatRayCen proc~influencegeohatraycen->proc~finalphase proc~bellhopcore BellhopCore proc~bellhopcore->proc~influencegeogaussiancart proc~bellhopcore->proc~influencegeohatcart proc~bellhopcore->proc~influencegeohatraycen proc~bellhopcore~2 BellhopCore proc~bellhopcore~2->proc~influencegeogaussiancart proc~bellhopcore~2->proc~influencegeohatcart proc~bellhopcore~2->proc~influencegeohatraycen program~bellhop BELLHOP program~bellhop->proc~bellhopcore~2 program~bellhop3d BELLHOP3D program~bellhop3d->proc~bellhopcore

Source Code

  SUBROUTINE FinalPhase( isGaussian )
    LOGICAL, INTENT( IN ) :: isGaussian
    INTEGER :: phaseStepNum

    !! phase shifts at caustics

    ! this should be precomputed [LP: While IncPhaseIfCaustic can be
    ! precomputed, FinalPhase cannot, as it is dependent on the interpolated `q`
    ! value which is not known until the main run.]
    ! LP: All 2D functions discard the ray point phase if the condition is met,
    ! probably BUG
    ! LP: 2D Gaussian Cartesian reads the phase from the current point, all
    ! others (including 3D) read the phase from the previous point, probably BUG
    IF ( isGaussian ) THEN
       phaseStepNum = iS
    ELSE
       phaseStepNum = iS - 1
    END IF

    phaseInt = ray2D( phaseStepNum )%Phase + phase
    IF ( IsAtCaustic( .TRUE. ) ) &
       phaseInt = phase + pi / 2.

  END SUBROUTINE FinalPhase