RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
taup::TPZeroFunctional Class Reference

The primary layer search functional used by Brents zeroIn(...) function to find layers that contain a turning ray whose distance matches the distance between the source and receiver. More...

`#include <TauPSiteFunctionals.h>`

## Public Member Functions
| TPZeroFunctional ()
| Default constructor.
| TPZeroFunctional (TauPSite *tps)
| Standard constructor. Assigns the TauPSite for this TPZeroFunctional.
| TPZeroFunctional (const TPZeroFunctional &tpzf)
| Copy constructor.
virtual | ~TPZeroFunctional ()
| Destructor.
TPZeroFunctional & | operator= (const TPZeroFunctional &tpzf)
| Assignment operator.
double | operator() (double p)
| The function objects operator() definition which is used by a Brents::zeroIn(...) function to find the value of the ray parameter p that gives a source to receiver distance of tpzD.
void | setTurningZero ()
| Sets the turning zero for the operator() function (tpzIsTurningZero is set to true).
bool | isTurningZero ()
| Returns true if the turning zero is set for return by the operator() function (tpzIsTurningZero is true).
double | getTurningZero ()
| Returns the turning leg zero evaluation from the last distance() function evaluation.
bool | isTurningRayValid ()
| Returns true if the turning ray, receiver, and source legs are valid in the last distance() function call evaluation.
void | setUpGoingZero ()
| Sets the upgoing zero for the operator() function (tpzIsTurningZero is set to false).
bool | isUpGoingZero ()
| Returns true if the upgoing zero is set for return by the operator() function (tpzIsTurningZero is false).
double | getUpGoingZero ()
| Returns the upgoing leg zero evaluation from the last distance() function evaluation.
bool | isUpGoingRayValid ()
| Returns true if the upgoing receiver and source legs are valid in the last distance() function call evaluation.
double | getMinP ()
| Returns the minimum allowable ray parameter for a ray to transfer between the source and receiver depths.
void | setTauPSite (TauPSite *tps)
| Sets the TauPSite.
TauPSite & | getTauPSite ()
| Gets the TauPSite.
void | setPlanetRadius (double pr)
| Sets the planet radius (default to Earth = 6371.0 km).
double | getPlanetRadius () const
| Returns the planet radius (default to Earth = 6371.0 km).
void | setSourceRadius (double r)
| Sets the source radius and sign.
double | getSourceRadius () const
| Returns the source radius.
void | setSourceDepth (double d)
| Sets the source radius and sign from the input depth.
double | getSourceDepth () const
| Returns the source depth.
void | setReceiverRadius (double r)
| Sets the receiver radius and sign.
double | getReceiverRadius () const
| Returns the receiver radius.
void | setReceiverDepth (double d)
| Sets the receiver radius and sign from the input depth.
double | getReceiverDepth () const
| Returns the receiver depth.
void | setDist (double d)
| Sets the search distance between the source and receiver.
double | getDist () const
| Sets the search distance between the source and receiver.
void | setPTop (double p)
| Sets the layer top ray parameter p for the current search layer.
double | getPTop () const
| Gets the layer top ray parameter p for the current search layer.
void | distance (double p)
| The primary function of this object which calculates the ray travel distance between the source and the receiver positions as a function of the input ray parameter p. The entire surface-to-surface ray leg is evaluated in addition to the surface-to-source and surface-to-receiver legs.
double | time (double p)
| Calculates the travel time between the source and receiver for the current layer at the zero in ray parameter value p. This function is only called once the zero in functional determines the critical ray parameter that gives a source to receiver distance equal to tpzD.
double | getRayDistance () const
| Returns the surface-to-surface ray distance.
double | getRayTime () const
| Returns the surface-to-surface ray time.
double | getSourceLegDistance () const
| Returns the surface-to-source ray distance.
double | getSourceLegTime () const
| Returns the surface-to-source ray time.
double | getReceiverLegDistance () const
| Returns the surface-to-receiver ray distance.
double | getReceiverLegTime () const
| Returns the surface-to-receiver ray time.
int | getSourceLayerId () const
| Return the layer containing the source position.
int | getReceiverLayerId () const
| Return the layer containing the receiver position.
int | getRadiusLayerId (double r) const
| Return the layer containing the input radius r.

