RSTT  3.2.0
Regional Seismic Travel Time
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
GreatCircle.h
Go to the documentation of this file.
1 //- ****************************************************************************
2 //-
3 //- Copyright 2009 National Technology & Engineering Solutions of Sandia, LLC
4 //- (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
5 //- Government retains certain rights in this software.
6 //-
7 //- BSD Open Source License
8 //- All rights reserved.
9 //-
10 //- Redistribution and use in source and binary forms, with or without
11 //- modification, are permitted provided that the following conditions are met:
12 //-
13 //- 1. Redistributions of source code must retain the above copyright notice,
14 //- this list of conditions and the following disclaimer.
15 //-
16 //- 2. Redistributions in binary form must reproduce the above copyright
17 //- notice, this list of conditions and the following disclaimer in the
18 //- documentation and/or other materials provided with the distribution.
19 //-
20 //- 3. Neither the name of the copyright holder nor the names of its
21 //- contributors may be used to endorse or promote products derived from
22 //- this software without specific prior written permission.
23 //-
24 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 //- POSSIBILITY OF SUCH DAMAGE.
35 //-
36 //- ****************************************************************************
37 
38 #ifndef GreatCircle_H
39 #define GreatCircle_H
40 
41 // **** _SYSTEM INCLUDES_ ******************************************************
42 
43 #include <vector>
44 #include <map>
45 #include <string>
46 #include <iostream>
47 
48 using namespace std;
49 
50 // **** _LOCAL INCLUDES_ *******************************************************
51 
52 #include "SLBMGlobals.h"
53 #include "Location.h"
54 #include "LayerProfile.h"
55 //#include "CrustalProfile.h"
56 
57 // **** _BEGIN SLBM NAMESPACE_ **************************************************
58 
59 namespace slbm {
60 
61 class Grid;
62 class CrustalProfile;
63 
64 // **** _CLASS DEFINITION_ *****************************************************
65 //
114 {
115 
116 public:
117 
132  const int& _phase,
133  Grid& _grid,
134  const double& latSource,
135  const double& lonSource,
136  const double& depthSource,
137  const double& latReceiver,
138  const double& lonReceiver,
139  const double& depthReceiver);
140 
146  virtual ~GreatCircle();
147 
151  GreatCircle(const GreatCircle &other);
152 
157 
161  virtual bool operator == (const GreatCircle& other) const;
162  virtual bool operator != (const GreatCircle& other) const { return !(*this == other); } ;
163 
169  Grid& getGrid() { return grid; };
170 
178  int getPhase() { return phase; };
179 
185  const int& getHeadWaveInterface() { return headWaveInterface; };
186 
192  string getPhaseString();
193 
198  CrustalProfile* getSourceProfile() { return source; };
199 
204  CrustalProfile* getReceiverProfile() { return receiver; };
205 
206  double getSourceRayParameter() { return sourceRayParameter; };
207 
208  double getReceiverRayParameter() { return receiverRayParameter; };
209 
234  LayerProfile* getProfile(const int& i);
235 
241  int getNProfiles() { return (int)profiles.size(); };
242 
248  void getLayerProfileLocation(const int& i, Location& loc);
249 
256  double getDistance() { return distance; };
257 
262  double getEsaz();
263 
271  double getSourceDistance() { return xSource; };
272 
280  double getSourceDistanceX() { return xSource; };
281 
289  double getSourceDistanceZ() { return zSource; };
290 
298  double getSourceDistanceS() { return sSource; };
299 
307  double getReceiverDistance() { return xReceiver; };
308 
316  double getReceiverDistanceX() { return xReceiver; };
317 
325  double getReceiverDistanceZ() { return zReceiver; };
326 
334  double getReceiverDistanceS() { return sReceiver; };
335 
347  double getHeadwaveDistance() { return distance-xSource-xReceiver; };
348 
361  double getHeadwaveDistanceKm() { return xHorizontal; };
362 
367  double getActualPathIncrement() { return actual_path_increment; };
368 
377  double getTravelTime();
378 
392  void getTravelTime(double& tTotal, double& tSource, double& tReceiver,
393  double& tMantle, double& tGradient);
394 
413  virtual string toString(const int& verbosity) = 0;
414 
452  void getData(
453  int& phase,
454  double& actual_path_increment,
455  double sourceDepth[NLAYERS],
456  double sourceVelocity[NLAYERS],
457  double receiverDepth[NLAYERS],
458  double receiverVelocity[NLAYERS],
459  int& npoints,
460  double headWaveVelocity[],
461  double gradient[]
462  );
463 
494  void getData(
495  int& phase,
496  double& actual_path_increment,
497  vector<double>& sourceDepth,
498  vector<double>& sourceVelocity,
499  vector<double>& receiverDepth,
500  vector<double>& receiverVelocity,
501  vector<double>& headWaveVelocity,
502  vector<double>& gradient
503  );
504 
533  int** neighbors,
534  double** coefficients,
535  const int& maxpoints,
536  const int& maxnodes,
537  int& npoints,
538  int* nnodes
539  );
540 
556  void getNodeInfo( vector<vector<int> >& neighbors, vector<vector<double> >& coefficients );
557 
565  void getGreatCircleLocation(const double& distance, Location& loc);
566 
600  void getWeights(vector<int>& nodeids, vector<double>& weights, bool headWaveWeights = true);
601 
634  void getWeights(int nodeids[], double weights[], int& nweights);
635 
636  double getFractionActive();
637 
638  double getRayParameter() { return rayParameter; };
639 
640  double getTurningRadius() { return turningRadius; };
641 
642  virtual void getZhaoParameters(double& Vm, double& Gm, double& H, double& C, double& Cm, int& udSign) = 0;
643 
644  virtual void getPgLgComponents(double& tT,
645  double& tTaup, double& tHeadwave,
646  double& pTaup, double& pHeadwave,
647  double& trTaup, double& trHeadwave)
648  { tT = tTaup = tHeadwave = pTaup = pHeadwave = trTaup = trHeadwave = NA_VALUE; };
649 
650  virtual size_t memSize();
651 
652  static int getClassCount();
653 
654 
655  static void setDelDistance(const double& del_distance) { DEL_DISTANCE = del_distance; }
656 
657  static double getDelDistance() { return DEL_DISTANCE; }
658 
659  static void setDelDepth(const double& del_depth) { DEL_DEPTH = del_depth; }
660 
661  static double getDelDepth() { return DEL_DEPTH; }
662 
663  static void setPathIncrement(const double& path_increment) { PATH_INCREMENT = path_increment; }
664 
665  static double getPathIncrement() { return PATH_INCREMENT; }
666 
674  void get_dtt_ddist(double& dtt_ddist);
675 
682  void get_dtt_dlat(double& dtt_dlat);
683 
690  void get_dtt_dlon(double& dtt_dlon);
691 
698  void get_dtt_ddepth(double& dtt_ddepth);
699 
706  //void get_dtt_dlat_fast(double& dtt_dlat);
707 
714  //void get_dtt_dlon_fast(double& dtt_dlon);
715 
721  //void get_dsh_ddist(double& dsh_ddist);
722 
729  //void get_dsh_dlat(double& dsh_dlat);
730 
737  //void get_dsh_dlon(double& dsh_dlon);
738 
745  //void get_dsh_ddepth(double& dsh_ddepth);
746 
747  static double MAX_DISTANCE;
748  static double MAX_DEPTH;
749 
750  void setNAValues();
751 
752 protected:
753 
755 
762 
769  int phase;
770 
771  double latSource;
772  double lonSource;
773  double depthSource;
774  double latReceiver;
775  double lonReceiver;
777 
787 
793 
799 
803 
812  double vtp[3];
813 
840  vector<LayerProfile*> profiles;
841 
848 
855  double tTotal;
856 
863 
867  double distance;
868 
872  double esaz;
873 
874  // \brief The ray parameter, in sec/radian or sec/km.
877  double rayParameter;
878 
885  double xSource;
886 
893  double zSource;
894 
901  double sSource;
902 
908  double tSource;
909 
916  double xReceiver;
917 
924  double zReceiver;
925 
932  double sReceiver;
933 
939  double tReceiver;
940 
946  double xHorizontal;
947 
953  double tHorizontal;
954 
959  double tGamma;
960 
963 
965 
974 
983 
998  double getActualPathIncrement(const int& i);
999 
1005  virtual void computeTravelTime() = 0;
1006 
1007  double sqr(const double& x) { return x*x; };
1008 
1012  double ttHminus;
1013 
1017  double ttHplus;
1018 
1022  //double ttZplus;
1023 
1027  double ttHZplus;
1028 
1032  // Used in calculation of derivatives wrt source position.
1033  double ttEast;
1034 
1038  // Used in calculation of derivatives wrt source position.
1039  double ttWest;
1040 
1044  // Used in calculation of derivatives wrt source position.
1045  double ttEastZ;
1046 
1050  // Used in calculation of derivatives wrt source position.
1051  double ttNorth;
1052 
1056  // Used in calculation of derivatives wrt source position.
1057  double ttSouth;
1058 
1062  // Used in calculation of derivatives wrt source position.
1063  double ttNorthZ;
1064 
1066  double get_ttHminus();
1067 
1069  double get_ttHplus();
1070 
1072  double get_ttZplus();
1073 
1075  double get_ttZminus();
1076 
1078  double get_ttHZplus();
1079 
1081  double get_ttEast();
1082 
1084  double get_ttWest();
1085 
1087  double get_ttEastZ();
1088 
1090  double get_ttNorth();
1091 
1093  double get_ttSouth();
1094 
1096  double get_ttNorthZ();
1097 
1098  // when computing horizontal slowness, the source is moved distance
1099  // del_distance (radians) away from the receiver and a new travel time
1100  // is computed. The difference in travel time divided by del_distance
1101  // is the horizontal slowness. Units are radians.
1102  static double DEL_DISTANCE;
1103 
1104  // when computing derivative of travel time wrt depth, the depth of the
1105  // source is increased by del_depth and a new travel time computed.
1106  // The difference in travel time divided by del_depth is the
1107  // derivative of travel time wrt depth. Units of DEL_DEPTH is km.
1108  static double DEL_DEPTH;
1109 
1119  static double PATH_INCREMENT;
1120 
1121 };
1122 
1123 inline double GreatCircle::getTravelTime()
1124 {
1125  return tTotal;
1126 }
1127 
1128 inline void GreatCircle::getTravelTime(double& tT, double& tS, double& tR, double& tM, double& tG)
1129 {
1130  tT = tTotal;
1131  tS = tSource;
1132  tR = tReceiver;
1133  tM = tHorizontal;
1134  tG = tGamma;
1135 }
1136 
1137 inline size_t GreatCircle::memSize()
1138 {
1139  //size_t n =
1140  //4 // sizeof(grid)
1141  //+ sizeof(phase)
1142  //+ sizeof(source)
1143  //+ sizeof(receiver)
1144  //+ sizeof(location)
1145  //+ sizeof(vtp)+3*sizeof(double)
1146  //+ sizeof(tTotal)
1147  //+ sizeof(actual_path_increment)
1148  //+ sizeof(distance)
1149  //+ sizeof(esaz)
1150  //+ sizeof(xSource)
1151  //+ sizeof(tSource)
1152  //+ sizeof(xReceiver)
1153  //+ sizeof(tReceiver)
1154  //+ sizeof(xHorizontal)
1155  //+ sizeof(tHorizontal)
1156  //+ sizeof(sourceIndex)
1157  //+ sizeof(receiverIndex);
1158  //for (int i=0; i<(int)profiles.size(); i++)
1159  // if (profiles[i]) n += profiles[i]->memSize();
1160 
1161  size_t n =
1162  sizeof(&grid) // Grid&
1163  + sizeof(phase)
1164  + sizeof(headWaveInterface)
1165  + sizeof(source) // CrustalProfile*
1166  + sizeof(receiver) // CrustalProfile*
1167  + sizeof(location) // Location
1168  + sizeof(vtp) + 3 * sizeof(double) // vtp[3]
1169  + sizeof(profiles) // vector<LayerProfile*> profiles)
1170  + sizeof(solutionMethod) // string
1171  + sizeof(tTotal)
1172  + sizeof(actual_path_increment)
1173  + sizeof(distance)
1174  + sizeof(esaz)
1175  + sizeof(rayParameter)
1176  + sizeof(xSource)
1177  + sizeof(zSource)
1178  + sizeof(sSource)
1179  + sizeof(tSource)
1180  + sizeof(xReceiver)
1181  + sizeof(zReceiver)
1182  + sizeof(sReceiver)
1183  + sizeof(tReceiver)
1184  + sizeof(xHorizontal)
1185  + sizeof(tHorizontal)
1186  + sizeof(tGamma)
1187  + sizeof(sourceRayParameter)
1188  + sizeof(receiverRayParameter)
1189  + sizeof(turningRadius)
1190  + sizeof(sourceIndex)
1191  + sizeof(receiverIndex)
1192  + sizeof(ttHminus)
1193  + sizeof(ttHplus)
1194  //+ sizeof(ttZplus)
1195  + sizeof(ttHZplus)
1196  + sizeof(ttEast)
1197  + sizeof(ttWest)
1198  + sizeof(ttEastZ)
1199  + sizeof(ttNorth)
1200  + sizeof(ttSouth)
1201  + sizeof(ttNorthZ)
1202  ;
1203 
1204  return n;
1205 }
1206 
1207 inline double GreatCircle::getActualPathIncrement(const int& i)
1208 {
1209  // this horizontal segment lies completely in between the
1210  // source and receiver. return actual_path_increment.
1211  if (i > sourceIndex && i < receiverIndex)
1212  return actual_path_increment;
1213 
1214  // if the source and receiver have the same index, it means the ray
1215  // hit the headwave interface in some horizontal segment, and left
1216  // the headwave interface before exiting the horizontal segment.
1217  // In this case, return the source-receiver separation minus the
1218  // horizontal offsets below the source and the receiver.
1219  if (i == sourceIndex && i == receiverIndex)
1220  return distance - xSource - xReceiver;
1221 
1222  // the ray hit the interface in this segment. return only the
1223  // part of the horizontal segment that starts at the source pierce point
1224  // and ends at the profile just to the right.
1225  if (i == sourceIndex)
1226  return (sourceIndex+1)*actual_path_increment - xSource;
1227 
1228  // this is the horizontal segment such that the ray left the
1229  // interface in this segment. return only the part of the
1230  // horizontal segment that starts at the profile that is the
1231  // left side of the horizontal segment and ends at the
1232  // receiver pierce point.
1233  if (i == receiverIndex)
1234  return distance - xReceiver - receiverIndex*actual_path_increment;
1235 
1236  return 0.;
1237 }
1238 
1239 inline string GreatCircle::getPhaseString()
1240 {
1241  return (phase==Pn ? "Pn" : (phase==Sn ? "Sn" : (phase==Pg ? "Pg" : (phase==Lg ? "Lg"
1242  : "unknown phase"))));
1243 }
1244 
1245 inline double GreatCircle::getFractionActive()
1246 {
1247  int nactive = 0;
1248  for (int i=0; i<(int)profiles.size(); ++i)
1249  if (getProfile(i)->isActiveProfile())
1250  ++nactive;
1251  return ((double)nactive)/((double)profiles.size());
1252 }
1253 
1254 inline void GreatCircle::get_dtt_ddist(double& dtt_ddist)
1255 {
1256  if (getTravelTime() > -1.)
1257  dtt_ddist = (get_ttHplus() - getTravelTime())/DEL_DISTANCE;
1258  else
1259  dtt_ddist = NA_VALUE;
1260 }
1261 
1262 inline void GreatCircle::get_dtt_dlat(double& dtt_dlat)
1263 {
1264  if (getTravelTime() > -1.)
1265  dtt_dlat = (get_ttNorth() - getTravelTime())/DEL_DISTANCE;
1266  else
1267  dtt_dlat = NA_VALUE;
1268 }
1269 
1270 inline void GreatCircle::get_dtt_dlon(double& dtt_dlon)
1271 {
1272  if (getTravelTime() > -1.)
1273  dtt_dlon = (get_ttEast() - getTravelTime())/DEL_DISTANCE;
1274  else
1275  dtt_dlon = NA_VALUE;
1276 }
1277 
1278 //inline void GreatCircle::get_dtt_dlat_fast(double& dtt_dlat)
1279 //{
1280 // dtt_dlat = (get_ttHplus() - getTravelTime())/DEL_DISTANCE*cos(getEsaz()+PI);
1281 //}
1282 //
1283 //inline void GreatCircle::get_dtt_dlon_fast(double& dtt_dlon)
1284 //{
1285 // dtt_dlon = (get_ttHplus() - getTravelTime())/DEL_DISTANCE*sin(getEsaz()+PI);
1286 //}
1287 //
1288 
1289 //inline void GreatCircle::get_dsh_ddist(double& dsh_ddist)
1290 //{
1291 // dsh_ddist = (get_ttHminus() - 2*getTravelTime() + get_ttHplus())
1292 // /DEL_DISTANCE/DEL_DISTANCE;
1293 //}
1294 //
1295 //inline void GreatCircle::get_dsh_dlat(double& dsh_dlat)
1296 //{
1297 // dsh_dlat = (get_ttNorth() - 2*getTravelTime() + get_ttSouth())
1298 // /DEL_DISTANCE/DEL_DISTANCE;
1299 //}
1300 //
1301 //inline void GreatCircle::get_dsh_dlon(double& dsh_dlon)
1302 //{
1303 // dsh_dlon = (get_ttEast() - 2*getTravelTime() + get_ttWest())
1304 // /DEL_DISTANCE/DEL_DISTANCE;
1305 //}
1306 //
1307 //inline void GreatCircle::get_dsh_ddepth(double& dsh_ddepth)
1308 //{
1309 // dsh_ddepth = (get_ttHZplus() - get_ttZplus()- get_ttHplus()
1310 // + getTravelTime()) /DEL_DEPTH/DEL_DISTANCE;
1311 //}
1312 
1313 } // end slbm namespace
1314 
1315 #endif // GreatCircle.h
#define SLBM_EXP_IMP
Definition: SLBMGlobals.h:180
A profile through the Earth model that stores interface radius, and interval P or S wave velocity inf...
The GreatCircle class manages information related to a great circle path between two Locations on the...
Definition: GreatCircle.h:114
double zSource
The vertical distance from the source Location to the source pierce point, in km.
Definition: GreatCircle.h:893
double sSource
The ray length from the source Location to the source pierce point, in km.
Definition: GreatCircle.h:901
static int getClassCount()
double actual_path_increment
The actual spacing between the elements of profiles, in radians.
Definition: GreatCircle.h:862
static double PATH_INCREMENT
the desired spacing of great circle nodes along the head wave interface, in radians.
Definition: GreatCircle.h:1119
double getSourceDistanceS()
Retrieve the ray length below the source, in km.
Definition: GreatCircle.h:298
double getHeadwaveDistanceKm()
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
Definition: GreatCircle.h:361
virtual void getZhaoParameters(double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)=0
double getSourceRayParameter()
Definition: GreatCircle.h:206
int getPhase()
Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn,...
Definition: GreatCircle.h:178
double distance
The horizontal source-receiver separation, in radians.
Definition: GreatCircle.h:867
double getSourceDistanceZ()
Retrieve vertical offset below the source, in km.
Definition: GreatCircle.h:289
virtual string toString(const int &verbosity)=0
Retrieve a formatted string providing a detailed description of the information managed by this Great...
double getRayParameter()
Definition: GreatCircle.h:638
double getReceiverDistanceX()
Retrieve horizontal offset below the receiver, in radians.
Definition: GreatCircle.h:316
double get_ttHminus()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
int sourceIndex
The index of the element in the profiles array corresponding to the horizontal increment in which the...
Definition: GreatCircle.h:973
double get_ttNorth()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
double getReceiverRayParameter()
Definition: GreatCircle.h:208
static double DEL_DISTANCE
Definition: GreatCircle.h:1102
double sourceRayParameter
Definition: GreatCircle.h:961
double get_ttZminus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
static double MAX_DEPTH
Definition: GreatCircle.h:748
static double getPathIncrement()
Definition: GreatCircle.h:665
const int & getHeadWaveInterface()
Retrieve the index of the head wave interface (SLBMGlobals::MANTLE for Pn, Sn; SLBMGlobals::MIDDLE_CR...
Definition: GreatCircle.h:185
static double getDelDepth()
Definition: GreatCircle.h:661
static void setDelDepth(const double &del_depth)
Definition: GreatCircle.h:659
void getWeights(int nodeids[], double weights[], int &nweights)
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
virtual void getPgLgComponents(double &tT, double &tTaup, double &tHeadwave, double &pTaup, double &pHeadwave, double &trTaup, double &trHeadwave)
Definition: GreatCircle.h:644
double get_ttHZplus()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
int phase
The phase that this GreatCircle object is set up for (Pn, Sn, Pg or Lg).
Definition: GreatCircle.h:769
virtual void computeTravelTime()=0
Method to compute the travel time from source to receiver, in seconds.
static int greatCircleClassCount
Definition: GreatCircle.h:754
double tTotal
The total travel time from source to receiver, in seconds.
Definition: GreatCircle.h:855
GreatCircle(const GreatCircle &other)
Copy constructor.
double getSourceDistance()
Retrieve horizontal offset below the source, in radians.
Definition: GreatCircle.h:271
double tHorizontal
The time spent by the ray traveling horizontally as a head wave, in seconds.
Definition: GreatCircle.h:953
CrustalProfile * getReceiverProfile()
Retrieve a pointer to the receiver CrustalProfile.
Definition: GreatCircle.h:204
double esaz
The source-receiver azimuth, in radians.
Definition: GreatCircle.h:872
double get_ttZplus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
double receiverRayParameter
Definition: GreatCircle.h:962
double xReceiver
The horizontal distance from the receiver Location to the receiver pierce point, in radians.
Definition: GreatCircle.h:916
static void setDelDistance(const double &del_distance)
Definition: GreatCircle.h:655
double get_ttNorthZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
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 p...
double sReceiver
The path length from the receiver Location to the receiver pierce point, in km.
Definition: GreatCircle.h:932
static double DEL_DEPTH
Definition: GreatCircle.h:1108
static void setPathIncrement(const double &path_increment)
Definition: GreatCircle.h:663
double get_ttEastZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
double getReceiverDistanceZ()
Retrieve vertical offset below the receiver, in km.
Definition: GreatCircle.h:325
double get_ttWest()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
Location location
A Location object used in a variety of places to manipulate Location information.
Definition: GreatCircle.h:802
double getTurningRadius()
Definition: GreatCircle.h:640
CrustalProfile * source
The source CrustalProfile object.
Definition: GreatCircle.h:792
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 receive...
CrustalProfile * receiver
The receiver CrustalProfile object.
Definition: GreatCircle.h:798
double xSource
The horizontal distance from the source Location to the source pierce point, in radians.
Definition: GreatCircle.h:885
virtual ~GreatCircle()
Destructor. Deletes LayerProfile objects associated with this GreatCircle object.
double xHorizontal
The horizontal distance traveled by the ray as a head wave, in km.
Definition: GreatCircle.h:946
double sqr(const double &x)
Definition: GreatCircle.h:1007
void getNodeInfo(vector< vector< int > > &neighbors, vector< vector< double > > &coefficients)
Retrieve information about the interpolated points along the headwave path, including the number of p...
void getGreatCircleLocation(const double &distance, Location &loc)
Retrieve a location object that is located on the great circle at specified distance from source.
Grid & grid
A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfil...
Definition: GreatCircle.h:761
void get_dtt_ddepth(double &dtt_ddepth)
Retrieve the derivative of travel time wrt to source depth, in seconds/km.
double getSourceDistanceX()
Retrieve horizontal offset below the source, in radians.
Definition: GreatCircle.h:280
LayerProfile * getProfile(const int &i)
Retrieve a pointer to one of the LayerProfile objects that comprise the head wave portion of the ray ...
GreatCircle & operator=(const GreatCircle &other)
Equal operator.
double tGamma
The gradient correction term of the total travel time, in sec.
Definition: GreatCircle.h:959
double getReceiverDistance()
Retrieve horizontal offset below the receiver, in radians.
Definition: GreatCircle.h:307
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.
double tReceiver
The time required for the ray to travel from the receiver pierce point to the receiver Location,...
Definition: GreatCircle.h:939
int receiverIndex
The index of the element in the profiles array corresponding to the horizontal increment in which the...
Definition: GreatCircle.h:982
double get_ttEast()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
vector< LayerProfile * > profiles
The LayerProfile objects which are positioned on the interface along which the head wave propagates.
Definition: GreatCircle.h:840
string solutionMethod
The method used to calculate travel times.
Definition: GreatCircle.h:847
static double getDelDistance()
Definition: GreatCircle.h:657
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 receive...
double getEsaz()
Retrieve source-receiver azimuth, in radians.
double get_ttHplus()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
double getActualPathIncrement()
Retrieve horizontal separation of LayerProfiles, in radians.
Definition: GreatCircle.h:367
CrustalProfile * getSourceProfile()
Retrieve a pointer to the source CrustalProfile.
Definition: GreatCircle.h:198
double get_ttSouth()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
void getLayerProfileLocation(const int &i, Location &loc)
Retrieve the Location of a LayerProfile.
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.
int getNProfiles()
Retrieve the number of LayerProfile object positioned along the head wave interface.
Definition: GreatCircle.h:241
Grid & getGrid()
Retrieve a reference to the Grid object that this GreatCircle is associated with.
Definition: GreatCircle.h:169
double getDistance()
Retrieve source-receiver separation, in radians.
Definition: GreatCircle.h:256
double tSource
The time required for the ray to travel from the source Location to piercePointSource,...
Definition: GreatCircle.h:908
double getReceiverDistanceS()
Retrieve the ray length below the receiver, in km.
Definition: GreatCircle.h:334
double zReceiver
The vertical distance from the receiver Location to the receiver pierce point, in km.
Definition: GreatCircle.h:924
int headWaveInterface
The index of the earth model interface along which head waves propagate. If phase is Pn or Sn,...
Definition: GreatCircle.h:786
double getHeadwaveDistance()
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
Definition: GreatCircle.h:347
static double MAX_DISTANCE
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
Definition: GreatCircle.h:747
A 2 dimensional, horizontal grid of GirdProfile objects.
Definition: Grid.h:91
A Profile object based on values interpolated from nearby GridProfile objects.
Definition: LayerProfile.h:76
The Location Class manages a single point in/on the Earth, which is described by the GRS80 ellipsoid.
Definition: Location.h:78