SLBM: taup::TPZeroFunctional Class Reference

SLBM 3.0 Regional Seismic Travel Time

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Private Member Functions | Private Attributes | List of all members
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. More...
| TPZeroFunctional (TauPSite *tps)
| Standard constructor. Assigns the TauPSite for this TPZeroFunctional. More...
| TPZeroFunctional (const TPZeroFunctional &tpzf)
| Copy constructor. More...
virtual | ~TPZeroFunctional ()
| Destructor. More...
TPZeroFunctional & | operator= (const TPZeroFunctional &tpzf)
| Assignment operator. More...
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. More...
void | setTurningZero ()
| Sets the turning zero for the operator() function (tpzIsTurningZero is set to true). More...
bool | isTurningZero ()
| Returns true if the turning zero is set for return by the operator() function (tpzIsTurningZero is true). More...
double | getTurningZero ()
| Returns the turning leg zero evaluation from the last distance() function evaluation. More...
bool | isTurningRayValid ()
| Returns true if the turning ray, receiver, and source legs are valid in the last distance() function call evaluation. More...
void | setUpGoingZero ()
| Sets the upgoing zero for the operator() function (tpzIsTurningZero is set to false). More...
bool | isUpGoingZero ()
| Returns true if the upgoing zero is set for return by the operator() function (tpzIsTurningZero is false). More...
double | getUpGoingZero ()
| Returns the upgoing leg zero evaluation from the last distance() function evaluation. More...
bool | isUpGoingRayValid ()
| Returns true if the upgoing receiver and source legs are valid in the last distance() function call evaluation. More...
double | getMinP ()
| Returns the minimum allowable ray parameter for a ray to transfer between the source and receiver depths. More...
void | setTauPSite (TauPSite *tps)
| Sets the TauPSite. More...
TauPSite & | getTauPSite ()
| Gets the TauPSite. More...
void | setPlanetRadius (double pr)
| Sets the planet radius (default to Earth = 6371.0 km) More...
double | getPlanetRadius () const
| Returns the planet radius (default to Earth = 6371.0 km) More...
void | setSourceRadius (double r)
| Sets the source radius and sign. More...
double | getSourceRadius () const
| Returns the source radius. More...
void | setSourceDepth (double d)
| Sets the source radius and sign from the input depth. More...
double | getSourceDepth () const
| Returns the source depth. More...
void | setReceiverRadius (double r)
| Sets the receiver radius and sign. More...
double | getReceiverRadius () const
| Returns the receiver radius. More...
void | setReceiverDepth (double d)
| Sets the receiver radius and sign from the input depth. More...
double | getReceiverDepth () const
| Returns the receiver depth. More...
void | setDist (double d)
| Sets the search distance between the source and receiver. More...
double | getDist () const
| Sets the search distance between the source and receiver. More...
void | setPTop (double p)
| Sets the layer top ray parameter p for the current search layer. More...
double | getPTop () const
| Gets the layer top ray parameter p for the current search layer. More...
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. More...
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. More...
double | getRayDistance () const
| Returns the surface-to-surface ray distance. More...
double | getRayTime () const
| Returns the surface-to-surface ray time. More...
double | getSourceLegDistance () const
| Returns the surface-to-source ray distance. More...
double | getSourceLegTime () const
| Returns the surface-to-source ray time. More...
double | getReceiverLegDistance () const
| Returns the surface-to-receiver ray distance. More...
double | getReceiverLegTime () const
| Returns the surface-to-receiver ray time. More...
int | getSourceLayerId () const
| Return the layer containing the source position. More...
int | getReceiverLayerId () const
| Return the layer containing the receiver position. More...
int | getRadiusLayerId (double r) const
| Return the layer containing the input radius r. More...

## Private Member Functions
double | setRadius (double &r)

## Private Attributes
TauPSite * | tpzTPS
| The site assigned to this functional. More...
double | tpzRSrc
| The source radius. More...
double | tpzRSrcSgn
double | tpzRRcvr
| The receiver radius. More...
double | tpzRRcvrSgn
double | tpzPLast
| The last ray parameter used to evaluate the zero in distance criteria. More...
double | tpzDLast
| The last evaluated zero in distance criteria. More...
double | tpzD
| The distance between the source and receiver. More...
double | tpzPT
| The current layer top ray parameter. This value is redefined for each layer before searching the layer for a match with tpzD. More...
double | tpzRayLegDist
| The surface-to-surface ray leg distance. More...
double | tpzRayLegTime
| The surface-to-surface ray leg time. More...
double | tpzSrcLegDist
| The surface-to-source ray leg distance. More...
double | tpzSrcLegTime
| The surface-to-source ray leg time. More...
double | tpzRcvrLegDist
| The surface-to-receiver ray leg distance. More...
double | tpzRcvrLegTime
| The surface-to-receiver ray leg time. More...
bool | tpzIsTurningZero
bool | tpzIsRayLegValid
bool | tpzIsRcvrLegValid
bool | tpzIsSrcLegValid
double | tpzRadius
| The Planet Radius (Defaults to Earth Radius (6371.0 km). More...

## Detailed Description

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.

## Constructor & Destructor Documentation

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

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

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

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

## Member Function Documentation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

double taup::TPZeroFunctional::setRadius | ( | double & | r | ) |
| inlineprivate

Private function that determines if the input radius r is below or above the surface of the Earth. 1.0 is returned if r is below the Earths surface and -1.0 is returned if r is above the Earths surface. If r is above the Earths surface it is recast as a depth to behave properly when using the velocity models.

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

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

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

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

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

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

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

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

## Member Data Documentation

double taup::TPZeroFunctional::tpzD
| private

double taup::TPZeroFunctional::tpzDLast
| private

bool taup::TPZeroFunctional::tpzIsRayLegValid
| private

A flag that is true if the last calculated surface-to-surface ray leg was valid.

bool taup::TPZeroFunctional::tpzIsRcvrLegValid
| private

A flag that is true if the last calculated surface-to-receiver ray leg was valid.

bool taup::TPZeroFunctional::tpzIsSrcLegValid
| private

A flag that is true if the last calculated surface-to-source ray leg was valid.

bool taup::TPZeroFunctional::tpzIsTurningZero
| private

A flag which causes the functional operator () to return the turning ray zero if true. Otherwise, the upgoing ray zero is returned.

double taup::TPZeroFunctional::tpzPLast
| private

double taup::TPZeroFunctional::tpzPT
| private

double taup::TPZeroFunctional::tpzRadius
| private

double taup::TPZeroFunctional::tpzRayLegDist
| private

double taup::TPZeroFunctional::tpzRayLegTime
| private

double taup::TPZeroFunctional::tpzRcvrLegDist
| private

double taup::TPZeroFunctional::tpzRcvrLegTime
| private

double taup::TPZeroFunctional::tpzRRcvr
| private

double taup::TPZeroFunctional::tpzRRcvrSgn
| private

The receiver elevation sign (1.0 for below and -1.0 for above the Earths surface).

double taup::TPZeroFunctional::tpzRSrc
| private

double taup::TPZeroFunctional::tpzRSrcSgn
| private

The source elevation sign (1.0 for below and -1.0 for above the Earths surface).

double taup::TPZeroFunctional::tpzSrcLegDist
| private

double taup::TPZeroFunctional::tpzSrcLegTime
| private

TauPSite* taup::TPZeroFunctional::tpzTPS
| private

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

- /nfs/tonto2/devlpool/sballar/RSTT/SLBM_Root.3.0.5/install/SLBM_Root.3.0.5.Linux/SLBM/include/TauPSiteFunctionals.h