## Detailed Description

The primary layer search functional used by Brents zeroIn(...) function to find layers that contain a turning ray whose distance matches the distance between the source and receiver.

The objects operator()(double p) function finds the zero-in value at the input ray parameter p from

zero-in functional = tpzD - 2.0 * tpzRayLegDist + tpzRSrcSgn * tpzSrcLegDist + tpzRRcvrSgn * tpzRcvrLegDist;

for a bottoming ray or

zero-in functional = tpzd - tpzRSrcSgn * tpzSrcLegDist - tpzRRcvrSgn * tpzRcvrLegDist;

for an upgoing or downgoing ray.

where

tpzD = The input distance between source and receiver, tpzRayLegDist = 1/2 the integrated distance from planet surface to planet surface at the input ray parameter, tpzSrcLegDist = The integrated distance from planet surface to the source depth at the input ray parameter, tpzRcvrLegDist = The integrated distance from planet surface to the receiver depth at the input ray parameter, tpzRSrcSgn = The sign (+-1.0) of the source (-1.0 if the source is elevated above the planet surface). tpzRRcvrSgn = The sign (+-1.0) of the receiver (-1.0 if the receiver is elevated above the planet surface).

This function is called in TauPSite::calculateTravelTimes(...) to evaluate each layer as a possible solution for the input source to receiver distance tpzD.

Definition at line 150 of file TauPSiteFunctionals.h.

## Constructor & Destructor Documentation

## ◆ TPZeroFunctional() [1/3]

taup::TPZeroFunctional::TPZeroFunctional | ( |  | ) |
| inline

Default constructor.

Definition at line 157 of file TauPSiteFunctionals.h.

## ◆ TPZeroFunctional() [2/3]

taup::TPZeroFunctional::TPZeroFunctional | ( | TauPSite * | tps | ) |
| inline

Standard constructor. Assigns the TauPSite for this TPZeroFunctional.

Definition at line 169 of file TauPSiteFunctionals.h.

## ◆ TPZeroFunctional() [3/3]

taup::TPZeroFunctional::TPZeroFunctional | ( | const TPZeroFunctional & | tpzf | ) |
| inline

Copy constructor.

Definition at line 181 of file TauPSiteFunctionals.h.

## ◆ ~TPZeroFunctional()

virtual taup::TPZeroFunctional::~TPZeroFunctional | ( |  | ) |
| inline virtual

Destructor.

Definition at line 200 of file TauPSiteFunctionals.h.

## Member Function Documentation

## ◆ distance()

void taup::TPZeroFunctional::distance | ( | double | p | ) |

The primary function of this object which calculates the ray travel distance between the source and the receiver positions as a function of the input ray parameter p. The entire surface-to-surface ray leg is evaluated in addition to the surface-to-source and surface-to-receiver legs.

## ◆ getDist()

double taup::TPZeroFunctional::getDist | ( |  | ) | const
| inline

Sets the search distance between the source and receiver.

Definition at line 413 of file TauPSiteFunctionals.h.

## ◆ getMinP()

double taup::TPZeroFunctional::getMinP | ( |  | ) |

Returns the minimum allowable ray parameter for a ray to transfer between the source and receiver depths.

## ◆ getPlanetRadius()

double taup::TPZeroFunctional::getPlanetRadius | ( |  | ) | const
| inline

Returns the planet radius (default to Earth = 6371.0 km).

Definition at line 348 of file TauPSiteFunctionals.h.

## ◆ getPTop()

double taup::TPZeroFunctional::getPTop | ( |  | ) | const
| inline

Gets the layer top ray parameter p for the current search layer.

Definition at line 426 of file TauPSiteFunctionals.h.

## ◆ getRadiusLayerId()

int taup::TPZeroFunctional::getRadiusLayerId | ( | double | r | ) | const

