RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
taup::VelocityIntegrate< V > Class Template Reference

`#include <TPVelocityModels.h>`

Inheritance diagram for taup::VelocityIntegrate< V >:

## Public Member Functions
| VelocityIntegrate ()
| Default constructor. Sets top radius to zero.
| VelocityIntegrate (double rt, double rb, const string &layrnam)
| Standard constructor. Sets top radius to rt.
| VelocityIntegrate (const VelocityIntegrate &vi)
| Copy constructor.
virtual | ~VelocityIntegrate ()
| Destructor.
VelocityIntegrate & | operator= (const VelocityIntegrate &vi)
| Assignment Operator.
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 performs the integration numerically using the integration object vmDistNI and the distance integrand object vmDist.
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 performs the integration numerically using the integration object vmDistNI and the distance integrand object vmDist.
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 performs the integration numerically using the integration object vmTauNI and the tau integrand object vmTau.
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 performs the integration numerically using the integration object vmTauNI and the tau integrand object vmTau.
void | setIntegTolerance (double tol)
| Sets the integration tolerance limit for this velocity layer. If the integration objects are not yet instantiated this function will create them before setting their tolerance.
Public Member Functions inherited from taup::TPVelocityLayer
| 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 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)

## Protected Member Functions
virtual void | createNumericObjects (V &v)
| Used to create the distance and tau integrand functions vmDist, and vmTau, and their associated integration objects vmDistNI and vmTauNI.
Protected Member Functions inherited from taup::TPVelocityLayer
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
TPdDistdr< V > * | vmDist
| The distance integrand object templated on the velocity.
TPdTaudr< V > * | vmTau
| The tau integrand object templated on the velocity.
util::IntegrateFunction< TPdDistdr< V > > * | vmDistNI
| The numerical integration object templated on vmDist.
util::IntegrateFunction< TPdTaudr< V > > * | vmTauNI
| The numerical integration object templated on vmTau.
Protected Attributes inherited from taup::TPVelocityLayer
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.

## Static Protected Attributes
static const double | vmIntegTol
| The default integration tolerance.

## Additional Inherited Members
Static Public Member Functions inherited from taup::TPVelocityLayer
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.

## Detailed Description

template<class V>
class taup::VelocityIntegrate< V >

The VelocityIntegrate<VL> template object is used to exclusively numerically integrate the distance and time functions if analytic versions were not provided in the superclass defintion (VL).

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 creates the numerical integrand templates

    TPdDistdr<V>* vmDist;
    TPdTaudr<V>*  vmTau;

which are used by the integration objects to integrate the spherically defined distance as a function of the layer velocity and input ray parameter. This object also creates the integration objects

    IntegrateFunction<TPdDistdr<V> >* vmDistNI;
    IntegrateFunction<TPdTaudr<V> >*  vmTauNI;

which are used to perform the numericaly integration. This object also defines the numerical versions of the abstract functions

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

Which can be overridden by any super class definitions if an analytic solution exists.

Definition at line 1150 of file TPVelocityModels.h.

## Constructor & Destructor Documentation

## ◆ VelocityIntegrate() [1/3]

template<class V>

taup::VelocityIntegrate< V >::VelocityIntegrate | ( |  | ) |
| inline

Default constructor. Sets top radius to zero.

Definition at line 1157 of file TPVelocityModels.h.

## ◆ VelocityIntegrate() [2/3]

template<class V>

taup::VelocityIntegrate< V >::VelocityIntegrate | ( | double | rt,
|  | double | rb,
|  | const string & | layrnam )
| inline

Standard constructor. Sets top radius to rt.

Definition at line 1161 of file TPVelocityModels.h.

## ◆ VelocityIntegrate() [3/3]

template<class V>

taup::VelocityIntegrate< V >::VelocityIntegrate | ( | const VelocityIntegrate< V > & | vi | ) |
| inline

Copy constructor.

Definition at line 1167 of file TPVelocityModels.h.

## ◆ ~VelocityIntegrate()

template<class V>

virtual taup::VelocityIntegrate< V >::~VelocityIntegrate | ( |  | ) |
| inline virtual

Destructor.

Definition at line 1172 of file TPVelocityModels.h.

