RSTT
3.2.0
Regional Seismic Travel Time
|
The GreatCircle class manages information related to a great circle path between two Locations on the Earth, including the ability to compute the total travel time from a seismic source to a receiver. More...
#include <GreatCircle.h>
Public Member Functions | |
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... | |
GreatCircle & | operator= (const GreatCircle &other) |
Equal operator. More... | |
virtual bool | operator== (const GreatCircle &other) const |
isEqualTo operator More... | |
virtual bool | operator!= (const GreatCircle &other) const |
Grid & | getGrid () |
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... | |
CrustalProfile * | getSourceProfile () |
Retrieve a pointer to the source CrustalProfile. More... | |
CrustalProfile * | getReceiverProfile () |
Retrieve a pointer to the receiver CrustalProfile. More... | |
double | getSourceRayParameter () |
double | getReceiverRayParameter () |
LayerProfile * | getProfile (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... | |
virtual string | toString (const int &verbosity)=0 |
Retrieve a formatted string providing a detailed description of the information managed by this GreatCircle object. 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 void | getZhaoParameters (double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)=0 |
virtual void | getPgLgComponents (double &tT, double &tTaup, double &tHeadwave, double &pTaup, double &pHeadwave, double &trTaup, double &trHeadwave) |
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 () |
Static Public Member Functions | |
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 | |
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 | |
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... | |
virtual void | computeTravelTime ()=0 |
Method to compute the travel time from source to receiver, in seconds. 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 | |
Grid & | grid |
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... | |
CrustalProfile * | source |
The source CrustalProfile object. More... | |
CrustalProfile * | receiver |
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 | |
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... | |
The GreatCircle class manages information related to a great circle path between two Locations on the Earth, including the ability to compute the total travel time from a seismic source to a receiver.
The GreatCircle class manages information related to a great circle path between two locations on the Earth, including the ability to compute the total travel time from a seismic source to a receiver. The GreatCircle class has derived classes GreatCircle_Xn, which computes travel times for Pn and Sn phases, and GreatCircle_Xg, which computes travel times for Pg and Lg phases. Calling applications should use GreatCircleFactory to retrieve the appropriate type of GreatCircle object.
A GreatCircle maintains two CrustalProfile objects, one for the source and one for the receiver. These CrustalProfile objects contain information about the velocity as a function of depth from the surface down to the Moho. The Location objects owned by the CrustalProfile objects reflect the latitude, longitude and depths of the source and receiver.
A GreatCircle object will generate a number of closely spaced LayerProfile objects which lie along the great circle path between the source and and receiver, at the depth of the interface along which the head wave travels (the Moho for Pn and Sn, the top of the middle crust for Pg and Lg).
The desired spacing of the LayerProfile objects is specified in the GreatCircle constructor, but the actual spacing may be reduced slightly so that an integral number of horizontal increments will exactly span the distance between the source and receiver piercepoints. Actual spacing will be as large as possible but less than or equal to the specified value. The actual spacing can be determined by calling getActualPathIncrement().
The LayerProfile objects used by a GreatCircle are owned by the GreatCircle in that they are created by it on an as-needed basis, they are deleted by it in the GreatCircle destructor, and LayerProfile objects are not shared among different GreatCircle objects. CrustalProfile objects, on the other hand, can be shared among multiple GreatCircle objects. Grid maintains a map that associates waveType/location combinations with pointers to CrustalProfile objects. Upon creation, GreatCircle objects request CrustalProfile objects from Grid. If Grid already has a CrustalProfile object for the specified wave type / location, it provides GreatCircle with the pointer. GreatCircle does not delete CrustalProfile objects in its desctructor. CrustalProfiles are deleted by calling Grid::clearCrustalProfiles() or in the Grid destructor.
Definition at line 113 of file GreatCircle.h.
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.
Parameterized constructor.
_phase | the phase that this GreatCircle object is to support. Must be one of SLBMGlobals::Pn, Sn, Pg, Lg. |
_grid | The Grid from which LayerProfile objects will be extracted. |
latSource | the geographic latitude of the source, in radians |
lonSource | the geographic longitude of the source, in radians |
depthSource | the depth of the source below sea level, in km |
latReceiver | the geographic latitude of the receiver, in radians |
lonReceiver | the geographic longitude of the receiver, in radians |
depthReceiver | the depth of the receiver below sea level, in km |
|
virtual |
Destructor. Deletes LayerProfile objects associated with this GreatCircle object.
Destructor. Deletes LayerProfile objects associated with this GreatCircle object.
slbm::GreatCircle::GreatCircle | ( | const GreatCircle & | other | ) |
Copy constructor.
Copy constructor.
|
protectedpure virtual |
Method to compute the travel time from source to receiver, in seconds.
Method to compute the travel time from source to receiver, in seconds.
Implemented in slbm::GreatCircle_Xg.
void slbm::GreatCircle::get_dtt_ddepth | ( | double & | dtt_ddepth | ) |
Retrieve the derivative of travel time wrt to source depth, in seconds/km.
Retrieve the derivative of travel time wrt to source depth, in seconds/km.
dtt_ddepth | the derivative of travel time wrt to source depth. |
|
inline |
Retrieve the derivative of travel time wrt to source-receiver separation, in seconds/radian.
Retrieve the derivative of travel time wrt to source-receiver separation, in seconds/radian.
Definition at line 1254 of file GreatCircle.h.
|
inline |
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
dtt_dlat | the derivative of travel time wrt to source latitude. |
Definition at line 1262 of file GreatCircle.h.
|
inline |
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
dtt_dlon | the derivative of travel time wrt to source longitude. |
Definition at line 1270 of file GreatCircle.h.
|
protected |
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
|
protected |
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
|
inline |
Retrieve horizontal separation of LayerProfiles, in radians.
Retrieve horizontal separation of LayerProfiles, in radians.
Definition at line 367 of file GreatCircle.h.
|
inlineprotected |
Retrieve the component of the horizontal separation between elements of profiles that actually contribute to the head wave, in radians.
Retrieve the component of the horizontal separation between elements of profiles that actually contribute to the head wave, in radians. For horizontal increments of the source-receiver separation that are entirely between the source and source pierce point, or between the receiver pierce point and the receiver, this will return 0. For horizontal increments that lie entirely between the source and receiver pierce points, this will return actual_path_increment. For the horizontal increments that include the source pierce point and/or the receiver pierce point, this will return some fraction of actual_path_increment, reflecting the part of the horizontal increment that was actually traversed by the head wave.
Definition at line 1207 of file GreatCircle.h.
|
static |
void slbm::GreatCircle::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.
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.
The caller must supply all of the arrays required by this method and retains ownership of those arrays. This method assumes the arrays have been allocated with sufficient memory to hold the requested information and simply populates the supplied arrays.
phase | the phase supported by the current GreatCircle. Will be one of Pn, Sn, Pg, Lg. |
actual_path_increment | the actual horizontal separation of the LayerProfile objects along the head wave interface, in radians. |
sourceDepth | a double array of length NLAYERS containing the depths of all the model interfaces below the source, in km. |
sourceVelocity | a double array of length NLAYERS containing the P or S velocity of each interval below the source, in km/sec. |
receiverDepth | a double array of length NLAYERS containing the depths of all the model interfaces below the receiver, in km. |
receiverVelocity | a double array of length NLAYERS containing the P or S velocity of each interval below the receiver, in km/sec. |
npoints | the number of points along the headwave path where velocity and gradient values are interpolated. |
headWaveVelocity | a double array of length npoints containing the P or S velocity at the center of each horizontal segment between the source and the receiver, in km/sec. The first horizontal segment starts at the source, the last horizontal segment ends at the receiver, and each one is of size actual_path_increment. The head wave velocities are interpolated at the center of each of these horizontal segments, just below the head wave interface. |
gradient | a double array of length npoints containing the P or S velocity gradient in the mantle at the center of each horizontal segment of the head wave, in 1/sec. For Pg and Lg, the values will be SLBMGlobals::NA_VALUE. |
void slbm::GreatCircle::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.
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.
phase | the phase supported by the current GreatCircle. Will be one of Pn, Sn, Pg, Lg. |
actual_path_increment | the actual horizontal separation of the LayerProfile objects along the head wave interface, in radians. |
sourceDepth | a double array of length NLAYERS containing the depths of all the model interfaces below the source, in km. |
sourceVelocity | a double array of length NLAYERS containing the P or S velocity of each interval below the source, in km/sec. |
receiverDepth | a double array of length NLAYERS containing the depths of all the model interfaces below the receiver, in km. |
receiverVelocity | a double array of length NLAYERS containing the P or S velocity of each interval below the receiver, in km/sec. |
headWaveVelocity | a double array of length npoints containing the P or S velocity at the center of each horizontal segment between the source and the receiver, in km/sec. The first horizontal segment starts at the source, the last horizontal segment ends at the receiver, and each one is of size actual_path_increment. The head wave velocities are interpolated at the center of each of these horizontal segments, just below the head wave interface. |
gradient | a double array of length npoints containing the P or S velocity gradient in the mantle at the center of each horizontal segment of the head wave, in 1/sec. For Pg and Lg, the values will be SLBMGlobals::NA_VALUE. |
|
inlinestatic |
Definition at line 661 of file GreatCircle.h.
|
inlinestatic |
Definition at line 657 of file GreatCircle.h.
|
inline |
Retrieve source-receiver separation, in radians.
Retrieve source-receiver separation, in radians. getDistance() = getSourceDistance() + getReceiverDistance() + getHeadwaveDistance().
Definition at line 256 of file GreatCircle.h.
double slbm::GreatCircle::getEsaz | ( | ) |
Retrieve source-receiver azimuth, in radians.
Retrieve source-receiver azimuth, in radians.
|
inline |
Definition at line 1245 of file GreatCircle.h.
void slbm::GreatCircle::getGreatCircleLocation | ( | const double & | distance, |
Location & | loc | ||
) |
Retrieve a location object that is located on the great circle at specified distance from source.
Retrieve a location object that is located on the great circle at specified distance from source.
distance | angular distance from source in radians. |
loc | the Location object to be populated with new position information. |
|
inline |
Retrieve a reference to the Grid object that this GreatCircle is associated with.
Retrieve a reference to the Grid object that this GreatCircle is associated with.
Definition at line 169 of file GreatCircle.h.
|
inline |
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
Retrieve the angular distance traveled by the ray below the headwave interface, in radians. This is the total distance minus the horizontal offsets below the source and receiver. getSourceDistance() + getReceiverDistance() + getHeadwaveDistance() = getDistance().
Definition at line 347 of file GreatCircle.h.
|
inline |
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
Retrieve horizontal distance traveled by the ray below the headwave interface, in km. This is the sum of actual_path_increment(i) * R(i) where actual_path_increment(i) is the angular distance traveled by the ray in each angular distance increment along the head wave interface, and R(i) is the radius of the head wave interface in that same horizontal increment.
Definition at line 361 of file GreatCircle.h.
|
inline |
Retrieve the index of the head wave interface (SLBMGlobals::MANTLE for Pn, Sn; SLBMGlobals::MIDDLE_CRUST for Pg, Lg).
Retrieve the index of the head wave interface (SLBMGlobals::MANTLE for Pn, Sn; SLBMGlobals::MIDDLE_CRUST for Pg, Lg).
Definition at line 185 of file GreatCircle.h.
void slbm::GreatCircle::getLayerProfileLocation | ( | const int & | i, |
Location & | loc | ||
) |
Retrieve the Location of a LayerProfile.
Retrieve the Location of a LayerProfile. Method Location::getRadius() will return the radius of the head wave interface at the position of the requested LayerProfile.
void slbm::GreatCircle::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.
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.
The caller must supply all of the array required by this method and retains ownership of those arrays. This method assumes the arrays have been allocated with sufficient memory to hold the requested information and simply populates the supplied arrays.
neighbors | a ragged 2D array of ints with dimensions npoints x nnodes containing the nodeIds of the neighboring grid nodes used to derive the interpolated data at each head wave profile. |
coefficients | a ragged 2D array of doubles with dimensions npoints x nnodes containing the interpolation coefficients applied to each element of neighbors. |
maxpoints | the maximum size of the first dimension of arrays neighbors and coefficients. If npoints exceeds this value, an exception is thrown. |
maxnodes | the maximum size of the second dimension of arrays neighbors and coefficients. If any value of nnodes exceeds this value, an exception is thrown. |
npoints | the number of horizontal increments sampled along the head wave interface. |
nnodes | an int array of length npoints containing the number of nodes that contributed to the interpolation of information at the center of each horizontal segment of the ray path. |
void slbm::GreatCircle::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.
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.
neighbors | a ragged 2D array of ints with dimensions npoints x nnodes containing the nodeIds of the neighboring grid nodes used to derive the interpolated data at each head wave profile. |
coefficients | a ragged 2D array of doubles with dimensions npoints x nnodes containing the interpolation coefficients applied to each element of neighbors. |
|
inline |
Retrieve the number of LayerProfile object positioned along the head wave interface.
Retrieve the number of LayerProfile object positioned along the head wave interface.
Definition at line 241 of file GreatCircle.h.
|
inlinestatic |
Definition at line 665 of file GreatCircle.h.
|
inlinevirtual |
Reimplemented in slbm::GreatCircle_Xg.
Definition at line 644 of file GreatCircle.h.
|
inline |
Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg, SLBMGlobals::Lg.
Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg, SLBMGlobals::Lg.
Definition at line 178 of file GreatCircle.h.
|
inline |
Retrieve a string representation fo the the phase that this GreatCircle supports. Will be one of 'Pn', 'Sn', 'Pg', 'Lg'.
Retrieve a string representation fo the the phase that this GreatCircle supports. Will be one of 'Pn', 'Sn', 'Pg', 'Lg'.
Definition at line 1239 of file GreatCircle.h.
LayerProfile* slbm::GreatCircle::getProfile | ( | const int & | i | ) |
Retrieve a pointer to one of the LayerProfile objects that comprise the head wave portion of the ray path.
Retrieve a pointer to one of the LayerProfile objects in profiles that comprise the head wave portion of the ray path. This object can be queried for depth, radius, velocity and gradient information.
If the requested LayerProfile object has not yet been instantiated (is NULL), it is instantiated by this method.
The profiles are located at the centers of horizontal increments of length actual_path_increment (radians). The first horizontal increment starts at the point on the head wave propagation interface with latitude and longitude equal to that of the source. The last horizontal increment ends at the point on the head wave propagation interface with latitude and longitude equal to the that of the receiver. The spacing is nominally equal to the value path_increment specified in the constructor, but is generally reduced somewhat so that an integral number of horizontal increments that are all the same size will fit into the distance from source to receiver. The actual spacing can be retrieved with a call to getActualPathIncrement().
|
inline |
Definition at line 638 of file GreatCircle.h.
|
inline |
Retrieve horizontal offset below the receiver, in radians.
Retrieve horizontal offset below the receiver, in radians. This is the angular distance between the location of the receiver and the receiver pierce point where the ray impinged on the headwave interface.
Definition at line 307 of file GreatCircle.h.
|
inline |
Retrieve the ray length below the receiver, in km.
Retrieve total length of the ray below the receiver, in km. This is the ray length between the location of the receiver and the receiver pierce point where the ray impinged on the headwave interface.
Definition at line 334 of file GreatCircle.h.
|
inline |
Retrieve horizontal offset below the receiver, in radians.
Retrieve horizontal offset below the receiver, in radians. This is the angular distance between the location of the receiver and the receiver pierce point where the ray impinged on the headwave interface.
Definition at line 316 of file GreatCircle.h.
|
inline |
Retrieve vertical offset below the receiver, in km.
Retrieve vertical offset below the receiver, in km. This is the vertical distance between the location of the receiver and the receiver pierce point where the ray impinged on the headwave interface.
Definition at line 325 of file GreatCircle.h.
|
inline |
Retrieve a pointer to the receiver CrustalProfile.
Retrieve a pointer to the receiver CrustalProfile. This object can be queried for velocity vs depth, travel time, Location, etc.
Definition at line 204 of file GreatCircle.h.
|
inline |
Definition at line 208 of file GreatCircle.h.
|
inline |
Retrieve horizontal offset below the source, in radians.
Retrieve horizontal offset below the source, in radians. This is the angular distance between the location of the source and the source pierce point where the ray impinged on the headwave interface.
Definition at line 271 of file GreatCircle.h.
|
inline |
Retrieve the ray length below the source, in km.
Retrieve total length of the ray below the source, in km. This is the ray length between the location of the source and the source pierce point where the ray impinged on the headwave interface.
Definition at line 298 of file GreatCircle.h.
|
inline |
Retrieve horizontal offset below the source, in radians.
Retrieve horizontal offset below the source, in radians. This is the angular distance between the location of the source and the source pierce point where the ray impinged on the headwave interface.
Definition at line 280 of file GreatCircle.h.
|
inline |
Retrieve vertical offset below the source, in km.
Retrieve vertical offset below the source, in km. This is the vertical distance between the location of the source and the source pierce point where the ray impinged on the headwave interface.
Definition at line 289 of file GreatCircle.h.
|
inline |
Retrieve a pointer to the source CrustalProfile.
Retrieve a pointer to the source CrustalProfile. This object can be queried for velocity vs depth, travel time, Location, etc.
Definition at line 198 of file GreatCircle.h.
|
inline |
Definition at line 206 of file GreatCircle.h.
|
inline |
Retrieve the travel time from the source to the receiver.
Retrieve the travel time from the source to the receiver. The travelTime was actually computed when the GreatCircle constructor was called. This method returns the previously computed value.
Definition at line 1123 of file GreatCircle.h.
|
inline |
Retrieve the total travel time and the 4 components that contribute to it.
Retrieve the total travel time and the 4 components that contribute to it. The values were actually computed when the GreatCircle constructor was called. This method returns the previously computed values. The values will equal SLBMGlobals::NA_VALUE if they are invalid.
tTotal | the total travel time, in seconds. |
tSource | the crustal travel time below the source, in seconds. |
tReceiver | the crustal travel time below the receiver, in seconds. |
tMantle | the head wave travel time in the mantle, in seconds. |
tGradient | the Zhao gradient correction term, in seconds. |
Definition at line 1128 of file GreatCircle.h.
|
inline |
Definition at line 640 of file GreatCircle.h.
void slbm::GreatCircle::getWeights | ( | int | nodeids[], |
double | weights[], | ||
int & | nweights | ||
) |
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
The weight array is initialized to 0 for each visited GridProfile object. Then every LayerProfile on the head wave interface between the source and receiver is visited and the angular distance, d, that the ray traveled in the horizontal segment is retrieved. If d > 0, then the neighboring GridProfile objects that contributed to the interpolated value of the LayerProfile are visited. The product of d * R * C is added to the weight associated with that GridProfile object, where R is the radius of the head wave interface for the LayerProfile object being evaluated, and C is the interpolation coefficient for the GridProfile - LayerProfile pair under consideration.
Note: Only grid nodes touched by this GreatCircle are included in the output. Each grid node is included only once, even though more than one LayerProfile object may have contributed some weight to it. The sum of all the weights will equal the horizontal distance traveled by the ray along the head wave interface, from the source pierce point to the receiver pierce point, in km.
nodeids | the ID numbers of all the GridProfile objects touched by this GreatCircle. |
weights | the weight associated with each GridProfile object touched by this GreatCircle. |
nweights | the number of elements in nodeId and weight. Calling application must dimension this array large enough to handle any possible size. |
void slbm::GreatCircle::getWeights | ( | vector< int > & | nodeids, |
vector< double > & | weights, | ||
bool | headWaveWeights = true |
||
) |
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
The weight vector is initialized to 0 for each visited GridProfile object. Then every LayerProfile on the head wave interface between the source and receiver is visited and the angular distance, d, that the ray traveled in the horizontal segment is retrieved. If d > 0, then the neighboring GridProfile objects that contributed to the interpolated value of the LayerProfile are visited. The product of d * R * C is added to the weight associated with that GridProfile object, where R is the radius of the head wave interface for the LayerProfile object being evaluated, and C is the interpolation coefficient for the GridProfile - LayerProfile pair under consideration. If headWaveWeights is true (default), then only weights for the path in the head wave are returned. If headWaveWeights is false, then only weights for the path in the crust are returned. The sum of the weights for both calls (true and false) is the total distance of the ray path in km.
Note: Only grid nodes touched by this GreatCircle are included in the output. Each grid node is included only once, even though more than one LayerProfile object may have contributed some weight to it. The sum of all the weights will equal the horizontal distance traveled by the ray along the head wave interface, from the source pierce point to the receiver pierce point, in km.
nodeids | the ID numbers of all the GridProfile objects touched by this GreatCircle. |
weights | the weight associated with each GridProfile object touched by this GreatCircle. |
|
pure virtual |
Implemented in slbm::GreatCircle_Xn, and slbm::GreatCircle_Xg.
|
inlinevirtual |
Definition at line 1137 of file GreatCircle.h.
|
inlinevirtual |
Definition at line 162 of file GreatCircle.h.
GreatCircle& slbm::GreatCircle::operator= | ( | const GreatCircle & | other | ) |
Equal operator.
Equal operator.
|
virtual |
isEqualTo operator
isEqualTo operator
|
inlinestatic |
Definition at line 659 of file GreatCircle.h.
|
inlinestatic |
Definition at line 655 of file GreatCircle.h.
void slbm::GreatCircle::setNAValues | ( | ) |
|
inlinestatic |
Definition at line 663 of file GreatCircle.h.
|
inlineprotected |
Definition at line 1007 of file GreatCircle.h.
|
pure 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.
verbosity | specifies the amount of information that is to be included in the return string. Each verbosity level includes all information in preceeding verbosity levels.
|
Implemented in slbm::GreatCircle_Xn, and slbm::GreatCircle_Xg.
|
protected |
The actual spacing between the elements of profiles, in radians.
The actual spacing between the elements of profiles, in radians.
Definition at line 862 of file GreatCircle.h.
|
staticprotected |
Definition at line 1108 of file GreatCircle.h.
|
staticprotected |
Definition at line 1102 of file GreatCircle.h.
|
protected |
Definition at line 776 of file GreatCircle.h.
|
protected |
Definition at line 773 of file GreatCircle.h.
|
protected |
The horizontal source-receiver separation, in radians.
The horizontal source-receiver separation, in radians.
Definition at line 867 of file GreatCircle.h.
|
protected |
The source-receiver azimuth, in radians.
The source-receiver azimuth, in radians.
Definition at line 872 of file GreatCircle.h.
|
staticprotected |
Definition at line 754 of file GreatCircle.h.
|
protected |
A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfile objects are interpolated.
A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfile objects are interpolated.
Definition at line 761 of file GreatCircle.h.
|
protected |
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.
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.
Definition at line 786 of file GreatCircle.h.
|
protected |
Definition at line 774 of file GreatCircle.h.
|
protected |
Definition at line 771 of file GreatCircle.h.
|
protected |
A Location object used in a variety of places to manipulate Location information.
Definition at line 802 of file GreatCircle.h.
|
protected |
Definition at line 775 of file GreatCircle.h.
|
protected |
Definition at line 772 of file GreatCircle.h.
|
static |
Definition at line 748 of file GreatCircle.h.
|
static |
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
dtt_dlat | the derivative of travel time wrt to source latitude. |
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
dtt_dlon | the derivative of travel time wrt to source longitude. |
Retrieve the derivative of horizontal slowness wrt to source-receiver distance, in seconds/radian^2.
Retrieve the derivative of horizontal slowness wrt to source-receiver distance, in seconds/radian^2.
Retrieve the derivative of horizontal slowness wrt to source latitude, in seconds/radian^2.
Retrieve the derivative of horizontal slowness wrt to source latitude, in seconds/radian^2.
dsh_dlat | the derivative of horizontal slowness wrt to source latitude. |
Retrieve the derivative of horizontal slowness wrt to source longitude, in seconds/radian^2.
Retrieve the derivative of horizontal slowness wrt to source longitude, in seconds/radian^2.
dsh_dlon | the derivative of horizontal slowness wrt to source longitude. |
Retrieve the derivative of horizontal slowness wrt to source depth, in seconds/radian-km.
Retrieve the derivative of horizontal slowness wrt to source depth, in seconds/radian-km.
dsh_ddepth | the derivative of horizontal slowness wrt to source depth. |
Definition at line 747 of file GreatCircle.h.
|
staticprotected |
the desired spacing of great circle nodes along the head wave interface, in radians.
the desired spacing of great circle nodes along the head wave interface, in radians. Defaults to 0.1 degrees if not specified. The actual spacing will be reduced from the requested value in order that an integral number of equally spaced LayerProfile objects will exactly span the source-receiver separation.
Definition at line 1119 of file GreatCircle.h.
|
protected |
The phase that this GreatCircle object is set up for (Pn, Sn, Pg or Lg).
The phase that this GreatCircle object is set up for. Will be one of Pn, Sn, Pg or Lg, which are int constants defined in SLBMGlobals.h.
Definition at line 769 of file GreatCircle.h.
|
protected |
The LayerProfile objects which are positioned on the interface along which the head wave propagates.
The LayerProfile objects which are positioned on the interface along which the head wave propagates. The profiles are located at the centers of horizontal increments of length actual_path_increment (radians). The first horizontal increment starts at the point on the head wave propagation interface with latitude and longitude equal to the latitude and longitude of the source. The last horizontal increment ends at the point on the head wave propagation interface with latitude and longitude equal to the latitude and longitude of the receiver. The spacing is nominally equal to the value path_increment specified in the constructor, but may be reduced somewhat so that an integral number of horizontal increments that are all the same size will fit into the distance from source to receiver. The actual spacing can be retrieved with a call to getActualPathIncrement().
actual_path_increment is determined in the GreatCircle() constructor and profiles is resized at that point to hold the correct number of LayerProfile objects. The profiles are not instantiated in the constructor since the ones close to the source and receiver will never be needed. Profiles are instantiated as needed in protected method getProfile(const int& i).
Definition at line 840 of file GreatCircle.h.
|
protected |
The ray parameter, in sec/radian or sec/km.
Definition at line 877 of file GreatCircle.h.
|
protected |
The receiver CrustalProfile object.
The receiver CrustalProfile object. This object can be queried for velocity vs depth, travel time, Location, etc.
Definition at line 798 of file GreatCircle.h.
|
protected |
The index of the element in the profiles array corresponding to the horizontal increment in which the receiver pierce point is located.
The index of the element in the profiles array corresponding to the horizontal increment in which the receiver pierce point is located.
Definition at line 982 of file GreatCircle.h.
|
protected |
Definition at line 962 of file GreatCircle.h.
|
protected |
The method used to calculate travel times.
The method used to calculate travel times. Will be a string that indicates the name of the c++ method that was used to calculate the travel times.
Definition at line 847 of file GreatCircle.h.
|
protected |
The source CrustalProfile object.
The source CrustalProfile object. This object can be queried for velocity vs depth, travel time, Location, etc.
Definition at line 792 of file GreatCircle.h.
|
protected |
The index of the element in the profiles array corresponding to the horizontal increment in which the source pierce point is located.
The index of the element in the profiles array corresponding to the horizontal increment in which the source pierce point is located.
Definition at line 973 of file GreatCircle.h.
|
protected |
Definition at line 961 of file GreatCircle.h.
|
protected |
The path length from the receiver Location to the receiver pierce point, in km.
The ray length from the receiver Location to the receiver pierce point, in km. This value is computed in CrustalProfile::xtCrust().
Definition at line 932 of file GreatCircle.h.
|
protected |
The ray length from the source Location to the source pierce point, in km.
The ray length from the source Location to the source pierce point, in km. This value is computed in CrustalProfile::xtCrust().
Definition at line 901 of file GreatCircle.h.
|
protected |
The gradient correction term of the total travel time, in sec.
The gradient correction term of the total travel time, in sec. Zero of Pg, Lg.
Definition at line 959 of file GreatCircle.h.
|
protected |
The time spent by the ray traveling horizontally as a head wave, in seconds.
The time spent by the ray traveling horizontally as a head wave, in seconds.
Definition at line 953 of file GreatCircle.h.
|
protected |
The time required for the ray to travel from the receiver pierce point to the receiver Location, in seconds.
The time required for the ray to travel from the receiver pierce point to the receiver Location, in seconds.
Definition at line 939 of file GreatCircle.h.
|
protected |
The time required for the ray to travel from the source Location to piercePointSource, in seconds.
The time required for the ray to travel from the source Location to source pierce point, in seconds.
Definition at line 908 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly to the east of the source measured along a great circle path through the source.
Definition at line 1033 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly to the east of the source measured along a great circle path through the source, and at a slightly deeper depth.
Definition at line 1045 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly closer to the receiver than current source. Used in calculation of derivatives wrt source position.
Definition at line 1012 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly further from the receiver than current source. Used in calculation of derivatives wrt source position.
Definition at line 1017 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly greater depth than current source. Used in calculation of derivatives wrt source position. the travel time at a source position which is very slightly further from the receiver, and at greater depth than current source. Used in calculation of derivatives wrt source position.
Definition at line 1027 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly to the north of the source measured along a great circle path through the source.
Definition at line 1051 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly to the north of the source measured along a great circle path through the source, and at a slightly deeper depth.
Definition at line 1063 of file GreatCircle.h.
|
protected |
The total travel time from source to receiver, in seconds.
The total travel time from source to receiver, in seconds. Includes both crustal legs, head wave component, and gradient correction, if appropriate. Computed in computeTravelTime(), which is called from the GreatCircle constructor.
Definition at line 855 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly to the South of the source measured along a great circle path through the source.
Definition at line 1057 of file GreatCircle.h.
|
protected |
the travel time at a source position which is very slightly to the west of the source measured along a great circle path through the source.
Definition at line 1039 of file GreatCircle.h.
|
protected |
Definition at line 964 of file GreatCircle.h.
|
protected |
The vector triple product of the source and receiver Locations. Used to compute Locations along the great circle path from source to receiver.
The vector triple product of the source and receiver Locations. (source cross receiver) cross source. Used to compute Locations along the great circle path from source to receiver.
Definition at line 812 of file GreatCircle.h.
|
protected |
The horizontal distance traveled by the ray as a head wave, in km.
The horizontal distance traveled by the ray as a head wave, in km.
Definition at line 946 of file GreatCircle.h.
|
protected |
The horizontal distance from the receiver Location to the receiver pierce point, in radians.
The horizontal distance from the receiver Location to the receiver pierce point, in radians. This value is computed in CrustalProfile::xtCrust().
Definition at line 916 of file GreatCircle.h.
|
protected |
The horizontal distance from the source Location to the source pierce point, in radians.
The horizontal distance from the source Location to the source pierce point, in radians. This value is computed in CrustalProfile::xtCrust().
Definition at line 885 of file GreatCircle.h.
|
protected |
The vertical distance from the receiver Location to the receiver pierce point, in km.
The vertical distance from the receiver Location to the receiver pierce point, in km. This value is computed in CrustalProfile::xtCrust().
Definition at line 924 of file GreatCircle.h.
|
protected |
The vertical distance from the source Location to the source pierce point, in km.
The vertical distance from the source Location to the source pierce point, in km. This value is computed in CrustalProfile::xtCrust().
Definition at line 893 of file GreatCircle.h.