|
| 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...
|
|
|
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...
|
|
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.