RSTT 3.2.1 Regional Seismic Travel Time

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

Abstract base class velocity layer model inherited by all concrete velocity layer classes. The inheritance hierarchy for a typical velocity layer object, VL, is: More...

`#include <TPVelocityModels.h>`

Inheritance diagram for taup::TPVelocityLayer:

## Public Member Functions
| TPVelocityLayer ()
| Default constructor. Sets top and bottom layer radius to zero.
| TPVelocityLayer (double rt, double rb, const string &layrnam)
| TPVelocityLayer (const TPVelocityLayer &vl)
| Copy constructor.
virtual | ~TPVelocityLayer ()
| Destructor.
TPVelocityLayer & | operator= (const TPVelocityLayer &vl)
| Assignment Operator.
virtual double | operator() (double r)
void | init ()
| Initializes the velocity layer evaluating vlVt, vlVb, vlPt, and vlPb;.
virtual void | writeNormRadius (ostream &os) const
| Used to write the normalized radius parameter (if defined) to a CLR output stream os.
virtual void | writeVelocity (ostream &os) const
| Used to write the CLR formatted velocity profile to the input output stream os.
virtual double | rAtP (double p)
double | pAtR (double r)
double | integDistance (double p, double r=-1.0)
| The distance integration function which gives the distance of the ray travel from the surface of the Earth to the ray turning depth as a function of the ray parameter p (slowness). The integration terminates before the turning depth if the radius r is positive.
double | integDistance (double p, double r1, double r2)
| The distance integration function which gives the distance of the ray travel from radius r1 to radius r2 as a function of the ray parameter p (slowness). The integration terminates at the turning depth if that occurs before reaching r2.
double | integTime (double p, double r=-1.0)
| The time integration function which gives the time of the ray travel from the surface of the Earth to the ray turning depth as a function of the ray parameter p (slowness). The integration terminates before the turning depth if the radius r is positive.
double | integTime (double p, double r1, double r2)
| The time integration function which gives the time of the ray travel from radius r1 to radius r2 as a function of the ray parameter p (slowness). The integration terminates at the turning depth if that occurs before reaching r2.
virtual double | integrateDistance (double p, double ra, bool r_open=false)
| The distance integration function that calculates the ray travel distance from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.
virtual double | integrateDistance (double p, double ra, double rb, bool r_open=false)
| The distance integration function that calculates the ray travel distance from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.
virtual double | integrateTime (double p, double ra)
| The time (or tau) integration function that calculates the ray travel time from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.
virtual double | integrateTime (double p, double ra, double rb)
| The time (or tau) integration function that calculates the ray travel time from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.
virtual bool | isTimeIntegralTau () const
| The Default time integral is really Tau function which must be added to p * distance. Override this function to return false if the time integral returns time and not tau.
double | getRt () const
| Returns the top of the layer radius.
double | getRb () const
| Returns the bottom of the layer radius.
double | getVt () const
| Returns the top of the layer velocity.
double | getVb () const
| Returns the bottom of the layer velocity.
double | getPt () const
| Returns the top of the layer ray parameter (slowness).
double | getPb () const
| Returns the bottom of the layer ray parameter (slowness).
double | getTurningRadius () const
double | getTurningVelocity () const
void | setPmin (double pmin)
| Sets the minimum ray parameter for the layer. If less than getPt() then the top half of the layer is shadowed.
double | getPmin () const
| Returns the minimum passing ray parameter for the layer. if less than getPt() then the top half of the layer is shadowed.
void | setDistT (double d)
| Sets the accumulated distance through all layers upto the top of this layer given a ray parameter of vlPt() or vlPmin(), whichever is smaller.
double | getDistT () const
| Returns the accumulated distance through all layers upto the top of this layer given a ray parameter of vlPt() or vlPmin(), whichever is smaller.
void | setDistB (double d)
| Sets the accumulated distance through all layers including this one given a ray parameter of vlPb() or vlPmin(), whichever is smaller.
double | getDistB () const
| Returns the accumulated distance through all layers including this one given a ray parameter of vlPb() or vlPmin(), whichever is smaller.
void | setdDistdPT (double dDdP)
| Sets the derivative of the distance wrt. the ray parameter at the top of the layer.
double | getdDistdPT () const
| Returns the derivative of the distance wrt. the ray parameter at the top of the layer.
void | setdDistdPB (double dDdP)
| Sets the derivative of the distance wrt. the ray parameter at the bottom of the layer.
double | getdDistdPB () const
| Returns the derivative of the distance wrt. the ray parameter at the bottom of the layer.
void | setLayerType (int lt)
int | getLayerType () const
const string & | getLayerName () const
| Returns the descriptive layer name.
void | setPhaseTypeP ()
| Sets the layer phase type to "P".
void | setPhaseTypeS ()
| Sets the layer phase type to "S".
void | setPhaseType (const string &phtype)
| Sets the layer phase type to phtype.
const string & | getPhaseType () const
| Returns the layer phase type string.
void | setPhaseName (const string &name)
| Sets the layer default phase name.
const string & | getPhaseName () const
| Returns the layer default phase name.
void | setPhaseNameUpper (const string &name)
| Sets the upper phase name if the layer is a retrograde layer.
const string & | getPhaseNameUpper () const
| Returns the upper phase name if the layer is a retrograde layer.
void | setPhaseNameLower (const string &name)
| Sets the lower phase name if the layer is a retrograde layer.
const string & | getPhaseNameLower () const
| Returns the lower phase name if the layer is a retrograde layer.
void | setPhaseNameDiff (const string &name)
| Sets the upper interface phase name.
const string & | getPhaseNameDiff () const
| Returns the upper interface phase name if assigned.
void | setPhaseNameDiffLower (const string &name)
| Sets the lower interface phase name.
const string & | getPhaseNameDiffLower () const
| Returns the lower interface phase name if assigned.
void | setPhaseDiffDef (bool def)
| Sets the upper diffracted wave phase for this layer to true even if it has no formal phase name definition. This will default to use the default evaluated names of X#i+ where # is the layer # and X is "P" or "S".
void | setPhaseDiffLowerDef (bool def)
| Sets the lower diffracted wave phase for this layer to true even if it has no formal phase name definition. This will default to use the default evaluated names of X#i- where # is the layer # and X is "P" or "S".
bool | isPhaseDiffDefined () const
| Returns true if the upper diffracted phase is defined for this layer.
bool | isPhaseDiffLowerDefined () const
| Returns true if the lower diffracted phase is defined for this layer.
double | getPCrit () const
double | getDistCrit () const
bool | isSplitLayer () const
| Returns true if the layer is a retrograde layer.
void | setSplitLayer (double pcrit, double dcrit)
| Sets the layers retrograde parameters if the layer was found to contain a retrograde minimum.
bool | invalidRay () const
| Returns true if the last evaluated ray parameter was unable to pass through this layer.
bool | passingRay () const
| Returns true if the last evaluated ray parameter passed through this layer.
bool | turningRay () const
| Returns true if the last evaluated ray parameter produced a turning ray in this layer.
string | toString () const
| Print object data to string.
virtual void | toStream (ostream &os, string indent) const
| Print object data to input stream os.
virtual string | get_class_name () const
| Virtual function that returns the class name.
virtual int | classSize () const
| Returns the class size.
virtual bool | isVelocityConstant () const
virtual bool | isVelocityPowerLaw () const
virtual bool | isVelocityLinear () const
virtual bool | isVelocityQuadratic () const
virtual bool | isVelocityCubic () const
virtual int | bufferSize () const
virtual void | serialize (DataBuffer &buffer)
virtual void | deserialize (DataBuffer &buffer)

