SLBM: taup::TauPSite Class Reference

SLBM 3.0 Regional Seismic Travel Time

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
taup::TauPSite Class Reference

`#include <TauPSite.h>`

## Public Member Functions
| TauPSite ()
| Default Constructor. More...
| TauPSite (const string &staname, const string &phase)
| Standard Constructor. Sets the station name and phase represented by this TauPSite. More...
| TauPSite (const TauPSite &tps)
| Copy Constructor. More...
virtual | ~TauPSite ()
| Destructor. More...
TauPSite & | operator= (const TauPSite &tps)
| Assignment operator. More...
void | setSiteDepth (double depth)
| Sets 'this' sites depth. More...
void | setVelocityModels (const vector< TPVelocityLayer * > &vm)
| Sets the velocity models for 'this' TauPSite ... model ownership is set to NOT OWNED (tpsIsVelModlOwned = false). More...
void | appendVelocityModel (TPVelocityLayer *vm)
| Appends another velocity model to the profile for 'this' TauPSite. If this is the first then model pointer is saved and ownership is set to NOT OWNED (tpsIsVelModlOwned = false). If this is the second or greater velocity layer added then if tpsIsVelModlOwned is false the pointer is added else a copy of the object is made and added. More...
void | appendConstVelocityModel (double c, double rt, double rb, const string &layrnam="")
| Appends a new OWNED constant velocity model to the profile stack. If this is the first entry a new model is created and tpsIsVelModlOwned is set to true. If this is the second or greater model and tpsIsVelModlOwned is false an error is thrown. Otherwise, the new model is added to the stack. Note the top radius must equal the bottom radius of the previous layer else an error is thrown. More...
void | appendLinearVelocityModel (double a0, double a1, double rt, double rb, const string &layrnam="", double normradius=1.0)
| Appends a new OWNED linear velocity model to the profile stack. If this is the first entry a new model is created and tpsIsVelModlOwned is set to true. If this is the second or greater model and tpsIsVelModlOwned is false an error is thrown. Otherwise, the new model is added to the stack. Note the top radius must equal the bottom radius of the previous layer else an error is thrown. More...
void | appendQuadraticVelocityModel (double a0, double a1, double a2, double rt, double rb, const string &layrnam="", double normradius=1.0)
| Appends a new OWNED quadratic velocity model to the profile stack. If this is the first entry a new model is created and tpsIsVelModlOwned is set to true. If this is the second or greater model and tpsIsVelModlOwned is false an error is thrown. Otherwise, the new model is added to the stack. Note the top radius must equal the bottom radius of the previous layer else an error is thrown. More...
void | appendCubicVelocityModel (double a0, double a1, double a2, double a3, double rt, double rb, const string &layrnam="", double normradius=1.0)
| Appends a new OWNED cubic velocity model to the profile stack. If this is the first entry a new model is created and tpsIsVelModlOwned is set to true. If this is the second or greater model and tpsIsVelModlOwned is false an error is thrown. Otherwise, the new model is added to the stack. Note the top radius must equal the bottom radius of the previous layer else an error is thrown. More...
void | clearVelocityModels ()
| Clears all velocity models from the current profile. If the models are OWNED they are deleted. More...
void | calculateTravelTimes (double srcdist, double srcdepth, bool evalderivs=true)
| Calculates travel times for all valid phases at the input distance and depth. This is the primary work function of the TauPSite object. More...
TravelTimeResult * | getFirstTravelTimeResult ()
| Returns the first travel time result. If no travel time exists a NULL pointer is returned. More...
double | getFirstTravelTime () const
| Returns the first travel time (smallest) for the last call to calculateTravelTimes(dist, depth). More...
double | getFirstNonDiffractedTravelTime () const
| Returns the first travel time (smallest) for the last call to calculateTravelTimes(dist, depth) that is not a diffracted ray (e.g. not Pdiff). If only a diffracted results exists this first is returned. If no travel time exists a -1.0 is returned. More...
TravelTimeResult * | getTravelTimeResult (const string &phase, bool matchPhase)
double | getTravelTime (const string &phase, bool matchPhase) const
const map< double, TravelTimeResult * > & | getAllTravelTimes () const
| Returns the map of all discovered travel time results sorted from fastest to slowest. More...
bool | integrateDistance (double p, double &d, bool bottom_pass=false)
| Returns the total integrated distance of a ray with ray parameter p in the input parameter d. The function returns true if successful and false if the result is invalid. The result is integrated from the surface of the planet to the turning depth, wherever that may be. More...
bool | integrateDistance (double p, double r, double &d)
| Returns the total integrated distance of a ray with ray parameter p in the input parameter d. The function returns true if successful and false if the result is invalid. The result is integrated from the surface of the planet to the input depth r. More...
bool | integrateDistance (double p, double r1, double r2, double &d)
| Returns the total integrated distance of a ray with ray parameter p in the input parameter d. The function returns true if successful and false if the result is invalid. The result is integrated from the r1 to depth r2. More...
bool | integrateTime (double p, double &d, bool bottom_pass=false)
| Returns the total integrated travel time of a ray with ray parameter p in the input parameter t. The function returns true if successful and false if the result is invalid. The result is integrated from the surface of the planet to the turning depth, wherever that may be. More...
bool | integrateTime (double p, double r, double &d)
| Returns the total integrated travel time of a ray with ray parameter p in the input parameter t. The function returns true if successful and false if the result is invalid. The result is integrated from the surface of the planet to the input depth r. More...
bool | integrateTime (double p, double r1, double r2, double &t)
| Returns the total integrated travel time of a ray with ray parameter p in the input parameter d. The function returns true if successful and false if the result is invalid. The result is integrated from the r1 to depth r2. An invalid ray is returned if p is greater than the larger ray parameter evaluated at r1 and r2 or if the ray turns before reaching r2 (r1 must be > r2). More...
virtual void | writeData (const string &filename) const
| Writes the TauPSite as a standard ASCII file in CLR format (see TauPModel function readData for a description of the format). More...
void | writeLayerData (int i, ostream &os, int n, double f0=0.0, double f1=1.0)
| This function writes out the surface to surface distance for waves turning in layer i of the input wave velocity layer vector vellyr. More...
void | dumpLocalSrcRcvrLayers (ostream &os)
| Debug function to output source receiver local conditions. More...
void | dumpLayerInfo (ostream &os)
| Debug function to output layer information. More...
string | toString () const
| Print object data to string. More...
virtual void | toStream (ostream &os, string indent) const
| Print object data to input stream os. More...
virtual string | get_class_name () const
| Virtual function that returns the class name. More...
virtual int | class_size () const
| Static function that returns the class size. More...
virtual string | getCommonName () const
| virtual function that returns the class common name. More...
const string & | getName () const
| Returns the assigned site name. More...
const string & | getPhase () const
| Returns the assigned site phase. More...
void | setModelName (const string &modname)
| Sets the assigned model name string. More...
const string & | getModelName () const
| Returns the assigned model name string. More...
void | setEarthRadius (double r)
| Set the Earth radius for this site. Overrides the default. More...
double | getEarthRadius () const
| Return the Earth radius. More...
void | setBrentsTolerance (double tol)
| Sets the Brents zero-in tolerance. More...
double | getBrentsTolerance () const
| Returns the Brents zero-in tolerance. More...
const vector< TPVelocityLayer * > & | getVelocityModels () const
| Returns the vector of layered velocity models assigned to this site. More...
virtual int64 | get_memory () const
| Returns the total memory resource for this TauPSite. More...
virtual int64 | get_alloc_memory () const
| Returns the total heap allocated memory resource for this TauPSite. More...

