RSTT: rstt/SLBM/include/GreatCircle.h Source File

RSTT 3.1.0 Regional Seismic Travel Time

GreatCircle.h
Go to the documentation of this file.
1
2 //- ****************************************************************************
3 //-
4 //- Copyright 2009 National Technology & Engineering Solutions of Sandia, LLC
5 //- (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
6 //- Government retains certain rights in this software.
7 //-
8 //- BSD Open Source License
9 //- All rights reserved.
10 //-
11 //- Redistribution and use in source and binary forms, with or without
12 //- modification, are permitted provided that the following conditions are met:
13 //-
14 //- 1. Redistributions of source code must retain the above copyright notice,
15 //- this list of conditions and the following disclaimer.
16 //-
17 //- 2. Redistributions in binary form must reproduce the above copyright
18 //- notice, this list of conditions and the following disclaimer in the
19 //- documentation and/or other materials provided with the distribution.
20 //-
21 //- 3. Neither the name of the copyright holder nor the names of its
22 //- contributors may be used to endorse or promote products derived from
23 //- this software without specific prior written permission.
24 //-
25 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 //- POSSIBILITY OF SUCH DAMAGE.
36 //-
37 //- ****************************************************************************
38
39 #ifndef GreatCircle_H
40 #define GreatCircle_H
41
42 // **** _SYSTEM INCLUDES_ ******************************************************
43
44 #include <vector>
45 #include <map>
46 #include <string>
47 #include <iostream>
48
49 using namespace std;
50
51 // **** _LOCAL INCLUDES_ *******************************************************
52
53 #include "SLBMGlobals.h"
54 #include "Location.h"
55 #include "LayerProfile.h"
56 //#include "CrustalProfile.h"
57
58 // **** _BEGIN SLBM NAMESPACE_ **************************************************
59
60 namespace slbm {
61
62 class Grid;
63 class CrustalProfile;
64
65 // **** _CLASS DEFINITION_ *****************************************************
66 //
114 class SLBM_EXP_IMP GreatCircle
115 {
116
117 public:
118
132 GreatCircle(
133 const int& _phase,
134 Grid& _grid,
135 const double& latSource,
136 const double& lonSource,
137 const double& depthSource,
138 const double& latReceiver,
139 const double& lonReceiver,
140 const double& depthReceiver);
141
147 virtual ~GreatCircle();
148
152 GreatCircle(const GreatCircle &other);
153
157 GreatCircle& operator=(const GreatCircle& other);
158
164 Grid& getGrid() { return grid; };
165
173 int getPhase() { return phase; };
174
180 const int& getHeadWaveInterface() { return headWaveInterface; };
181
187 string getPhaseString();
188
193 CrustalProfile* getSourceProfile() { return source; };
194
199 CrustalProfile* getReceiverProfile() { return receiver; };
200
201 double getSourceRayParameter() { return sourceRayParameter; };
202
203 double getReceiverRayParameter() { return receiverRayParameter; };
204
229 LayerProfile* getProfile(const int& i);
230
236 int getNProfiles() { return (int)profiles.size(); };
237
243 void getLayerProfileLocation(const int& i, Location& loc);
244
251 double getDistance() { return distance; };
252
257 double getEsaz();
258
266 double getSourceDistance() { return xSource; };
267
275 double getSourceDistanceX() { return xSource; };
276
284 double getSourceDistanceZ() { return zSource; };
285
293 double getSourceDistanceS() { return sSource; };
294
302 double getReceiverDistance() { return xReceiver; };
303
311 double getReceiverDistanceX() { return xReceiver; };
312
320 double getReceiverDistanceZ() { return zReceiver; };
321
329 double getReceiverDistanceS() { return sReceiver; };
330
342 double getHeadwaveDistance() { return distance-xSource-xReceiver; };
343
356 double getHeadwaveDistanceKm() { return xHorizontal; };
357
362 double getActualPathIncrement() { return actual_path_increment; };
363
372 double getTravelTime();
373
387 void getTravelTime(double& tTotal, double& tSource, double& tReceiver,
388 double& tMantle, double& tGradient);
389
408 virtual string toString(const int& verbosity) = 0;
409
447 void getData(
448 int& phase,
449 double& actual_path_increment,
450 double sourceDepth[NLAYERS],
451 double sourceVelocity[NLAYERS],
452 double receiverDepth[NLAYERS],
453 double receiverVelocity[NLAYERS],
454 int& npoints,
455 double headWaveVelocity[],
456 double gradient[]
457 );
458
489 void getData(
490 int& phase,
491 double& actual_path_increment,
492 vector<double>& sourceDepth,
493 vector<double>& sourceVelocity,
494 vector<double>& receiverDepth,
495 vector<double>& receiverVelocity,
496 vector<double>& headWaveVelocity,
497 vector<double>& gradient
498 );
499
527 void getNodeInfo(
528 int** neighbors,
529 double** coefficients,
530 const int& maxpoints,
531 const int& maxnodes,
532 int& npoints,
533 int* nnodes
534 );
535
551 void getNodeInfo( vector<vector<int> >& neighbors, vector<vector<double> >& coefficients );
552
560 void getGreatCircleLocation(const double& distance, Location& loc);
561
595 void getWeights(vector<int>& nodeids, vector<double>& weights, bool headWaveWeights = true);
596
629 void getWeights(int nodeids[], double weights[], int& nweights);
630
631 double getFractionActive();
632
633 double getRayParameter() { return rayParameter; };
634
635 double getTurningRadius() { return turningRadius; };
636
637 virtual void getZhaoParameters(double& Vm, double& Gm, double& H, double& C, double& Cm, int& udSign) = 0;
638
639 virtual void getPgLgComponents(double& tT,
640 double& tTaup, double& tHeadwave,
641 double& pTaup, double& pHeadwave,
642 double& trTaup, double& trHeadwave)
643 { tT = tTaup = tHeadwave = pTaup = pHeadwave = trTaup = trHeadwave = NA_VALUE; };
644
645 virtual size_t memSize();
646
647 static int getClassCount();
648
649
650 static void setDelDistance(const double& del_distance) { DEL_DISTANCE = del_distance; }
651
652 static double getDelDistance() { return DEL_DISTANCE; }
653
654 static void setDelDepth(const double& del_depth) { DEL_DEPTH = del_depth; }
655
656 static double getDelDepth() { return DEL_DEPTH; }
657
658 static void setPathIncrement(const double& path_increment) { PATH_INCREMENT = path_increment; }
659
660 static double getPathIncrement() { return PATH_INCREMENT; }
661
669 void get_dtt_ddist(double& dtt_ddist);
670
677 void get_dtt_dlat(double& dtt_dlat);
678
685 void get_dtt_dlon(double& dtt_dlon);
686
693 void get_dtt_ddepth(double& dtt_ddepth);
694
701 //void get_dtt_dlat_fast(double& dtt_dlat);
702
709 //void get_dtt_dlon_fast(double& dtt_dlon);
710
716 //void get_dsh_ddist(double& dsh_ddist);
717
724 //void get_dsh_dlat(double& dsh_dlat);
725
732 //void get_dsh_dlon(double& dsh_dlon);
733
740 //void get_dsh_ddepth(double& dsh_ddepth);
741
742 static double MAX_DISTANCE;
743 static double MAX_DEPTH;
744
745 void setNAValues();
746
747 protected:
748
749 static int greatCircleClassCount;
750
756 Grid& grid;
757
764 int phase;
765
774 int headWaveInterface;
775
780 CrustalProfile* source;
781
786 CrustalProfile* receiver;
787
790 Location location;
791
800 double vtp[3];
801
828 vector<LayerProfile*> profiles;
829
835 string solutionMethod;
836
843 double tTotal;
844
850 double actual_path_increment;
851
855 double distance;
856
860 double esaz;
861
862 // \brief The ray parameter, in sec/radian or sec/km.
865 double rayParameter;
866
873 double xSource;
874
881 double zSource;
882
889 double sSource;
890
896 double tSource;
897
904 double xReceiver;
905
912 double zReceiver;
913
920 double sReceiver;
921
927 double tReceiver;
928
934 double xHorizontal;
935
941 double tHorizontal;
942
947 double tGamma;
948
949 double sourceRayParameter;
950 double receiverRayParameter;
951
952 double turningRadius;
953
961 int sourceIndex;
962
970 int receiverIndex;
971
986 double getActualPathIncrement(const int& i);
987
993 virtual void computeTravelTime() = 0;
994
995 double sqr(const double& x) { return x*x; };
996
1000 double ttHminus;
1001
1005 double ttHplus;
1006
1010 //double ttZplus;
1011
1015 double ttHZplus;
1016
1020 // Used in calculation of derivatives wrt source position.
1021 double ttEast;
1022
1026 // Used in calculation of derivatives wrt source position.
1027 double ttWest;
1028
1032 // Used in calculation of derivatives wrt source position.
1033 double ttEastZ;
1034
1038 // Used in calculation of derivatives wrt source position.
1039 double ttNorth;
1040
1044 // Used in calculation of derivatives wrt source position.
1045 double ttSouth;
1046
1050 // Used in calculation of derivatives wrt source position.
1051 double ttNorthZ;
1052
1054 double get_ttHminus();
1055
1057 double get_ttHplus();
1058
1060 double get_ttZplus();
1061
1063 double get_ttZminus();
1064
1066 double get_ttHZplus();
1067
1069 double get_ttEast();
1070
1072 double get_ttWest();
1073
1075 double get_ttEastZ();
1076
1078 double get_ttNorth();
1079
1081 double get_ttSouth();
1082
1084 double get_ttNorthZ();
1085
1086 // when computing horizontal slowness, the source is moved distance
1087 // del_distance (radians) away from the receiver and a new travel time
1088 // is computed. The difference in travel time divided by del_distance
1089 // is the horizontal slowness. Units are radians.
1090 static double DEL_DISTANCE;
1091
1092 // when computing derivative of travel time wrt depth, the depth of the
1093 // source is increased by del_depth and a new travel time computed.
1094 // The difference in travel time divided by del_depth is the
1095 // derivative of travel time wrt depth. Units of DEL_DEPTH is km.
1096 static double DEL_DEPTH;
1097
1107 static double PATH_INCREMENT;
1108
1109 };
1110
1111 inline double GreatCircle::getTravelTime()
1112 {
1113 return tTotal;
1114 }
1115
1116 inline void GreatCircle::getTravelTime(double& tT, double& tS, double& tR, double& tM, double& tG)
1117 {
1118 tT = tTotal;
1119 tS = tSource;
1120 tR = tReceiver;
1121 tM = tHorizontal;
1122 tG = tGamma;
1123 }
1124
1125 inline size_t GreatCircle::memSize()
1126 {
1127 //size_t n =
1128 //4 // sizeof(grid)
1129 //+ sizeof(phase)
1130 //+ sizeof(source)
1131 //+ sizeof(receiver)
1132 //+ sizeof(location)
1133 //+ sizeof(vtp)+3*sizeof(double)
1134 //+ sizeof(tTotal)
1135 //+ sizeof(actual_path_increment)
1136 //+ sizeof(distance)
1137 //+ sizeof(esaz)
1138 //+ sizeof(xSource)
1139 //+ sizeof(tSource)
1140 //+ sizeof(xReceiver)
1141 //+ sizeof(tReceiver)
1142 //+ sizeof(xHorizontal)
1143 //+ sizeof(tHorizontal)
1144 //+ sizeof(sourceIndex)
1145 //+ sizeof(receiverIndex);
1146 //for (int i=0; i<(int)profiles.size(); i++)
1147 // if (profiles[i]) n += profiles[i]->memSize();
1148
1149 size_t n =
1150 sizeof(&grid) // Grid&
1151 + sizeof(phase)
1152 + sizeof(headWaveInterface)
1153 + sizeof(source) // CrustalProfile*
1154 + sizeof(receiver) // CrustalProfile*
1155 + sizeof(location) // Location
1156 + sizeof(vtp) + 3 * sizeof(double) // vtp[3]
1157 + sizeof(profiles) // vector<LayerProfile*> profiles)
1158 + sizeof(solutionMethod) // string
1159 + sizeof(tTotal)
1160 + sizeof(actual_path_increment)
1161 + sizeof(distance)
1162 + sizeof(esaz)
1163 + sizeof(rayParameter)
1164 + sizeof(xSource)
1165 + sizeof(zSource)
1166 + sizeof(sSource)
1167 + sizeof(tSource)
1168 + sizeof(xReceiver)
1169 + sizeof(zReceiver)
1170 + sizeof(sReceiver)
1171 + sizeof(tReceiver)
1172 + sizeof(xHorizontal)
1173 + sizeof(tHorizontal)
1174 + sizeof(tGamma)
1175 + sizeof(sourceRayParameter)
1176 + sizeof(receiverRayParameter)
1177 + sizeof(turningRadius)
1178 + sizeof(sourceIndex)
1179 + sizeof(receiverIndex)
1180 + sizeof(ttHminus)
1181 + sizeof(ttHplus)
1182 //+ sizeof(ttZplus)
1183 + sizeof(ttHZplus)
1184 + sizeof(ttEast)
1185 + sizeof(ttWest)
1186 + sizeof(ttEastZ)
1187 + sizeof(ttNorth)
1188 + sizeof(ttSouth)
1189 + sizeof(ttNorthZ)
1190 ;
1191
1192 return n;
1193 }
1194
1195 inline double GreatCircle::getActualPathIncrement(const int& i)
1196 {
1197 // this horizontal segment lies completely in between the
1198 // source and receiver. return actual_path_increment.
1199 if (i > sourceIndex && i < receiverIndex)
1200 return actual_path_increment;
1201
1202 // if the source and receiver have the same index, it means the ray
1203 // hit the headwave interface in some horizontal segment, and left
1204 // the headwave interface before exiting the horizontal segment.
1205 // In this case, return the source-receiver separation minus the
1206 // horizontal offsets below the source and the receiver.
1207 if (i == sourceIndex && i == receiverIndex)
1208 return distance - xSource - xReceiver;
1209
1210 // the ray hit the interface in this segment. return only the
1211 // part of the horizontal segment that starts at the source pierce point
1212 // and ends at the profile just to the right.
1213 if (i == sourceIndex)
1214 return (sourceIndex+1)*actual_path_increment - xSource;
1215
1216 // this is the horizontal segment such that the ray left the
1217 // interface in this segment. return only the part of the
1218 // horizontal segment that starts at the profile that is the
1219 // left side of the horizontal segment and ends at the
1220 // receiver pierce point.
1221 if (i == receiverIndex)
1222 return distance - xReceiver - receiverIndex*actual_path_increment;
1223
1224 return 0.;
1225 }
1226
1227 inline string GreatCircle::getPhaseString()
1228 {
1229 return (phase==Pn ? "Pn" : (phase==Sn ? "Sn" : (phase==Pg ? "Pg" : (phase==Lg ? "Lg"
1230 : "unknown phase"))));
1231 }
1232
1233 inline double GreatCircle::getFractionActive()
1234 {
1235 int nactive = 0;
1236 for (int i=0; i<(int)profiles.size(); ++i)
1237 if (getProfile(i)->isActiveProfile())
1238 ++nactive;
1239 return ((double)nactive)/((double)profiles.size());
1240 }
1241
1242 inline void GreatCircle::get_dtt_ddist(double& dtt_ddist)
1243 {
1244 if (getTravelTime() > -1.)
1245 dtt_ddist = (get_ttHplus() - getTravelTime())/DEL_DISTANCE;
1246 else
1247 dtt_ddist = NA_VALUE;
1248 }
1249
1250 inline void GreatCircle::get_dtt_dlat(double& dtt_dlat)
1251 {
1252 if (getTravelTime() > -1.)
1253 dtt_dlat = (get_ttNorth() - getTravelTime())/DEL_DISTANCE;
1254 else
1255 dtt_dlat = NA_VALUE;
1256 }
1257
1258 inline void GreatCircle::get_dtt_dlon(double& dtt_dlon)
1259 {
1260 if (getTravelTime() > -1.)
1261 dtt_dlon = (get_ttEast() - getTravelTime())/DEL_DISTANCE;
1262 else
1263 dtt_dlon = NA_VALUE;
1264 }
1265
1266 //inline void GreatCircle::get_dtt_dlat_fast(double& dtt_dlat)
1267 //{
1268 // dtt_dlat = (get_ttHplus() - getTravelTime())/DEL_DISTANCE*cos(getEsaz()+PI);
1269 //}
1270 //
1271 //inline void GreatCircle::get_dtt_dlon_fast(double& dtt_dlon)
1272 //{
1273 // dtt_dlon = (get_ttHplus() - getTravelTime())/DEL_DISTANCE*sin(getEsaz()+PI);
1274 //}
1275 //
1276
1277 //inline void GreatCircle::get_dsh_ddist(double& dsh_ddist)
1278 //{
1279 // dsh_ddist = (get_ttHminus() - 2*getTravelTime() + get_ttHplus())
1280 // /DEL_DISTANCE/DEL_DISTANCE;
1281 //}
1282 //
1283 //inline void GreatCircle::get_dsh_dlat(double& dsh_dlat)
1284 //{
1285 // dsh_dlat = (get_ttNorth() - 2*getTravelTime() + get_ttSouth())
1286 // /DEL_DISTANCE/DEL_DISTANCE;
1287 //}
1288 //
1289 //inline void GreatCircle::get_dsh_dlon(double& dsh_dlon)
1290 //{
1291 // dsh_dlon = (get_ttEast() - 2*getTravelTime() + get_ttWest())
1292 // /DEL_DISTANCE/DEL_DISTANCE;
1293 //}
1294 //
1295 //inline void GreatCircle::get_dsh_ddepth(double& dsh_ddepth)
1296 //{
1297 // dsh_ddepth = (get_ttHZplus() - get_ttZplus()- get_ttHplus()
1298 // + getTravelTime()) /DEL_DEPTH/DEL_DISTANCE;
1299 //}
1300
1301 } // end slbm namespace
1302
1303 #endif // GreatCircle.h
slbm::GreatCircle::rayParameter
double rayParameter
Definition: GreatCircle.h:865
slbm::GreatCircle::get_ttSouth
double get_ttSouth()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::setPathIncrement
static void setPathIncrement(const double &path_increment)
Definition: GreatCircle.h:658
slbm::GreatCircle::getDelDepth
static double getDelDepth()
Definition: GreatCircle.h:656
slbm::GreatCircle::profiles
vector< LayerProfile * > profiles
The LayerProfile objects which are positioned on the interface along which the head wave propagates.
Definition: GreatCircle.h:828
slbm::GreatCircle::sSource
double sSource
The ray length from the source Location to the source pierce point, in km.
Definition: GreatCircle.h:889
slbm::GreatCircle::tHorizontal
double tHorizontal
The time spent by the ray traveling horizontally as a head wave, in seconds.
Definition: GreatCircle.h:941
slbm::GreatCircle::get_ttZplus
double get_ttZplus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getReceiverDistanceX
double getReceiverDistanceX()
Retrieve horizontal offset below the receiver, in radians.
Definition: GreatCircle.h:311
slbm::GreatCircle::getTurningRadius
double getTurningRadius()
Definition: GreatCircle.h:635
slbm::GreatCircle::toString
virtual string toString(const int &verbosity)=0
Retrieve a formatted string providing a detailed description of the information managed by this Great...
slbm::GreatCircle::get_ttNorth
double get_ttNorth()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::ttWest
double ttWest
Definition: GreatCircle.h:1027
slbm::GreatCircle::get_ttHminus
double get_ttHminus()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::get_ttZminus
double get_ttZminus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
slbm::Location
The Location Class manages a single point in/on the Earth, which is described by the GRS80 ellipsoid.
Definition: Location.h:78
slbm::GreatCircle::computeTravelTime
virtual void computeTravelTime()=0
Method to compute the travel time from source to receiver, in seconds.
slbm::GreatCircle::get_ttHZplus
double get_ttHZplus()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::sqr
double sqr(const double &x)
Definition: GreatCircle.h:995
slbm::GreatCircle::location
Location location
A Location object used in a variety of places to manipulate Location information.
Definition: GreatCircle.h:790
slbm::GreatCircle::esaz
double esaz
The source-receiver azimuth, in radians.
Definition: GreatCircle.h:860
slbm::GreatCircle::setNAValues
void setNAValues()
slbm::GreatCircle::getData
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...
slbm::GreatCircle::sourceRayParameter
double sourceRayParameter
Definition: GreatCircle.h:949
slbm::GreatCircle::~GreatCircle
virtual ~GreatCircle()
Destructor. Deletes LayerProfile objects associated with this GreatCircle object.
slbm::GreatCircle::DEL_DISTANCE
static double DEL_DISTANCE
Definition: GreatCircle.h:1090
slbm::GreatCircle::get_ttNorthZ
double get_ttNorthZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::get_ttEast
double get_ttEast()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::turningRadius
double turningRadius
Definition: GreatCircle.h:952
slbm::GreatCircle::getSourceRayParameter
double getSourceRayParameter()
Definition: GreatCircle.h:201
slbm::GreatCircle::getNProfiles
int getNProfiles()
Retrieve the number of LayerProfile object positioned along the head wave interface.
Definition: GreatCircle.h:236
LayerProfile.h
slbm::GreatCircle::get_ttHplus
double get_ttHplus()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::receiver
CrustalProfile * receiver
The receiver CrustalProfile object.
Definition: GreatCircle.h:786
slbm::GreatCircle::getPgLgComponents
virtual void getPgLgComponents(double &tT, double &tTaup, double &tHeadwave, double &pTaup, double &pHeadwave, double &trTaup, double &trHeadwave)
Definition: GreatCircle.h:639
slbm::GreatCircle::getPathIncrement
static double getPathIncrement()
Definition: GreatCircle.h:660
slbm::GreatCircle::PATH_INCREMENT
static double PATH_INCREMENT
the desired spacing of great circle nodes along the head wave interface, in radians.
Definition: GreatCircle.h:1107
slbm::GreatCircle::tSource
double tSource
The time required for the ray to travel from the source Location to piercePointSource,...
Definition: GreatCircle.h:896
slbm::GreatCircle::getSourceProfile
CrustalProfile * getSourceProfile()
Retrieve a pointer to the source CrustalProfile.
Definition: GreatCircle.h:193
slbm::GreatCircle::getSourceDistanceS
double getSourceDistanceS()
Retrieve the ray length below the source, in km.
Definition: GreatCircle.h:293
slbm::GreatCircle::getData
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...
SLBMGlobals.h
slbm::GreatCircle::getReceiverDistance
double getReceiverDistance()
Retrieve horizontal offset below the receiver, in radians.
Definition: GreatCircle.h:302
slbm::GreatCircle::getZhaoParameters
virtual void getZhaoParameters(double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)=0
slbm::CrustalProfile
A profile through the Earth model that stores interface radius, and interval P or S wave velocity inf...
Definition: CrustalProfile.h:101
slbm::GreatCircle::source
CrustalProfile * source
The source CrustalProfile object.
Definition: GreatCircle.h:780
slbm::GreatCircle::ttHZplus
double ttHZplus
Definition: GreatCircle.h:1015
slbm::Grid
A 2 dimensional, horizontal grid of GirdProfile objects.
Definition: Grid.h:90
slbm::GreatCircle::sourceIndex
int sourceIndex
The index of the element in the profiles array corresponding to the horizontal increment in which the...
Definition: GreatCircle.h:961
slbm::GreatCircle::greatCircleClassCount
static int greatCircleClassCount
Definition: GreatCircle.h:749
slbm::GreatCircle::getProfile
LayerProfile * getProfile(const int &i)
Retrieve a pointer to one of the LayerProfile objects that comprise the head wave portion of the ray ...
slbm::GreatCircle::getSourceDistance
double getSourceDistance()
Retrieve horizontal offset below the source, in radians.
Definition: GreatCircle.h:266
slbm::GreatCircle::receiverIndex
int receiverIndex
The index of the element in the profiles array corresponding to the horizontal increment in which the...
Definition: GreatCircle.h:970
slbm::GreatCircle::getLayerProfileLocation
void getLayerProfileLocation(const int &i, Location &loc)
Retrieve the Location of a LayerProfile.
slbm::LayerProfile
A Profile object based on values interpolated from nearby GridProfile objects.
Definition: LayerProfile.h:76
slbm::GreatCircle::ttEast
double ttEast
Definition: GreatCircle.h:1021
slbm::GreatCircle::operator=
GreatCircle & operator=(const GreatCircle &other)
Equal operator.
slbm::GreatCircle::getSourceDistanceZ
double getSourceDistanceZ()
Retrieve vertical offset below the source, in km.
Definition: GreatCircle.h:284
slbm::GreatCircle::getReceiverDistanceZ
double getReceiverDistanceZ()
Retrieve vertical offset below the receiver, in km.
Definition: GreatCircle.h:320
slbm::GreatCircle::GreatCircle
GreatCircle(const GreatCircle &other)
Copy constructor.
slbm::GreatCircle::ttEastZ
double ttEastZ
Definition: GreatCircle.h:1033
slbm::GreatCircle::getReceiverDistanceS
double getReceiverDistanceS()
Retrieve the ray length below the receiver, in km.
Definition: GreatCircle.h:329
slbm::GreatCircle::get_ttEastZ
double get_ttEastZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::headWaveInterface
int headWaveInterface
The index of the earth model interface along which head waves propagate. If phase is Pn or Sn,...
Definition: GreatCircle.h:774
slbm::GreatCircle::getNodeInfo
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...
slbm::GreatCircle::xSource
double xSource
The horizontal distance from the source Location to the source pierce point, in radians.
Definition: GreatCircle.h:873
slbm::GreatCircle::tTotal
double tTotal
The total travel time from source to receiver, in seconds.
Definition: GreatCircle.h:843
slbm::GreatCircle::receiverRayParameter
double receiverRayParameter
Definition: GreatCircle.h:950
slbm::GreatCircle::getPhase
int getPhase()
Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn,...
Definition: GreatCircle.h:173
slbm::GreatCircle::getDistance
double getDistance()
Retrieve source-receiver separation, in radians.
Definition: GreatCircle.h:251
slbm::GreatCircle::getHeadWaveInterface
const int & getHeadWaveInterface()
Retrieve the index of the head wave interface (SLBMGlobals::MANTLE for Pn, Sn; SLBMGlobals::MIDDLE_CR...
Definition: GreatCircle.h:180
slbm::GreatCircle::ttHminus
double ttHminus
Definition: GreatCircle.h:995
slbm::GreatCircle::ttNorth
double ttNorth
Definition: GreatCircle.h:1039
slbm::GreatCircle::DEL_DEPTH
static double DEL_DEPTH
Definition: GreatCircle.h:1096
slbm::GreatCircle::tGamma
double tGamma
The gradient correction term of the total travel time, in sec.
Definition: GreatCircle.h:947
slbm::GreatCircle::zSource
double zSource
The vertical distance from the source Location to the source pierce point, in km.
Definition: GreatCircle.h:881
SLBM_EXP_IMP
#define SLBM_EXP_IMP
Definition: SLBMGlobals.h:180
Location.h
slbm::GreatCircle::getNodeInfo
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...
slbm::GreatCircle::zReceiver
double zReceiver
The vertical distance from the receiver Location to the receiver pierce point, in km.
Definition: GreatCircle.h:912
slbm::GreatCircle::get_ttWest
double get_ttWest()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getDelDistance
static double getDelDistance()
Definition: GreatCircle.h:652
slbm::GreatCircle::getWeights
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.
slbm::GreatCircle::getRayParameter
double getRayParameter()
Definition: GreatCircle.h:633
slbm::GreatCircle::ttSouth
double ttSouth
Definition: GreatCircle.h:1045
slbm::GreatCircle::getWeights
void getWeights(int nodeids[], double weights[], int &nweights)
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
slbm::GreatCircle::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.
slbm::GreatCircle::xHorizontal
double xHorizontal
The horizontal distance traveled by the ray as a head wave, in km.
Definition: GreatCircle.h:934
slbm::GreatCircle::ttHplus
double ttHplus
Definition: GreatCircle.h:1005
slbm::GreatCircle::setDelDepth
static void setDelDepth(const double &del_depth)
Definition: GreatCircle.h:654
slbm::GreatCircle::setDelDistance
static void setDelDistance(const double &del_distance)
Definition: GreatCircle.h:650
slbm::GreatCircle::getSourceDistanceX
double getSourceDistanceX()
Retrieve horizontal offset below the source, in radians.
Definition: GreatCircle.h:275
slbm::GreatCircle::phase
int phase
The phase that this GreatCircle object is set up for (Pn, Sn, Pg or Lg).
Definition: GreatCircle.h:764
slbm::GreatCircle::MAX_DISTANCE
static double MAX_DISTANCE
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
Definition: GreatCircle.h:742
slbm::GreatCircle::getHeadwaveDistance
double getHeadwaveDistance()
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
Definition: GreatCircle.h:342
slbm::GreatCircle::getGreatCircleLocation
void getGreatCircleLocation(const double &distance, Location &loc)
Retrieve a location object that is located on the great circle at specified distance from source.
slbm::GreatCircle::distance
double distance
The horizontal source-receiver separation, in radians.
Definition: GreatCircle.h:855
slbm::GreatCircle::sReceiver
double sReceiver
The path length from the receiver Location to the receiver pierce point, in km.
Definition: GreatCircle.h:920
slbm::GreatCircle::MAX_DEPTH
static double MAX_DEPTH
Definition: GreatCircle.h:743
slbm::GreatCircle::actual_path_increment
double actual_path_increment
The actual spacing between the elements of profiles, in radians.
Definition: GreatCircle.h:850
slbm::GreatCircle::getGrid
Grid & getGrid()
Retrieve a reference to the Grid object that this GreatCircle is associated with.
Definition: GreatCircle.h:164
slbm::GreatCircle::getHeadwaveDistanceKm
double getHeadwaveDistanceKm()
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
Definition: GreatCircle.h:356
slbm::GreatCircle::getClassCount
static int getClassCount()
slbm::GreatCircle::getReceiverProfile
CrustalProfile * getReceiverProfile()
Retrieve a pointer to the receiver CrustalProfile.
Definition: GreatCircle.h:199
slbm::GreatCircle::tReceiver
double tReceiver
The time required for the ray to travel from the receiver pierce point to the receiver Location,...
Definition: GreatCircle.h:927
slbm::GreatCircle::ttNorthZ
double ttNorthZ
Definition: GreatCircle.h:1051
slbm::GreatCircle::getReceiverRayParameter
double getReceiverRayParameter()
Definition: GreatCircle.h:203
slbm::GreatCircle::grid
Grid & grid
A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfil...
Definition: GreatCircle.h:756
slbm::GreatCircle
The GreatCircle class manages information related to a great circle path between two Locations on the...
Definition: GreatCircle.h:115
slbm::GreatCircle::xReceiver
double xReceiver
The horizontal distance from the receiver Location to the receiver pierce point, in radians.
Definition: GreatCircle.h:904
slbm
Definition: CrustalProfile.h:59
slbm::GreatCircle::solutionMethod
string solutionMethod
The method used to calculate travel times.
Definition: GreatCircle.h:835
slbm::GreatCircle::getActualPathIncrement
double getActualPathIncrement()
Retrieve horizontal separation of LayerProfiles, in radians.
Definition: GreatCircle.h:362
slbm::GreatCircle::getEsaz
double getEsaz()
Retrieve source-receiver azimuth, in radians.
slbm::GreatCircle::get_dtt_ddepth
void get_dtt_ddepth(double &dtt_ddepth)
Retrieve the derivative of travel time wrt to source depth, in seconds/km.