## Static Public Member Functions
static TPVelocityLayer * | newModelCopy (TPVelocityLayer *tpvl)
| TPVelocityLayer factory method that returns a new TPVelocityLayer object copied from the input object tpvl.
static TPVelocityLayer * | newModelCopy (const string &cnam, DataBuffer &buffer)
| TPVelocityLayer factory method that returns a new TPVelocityLayer object of derived type name, /em cnam. The data used to define the layer is given in the DataBuffer buffer.
static string | class_name ()
| Static function that returns the class name.

## Protected Member Functions
void | setRay (double p)
| Sets the ray as invalid, passing, or turning given an input ray parameter p. This function also sets the turning radius and velocity (vlRTurn and vlVTurn).
void | setUpDownRay (double p, double r1, double r2)
| Sets the upgoing / downgoing flags for an integration between r1 and r2 for the input ray parameter p. If the ray turns between r1 and r2 in the layer, or the ray parameter is larger than the largest ray parameter evaluated at r1 and r2, or the r2 > r1 then the invalid ray flag is set.

## Protected Attributes
string | vlLayerName
| The descriptive name of the velocity layer.
string | vlPhaseType
| The phase type name ... either "P" or "S".
string | vlPhase
| The phase name of a ray that turns in the layer. This name is optional and used to define the phase unless overidden by vlPhaseUpper or vlPhaseLower for retrograde layers.
string | vlPhaseUpper
| The name of the phase for a ray that turns in the top half of a retro-grade layer. This name is optional and only used if assigned to a retrograde layer.
string | vlPhaseLower
| The name of the phase for a ray that turns in the bottom half of a retro-grade layer. This name is optional and only used if assigned to a retrograde layer.
string | vlPhaseIUpper
| The name of the diffracted phase for a ray that bottoms in the layer and uses the layers bottom velocity to travel along the layer boundary. This name is optional and only required if the phase is to be supported.
string | vlPhaseILower
| The name of the diffracted phase of a ray that bottoms in the layer and uses the next layers top velocity to travel along the layer boundary. This name is optional and only required if the phase is to be supported.
int | vlLayerType
| An integer value that describes the layer type.
bool | vlSplitLayer
| Boolean flag that is true if the velocity layer is a retrograde layer.
bool | vlInvalidRay
| Boolean flag that is true if the last distance / time evaluation for this velocity layer was invalid.
bool | vlPassingRay
| Boolean flag that is true if the last distance / time evaluation for this velocity layer was a passing ray.
bool | vlTurningRay
| Boolean flag that is true if the last distance / time evaluation for this velocity layer was a turning ray.
bool | vlPhaseUpperIDef
| Set to true if the upper diffracted phase for this layer is to be evaluated.
bool | vlPhaseLowerIDef
| Set to true if the lower diffracted phase for this layer is to be evaluated.
double | vlRt
| The layer top radius.
double | vlRb
| The layer bottom radius.
double | vlIRt
| The last integration top radius for this layer.
double | vlIRb
| The last integration bottom radius for this layer.
double | vlVt
| The layer top velocity.
double | vlVb
| The layer bottom velocity.
double | vlPt
| The layer top ray parameter (vlRt / vlVt).
double | vlPb
| The layer bottom ray parameter (vlRb / vlVb).
double | vlRTurn
double | vlVTurn
double | vlRLast
| Contains the last evaluated turning depth (or vlRb).
double | vlDistT
| The integrated distance to the top of the layer using the top ray parameter (vlPt or vlPmin if the layer is partially shadowed).
double | vlDistB
| The integrated distance to the bottom of the layer using the bottom ray parameter (vlPb or vlPmin if the layer is partially shadowed).
double | vldDistdP_T
| The derivative of distance wrt. the ray parameter at the top of the layer.
double | vldDistdP_B
| The derivative of distance wrt. the ray parameter at the bottom of the layer.
double | vlPmin
| The minimum allowed valid ray parameter that marks a passing limit in the layer. If vlPmin >= vlPt then all rays can penentrate the layer. If vlPMin < vlPb then the layer is a shadow layer and only passing rays (p < vlPb) can pass. If in between then vlPmin marks the boundary where a valid turning ray is allowed and a bounding shadow region exists above or below vlPmin.
double | vlPCrit
| The ray parameter that gives the distance minimum of a retrograde layer. If the layer is not retrograde this value is ignored.
double | vlDistCrit
| The distance to the minimum of the retrograde layer if the layer is retrograde. Otherwise ignored.

