RSTT  3.2.0
Regional Seismic Travel Time
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
slbm::GreatCircle_Xg Class Reference

The GreatCircle_Xg class manages information related to a great circle path between two Locations on the Earth. Its computeTravelTime() methods compute travel times for Pg or Lg phases. More...

#include <GreatCircle_Xg.h>

Inheritance diagram for slbm::GreatCircle_Xg:
slbm::GreatCircle

Public Member Functions

 GreatCircle_Xg (const int &_phase, Grid &_grid, const double &latSource, const double &lonSource, const double &depthSource, const double &latReceiver, const double &lonReceiver, const double &depthReceiver)
 Parameterized constructor. More...
 
 ~GreatCircle_Xg ()
 Destructor. Calls GreatCircle destructor, which deletes the source and receiver CrustalProfile objects and all LayerProfile objects created by this GreatCircle_Xg object. More...
 
 GreatCircle_Xg (const GreatCircle_Xg &other)
 Copy constructor. More...
 
GreatCircle_Xgoperator= (const GreatCircle_Xg &other)
 Equal operator. More...
 
void computeTravelTime ()
 
void getZhaoParameters (double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)
 
void getPgLgComponents (double &tTotal, double &tTaup, double &tHeadwave, double &pTaup, double &pHeadwave, double &trTaup, double &trHeadwave)
 
string toString (const int &verbosity)
 Retrieve a formatted string providing a detailed description of the information managed by this GreatCircle object. More...
 
- Public Member Functions inherited from slbm::GreatCircle
 GreatCircle (const int &_phase, Grid &_grid, const double &latSource, const double &lonSource, const double &depthSource, const double &latReceiver, const double &lonReceiver, const double &depthReceiver)
 Parameterized constructor. More...
 
virtual ~GreatCircle ()
 Destructor. Deletes LayerProfile objects associated with this GreatCircle object. More...
 
 GreatCircle (const GreatCircle &other)
 Copy constructor. More...
 
GreatCircleoperator= (const GreatCircle &other)
 Equal operator. More...
 
virtual bool operator== (const GreatCircle &other) const
 isEqualTo operator More...
 
virtual bool operator!= (const GreatCircle &other) const
 
GridgetGrid ()
 Retrieve a reference to the Grid object that this GreatCircle is associated with. More...
 
int getPhase ()
 Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg, SLBMGlobals::Lg. More...
 
const int & getHeadWaveInterface ()
 Retrieve the index of the head wave interface (SLBMGlobals::MANTLE for Pn, Sn; SLBMGlobals::MIDDLE_CRUST for Pg, Lg). More...
 
string getPhaseString ()
 Retrieve a string representation fo the the phase that this GreatCircle supports. Will be one of 'Pn', 'Sn', 'Pg', 'Lg'. More...
 
CrustalProfilegetSourceProfile ()
 Retrieve a pointer to the source CrustalProfile. More...
 
CrustalProfilegetReceiverProfile ()
 Retrieve a pointer to the receiver CrustalProfile. More...
 
double getSourceRayParameter ()
 
double getReceiverRayParameter ()
 
LayerProfilegetProfile (const int &i)
 Retrieve a pointer to one of the LayerProfile objects that comprise the head wave portion of the ray path. More...
 
int getNProfiles ()
 Retrieve the number of LayerProfile object positioned along the head wave interface. More...
 
void getLayerProfileLocation (const int &i, Location &loc)
 Retrieve the Location of a LayerProfile. More...
 
double getDistance ()
 Retrieve source-receiver separation, in radians. More...
 
double getEsaz ()
 Retrieve source-receiver azimuth, in radians. More...
 
double getSourceDistance ()
 Retrieve horizontal offset below the source, in radians. More...
 
double getSourceDistanceX ()
 Retrieve horizontal offset below the source, in radians. More...
 
double getSourceDistanceZ ()
 Retrieve vertical offset below the source, in km. More...
 
double getSourceDistanceS ()
 Retrieve the ray length below the source, in km. More...
 
double getReceiverDistance ()
 Retrieve horizontal offset below the receiver, in radians. More...
 
double getReceiverDistanceX ()
 Retrieve horizontal offset below the receiver, in radians. More...
 
double getReceiverDistanceZ ()
 Retrieve vertical offset below the receiver, in km. More...
 
double getReceiverDistanceS ()
 Retrieve the ray length below the receiver, in km. More...
 
