SLBM: slbm::GreatCircle_Xn Class Reference

SLBM 3.0 Regional Seismic Travel Time

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Private Member Functions | Private Attributes | List of all members
slbm::GreatCircle_Xn Class Reference

The GreatCircle_Xn class manages information related to a great circle path between two Locations on the Earth. It uses the Zhao method to compute travel times for Pn and Sn phases. More...

`#include <GreatCircle_Xn.h>`

Inherits slbm::GreatCircle.

## Public Member Functions
| GreatCircle_Xn (const int &_phase, Grid &_grid, const double &latSource, const double &lonSource, const double &depthSource, const double &latReceiver, const double &lonReceiver, const double &depthReceiver, const double &chMax)
| Parameterized constructor. More...
| ~GreatCircle_Xn ()
| Destructor. Deletes the source and receiver CrustalProfile objects and all LayerProfile objects created by this GreatCircle_Xn object. More...
| GreatCircle_Xn (const GreatCircle_Xn &other)
| Copy constructor. More...
GreatCircle_Xn & | operator= (const GreatCircle_Xn &other)
| Equal operator. More...
void | getZhaoParameters (double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)
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...
GreatCircle & | operator= (const GreatCircle &other)
| Equal operator. More...
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 | getReceiverDistance ()
| Retrieve horizontal offset below the receiver, in radians. 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)
| 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 | 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 ()

## Private Member Functions
void | computeTravelTime ()
void | computeTravelTimeCrust ()
void | computeTravelTimeMantle ()
double | func (const double &h)
void | mnbrak (double &ax, double &bx, double &cx, double &fa, double &fb, double &fc)
double | brent (const double ax, const double bx, const double cx, const double tol, double &xmin)
void | SWAP (double &a, double &b)
double | SIGN (const double &a, const double &b)
void | shft3 (double &a, double &b, double &cc, const double d)

## Private Attributes
double | ch_max
double | Vm
| The path average velocity in the mantle along the great circle, in km/sec. More...
double | Gm
| The path average velocity gradient in the mantle along the great circle, in 1/sec. More...
double | H
| The depth of the turning point of the ray below the Moho, in km. More...
double | rMoho
| The average of Moho radius at the source and receiver, in km. More...
double | rZm
int | udSign
| Flag indicating whether the ray leaves the source in the upgoing (-1) or downgoing (+1) direction. More...
double | V0
bool | inCrust
double | c
double | cm
double | zm
double | zhao_r
double | cz
double | cmz
const double | cmin

## 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
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...
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 | 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 | 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_Xn class manages information related to a great circle path between two Locations on the Earth. It uses the Zhao method to compute travel times for Pn and Sn phases.

GreatCircle_Xn inherits much of its functionality from the GreatCircle class from which it is derived but overrides the computeTravelTime() and toString() methods.

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

## Constructor & Destructor Documentation

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

Parameterized constructor.

Parameters

  _phase | the phase that this GreatCircle_Xn object is to support. Must be one of SLBMGlobals::Pn or SLBMGlobals::Sn.
  _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
  chMax | c is the zhao c parameter and h is the turning depth of the ray below the moho. Zhao method only valid for c*h << 1. When c*h > ch_max, then slbm will throw an exception.

slbm::GreatCircle_Xn::~GreatCircle_Xn | ( |  | ) |

Destructor. Deletes the source and receiver CrustalProfile objects and all LayerProfile objects created by this GreatCircle_Xn object.

slbm::GreatCircle_Xn::GreatCircle_Xn | ( | const GreatCircle_Xn & | other | ) |

Copy constructor.

## Member Function Documentation

double slbm::GreatCircle_Xn::brent | ( | const double | ax,
|  | const double | bx,
|  | const double | cx,
|  | const double | tol,
|  | double & | xmin
| ) |  |
| private

void slbm::GreatCircle_Xn::computeTravelTime | ( |  | ) |
| privatevirtual

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.

void slbm::GreatCircle_Xn::computeTravelTimeCrust | ( |  | ) |
| private

void slbm::GreatCircle_Xn::computeTravelTimeMantle | ( |  | ) |
| private

double slbm::GreatCircle_Xn::func | ( | const double & | h | ) |
| private

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

Implements slbm::GreatCircle.

void slbm::GreatCircle_Xn::mnbrak | ( | double & | ax,
|  | double & | bx,
|  | double & | cx,
|  | double & | fa,
|  | double & | fb,
|  | double & | fc
| ) |  |
| private

GreatCircle_Xn& slbm::GreatCircle_Xn::operator= | ( | const GreatCircle_Xn & | other | ) |

Equal operator.

void slbm::GreatCircle_Xn::shft3 | ( | double & | a,
|  | double & | b,
|  | double & | cc,
|  | const double | d
| ) |  |
| inlineprivate

double slbm::GreatCircle_Xn::SIGN | ( | const double & | a,
|  | const double & | b
| ) |  |
| inlineprivate

void slbm::GreatCircle_Xn::SWAP | ( | double & | a,
|  | double & | b
| ) |  |
| inlineprivate

string slbm::GreatCircle_Xn::toString | ( | const int & | verbosity | ) |
| virtual

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

Parameters

  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. 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.

## Member Data Documentation

double slbm::GreatCircle_Xn::c
| private

double slbm::GreatCircle_Xn::ch_max
| private

c is the zhao c parameter and h is the turning depth of the ray below the moho. Zhao method only valid for c*h << 1. When c*h > ch_max, then slbm will throw an exception.

double slbm::GreatCircle_Xn::cm
| private

const double slbm::GreatCircle_Xn::cmin
| private

double slbm::GreatCircle_Xn::cmz
| private

double slbm::GreatCircle_Xn::cz
| private

double slbm::GreatCircle_Xn::Gm
| private

The path average velocity gradient in the mantle along the great circle, in 1/sec.

double slbm::GreatCircle_Xn::H
| private

The depth of the turning point of the ray below the Moho, in km.

bool slbm::GreatCircle_Xn::inCrust
| private

double slbm::GreatCircle_Xn::rMoho
| private

The average of Moho radius at the source and receiver, in km.

double slbm::GreatCircle_Xn::rZm
| private

int slbm::GreatCircle_Xn::udSign
| private

Flag indicating whether the ray leaves the source in the upgoing (-1) or downgoing (+1) direction.

double slbm::GreatCircle_Xn::V0
| private

double slbm::GreatCircle_Xn::Vm
| private

The path average velocity in the mantle along the great circle, in km/sec.

double slbm::GreatCircle_Xn::zhao_r
| private

double slbm::GreatCircle_Xn::zm
| private

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

- /nfs/tonto2/devlpool/sballar/RSTT/SLBM_Root.3.0.5/install/SLBM_Root.3.0.5.Linux/SLBM/include/GreatCircle_Xn.h