## Detailed Description

Abstract base class velocity layer model inherited by all concrete velocity layer classes. The inheritance hierarchy for a typical velocity layer object, VL, is:

    VL::VelocityIntegrate<VL>::TPVelocityLayer.

VL contains the definition of the velocity function for the layer which is evaluated using the overloaded operator ().

    virtual double  operator()(double r);

VL also contains the definition for retrieving the radius in the layer given an input ray parameter.

    virtual double  rAtP(double p);

If the distance and or time functions can be evaluated analytically then they are also defined in VL which will override the default numerical versions of at run time.

    virtual double integrateDistance(double p, double r,
                                     bool r_open = false);
    virtual double integrateTime(double p, double r);

The VelocityIntegrate<VL> template object is used to exclusively numerically integrate the distance and time functions if analytic versions were not provided in the VL defintion. A template is used to avoid virtual pointer traversal during the numerical integration process which can evaluate the integrand many hundreds of times per integration.

This object, the base class TPVelocityLayer, contains the bulk of the contents of the commonality shared between all velocity layers including a descriptive name, a phase name breakdown, the radius, ray parameter, velocity, distance to, and distance/ray parameter derivatives of the layer defined at the top and bottom, layer type designations, retrograde definitions, and current processing defintions for the layer including the last ray parameter used to integrate distance and time and the results of the integration.

Definition at line 264 of file TPVelocityModels.h.

## Constructor & Destructor Documentation

## ◆ TPVelocityLayer() [1/3]

taup::TPVelocityLayer::TPVelocityLayer | ( |  | ) |
| inline

Default constructor. Sets top and bottom layer radius to zero.

Definition at line 271 of file TPVelocityModels.h.

## ◆ TPVelocityLayer() [2/3]

taup::TPVelocityLayer::TPVelocityLayer | ( | double | rt,
|  | double | rb,
|  | const string & | layrnam )
| inline

Standard constructor. Sets top and bottom layer radius to rt and rb.

Definition at line 288 of file TPVelocityModels.h.

## ◆ TPVelocityLayer() [3/3]

taup::TPVelocityLayer::TPVelocityLayer | ( | const TPVelocityLayer & | vl | ) |
| inline

Copy constructor.

Definition at line 304 of file TPVelocityModels.h.

## ◆ ~TPVelocityLayer()

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

Destructor.

Definition at line 324 of file TPVelocityModels.h.

## Member Function Documentation

## ◆ bufferSize()

virtual int taup::TPVelocityLayer::bufferSize | ( |  | ) | const
| inline virtual

Used to calculate the size of a DataBuffer required to contain all of the data defined for a TPVelocityLayer object.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

Definition at line 783 of file TPVelocityModels.h.

## ◆ class_name()

string taup::TPVelocityLayer::class_name | ( |  | ) |
| inline static

Static function that returns the class name.

Definition at line 764 of file TPVelocityModels.h.

## ◆ classSize()

virtual int taup::TPVelocityLayer::classSize | ( |  | ) | const
| inline virtual

Returns the class size.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

Definition at line 770 of file TPVelocityModels.h.

## ◆ deserialize()

virtual void taup::TPVelocityLayer::deserialize | ( | DataBuffer & | buffer | ) |
| inline virtual

Used to read the contents of a TPVelocityLayer object from the input DataBuffer object buffer.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

Definition at line 831 of file TPVelocityModels.h.

## ◆ get_class_name()

virtual string taup::TPVelocityLayer::get_class_name | ( |  | ) | const
| inline virtual

Virtual function that returns the class name.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

Definition at line 767 of file TPVelocityModels.h.

## ◆ getdDistdPB()

double taup::TPVelocityLayer::getdDistdPB | ( |  | ) | const
| inline

Returns the derivative of the distance wrt. the ray parameter at the bottom of the layer.

Definition at line 636 of file TPVelocityModels.h.

## ◆ getdDistdPT()

double taup::TPVelocityLayer::getdDistdPT | ( |  | ) | const
| inline

Returns the derivative of the distance wrt. the ray parameter at the top of the layer.

Definition at line 628 of file TPVelocityModels.h.

## ◆ getDistB()

double taup::TPVelocityLayer::getDistB | ( |  | ) | const
| inline

Returns the accumulated distance through all layers including this one given a ray parameter of vlPb() or vlPmin(), whichever is smaller.

Definition at line 620 of file TPVelocityModels.h.

## ◆ getDistCrit()

double taup::TPVelocityLayer::getDistCrit | ( |  | ) | const
| inline

Returns the distance to the retrograde minimum if the layer is a retrograde layer. Otherwise -1.0 is returned.

Definition at line 731 of file TPVelocityModels.h.

## ◆ getDistT()

double taup::TPVelocityLayer::getDistT | ( |  | ) | const
| inline

Returns the accumulated distance through all layers upto the top of this layer given a ray parameter of vlPt() or vlPmin(), whichever is smaller.

Definition at line 610 of file TPVelocityModels.h.