## Static Public Member Functions
static string | class_name ()
| Static function that returns the class name. More...
static string | commonName ()
| Static function that returns the class common name. More...

## Private Member Functions
virtual void | writeData (ostream &os) const
| Writes the TauPSite as a standard ASCII file in CLR format (see TauPModel function readData for a description of the format). More...
void | clearTTRMap ()
| Clears the input ttrm map and stores the TravelTimeResult entries for future use. More...
TravelTimeResult * | saveResultI (double pB, double pI, double dist, int i, bool isUpper, bool isLower)
| saves the diffracted ray results into the TravelTimeResult object returned by the call to saveResult(). More...
TravelTimeResult * | saveResult (double p, int i, bool isintrfcupper, bool isintrfclower, bool isspltlower, bool isspltupper, bool isturningzero)
| Saves the travel time results for the ray parameter p that turned in velocity layer i. The TravelTimeResult object containing the result is returned to the caller. More...
void | findLimits ()
| Evaluates the limits of each velocity layer in the input vector. The limits include the layer type, pMin, the derivative of travel time with respect to the ray parameter (slowness), The distance at pT and pB, and a retrogrades layer split distance and ray parameter. More...
void | debugOutZeros (int n, double p0, double p1)
| Private function used to output n zero results between p0 and p1. More...
void | evaluateDerivatives (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI=-1.0, int derivcnt=0)
| Calculates the travel time derivatives (derivs) at the input distance (dist) and depth (depth). The derivatives are evaluated numerically by calculating travel time at dist + f*edist and depth + f*edepth. The fraction f is either -1, -1/2, 0, 1/2, or 1 and is evaluated automatically for various stencils. The user must set edist and edepth to some small step size to begin. Seven different stencils will be tried until one succeeds in evaluating the derivatives. If none succeed the step sizes are cut in half and the function is recursively called to try again. If after 5 recursions none of the 7 different stencils are successfully evaluated an error is thrown. More...
void | reEvaluateDerivatives (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI, int derivcnt)
| Recursively calls evaluateDerivatives(...) using a distance and depth stepsize reduced by 2.0. If the input derivcnt flag is 5 then the function prints and error message and returns without calling the function evaluateDerivatives(...). More...
int | evalDerivsPrimary (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil surrounding the current interpolation point whose travel time is given by T00. More...
int | evalDerivsAlternateA (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil located in front of (+distance) and above (+radius) the current interpolation point whose travel time is given by T00. More...
int | evalDerivsAlternateB (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil located on either side of (distance) and above (+radius) the current interpolation point whose travel time is given by T00. More...
int | evalDerivsAlternateC (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil located behind (-distance) and above (+radius) the current interpolation point whose travel time is given by T00. More...
int | evalDerivsAlternateD (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil located in front of (+distance) and below (-radius) the current interpolation point whose travel time is given by T00. More...
int | evalDerivsAlternateE (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil located on either side of (distance) and below (-radius) the current interpolation point whose travel time is given by T00. More...
int | evalDerivsAlternateF (double pT, double pB, double T00, double dist, double depth, double edist, double edepth, double *derivs, double pI)
| Evaluates the derivatives (derivs) at distance dist and depth depth using a first order stencil located behind (-distance) and below (-radius) the current interpolation point whose travel time is given by T00. More...
double | layeredTravelTime (double pT, double pB, double dist, double depth, double &T, double pI)
| Calculates the travel time (T) at input distance (dist) and depth (depth). The solution is performed for a layer whose ray parameter at the top and bottom is defined by pT and pB. If no solution exists for that layer the function returns -1.0. Otherwise, the ray parameter that provides the input distance and depth is returned. The brents zero-in function containing the travel time zero functional (TPZeroFunctional) is input as bz. A diffracted result is returned if the interface slowness, pI, is non-negative. The default value for pI is defined as -1.0 (a turning ray). More...

## Private Attributes
vector< TPVelocityLayer * > | tpsVLayer
| The velocity structure of the various layers used by 'this' TauPSite. If tpsIsVelModlOwned is true then the velocity structure is owned by 'this' TauPSite. Otherwise, it was assigned by some TauPModel object. More...
bool | tpsIsVelModlOwned
| Internal flag that is true if the velocity models used by this TauPSite were instantiated by it. If they are owned by some other object this flag is false. More...
string | tpsRcvrName
| The receiver name. More...
string | tpsRcvrPhase
| The receiver phase type (P or S). More...
string | tpsModelName
| The velocity model name. More...
double | tpsRcvrRad
| The receiver radius. More...
double | tpsRcvrDepth
| The receiver depth. More...
double | tpsSrcRad
| The source radius. More...
double | tpsSrcDepth
| The source depth. More...
double | tpsDist
| The distance between the source and receiver. More...
double | tpsLastDist
| The last evaluated source-receiver distance. More...
double | tpsLastDepth
| The last evaluated source depth. More...
TPZeroFunctional | tpsZeroF
| The TauP zero-in functional used to zero-in on a ray parameter that gives the source distance / depth. More...
util::Brents< TPZeroFunctional > | tpsZeroIn
| The Brents zero-in and function maximum utility object used to find the zero in tpsZeroF and the distance versus ray parameter minimum in retro-grade layers. More...
map< double, TravelTimeResult * > | tpsTTR
| The map of all evaluated branch phases that satisfy the latest input source distance/depth. The results are sorted on travel time from minimum to maximum. If the map is empty on solution was found for the input source distance / depth. The ray characteristics are contained in the associated TravelTimeResult object for each discovered ray. More...

## Static Private Attributes
static int | tpsClassCount
| Static instantiation count used to maintain a count of all objects of this type that have been instantiated. More...
static const double | tpsDerivStepSize
| Static default numerical derivative distance / depth stepsize. More...
static const double | tpsBrentsZeroInTol
| Static default Brents zero-in Tolerance. More...
static vector< TravelTimeResult * > | tpsReuseTTR
| A temporary static stack used to contain unused TravelTimeResult objects to avoid reallocation costs. More...

## Detailed Description

The TauPSite object is used to represent a specific receiver location for the TauP 1D spherical travel time calculation. The objects primary function is calculateTravelTimes(double srcdist, double srcdepth) which determines all viable ray path solutions at the input source distance / depth position to the 1D spherical travel time equations as defined in:

Lay, Thorne; Wallace, T. C.; "Modern Global Seismology", Volume 58, International Geophysics Series, Academic Press, 1995, pp 91-93.The object contains functionality to assign or create a series of layered velocity models that define the planetary velocity structure to be modeled. Functionality is also provided to set the receiver depth. Both the receiver and source depths can be negative (elevated) which uses the top layer velocity structure as an infinite propagation medium using an inverted radius definition.

All valid branches are evaluated for a single input distance / depth. These are stored in a map that associates the travel time for the branch with an internal descriptive object (a TravelTimeResult) that describes the path in specific detail. The entries in the map are stored in ascending order (fastest to slowest). The Model also solves for all requested diffracted phases (e.g. Pdiff) if a particular velocity layers upper or lower diffracted phase interface flag is set.

Individual layers can be modeled as one of the following variations:

Constant Power Law Linear Quadratic Cubic

Each layer can be given a standard phase name or can default to the internal evaluated phase name of the form Tn[b,i][+,-] where T can be "P" or "S"; n is the turning layer index between 0 and N-1 where N is the number of layers; either b or i is appended for a body wave or diffracted interface; and either + or - can be appended whose meaning depends on if b or i was used in the naming. If b (a body wave) is defined and the turning layer is a retro-grade layer (i.e. contains a minimum in path distance wrt. the ray parameter such as the outer core for example) then a "+" will be appended if the ray turned in the upper half of the retro-grade layer above the minimum, or a "-" will be appended if the ray turned in the lower half of the layer below the minimum. If "i" (a diffracted ray) is defined and the ray uses the upper layer velocity to propagate then a "+" will be appended, else if the ray uses the lower layer velocity to propagate a "-" will be appended.

## Constructor & Destructor Documentation

taup::TauPSite::TauPSite | ( |  | ) |

taup::TauPSite::TauPSite | ( | const string & | staname,
|  | const string & | phase
| ) |  |

taup::TauPSite::TauPSite | ( | const TauPSite & | tps | ) |

virtual taup::TauPSite::~TauPSite | ( |  | ) |
| virtual

## Member Function Documentation

void taup::TauPSite::appendConstVelocityModel | ( | double | c,
|  | double | rt,
|  | double | rb,
|  | const string & | layrnam = `""`
| ) |  |

void taup::TauPSite::appendCubicVelocityModel | ( | double | a0,
|  | double | a1,
|  | double | a2,
|  | double | a3,
|  | double | rt,
|  | double | rb,
|  | const string & | layrnam = `""`,
|  | double | normradius = `1.0`
| ) |  |

void taup::TauPSite::appendLinearVelocityModel | ( | double | a0,
|  | double | a1,
|  | double | rt,
|  | double | rb,
|  | const string & | layrnam = `""`,
|  | double | normradius = `1.0`
| ) |  |

void taup::TauPSite::appendQuadraticVelocityModel | ( | double | a0,
|  | double | a1,
|  | double | a2,
|  | double | rt,
|  | double | rb,
|  | const string & | layrnam = `""`,
|  | double | normradius = `1.0`
| ) |  |

void taup::TauPSite::appendVelocityModel | ( | TPVelocityLayer * | vm | ) |

void taup::TauPSite::calculateTravelTimes | ( | double | srcdist,
|  | double | srcdepth,
|  | bool | evalderivs = `true`
| ) |  |

string taup::TauPSite::class_name | ( |  | ) |
| inlinestatic

int taup::TauPSite::class_size | ( |  | ) | const
| inlinevirtual

Returns the class size (in bytes).

void taup::TauPSite::clearTTRMap | ( |  | ) |
| private

void taup::TauPSite::clearVelocityModels | ( |  | ) |

string taup::TauPSite::commonName | ( |  | ) |
| inlinestatic

Static function that returns the common name of the object.

void taup::TauPSite::debugOutZeros | ( | int | n,
|  | double | p0,
|  | double | p1
| ) |  |
| private

void taup::TauPSite::dumpLayerInfo | ( | ostream & | os | ) |

void taup::TauPSite::dumpLocalSrcRcvrLayers | ( | ostream & | os | ) |

int taup::TauPSite::evalDerivsAlternateA | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

    (4)                   (3)

T(0,1) T(1,1)

- *

               (1)        (2)

T(0,0) T(.5,0) T(1,0)

int taup::TauPSite::evalDerivsAlternateB | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

    (4)                  (3)

T(-1,1) T(1,1)

- *

    (1)                  (2)

T(-1,0) T(0,0) T(1,0)

int taup::TauPSite::evalDerivsAlternateC | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

    (4)                   (3)

T(-1,1) T(0,1)

- *

    (1)        (2)

T(-1,0) T(-.5,0) T(0,0)

int taup::TauPSite::evalDerivsAlternateD | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

               (4)       (3)

T(0,0) T(.5,0) T(1,0)

    (1)                   (2)

T(0,-1) T(1,-1)

- *

int taup::TauPSite::evalDerivsAlternateE | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

    (4)                  (3)

T(-1,0) T(0,0) T(1,0)

    (1)                  (2)

T(-1,-1) T(1,-1)

- *

int taup::TauPSite::evalDerivsAlternateF | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

    (4)        (3)

T(-1,0) T(-.5,0) T(0,0)

    (1)                    (2)

T(-1,-1) T(0,-1)

- *

int taup::TauPSite::evalDerivsPrimary | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The step size surrounding the current interpolation point is edist and edepth. A diffracted result is returned if the interface slowness, pI, is non-negative. In that case the turning ray component travel time is evaluated at ray parameter pB. The default value for pI is defined as -1.0 (a turning ray). This function is only called by the function evaluateDerivatives.

The additional four points necessary to evaluate the derivatives are defined about T00 at steps edist and edepth away using the following stencil:

    (4)                  (3)

T(-1,1) T(1,1)

- *

  T(0,0)

  - (1) (2) T(-1,-1) T(1,-1)
- *

void taup::TauPSite::evaluateDerivatives | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI = `-1.0`,
|  | int | derivcnt = `0`
| ) |  |
| private

The derivatives are only evaluated if a valid solution exists for some ray parameter between pT, the layer top ray parameter, and pB, the layer bottom ray parameter. The evaluated travel time at dist and depth is given by T00 and is used to numerically evaluate the derivatives. A diffracted result is returned at ray parameter pB if the interface slowness, pI, is non-negative. The default value for pI is defined as -1.0 (a turning ray). The recursion level (derivcnt) is initialized to 0 and is incremented each time this function is recursively called.

The returned derivative array contains the following four derivatives on outputa:

derivs[0] = dT/dD derivs[1] = dT/dr derivs[2] = d^2T/dD/dr derivs[3] = d^2T/dD^2

void taup::TauPSite::findLimits | ( |  | ) |
| private

virtual int64 taup::TauPSite::get_alloc_memory | ( |  | ) | const
| virtual

string taup::TauPSite::get_class_name | ( |  | ) | const
| inlinevirtual

Returns the class name.

int64 taup::TauPSite::get_memory | ( |  | ) | const
| inlinevirtual

Returns the total memory allocated by 'this' TTBMTauP object.

const map< double, TravelTimeResult * > & taup::TauPSite::getAllTravelTimes | ( |  | ) | const
| inline

Returns the first travel time result. If no travel time exists a NULL pointer is returned.

double taup::TauPSite::getBrentsTolerance | ( |  | ) | const
| inline

string taup::TauPSite::getCommonName | ( |  | ) | const
| inlinevirtual

Returns the common name.

double taup::TauPSite::getEarthRadius | ( |  | ) | const
| inline

double taup::TauPSite::getFirstNonDiffractedTravelTime | ( |  | ) | const

double taup::TauPSite::getFirstTravelTime | ( |  | ) | const

TravelTimeResult* taup::TauPSite::getFirstTravelTimeResult | ( |  | ) |

const string & taup::TauPSite::getModelName | ( |  | ) | const
| inline

Returns the model name.

const string & taup::TauPSite::getName | ( |  | ) | const
| inline

Returns the site name.

const string & taup::TauPSite::getPhase | ( |  | ) | const
| inline

Returns the site phase.

double taup::TauPSite::getTravelTime | ( | const string & | phase,
|  | bool | matchPhase
| ) |  | const

TravelTimeResult* taup::TauPSite::getTravelTimeResult | ( | const string & | phase,
|  | bool | matchPhase
| ) |  |

const vector< TPVelocityLayer * > & taup::TauPSite::getVelocityModels | ( |  | ) | const
| inline

Returns the vector of layered velocity models.

bool taup::TauPSite::integrateDistance | ( | double | p,
|  | double & | d,
|  | bool | bottom_pass = `false`
| ) |  |

If the ray parameter is equal to the top of a layers ray parameter in a shadow then the boolean flag bottom_pass should be set to true to ensure that the integration does not terminate before accumulating the run-up to the top of the next layer.

bool taup::TauPSite::integrateDistance | ( | double | p,
|  | double | r,
|  | double & | d
| ) |  |

bool taup::TauPSite::integrateDistance | ( | double | p,
|  | double | r1,
|  | double | r2,
|  | double & | d
| ) |  |

bool taup::TauPSite::integrateTime | ( | double | p,
|  | double & | d,
|  | bool | bottom_pass = `false`
| ) |  |

If the ray parameter is equal to the top of a layers ray parameter in a shadow then the boolean flag bottom_pass should be set to true to ensure that the integration does not terminate before accumulating the run-up to the top of the next layer.

bool taup::TauPSite::integrateTime | ( | double | p,
|  | double | r,
|  | double & | d
| ) |  |

bool taup::TauPSite::integrateTime | ( | double | p,
|  | double | r1,
|  | double | r2,
|  | double & | t
| ) |  |

double taup::TauPSite::layeredTravelTime | ( | double | pT,
|  | double | pB,
|  | double | dist,
|  | double | depth,
|  | double & | T,
|  | double | pI
| ) |  |
| private

TauPSite& taup::TauPSite::operator= | ( | const TauPSite & | tps | ) |

void taup::TauPSite::reEvaluateDerivatives | ( | double | pT,
|  | double | pB,
|  | double | T00,
|  | double | dist,
|  | double | depth,
|  | double | edist,
|  | double | edepth,
|  | double * | derivs,
|  | double | pI,
|  | int | derivcnt
| ) |  |
| private

TravelTimeResult* taup::TauPSite::saveResult | ( | double | p,
|  | int | i,
|  | bool | isintrfcupper,
|  | bool | isintrfclower,
|  | bool | isspltlower,
|  | bool | isspltupper,
|  | bool | isturningzero
| ) |  |
| private

TravelTimeResult* taup::TauPSite::saveResultI | ( | double | pB,
|  | double | pI,
|  | double | dist,
|  | int | i,
|  | bool | isUpper,
|  | bool | isLower
| ) |  |
| private

void taup::TauPSite::setBrentsTolerance | ( | double | tol | ) |
| inline

void taup::TauPSite::setEarthRadius | ( | double | r | ) |
| inline

Set the Earth radius.

void taup::TauPSite::setModelName | ( | const string & | modname | ) |
| inline

Returns the model name.

void taup::TauPSite::setSiteDepth | ( | double | depth | ) |

void taup::TauPSite::setVelocityModels | ( | const vector< TPVelocityLayer * > & | vm | ) |

virtual void taup::TauPSite::toStream | ( | ostream & | os,
|  | string | indent
| ) |  | const
| virtual

string taup::TauPSite::toString | ( |  | ) | const

virtual void taup::TauPSite::writeData | ( | const string & | filename | ) | const
| virtual

virtual void taup::TauPSite::writeData | ( | ostream & | os | ) | const
| privatevirtual

void taup::TauPSite::writeLayerData | ( | int | i,
|  | ostream & | os,
|  | int | n,
|  | double | f0 = `0.0`,
|  | double | f1 = `1.0`
| ) |  |

The ray parameter (s/deg) is written along with the travel distance (deg) into the input stream os. At least n points will be written but more may be required if the maximum traversed distance divided by n is exceeded in any step. The function automatically decrements the ray-parameter step size for areas where the corresponding distance step size exceeds the aforementioned limit.

## Member Data Documentation

const double taup::TauPSite::tpsBrentsZeroInTol
| staticprivate

int taup::TauPSite::tpsClassCount
| staticprivate

const double taup::TauPSite::tpsDerivStepSize
| staticprivate

double taup::TauPSite::tpsDist
| private

bool taup::TauPSite::tpsIsVelModlOwned
| private

double taup::TauPSite::tpsLastDepth
| private

double taup::TauPSite::tpsLastDist
| private

string taup::TauPSite::tpsModelName
| private

double taup::TauPSite::tpsRcvrDepth
| private

string taup::TauPSite::tpsRcvrName
| private

string taup::TauPSite::tpsRcvrPhase
| private

double taup::TauPSite::tpsRcvrRad
| private

vector<TravelTimeResult*> taup::TauPSite::tpsReuseTTR
| staticprivate

double taup::TauPSite::tpsSrcDepth
| private

double taup::TauPSite::tpsSrcRad
| private

map<double, TravelTimeResult*> taup::TauPSite::tpsTTR
| private

vector<TPVelocityLayer*> taup::TauPSite::tpsVLayer
| private

TPZeroFunctional taup::TauPSite::tpsZeroF
| private

util::Brents<TPZeroFunctional> taup::TauPSite::tpsZeroIn
| 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/TauPSite.h