double getHeadwaveDistance ()
 Retrieve angular distance traveled by the ray below the headwave interface, in radians. More...
 
double getHeadwaveDistanceKm ()
 Retrieve horizontal distance traveled by the ray below the headwave interface, in radians. More...
 
double getActualPathIncrement ()
 Retrieve horizontal separation of LayerProfiles, in radians. More...
 
double getTravelTime ()
 Retrieve the travel time from the source to the receiver. More...
 
void getTravelTime (double &tTotal, double &tSource, double &tReceiver, double &tMantle, double &tGradient)
 Retrieve the total travel time and the 4 components that contribute to it. More...
 
void getData (int &phase, double &actual_path_increment, double sourceDepth[NLAYERS], double sourceVelocity[NLAYERS], double receiverDepth[NLAYERS], double receiverVelocity[NLAYERS], int &npoints, double headWaveVelocity[], double gradient[])
 Retrieve information about the great circle path including the interface depths at source and receiver, the velocity profiles at the source and receiver, and mantle velocity and velocity gradient at points along the great circle path from source pierce point to receiver pierce point. More...
 
void getData (int &phase, double &actual_path_increment, vector< double > &sourceDepth, vector< double > &sourceVelocity, vector< double > &receiverDepth, vector< double > &receiverVelocity, vector< double > &headWaveVelocity, vector< double > &gradient)
 Retrieve information about the great circle path including the interface depths at source and receiver, the velocity profiles at the source and receiver, and mantle velocity and velocity gradient at points along the great circle path from source pierce point to receiver pierce point. More...
 
void getNodeInfo (int **neighbors, double **coefficients, const int &maxpoints, const int &maxnodes, int &npoints, int *nnodes)
 Retrieve information about the interpolated points along the headwave path, including the number of points, the indexes of the grid nodes that contributed to interpolation of values at the points, and the interpolation coefficients used to calculate values at the points. More...
 
void getNodeInfo (vector< vector< int > > &neighbors, vector< vector< double > > &coefficients)
 Retrieve information about the interpolated points along the headwave path, including the number of points, the indexes of the grid nodes that contributed to interpolation of values at the points, and the interpolation coefficients used to calculate values at the points. More...
 
void getGreatCircleLocation (const double &distance, Location &loc)
 Retrieve a location object that is located on the great circle at specified distance from source. More...
 
void getWeights (vector< int > &nodeids, vector< double > &weights, bool headWaveWeights=true)
 Retrieve the weight assigned to each grid node that was touched by the GreatCircle. More...
 
void getWeights (int nodeids[], double weights[], int &nweights)
 Retrieve the weight assigned to each grid node that was touched by the GreatCircle. More...
 
double getFractionActive ()
 
double getRayParameter ()
 
double getTurningRadius ()
 
virtual size_t memSize ()
 
void get_dtt_ddist (double &dtt_ddist)
 Retrieve the derivative of travel time wrt to source-receiver separation, in seconds/radian. More...
 
void get_dtt_dlat (double &dtt_dlat)
 Retrieve the derivative of travel time wrt to source latitude, in seconds/radian. More...
 
void get_dtt_dlon (double &dtt_dlon)
 Retrieve the derivative of travel time wrt to source longitude, in seconds/radian. More...
 
void get_dtt_ddepth (double &dtt_ddepth)
 Retrieve the derivative of travel time wrt to source depth, in seconds/km. More...
 
void setNAValues ()
 

Additional Inherited Members

- Static Public Member Functions inherited from slbm::GreatCircle
static int getClassCount ()
 
static void setDelDistance (const double &del_distance)
 
static double getDelDistance ()
 
static void setDelDepth (const double &del_depth)
 
static double getDelDepth ()
 
static void setPathIncrement (const double &path_increment)
 
static double getPathIncrement ()
 
- Static Public Attributes inherited from slbm::GreatCircle
static double MAX_DISTANCE
 Retrieve the derivative of travel time wrt to source latitude, in seconds/radian. More...
 
static double MAX_DEPTH
 
- Protected Member Functions inherited from slbm::GreatCircle
double getActualPathIncrement (const int &i)
 Retrieve the component of the horizontal separation between elements of profiles that actually contribute to the head wave, in radians. More...
 
double sqr (const double &x)
 
double get_ttHminus ()
 retrieve value of ttHminus. Compute the value if it is NA_VALUE. More...
 