## ◆ getLayerName()

const string & taup::TPVelocityLayer::getLayerName | ( |  | ) | const
| inline

Returns the descriptive layer name.

Definition at line 653 of file TPVelocityModels.h.

## ◆ getLayerType()

int taup::TPVelocityLayer::getLayerType | ( |  | ) | const
| inline

Returns the layer type. 0 = "Turning Layer" 1 = "Top Shadow, Bottom Turning" 2 = "Top Turning, Bottom Shadow" 3 = "Shadow Layer"

Definition at line 650 of file TPVelocityModels.h.

## ◆ getPb()

double taup::TPVelocityLayer::getPb | ( |  | ) | const
| inline

Returns the bottom of the layer ray parameter (slowness).

Definition at line 580 of file TPVelocityModels.h.

## ◆ getPCrit()

double taup::TPVelocityLayer::getPCrit | ( |  | ) | const
| inline

Returns the ray parameter that gives the retrograde minimum distance if the layer is a retrograde layer. Otherwise -1.0 is returned.

Definition at line 727 of file TPVelocityModels.h.

## ◆ getPhaseName()

const string & taup::TPVelocityLayer::getPhaseName | ( |  | ) | const
| inline

Returns the layer default phase name.

Definition at line 672 of file TPVelocityModels.h.

## ◆ getPhaseNameDiff()

const string & taup::TPVelocityLayer::getPhaseNameDiff | ( |  | ) | const
| inline

Returns the upper interface phase name if assigned.

Definition at line 693 of file TPVelocityModels.h.

## ◆ getPhaseNameDiffLower()

const string & taup::TPVelocityLayer::getPhaseNameDiffLower | ( |  | ) | const
| inline

Returns the lower interface phase name if assigned.

Definition at line 700 of file TPVelocityModels.h.

## ◆ getPhaseNameLower()

const string & taup::TPVelocityLayer::getPhaseNameLower | ( |  | ) | const
| inline

Returns the lower phase name if the layer is a retrograde layer.

Definition at line 686 of file TPVelocityModels.h.

## ◆ getPhaseNameUpper()

const string & taup::TPVelocityLayer::getPhaseNameUpper | ( |  | ) | const
| inline

Returns the upper phase name if the layer is a retrograde layer.

Definition at line 679 of file TPVelocityModels.h.

## ◆ getPhaseType()

const string & taup::TPVelocityLayer::getPhaseType | ( |  | ) | const
| inline

Returns the layer phase type string.

Definition at line 666 of file TPVelocityModels.h.

## ◆ getPmin()

double taup::TPVelocityLayer::getPmin | ( |  | ) | const
| inline

Returns the minimum passing ray parameter for the layer. if less than getPt() then the top half of the layer is shadowed.

Definition at line 600 of file TPVelocityModels.h.

## ◆ getPt()

double taup::TPVelocityLayer::getPt | ( |  | ) | const
| inline

Returns the top of the layer ray parameter (slowness).

Definition at line 577 of file TPVelocityModels.h.

## ◆ getRb()

double taup::TPVelocityLayer::getRb | ( |  | ) | const
| inline

Returns the bottom of the layer radius.

Definition at line 568 of file TPVelocityModels.h.

## ◆ getRt()

double taup::TPVelocityLayer::getRt | ( |  | ) | const
| inline

Returns the top of the layer radius.

Definition at line 565 of file TPVelocityModels.h.

## ◆ getTurningRadius()

double taup::TPVelocityLayer::getTurningRadius | ( |  | ) | const
| inline

/brief Returns the last evaluated turning radius for this layer. If the last evaluation was a passing ray then the bottom radius is returned. One must inspect the boolean function isTurning() to determine if the ray really turned in the layer.

Definition at line 586 of file TPVelocityModels.h.

## ◆ getTurningVelocity()

double taup::TPVelocityLayer::getTurningVelocity | ( |  | ) | const
| inline

/brief Returns the last evaluated turning velocity for this layer. If the last evaluation was a passing ray then the bottom velocity is returned. One must inspect the boolean function isTurning() to determine if the ray really turned in the layer.

Definition at line 592 of file TPVelocityModels.h.

## ◆ getVb()

double taup::TPVelocityLayer::getVb | ( |  | ) | const
| inline

Returns the bottom of the layer velocity.

Definition at line 574 of file TPVelocityModels.h.

## ◆ getVt()

double taup::TPVelocityLayer::getVt | ( |  | ) | const
| inline

Returns the top of the layer velocity.

Definition at line 571 of file TPVelocityModels.h.

## ◆ init()

void taup::TPVelocityLayer::init | ( |  | ) |
| inline

Initializes the velocity layer evaluating vlVt, vlVb, vlPt, and vlPb;.

Definition at line 379 of file TPVelocityModels.h.

## ◆ integDistance() [1/2]

double taup::TPVelocityLayer::integDistance | ( | double | p,
|  | double | r1,
|  | double | r2 )
| inline

The distance integration function which gives the distance of the ray travel from radius r1 to radius r2 as a function of the ray parameter p (slowness). The integration terminates at the turning depth if that occurs before reaching r2.

Definition at line 456 of file TPVelocityModels.h.

## ◆ integDistance() [2/2]

double taup::TPVelocityLayer::integDistance | ( | double | p,
|  | double | r = -1.0 )
| inline

The distance integration function which gives the distance of the ray travel from the surface of the Earth to the ray turning depth as a function of the ray parameter p (slowness). The integration terminates before the turning depth if the radius r is positive.

Definition at line 420 of file TPVelocityModels.h.

## ◆ integrateDistance() [1/2]

virtual double taup::TPVelocityLayer::integrateDistance | ( | double | p,
|  | double | ra,
|  | bool | r_open = false )
| virtual

