RSTT 3.2.1 Regional Seismic Travel Time

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

Cubic velocity model returns a cubicly modeled velocity between the top and bottom of the layer as a function of the radius. More...

`#include <TPVelocityModels.h>`

Inheritance diagram for taup::VelocityCubic:

## Public Member Functions
| VelocityCubic ()
| Default constructor. Sets velocity to zero.
| VelocityCubic (double a0, double a1, double a2, double a3, double rt, double rb, const string &layrnam="", double normradius=1.0)
| Standard constructor.
| VelocityCubic (const VelocityCubic &vc)
| Copy constructor.
| VelocityCubic (DataBuffer &buffer)
| DataBuffer constructor.
virtual | ~VelocityCubic ()
| Destructor.
VelocityCubic & | operator= (const VelocityCubic &vc)
| Assignment operator.
virtual double | operator() (double r)
virtual double | rAtP (double p)
virtual void | writeNormRadius (ostream &os) const
| Writes the normalized radius definition to input stream os.
virtual void | writeVelocity (ostream &os) const
| Writes the velocity definition to the input stream os.
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 | isVelocityCubic () const
| Virtual function that returns true for a Cubic model.
virtual int | bufferSize () const
| Returns the size of a DataBuffer required to contain all serialized information for a VelocityCubic object.
virtual void | serialize (DataBuffer &buffer)
| Writes the content of the VelocityCubic object into the input DataBuffer buffer.
virtual void | deserialize (DataBuffer &buffer)
| Reads the content of the VelocityCubic object from the input DataBuffer buffer.
Public Member Functions inherited from taup::VelocityIntegrate< VelocityCubic >
| VelocityIntegrate ()
| Default constructor. Sets top radius to zero.
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 | 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.
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.
void | init ()
| Initializes the velocity layer evaluating vlVt, vlVb, vlPt, and vlPb;.
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 | 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 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 bool | isVelocityConstant () const
virtual bool | isVelocityPowerLaw () const
virtual bool | isVelocityLinear () const
virtual bool | isVelocityQuadratic () const

## Static Public Member Functions
static string | class_name ()
| Static function that returns the class name.
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.

## Additional Inherited Members
Protected Member Functions inherited from taup::VelocityIntegrate< VelocityCubic >
virtual void | createNumericObjects (VelocityCubic &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 inherited from taup::VelocityIntegrate< VelocityCubic >
TPdDistdr< VelocityCubic > * | vmDist
| The distance integrand object templated on the velocity.
TPdTaudr< VelocityCubic > * | vmTau
| The tau integrand object templated on the velocity.
util::IntegrateFunction< TPdDistdr< VelocityCubic > > * | vmDistNI
| The numerical integration object templated on vmDist.
util::IntegrateFunction< TPdTaudr< VelocityCubic > > * | 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 inherited from taup::VelocityIntegrate< VelocityCubic >
static const double | vmIntegTol
| The default integration tolerance.

## Detailed Description

Cubic velocity model returns a cubicly modeled velocity between the top and bottom of the layer as a function of the radius.

Definition at line 2117 of file TPVelocityModels.h.

## Constructor & Destructor Documentation

## ◆ VelocityCubic() [1/4]

taup::VelocityCubic::VelocityCubic | ( |  | ) |
| inline

Default constructor. Sets velocity to zero.

Definition at line 2124 of file TPVelocityModels.h.

## ◆ VelocityCubic() [2/4]

taup::VelocityCubic::VelocityCubic | ( | double | a0,
|  | double | a1,
|  | double | a2,
|  | double | a3,
|  | double | rt,
|  | double | rb,
|  | const string & | layrnam = "",
|  | double | normradius = 1.0 )
| inline

Standard constructor.

Definition at line 2128 of file TPVelocityModels.h.

## ◆ VelocityCubic() [3/4]

taup::VelocityCubic::VelocityCubic | ( | const VelocityCubic & | vc | ) |
| inline

Copy constructor.

Definition at line 2135 of file TPVelocityModels.h.

## ◆ VelocityCubic() [4/4]

taup::VelocityCubic::VelocityCubic | ( | DataBuffer & | buffer | ) |
| inline

DataBuffer constructor.

Definition at line 2140 of file TPVelocityModels.h.

## ◆ ~VelocityCubic()

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

Destructor.

Definition at line 2143 of file TPVelocityModels.h.

## Member Function Documentation

## ◆ bufferSize()

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

Returns the size of a DataBuffer required to contain all serialized information for a VelocityCubic object.

Reimplemented from taup::TPVelocityLayer.

Definition at line 2200 of file TPVelocityModels.h.

## ◆ class_name()

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

Static function that returns the class name.

Definition at line 2186 of file TPVelocityModels.h.

## ◆ classSize()

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

Returns the class size.

Reimplemented from taup::TPVelocityLayer.

Definition at line 2192 of file TPVelocityModels.h.

## ◆ deserialize()

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

Reads the content of the VelocityCubic object from the input DataBuffer buffer.

Reimplemented from taup::TPVelocityLayer.

Definition at line 2219 of file TPVelocityModels.h.

## ◆ get_class_name()

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

Virtual function that returns the class name.

Reimplemented from taup::TPVelocityLayer.

Definition at line 2189 of file TPVelocityModels.h.

## ◆ isVelocityCubic()

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

Virtual function that returns true for a Cubic model.

Reimplemented from taup::TPVelocityLayer.

Definition at line 2196 of file TPVelocityModels.h.

## ◆ operator()()

virtual double taup::VelocityCubic::operator() | ( | double | r | ) |
| inline virtual

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

Reimplemented from taup::TPVelocityLayer.

Definition at line 2163 of file TPVelocityModels.h.

## ◆ operator=()

VelocityCubic & taup::VelocityCubic::operator= | ( | const VelocityCubic & | vc | ) |
| inline

Assignment operator.

Definition at line 2148 of file TPVelocityModels.h.

## ◆ rAtP()

virtual double taup::VelocityCubic::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 from taup::TPVelocityLayer.

## ◆ serialize()

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

Writes the content of the VelocityCubic object into the input DataBuffer buffer.

Reimplemented from taup::TPVelocityLayer.

Definition at line 2207 of file TPVelocityModels.h.

## ◆ toStream()

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

Print object data to input stream os.

Reimplemented from taup::TPVelocityLayer.

## ◆ writeNormRadius()

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

Writes the normalized radius definition to input stream os.

Reimplemented from taup::TPVelocityLayer.

## ◆ writeVelocity()

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

Writes the velocity definition to the input stream os.

Reimplemented from taup::TPVelocityLayer.

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

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