double get_ttHplus ()
 retrieve value of ttHplus. Compute the value if it is NA_VALUE. More...
 
double get_ttZplus ()
 retrieve value of ttZplus. Compute the value if it is NA_VALUE. More...
 
double get_ttZminus ()
 retrieve value of ttZplus. Compute the value if it is NA_VALUE. More...
 
double get_ttHZplus ()
 retrieve value of ttHZplus. Compute the value if it is NA_VALUE. More...
 
double get_ttEast ()
 retrieve value of ttHminus. Compute the value if it is NA_VALUE. More...
 
double get_ttWest ()
 retrieve value of ttHplus. Compute the value if it is NA_VALUE. More...
 
double get_ttEastZ ()
 retrieve value of ttHZplus. Compute the value if it is NA_VALUE. More...
 
double get_ttNorth ()
 retrieve value of ttHminus. Compute the value if it is NA_VALUE. More...
 
double get_ttSouth ()
 retrieve value of ttHplus. Compute the value if it is NA_VALUE. More...
 
double get_ttNorthZ ()
 retrieve value of ttHZplus. Compute the value if it is NA_VALUE. More...
 
- Protected Attributes inherited from slbm::GreatCircle
Gridgrid
 A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfile objects are interpolated. More...
 
int phase
 The phase that this GreatCircle object is set up for (Pn, Sn, Pg or Lg). More...
 
double latSource
 
double lonSource
 
double depthSource
 
double latReceiver
 
double lonReceiver
 
double depthReceiver
 
int headWaveInterface
 The index of the earth model interface along which head waves propagate. If phase is Pn or Sn, headWaveInterface will equal SLBMGlobals::MANTLE. If phase is Pg or Lg, headWaveInterface will equal SLBMGlobals::MIDDLE_CRUST. More...
 
CrustalProfilesource
 The source CrustalProfile object. More...
 
CrustalProfilereceiver
 The receiver CrustalProfile object. More...
 
Location location
 A Location object used in a variety of places to manipulate Location information. More...
 
double vtp [3]
 The vector triple product of the source and receiver Locations. Used to compute Locations along the great circle path from source to receiver. More...
 
vector< LayerProfile * > profiles
 The LayerProfile objects which are positioned on the interface along which the head wave propagates. More...
 
string solutionMethod
 The method used to calculate travel times. More...
 
double tTotal
 The total travel time from source to receiver, in seconds. More...
 
double actual_path_increment
 The actual spacing between the elements of profiles, in radians. More...
 
double distance
 The horizontal source-receiver separation, in radians. More...
 
double esaz
 The source-receiver azimuth, in radians. More...
 
double rayParameter
 
double xSource
 The horizontal distance from the source Location to the source pierce point, in radians. More...
 
double zSource
 The vertical distance from the source Location to the source pierce point, in km. More...
 
double sSource
 The ray length from the source Location to the source pierce point, in km. More...
 
double tSource
 The time required for the ray to travel from the source Location to piercePointSource, in seconds. More...
 
double xReceiver
 The horizontal distance from the receiver Location to the receiver pierce point, in radians. More...
 
double zReceiver
 The vertical distance from the receiver Location to the receiver pierce point, in km. More...
 
double sReceiver
 The path length from the receiver Location to the receiver pierce point, in km. More...
 
double tReceiver
 The time required for the ray to travel from the receiver pierce point to the receiver Location, in seconds. More...
 
double xHorizontal
 The horizontal distance traveled by the ray as a head wave, in km. More...
 
double tHorizontal
 The time spent by the ray traveling horizontally as a head wave, in seconds. More...
 
double tGamma
 The gradient correction term of the total travel time, in sec. More...
 
double sourceRayParameter
 
double receiverRayParameter
 
double turningRadius
 
int sourceIndex
 The index of the element in the profiles array corresponding to the horizontal increment in which the source pierce point is located. More...
 
int receiverIndex
 The index of the element in the profiles array corresponding to the horizontal increment in which the receiver pierce point is located. More...
 
double ttHminus
 
double ttHplus
 
double ttHZplus
 
double ttEast
 
double ttWest
 
double ttEastZ
 
double ttNorth
 
double ttSouth
 
double ttNorthZ
 
- Static Protected Attributes inherited from slbm::GreatCircle
static int greatCircleClassCount
 
static double DEL_DISTANCE
 