The distance integration function that calculates the ray travel distance from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.

If the flag r_open is true and a numerical integration is to be performed then the open limit integration function IntegrateFunction::integrateAOpenS(...) is called. Otherwise the closed form function, IntegrateFunction::integrateClosed(...), is used. If the velocity model is defined analytically then the flag is ignored.

Reimplemented in taup::VelocityConst, taup::VelocityIntegrate< V >, taup::VelocityLinear, and taup::VelocityPower.

## ◆ integrateDistance() [2/2]

virtual double taup::TPVelocityLayer::integrateDistance | ( | double | p,
|  | double | ra,
|  | double | rb,
|  | bool | r_open = false )
| virtual

The distance integration function that calculates the ray travel distance from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.

If the flag r_open is true and a numerical integration is to be performed then the open limit integration function IntegrateFunction::integrateAOpenS(...) is called. Otherwise the closed form function, IntegrateFunction::integrateClosed(...), is used. If the velocity model is defined analytically then the flag is ignored.

Reimplemented in taup::VelocityConst, taup::VelocityIntegrate< V >, taup::VelocityIntegrate< VelocityConst >, taup::VelocityIntegrate< VelocityCubic >, taup::VelocityIntegrate< VelocityLinear >, taup::VelocityIntegrate< VelocityPower >, taup::VelocityIntegrate< VelocityQuadratic >, taup::VelocityLinear, and taup::VelocityPower.

## ◆ integrateTime() [1/2]

virtual double taup::TPVelocityLayer::integrateTime | ( | double | p,
|  | double | ra )
| virtual

The time (or tau) integration function that calculates the ray travel time from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.

Reimplemented in taup::VelocityConst, taup::VelocityIntegrate< V >, and taup::VelocityPower.

## ◆ integrateTime() [2/2]

virtual double taup::TPVelocityLayer::integrateTime | ( | double | p,
|  | double | ra,
|  | double | rb )
| virtual

The time (or tau) integration function that calculates the ray travel time from the start of the layer boundary (vlRt) to depth r given the input ray parameter p. This function is defined by super classes of this object.

Reimplemented in taup::VelocityConst, taup::VelocityIntegrate< V >, taup::VelocityIntegrate< VelocityConst >, taup::VelocityIntegrate< VelocityCubic >, taup::VelocityIntegrate< VelocityLinear >, taup::VelocityIntegrate< VelocityPower >, taup::VelocityIntegrate< VelocityQuadratic >, and taup::VelocityPower.

## ◆ integTime() [1/2]

double taup::TPVelocityLayer::integTime | ( | double | p,
|  | double | r1,
|  | double | r2 )
| inline

The time integration function which gives the time of the ray travel from radius r1 to radius r2 as a function of the ray parameter p (slowness). The integration terminates at the turning depth if that occurs before reaching r2.

Definition at line 499 of file TPVelocityModels.h.

## ◆ integTime() [2/2]

double taup::TPVelocityLayer::integTime | ( | double | p,
|  | double | r = -1.0 )
| inline

The time integration function which gives the time of the ray travel from the surface of the Earth to the ray turning depth as a function of the ray parameter p (slowness). The integration terminates before the turning depth if the radius r is positive.

Definition at line 477 of file TPVelocityModels.h.

## ◆ invalidRay()

bool taup::TPVelocityLayer::invalidRay | ( |  | ) | const
| inline

Returns true if the last evaluated ray parameter was unable to pass through this layer.

Definition at line 747 of file TPVelocityModels.h.

## ◆ isPhaseDiffDefined()

bool taup::TPVelocityLayer::isPhaseDiffDefined | ( |  | ) | const
| inline

Returns true if the upper diffracted phase is defined for this layer.

Definition at line 717 of file TPVelocityModels.h.

## ◆ isPhaseDiffLowerDefined()

bool taup::TPVelocityLayer::isPhaseDiffLowerDefined | ( |  | ) | const
| inline

Returns true if the lower diffracted phase is defined for this layer.

Definition at line 721 of file TPVelocityModels.h.

## ◆ isSplitLayer()

bool taup::TPVelocityLayer::isSplitLayer | ( |  | ) | const
| inline

Returns true if the layer is a retrograde layer.

Definition at line 734 of file TPVelocityModels.h.

## ◆ isTimeIntegralTau()

virtual bool taup::TPVelocityLayer::isTimeIntegralTau | ( |  | ) | const
| inline virtual

The Default time integral is really Tau function which must be added to p * distance. Override this function to return false if the time integral returns time and not tau.

Reimplemented in taup::VelocityConst, and taup::VelocityPower.

Definition at line 562 of file TPVelocityModels.h.

## ◆ isVelocityConstant()

virtual bool taup::TPVelocityLayer::isVelocityConstant | ( |  | ) | const
| inline virtual

Virtual function that returns False for each model type. These functions are defined in each model type to return true.

Reimplemented in taup::VelocityConst.

Definition at line 775 of file TPVelocityModels.h.

## ◆ isVelocityCubic()

virtual bool taup::TPVelocityLayer::isVelocityCubic | ( |  | ) | const
| inline virtual

Reimplemented in taup::VelocityCubic.

Definition at line 779 of file TPVelocityModels.h.

## ◆ isVelocityLinear()

virtual bool taup::TPVelocityLayer::isVelocityLinear | ( |  | ) | const
| inline virtual

Reimplemented in taup::VelocityLinear.

Definition at line 777 of file TPVelocityModels.h.

## ◆ isVelocityPowerLaw()

virtual bool taup::TPVelocityLayer::isVelocityPowerLaw | ( |  | ) | const
| inline virtual

Reimplemented in taup::VelocityPower.