Return the layer containing the input radius r.

## ◆ getRayDistance()

double taup::TPZeroFunctional::getRayDistance | ( |  | ) | const
| inline

Returns the surface-to-surface ray distance.

Definition at line 446 of file TauPSiteFunctionals.h.

## ◆ getRayTime()

double taup::TPZeroFunctional::getRayTime | ( |  | ) | const
| inline

Returns the surface-to-surface ray time.

Definition at line 449 of file TauPSiteFunctionals.h.

## ◆ getReceiverDepth()

double taup::TPZeroFunctional::getReceiverDepth | ( |  | ) | const
| inline

Returns the receiver depth.

Definition at line 400 of file TauPSiteFunctionals.h.

## ◆ getReceiverLayerId()

int taup::TPZeroFunctional::getReceiverLayerId | ( |  | ) | const
| inline

Return the layer containing the receiver position.

Definition at line 470 of file TauPSiteFunctionals.h.

## ◆ getReceiverLegDistance()

double taup::TPZeroFunctional::getReceiverLegDistance | ( |  | ) | const
| inline

Returns the surface-to-receiver ray distance.

Definition at line 458 of file TauPSiteFunctionals.h.

## ◆ getReceiverLegTime()

double taup::TPZeroFunctional::getReceiverLegTime | ( |  | ) | const
| inline

Returns the surface-to-receiver ray time.

Definition at line 464 of file TauPSiteFunctionals.h.

## ◆ getReceiverRadius()

double taup::TPZeroFunctional::getReceiverRadius | ( |  | ) | const
| inline

Returns the receiver radius.

Definition at line 388 of file TauPSiteFunctionals.h.

## ◆ getSourceDepth()

double taup::TPZeroFunctional::getSourceDepth | ( |  | ) | const
| inline

Returns the source depth.

Definition at line 374 of file TauPSiteFunctionals.h.

## ◆ getSourceLayerId()

int taup::TPZeroFunctional::getSourceLayerId | ( |  | ) | const
| inline

Return the layer containing the source position.

Definition at line 467 of file TauPSiteFunctionals.h.

## ◆ getSourceLegDistance()

double taup::TPZeroFunctional::getSourceLegDistance | ( |  | ) | const
| inline

Returns the surface-to-source ray distance.

Definition at line 452 of file TauPSiteFunctionals.h.

## ◆ getSourceLegTime()

double taup::TPZeroFunctional::getSourceLegTime | ( |  | ) | const
| inline

Returns the surface-to-source ray time.

Definition at line 455 of file TauPSiteFunctionals.h.

## ◆ getSourceRadius()

double taup::TPZeroFunctional::getSourceRadius | ( |  | ) | const
| inline

Returns the source radius.

Definition at line 362 of file TauPSiteFunctionals.h.

## ◆ getTauPSite()

TauPSite & taup::TPZeroFunctional::getTauPSite | ( |  | ) |
| inline

Gets the TauPSite.

Definition at line 335 of file TauPSiteFunctionals.h.

## ◆ getTurningZero()

double taup::TPZeroFunctional::getTurningZero | ( |  | ) |
| inline

Returns the turning leg zero evaluation from the last distance() function evaluation.

Definition at line 280 of file TauPSiteFunctionals.h.

## ◆ getUpGoingZero()

double taup::TPZeroFunctional::getUpGoingZero | ( |  | ) |
| inline

Returns the upgoing leg zero evaluation from the last distance() function evaluation.

Definition at line 309 of file TauPSiteFunctionals.h.

## ◆ isTurningRayValid()

bool taup::TPZeroFunctional::isTurningRayValid | ( |  | ) |
| inline

Returns true if the turning ray, receiver, and source legs are valid in the last distance() function call evaluation.

Definition at line 288 of file TauPSiteFunctionals.h.

## ◆ isTurningZero()

bool taup::TPZeroFunctional::isTurningZero | ( |  | ) |
| inline

Returns true if the turning zero is set for return by the operator() function (tpzIsTurningZero is true).