static double DEL_DEPTH
 
static double PATH_INCREMENT
 the desired spacing of great circle nodes along the head wave interface, in radians. More...
 

Detailed Description

The GreatCircle_Xg class manages information related to a great circle path between two Locations on the Earth. Its computeTravelTime() methods compute travel times for Pg or Lg phases.

The GreatCircle_Xg class manages information related to a great circle path between two Locations on the Earth. It inherits much of its functionality from the GreatCircle class from which it is derived but overrides the computeTravelTime() method to compute travel times for Pg and Lg phases. It also overrides the toString() method.

Applications should use a GreatCircleFactory object to obtain pointers to GreatCircle_Xg objects.

Definition at line 77 of file GreatCircle_Xg.h.

Constructor & Destructor Documentation

◆ GreatCircle_Xg() [1/2]

slbm::GreatCircle_Xg::GreatCircle_Xg ( const int &  _phase,
Grid _grid,
const double &  latSource,
const double &  lonSource,
const double &  depthSource,
const double &  latReceiver,
const double &  lonReceiver,
const double &  depthReceiver 
)

Parameterized constructor.

Parameterized constructor.

Parameters
_phasethe phase that this GreatCircle_Xg object is to support. Must be one of SLBMGlobals::Pg or SLBMGlobals::Lg.
_gridThe Grid from which LayerProfile objects will be extracted.
latSourcethe geographic latitude of the source, in radians
lonSourcethe geographic longitude of the source, in radians
depthSourcethe depth of the source below sea level, in km
latReceiverthe geographic latitude of the receiver, in radians
lonReceiverthe geographic longitude of the receiver, in radians
depthReceiverthe depth of the receiver below sea level, in km

◆ ~GreatCircle_Xg()

slbm::GreatCircle_Xg::~GreatCircle_Xg ( )

Destructor. Calls GreatCircle destructor, which deletes the source and receiver CrustalProfile objects and all LayerProfile objects created by this GreatCircle_Xg object.

Destructor. Calls destructor, which deletes the source and receiver CrustalProfile objects and all LayerProfile objects created by this GreatCircle_Xg object.

◆ GreatCircle_Xg() [2/2]

slbm::GreatCircle_Xg::GreatCircle_Xg ( const GreatCircle_Xg other)

Copy constructor.

Copy constructor.

Member Function Documentation

◆ computeTravelTime()

void slbm::GreatCircle_Xg::computeTravelTime ( )
virtual

brief Computes the geometry of the ray, all the components of the traveltime, and the total travel time.

Computes the geometry of the ray, all the components of the traveltime, and the total travel time.

Implements slbm::GreatCircle.

◆ getPgLgComponents()

void slbm::GreatCircle_Xg::getPgLgComponents ( double &  tTotal,
double &  tTaup,
double &  tHeadwave,
double &  pTaup,
double &  pHeadwave,
double &  trTaup,
double &  trHeadwave 
)
inlinevirtual

Reimplemented from slbm::GreatCircle.

Definition at line 215 of file GreatCircle_Xg.h.

◆ getZhaoParameters()

void slbm::GreatCircle_Xg::getZhaoParameters ( double &  Vm,
double &  Gm,
double &  H,
double &  C,
double &  Cm,
int &  udSign 
)
inlinevirtual

Implements slbm::GreatCircle.

Definition at line 205 of file GreatCircle_Xg.h.

◆ operator=()

GreatCircle_Xg& slbm::GreatCircle_Xg::operator= ( const GreatCircle_Xg other)

Equal operator.

Equal operator.

◆ toString()

string slbm::GreatCircle_Xg::toString ( const int &  verbosity)
virtual

Retrieve a formatted string providing a detailed description of the information managed by this GreatCircle object.

Retrieve a formatted string providing a detailed description of the information managed by this GreatCircle object.

Parameters
verbosityspecifies the amount of information that is to be included in the return string. Each verbosity level includes all information in preceeding verbosity levels.
  • 0 : nothing. An empty string is returned.
  • 1 : total distance and travel time summary
  • 2 : gradient correction information for Pn/Sn. Nothing for Pg/Lg
  • 3 : Source and receiver profiles
  • 4 : Grid node weights.
  • 5 : Head wave interface profiles
  • 6 : Interpolation coefficients for great circle nodes on the head wave interface.

Implements slbm::GreatCircle.


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