Definition at line 776 of file TPVelocityModels.h.

## ◆ isVelocityQuadratic()

virtual bool taup::TPVelocityLayer::isVelocityQuadratic | ( |  | ) | const
| inline virtual

Reimplemented in taup::VelocityQuadratic.

Definition at line 778 of file TPVelocityModels.h.

## ◆ newModelCopy() [1/2]

TPVelocityLayer * taup::TPVelocityLayer::newModelCopy | ( | const string & | cnam,
|  | DataBuffer & | buffer )
| static

TPVelocityLayer factory method that returns a new TPVelocityLayer object of derived type name, /em cnam. The data used to define the layer is given in the DataBuffer buffer.

## ◆ newModelCopy() [2/2]

TPVelocityLayer * taup::TPVelocityLayer::newModelCopy | ( | TPVelocityLayer * | tpvl | ) |
| static

TPVelocityLayer factory method that returns a new TPVelocityLayer object copied from the input object tpvl.

## ◆ operator()()

virtual double taup::TPVelocityLayer::operator() | ( | double | r | ) |
| virtual

Standard operator() overload which returns the velocity at radius r. The radius is defined from the center of the Earth.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

## ◆ operator=()

TPVelocityLayer & taup::TPVelocityLayer::operator= | ( | const TPVelocityLayer & | vl | ) |
| inline

Assignment Operator.

Definition at line 329 of file TPVelocityModels.h.

## ◆ passingRay()

bool taup::TPVelocityLayer::passingRay | ( |  | ) | const
| inline

Returns true if the last evaluated ray parameter passed through this layer.

Definition at line 751 of file TPVelocityModels.h.

## ◆ pAtR()

double taup::TPVelocityLayer::pAtR | ( | double | r | ) |
| inline

Standard function that returns the turning ray parameter as a function of radius r. The turning ray parameter is defined as p = r / v(r) where v(r) is the radial velocity.

Definition at line 414 of file TPVelocityModels.h.

## ◆ rAtP()

virtual double taup::TPVelocityLayer::rAtP | ( | double | p | ) |
| virtual

Standard function that returns the radius as function of the turning ray parameter p. The turning ray parameter is defined as p = r / v(r) where v(r) is the radial velocity

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

## ◆ serialize()

virtual void taup::TPVelocityLayer::serialize | ( | DataBuffer & | buffer | ) |
| inline virtual

Used to write the contents of a TPVelocityLayer object into the input DataBuffer object buffer.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

Definition at line 796 of file TPVelocityModels.h.

## ◆ setdDistdPB()

void taup::TPVelocityLayer::setdDistdPB | ( | double | dDdP | ) |
| inline

Sets the derivative of the distance wrt. the ray parameter at the bottom of the layer.

Definition at line 632 of file TPVelocityModels.h.

## ◆ setdDistdPT()

void taup::TPVelocityLayer::setdDistdPT | ( | double | dDdP | ) |
| inline

Sets the derivative of the distance wrt. the ray parameter at the top of the layer.

Definition at line 624 of file TPVelocityModels.h.

## ◆ setDistB()

void taup::TPVelocityLayer::setDistB | ( | double | d | ) |
| inline

Sets the accumulated distance through all layers including this one given a ray parameter of vlPb() or vlPmin(), whichever is smaller.

Definition at line 615 of file TPVelocityModels.h.

## ◆ setDistT()

void taup::TPVelocityLayer::setDistT | ( | double | d | ) |
| inline

Sets the accumulated distance through all layers upto the top of this layer given a ray parameter of vlPt() or vlPmin(), whichever is smaller.

Definition at line 605 of file TPVelocityModels.h.

## ◆ setLayerType()

void taup::TPVelocityLayer::setLayerType | ( | int | lt | ) |
| inline

Sets the layer type: 0 = "Turning Layer" 1 = "Top Shadow, Bottom Turning" 2 = "Top Turning, Bottom Shadow" 3 = "Shadow Layer"

Definition at line 643 of file TPVelocityModels.h.

## ◆ setPhaseDiffDef()

void taup::TPVelocityLayer::setPhaseDiffDef | ( | bool | def | ) |
| inline

Sets the upper diffracted wave phase for this layer to true even if it has no formal phase name definition. This will default to use the default evaluated names of X#i+ where # is the layer # and X is "P" or "S".

Definition at line 706 of file TPVelocityModels.h.

## ◆ setPhaseDiffLowerDef()

void taup::TPVelocityLayer::setPhaseDiffLowerDef | ( | bool | def | ) |
| inline

Sets the lower diffracted wave phase for this layer to true even if it has no formal phase name definition. This will default to use the default evaluated names of X#i- where # is the layer # and X is "P" or "S".

Definition at line 713 of file TPVelocityModels.h.

## ◆ setPhaseName()

void taup::TPVelocityLayer::setPhaseName | ( | const string & | name | ) |
| inline

Sets the layer default phase name.

Definition at line 669 of file TPVelocityModels.h.

## ◆ setPhaseNameDiff()

void taup::TPVelocityLayer::setPhaseNameDiff | ( | const string & | name | ) |
| inline

Sets the upper interface phase name.

Definition at line 689 of file TPVelocityModels.h.

## ◆ setPhaseNameDiffLower()

void taup::TPVelocityLayer::setPhaseNameDiffLower | ( | const string & | name | ) |
| inline

Sets the lower interface phase name.

Definition at line 696 of file TPVelocityModels.h.

## ◆ setPhaseNameLower()

void taup::TPVelocityLayer::setPhaseNameLower | ( | const string & | name | ) |
| inline

Sets the lower phase name if the layer is a retrograde layer.

Definition at line 682 of file TPVelocityModels.h.

## ◆ setPhaseNameUpper()