Definition at line 273 of file TauPSiteFunctionals.h.

## ◆ isUpGoingRayValid()

bool taup::TPZeroFunctional::isUpGoingRayValid | ( |  | ) |
| inline

Returns true if the upgoing receiver and source legs are valid in the last distance() function call evaluation.

Definition at line 318 of file TauPSiteFunctionals.h.

## ◆ isUpGoingZero()

bool taup::TPZeroFunctional::isUpGoingZero | ( |  | ) |
| inline

Returns true if the upgoing zero is set for return by the operator() function (tpzIsTurningZero is false).

Definition at line 302 of file TauPSiteFunctionals.h.

## ◆ operator()()

double taup::TPZeroFunctional::operator() | ( | double | p | ) |
| inline

The function objects operator() definition which is used by a Brents::zeroIn(...) function to find the value of the ray parameter p that gives a source to receiver distance of tpzD.

Definition at line 240 of file TauPSiteFunctionals.h.

## ◆ operator=()

TPZeroFunctional & taup::TPZeroFunctional::operator= | ( | const TPZeroFunctional & | tpzf | ) |
| inline

Assignment operator.

Definition at line 205 of file TauPSiteFunctionals.h.

## ◆ setDist()

void taup::TPZeroFunctional::setDist | ( | double | d | ) |
| inline

Sets the search distance between the source and receiver.

Definition at line 406 of file TauPSiteFunctionals.h.

## ◆ setPlanetRadius()

void taup::TPZeroFunctional::setPlanetRadius | ( | double | pr | ) |
| inline

Sets the planet radius (default to Earth = 6371.0 km).

Definition at line 341 of file TauPSiteFunctionals.h.

## ◆ setPTop()

void taup::TPZeroFunctional::setPTop | ( | double | p | ) |
| inline

Sets the layer top ray parameter p for the current search layer.

Definition at line 419 of file TauPSiteFunctionals.h.

## ◆ setReceiverDepth()

void taup::TPZeroFunctional::setReceiverDepth | ( | double | d | ) |
| inline

Sets the receiver radius and sign from the input depth.

Definition at line 394 of file TauPSiteFunctionals.h.

## ◆ setReceiverRadius()

void taup::TPZeroFunctional::setReceiverRadius | ( | double | r | ) |
| inline

Sets the receiver radius and sign.

Definition at line 380 of file TauPSiteFunctionals.h.

## ◆ setSourceDepth()

void taup::TPZeroFunctional::setSourceDepth | ( | double | d | ) |
| inline

Sets the source radius and sign from the input depth.

Definition at line 368 of file TauPSiteFunctionals.h.

## ◆ setSourceRadius()

void taup::TPZeroFunctional::setSourceRadius | ( | double | r | ) |
| inline

Sets the source radius and sign.

Definition at line 354 of file TauPSiteFunctionals.h.

## ◆ setTauPSite()

void taup::TPZeroFunctional::setTauPSite | ( | TauPSite * | tps | ) |
| inline

Sets the TauPSite.

Definition at line 328 of file TauPSiteFunctionals.h.

## ◆ setTurningZero()

void taup::TPZeroFunctional::setTurningZero | ( |  | ) |
| inline

Sets the turning zero for the operator() function (tpzIsTurningZero is set to true).

Definition at line 266 of file TauPSiteFunctionals.h.

## ◆ setUpGoingZero()

void taup::TPZeroFunctional::setUpGoingZero | ( |  | ) |
| inline

Sets the upgoing zero for the operator() function (tpzIsTurningZero is set to false).

Definition at line 295 of file TauPSiteFunctionals.h.

## ◆ time()

double taup::TPZeroFunctional::time | ( | double | p | ) |

Calculates the travel time between the source and receiver for the current layer at the zero in ray parameter value p. This function is only called once the zero in functional determines the critical ray parameter that gives a source to receiver distance equal to tpzD.

The documentation for this class was generated from the following file:

- rstt_v3.2.1/SLBM/include/TauPSiteFunctionals.h