## Member Function Documentation

## ◆ createNumericObjects()

template<class V>

virtual void taup::VelocityIntegrate< V >::createNumericObjects | ( | V & | v | ) |
| protected virtual

Used to create the distance and tau integrand functions vmDist, and vmTau, and their associated integration objects vmDistNI and vmTauNI.

## ◆ integrateDistance() [1/2]

template<class V>

virtual double taup::VelocityIntegrate< V >::integrateDistance | ( | double | p,
|  | double | ra,
|  | bool | r_open = false )
| inline 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 performs the integration numerically using the integration object vmDistNI and the distance integrand object vmDist.

If the flag r_open is true then the open limit integration function IntegrateFunction::integrateAOpenS(...) is called. Otherwise the closed form function, IntegrateFunction::integrateClosed(...), is used.

Reimplemented from taup::TPVelocityLayer.

Definition at line 1246 of file TPVelocityModels.h.

## ◆ integrateDistance() [2/2]

template<class V>

virtual double taup::VelocityIntegrate< V >::integrateDistance | ( | double | p,
|  | double | ra,
|  | double | rb,
|  | bool | r_open = false )
| inline 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 performs the integration numerically using the integration object vmDistNI and the distance integrand object vmDist.

If the flag r_open is true then the open limit integration function IntegrateFunction::integrateAOpenS(...) is called. Otherwise the closed form function, IntegrateFunction::integrateClosed(...), is used.

Reimplemented from taup::TPVelocityLayer.

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

Definition at line 1221 of file TPVelocityModels.h.

## ◆ integrateTime() [1/2]

template<class V>

virtual double taup::VelocityIntegrate< V >::integrateTime | ( | double | p,
|  | double | ra )
| inline 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 performs the integration numerically using the integration object vmTauNI and the tau integrand object vmTau.

Reimplemented from taup::TPVelocityLayer.

Definition at line 1277 of file TPVelocityModels.h.

## ◆ integrateTime() [2/2]

template<class V>

virtual double taup::VelocityIntegrate< V >::integrateTime | ( | double | p,
|  | double | ra,
|  | double | rb )
| inline 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 performs the integration numerically using the integration object vmTauNI and the tau integrand object vmTau.

Reimplemented from taup::TPVelocityLayer.

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

Definition at line 1257 of file TPVelocityModels.h.

## ◆ operator=()

template<class V>

VelocityIntegrate & taup::VelocityIntegrate< V >::operator= | ( | const VelocityIntegrate< V > & | vi | ) |
| inline

Assignment Operator.

Definition at line 1189 of file TPVelocityModels.h.

## ◆ setIntegTolerance()

template<class V>

void taup::VelocityIntegrate< V >::setIntegTolerance | ( | double | tol | ) |
| inline

Sets the integration tolerance limit for this velocity layer. If the integration objects are not yet instantiated this function will create them before setting their tolerance.

Definition at line 1285 of file TPVelocityModels.h.

## Member Data Documentation

## ◆ vmDist

template<class V>

TPdDistdr<V>* taup::VelocityIntegrate< V >::vmDist
| protected

The distance integrand object templated on the velocity.

Definition at line 1308 of file TPVelocityModels.h.

## ◆ vmDistNI

template<class V>

util::IntegrateFunction<TPdDistdr<V> >* taup::VelocityIntegrate< V >::vmDistNI
| protected

The numerical integration object templated on vmDist.

Definition at line 1314 of file TPVelocityModels.h.

## ◆ vmIntegTol

template<class V>

const double taup::VelocityIntegrate< V >::vmIntegTol
| static protected

The default integration tolerance.

Definition at line 1305 of file TPVelocityModels.h.

## ◆ vmTau

template<class V>

TPdTaudr<V>* taup::VelocityIntegrate< V >::vmTau
| protected

The tau integrand object templated on the velocity.

Definition at line 1311 of file TPVelocityModels.h.

## ◆ vmTauNI

template<class V>

util::IntegrateFunction<TPdTaudr<V> >* taup::VelocityIntegrate< V >::vmTauNI
| protected

The numerical integration object templated on vmTau.

Definition at line 1317 of file TPVelocityModels.h.

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

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