void taup::TPVelocityLayer::setPhaseNameUpper | ( | const string & | name | ) |
| inline

Sets the upper phase name if the layer is a retrograde layer.

Definition at line 675 of file TPVelocityModels.h.

## ◆ setPhaseType()

void taup::TPVelocityLayer::setPhaseType | ( | const string & | phtype | ) |
| inline

Sets the layer phase type to phtype.

Definition at line 662 of file TPVelocityModels.h.

## ◆ setPhaseTypeP()

void taup::TPVelocityLayer::setPhaseTypeP | ( |  | ) |
| inline

Sets the layer phase type to "P".

Definition at line 656 of file TPVelocityModels.h.

## ◆ setPhaseTypeS()

void taup::TPVelocityLayer::setPhaseTypeS | ( |  | ) |
| inline

Sets the layer phase type to "S".

Definition at line 659 of file TPVelocityModels.h.

## ◆ setPmin()

void taup::TPVelocityLayer::setPmin | ( | double | pmin | ) |
| inline

Sets the minimum ray parameter for the layer. If less than getPt() then the top half of the layer is shadowed.

Definition at line 596 of file TPVelocityModels.h.

## ◆ setRay()

void taup::TPVelocityLayer::setRay | ( | double | p | ) |
| inline protected

Sets the ray as invalid, passing, or turning given an input ray parameter p. This function also sets the turning radius and velocity (vlRTurn and vlVTurn).

Definition at line 869 of file TPVelocityModels.h.

## ◆ setSplitLayer()

void taup::TPVelocityLayer::setSplitLayer | ( | double | pcrit,
|  | double | dcrit )
| inline

Sets the layers retrograde parameters if the layer was found to contain a retrograde minimum.

Definition at line 738 of file TPVelocityModels.h.

## ◆ setUpDownRay()

void taup::TPVelocityLayer::setUpDownRay | ( | double | p,
|  | double | r1,
|  | double | r2 )
| inline protected

Sets the upgoing / downgoing flags for an integration between r1 and r2 for the input ray parameter p. If the ray turns between r1 and r2 in the layer, or the ray parameter is larger than the largest ray parameter evaluated at r1 and r2, or the r2 > r1 then the invalid ray flag is set.

Definition at line 917 of file TPVelocityModels.h.

## ◆ toStream()

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

Print object data to input stream os.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

## ◆ toString()

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

Print object data to string.

## ◆ turningRay()

bool taup::TPVelocityLayer::turningRay | ( |  | ) | const
| inline

Returns true if the last evaluated ray parameter produced a turning ray in this layer.

Definition at line 755 of file TPVelocityModels.h.

## ◆ writeNormRadius()

virtual void taup::TPVelocityLayer::writeNormRadius | ( | ostream & | os | ) | const
| inline virtual

Used to write the normalized radius parameter (if defined) to a CLR output stream os.

Reimplemented in taup::VelocityCubic, taup::VelocityLinear, and taup::VelocityQuadratic.

Definition at line 400 of file TPVelocityModels.h.

## ◆ writeVelocity()

virtual void taup::TPVelocityLayer::writeVelocity | ( | ostream & | os | ) | const
| virtual

Used to write the CLR formatted velocity profile to the input output stream os.

Reimplemented in taup::VelocityConst, taup::VelocityCubic, taup::VelocityLinear, taup::VelocityPower, and taup::VelocityQuadratic.

## Member Data Documentation

## ◆ vldDistdP_B

double taup::TPVelocityLayer::vldDistdP_B
| protected

The derivative of distance wrt. the ray parameter at the bottom of the layer.

Definition at line 1096 of file TPVelocityModels.h.

## ◆ vldDistdP_T

double taup::TPVelocityLayer::vldDistdP_T
| protected

The derivative of distance wrt. the ray parameter at the top of the layer.

Definition at line 1092 of file TPVelocityModels.h.

## ◆ vlDistB

double taup::TPVelocityLayer::vlDistB
| protected

The integrated distance to the bottom of the layer using the bottom ray parameter (vlPb or vlPmin if the layer is partially shadowed).

Definition at line 1088 of file TPVelocityModels.h.

## ◆ vlDistCrit

double taup::TPVelocityLayer::vlDistCrit
| protected

The distance to the minimum of the retrograde layer if the layer is retrograde. Otherwise ignored.

Definition at line 1113 of file TPVelocityModels.h.

## ◆ vlDistT

double taup::TPVelocityLayer::vlDistT
| protected

The integrated distance to the top of the layer using the top ray parameter (vlPt or vlPmin if the layer is partially shadowed).

Definition at line 1083 of file TPVelocityModels.h.

## ◆ vlInvalidRay

bool taup::TPVelocityLayer::vlInvalidRay
| protected

Boolean flag that is true if the last distance / time evaluation for this velocity layer was invalid.

Definition at line 1029 of file TPVelocityModels.h.

## ◆ vlIRb

double taup::TPVelocityLayer::vlIRb
| protected

The last integration bottom radius for this layer.

Definition at line 1057 of file TPVelocityModels.h.

## ◆ vlIRt

double taup::TPVelocityLayer::vlIRt
| protected

The last integration top radius for this layer.

Definition at line 1054 of file TPVelocityModels.h.

## ◆ vlLayerName

string taup::TPVelocityLayer::vlLayerName
| protected

The descriptive name of the velocity layer.

Definition at line 976 of file TPVelocityModels.h.

## ◆ vlLayerType

int taup::TPVelocityLayer::vlLayerType
| protected

An integer value that describes the layer type.

Valid types include:

    0: A Turning Layer ... A ray can turn anywhere within the layer
       between ray parameter values of vlPt to vlPb.
    1: A Bottom Turning Layer ... A ray can turn in the bottom half of
       the layer between vlPmin and vlPb but is shadowed (excluded) in
       the upper part of the layer.
    2: A Top Turning Layer ... A ray can turn in the top half of the
       layer between vlPt and vlPmin but is shadowed (excluded) in the
       lower part of the layer. And,
    3: A Shadow Layer ... No valid ray turns anywhere within the layer.

Definition at line 1021 of file TPVelocityModels.h.

## ◆ vlPassingRay

bool taup::TPVelocityLayer::vlPassingRay
| protected

Boolean flag that is true if the last distance / time evaluation for this velocity layer was a passing ray.

Definition at line 1033 of file TPVelocityModels.h.

## ◆ vlPb

double taup::TPVelocityLayer::vlPb
| protected

The layer bottom ray parameter (vlRb / vlVb).

Definition at line 1069 of file TPVelocityModels.h.

## ◆ vlPCrit

double taup::TPVelocityLayer::vlPCrit
| protected

The ray parameter that gives the distance minimum of a retrograde layer. If the layer is not retrograde this value is ignored.

Definition at line 1109 of file TPVelocityModels.h.

## ◆ vlPhase

string taup::TPVelocityLayer::vlPhase
| protected

The phase name of a ray that turns in the layer. This name is optional and used to define the phase unless overidden by vlPhaseUpper or vlPhaseLower for retrograde layers.

Definition at line 984 of file TPVelocityModels.h.

## ◆ vlPhaseILower

string taup::TPVelocityLayer::vlPhaseILower
| protected

The name of the diffracted phase of a ray that bottoms in the layer and uses the next layers top velocity to travel along the layer boundary. This name is optional and only required if the phase is to be supported.

Definition at line 1006 of file TPVelocityModels.h.

## ◆ vlPhaseIUpper

string taup::TPVelocityLayer::vlPhaseIUpper
| protected

The name of the diffracted phase for a ray that bottoms in the layer and uses the layers bottom velocity to travel along the layer boundary. This name is optional and only required if the phase is to be supported.

Definition at line 1000 of file TPVelocityModels.h.

## ◆ vlPhaseLower

string taup::TPVelocityLayer::vlPhaseLower
| protected

The name of the phase for a ray that turns in the bottom half of a retro-grade layer. This name is optional and only used if assigned to a retrograde layer.

Definition at line 994 of file TPVelocityModels.h.

## ◆ vlPhaseLowerIDef

bool taup::TPVelocityLayer::vlPhaseLowerIDef
| protected

Set to true if the lower diffracted phase for this layer is to be evaluated.

Definition at line 1045 of file TPVelocityModels.h.

## ◆ vlPhaseType

string taup::TPVelocityLayer::vlPhaseType
| protected

The phase type name ... either "P" or "S".

Definition at line 979 of file TPVelocityModels.h.

## ◆ vlPhaseUpper

string taup::TPVelocityLayer::vlPhaseUpper
| protected

The name of the phase for a ray that turns in the top half of a retro-grade layer. This name is optional and only used if assigned to a retrograde layer.

Definition at line 989 of file TPVelocityModels.h.

## ◆ vlPhaseUpperIDef

bool taup::TPVelocityLayer::vlPhaseUpperIDef
| protected

Set to true if the upper diffracted phase for this layer is to be evaluated.

Definition at line 1041 of file TPVelocityModels.h.

## ◆ vlPmin

double taup::TPVelocityLayer::vlPmin
| protected

The minimum allowed valid ray parameter that marks a passing limit in the layer. If vlPmin >= vlPt then all rays can penentrate the layer. If vlPMin < vlPb then the layer is a shadow layer and only passing rays (p < vlPb) can pass. If in between then vlPmin marks the boundary where a valid turning ray is allowed and a bounding shadow region exists above or below vlPmin.

Definition at line 1104 of file TPVelocityModels.h.

## ◆ vlPt

double taup::TPVelocityLayer::vlPt
| protected

The layer top ray parameter (vlRt / vlVt).

Definition at line 1066 of file TPVelocityModels.h.

## ◆ vlRb

double taup::TPVelocityLayer::vlRb
| protected

The layer bottom radius.

Definition at line 1051 of file TPVelocityModels.h.

## ◆ vlRLast

double taup::TPVelocityLayer::vlRLast
| protected

Contains the last evaluated turning depth (or vlRb).

Definition at line 1078 of file TPVelocityModels.h.

## ◆ vlRt

double taup::TPVelocityLayer::vlRt
| protected

The layer top radius.

Definition at line 1048 of file TPVelocityModels.h.

## ◆ vlRTurn

double taup::TPVelocityLayer::vlRTurn
| protected

Definition at line 1072 of file TPVelocityModels.h.

## ◆ vlSplitLayer

bool taup::TPVelocityLayer::vlSplitLayer
| protected

Boolean flag that is true if the velocity layer is a retrograde layer.

Definition at line 1025 of file TPVelocityModels.h.

## ◆ vlTurningRay

bool taup::TPVelocityLayer::vlTurningRay
| protected

Boolean flag that is true if the last distance / time evaluation for this velocity layer was a turning ray.

Definition at line 1037 of file TPVelocityModels.h.

## ◆ vlVb

double taup::TPVelocityLayer::vlVb
| protected

The layer bottom velocity.

Definition at line 1063 of file TPVelocityModels.h.

## ◆ vlVt

double taup::TPVelocityLayer::vlVt
| protected

The layer top velocity.

Definition at line 1060 of file TPVelocityModels.h.

## ◆ vlVTurn

double taup::TPVelocityLayer::vlVTurn
| protected

Definition at line 1075 of file TPVelocityModels.h.

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

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