RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
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//
113 class SLBM_EXP_IMP GreatCircle
114{
115
116 public:
117
131 GreatCircle(
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 // virtual GreatCircle *clone() = 0;
153
157 GreatCircle& operator=(const GreatCircle& other);
158
162 virtual bool operator == (const GreatCircle& other) const;
163 virtual bool operator != (const GreatCircle& other) const { return !(*this == other); } ;
164
170 Grid& getGrid() { return grid; };
171
179 int getPhase() { return phase; };
180
186 const int& getHeadWaveInterface() { return headWaveInterface; };
187
193 string getPhaseString();
194
199 CrustalProfile* getSourceProfile() { return source; };
200
205 CrustalProfile* getReceiverProfile() { return receiver; };
206
207 double getSourceRayParameter() { return sourceRayParameter; };
208
209 double getReceiverRayParameter() { return receiverRayParameter; };
210
235 LayerProfile* getProfile(const int& i);
236 vector<LayerProfile*> getProfiles() { return profiles; };
237
243 int getNProfiles() { return (int)profiles.size(); };
244
250 void getLayerProfileLocation(const int& i, Location& loc);
251
258 double getDistance() { return distance; };
259
264 double getEsaz();
265
273 double getSourceDistance() { return xSource; };
274
282 double getSourceDistanceX() { return xSource; };
283
291 double getSourceDistanceZ() { return zSource; };
292
300 double getSourceDistanceS() { return sSource; };
301
309 double getReceiverDistance() { return xReceiver; };
310
318 double getReceiverDistanceX() { return xReceiver; };
319
327 double getReceiverDistanceZ() { return zReceiver; };
328
336 double getReceiverDistanceS() { return sReceiver; };
337
349 double getHeadwaveDistance() { return distance-xSource-xReceiver; };
350
363 double getHeadwaveDistanceKm() { return xHorizontal; };
364
369 double getActualPathIncrement() { return actual_path_increment; };
370
379 double getTravelTime();
380
394 void getTravelTime(double& tTotal, double& tSource, double& tReceiver,
395 double& tMantle, double& tGradient);
396
415 virtual string toString(const int& verbosity) = 0;
416
454 void getData(
455 int& phase,
456 double& actual_path_increment,
457 double sourceDepth[NLAYERS],
458 double sourceVelocity[NLAYERS],
459 double receiverDepth[NLAYERS],
460 double receiverVelocity[NLAYERS],
461 int& npoints,
462 double headWaveVelocity[],
463 double gradient[]
464 );
465
496 void getData(
497 int& phase,
498 double& actual_path_increment,
499 vector<double>& sourceDepth,
500 vector<double>& sourceVelocity,
501 vector<double>& receiverDepth,
502 vector<double>& receiverVelocity,
503 vector<double>& headWaveVelocity,
504 vector<double>& gradient
505 );
506
534 void getNodeInfo(
535 int** neighbors,
536 double** coefficients,
537 const int& maxpoints,
538 const int& maxnodes,
539 int& npoints,
540 int* nnodes
541 );
542
558 void getNodeInfo( vector<vector<int> >& neighbors, vector<vector<double> >& coefficients );
559
567 void getGreatCircleLocation(const double& distance, Location& loc);
568
602 void getWeights(vector<int>& nodeids, vector<double>& weights, bool headWaveWeights = true);
603
636 void getWeights(int nodeids[], double weights[], int& nweights);
637
638 double getFractionActive();
639
640 double getRayParameter() { return rayParameter; };
641
642 double getTurningRadius() { return turningRadius; };
643
644 virtual void getZhaoParameters(double& Vm, double& Gm, double& H, double& C, double& Cm, int& udSign) = 0;
645
646 virtual void getPgLgComponents(double& tT,
647 double& tTaup, double& tHeadwave,
648 double& pTaup, double& pHeadwave,
649 double& trTaup, double& trHeadwave)
650 { tT = tTaup = tHeadwave = pTaup = pHeadwave = trTaup = trHeadwave = NA_VALUE; };
651
652 virtual size_t memSize();
653
654 static int getClassCount();
655
656
657 static void setDelDistance(const double& del_distance) { DEL_DISTANCE = del_distance; }
658
659 static double getDelDistance() { return DEL_DISTANCE; }
660
661 static void setDelDepth(const double& del_depth) { DEL_DEPTH = del_depth; }
662
663 static double getDelDepth() { return DEL_DEPTH; }
664
665 static void setPathIncrement(const double& path_increment) { PATH_INCREMENT = path_increment; }
666
667 static double getPathIncrement() { return PATH_INCREMENT; }
668
676 void get_dtt_ddist(double& dtt_ddist);
677
684 void get_dtt_dlat(double& dtt_dlat);
685
692 void get_dtt_dlon(double& dtt_dlon);
693
700 void get_dtt_ddepth(double& dtt_ddepth);
701
708 //void get_dtt_dlat_fast(double& dtt_dlat);
709
716 //void get_dtt_dlon_fast(double& dtt_dlon);
717
723 //void get_dsh_ddist(double& dsh_ddist);
724
731 //void get_dsh_dlat(double& dsh_dlat);
732
739 //void get_dsh_dlon(double& dsh_dlon);
740
747 //void get_dsh_ddepth(double& dsh_ddepth);
748
749 static double MAX_DISTANCE;
750 static double MAX_DEPTH;
751
752 void setNAValues();
753
754 protected:
755
756 static int greatCircleClassCount;
757
763 Grid& grid;
764
771 int phase;
772
773 double latSource;
774 double lonSource;
775 double depthSource;
776 double latReceiver;
777 double lonReceiver;
778 double depthReceiver;
779
788 int headWaveInterface;
789
794 CrustalProfile* source;
795
800 CrustalProfile* receiver;
801
804 Location location;
805
814 double vtp[3];
815
842 vector<LayerProfile*> profiles;
843
849 string solutionMethod;
850
857 double tTotal;
858
864 double actual_path_increment;
865
869 double distance;
870
874 double esaz;
875
876 // \brief The ray parameter, in sec/radian or sec/km.
879 double rayParameter;
880
887 double xSource;
888
895 double zSource;
896
903 double sSource;
904
910 double tSource;
911
918 double xReceiver;
919
926 double zReceiver;
927
934 double sReceiver;
935
941 double tReceiver;
942
948 double xHorizontal;
949
955 double tHorizontal;
956
961 double tGamma;
962
963 double sourceRayParameter;
964 double receiverRayParameter;
965
966 double turningRadius;
967
975 int sourceIndex;
976
984 int receiverIndex;
985
1000 double getActualPathIncrement(const int& i);
1001
1007 virtual void computeTravelTime() = 0;
1008
1009 double sqr(const double& x) { return x*x; };
1010
1014 double ttHminus;
1015
1019 double ttHplus;
1020
1024 //double ttZplus;
1025
1029 double ttHZplus;
1030
1034 // Used in calculation of derivatives wrt source position.
1035 double ttEast;
1036
1040 // Used in calculation of derivatives wrt source position.
1041 double ttWest;
1042
1046 // Used in calculation of derivatives wrt source position.
1047 double ttEastZ;
1048
1052 // Used in calculation of derivatives wrt source position.
1053 double ttNorth;
1054
1058 // Used in calculation of derivatives wrt source position.
1059 double ttSouth;
1060
1064 // Used in calculation of derivatives wrt source position.
1065 double ttNorthZ;
1066
1068 double get_ttHminus();
1069
1071 double get_ttHplus();
1072
1074 double get_ttZplus();
1075
1077 double get_ttZminus();
1078
1080 double get_ttHZplus();
1081
1083 double get_ttEast();
1084
1086 double get_ttWest();
1087
1089 double get_ttEastZ();
1090
1092 double get_ttNorth();
1093
1095 double get_ttSouth();
1096
1098 double get_ttNorthZ();
1099
1100 // when computing horizontal slowness, the source is moved distance
1101 // del_distance (radians) away from the receiver and a new travel time
1102 // is computed. The difference in travel time divided by del_distance
1103 // is the horizontal slowness. Units are radians.
1104 static double DEL_DISTANCE;
1105
1106 // when computing derivative of travel time wrt depth, the depth of the
1107 // source is increased by del_depth and a new travel time computed.
1108 // The difference in travel time divided by del_depth is the
1109 // derivative of travel time wrt depth. Units of DEL_DEPTH is km.
1110 static double DEL_DEPTH;
1111
1121 static double PATH_INCREMENT;
1122
1123};
1124
1125 inline double GreatCircle::getTravelTime()
1126{
1127 return tTotal;
1128}
1129
1130 inline void GreatCircle::getTravelTime(double& tT, double& tS, double& tR, double& tM, double& tG)
1131{
1132 tT = tTotal;
1133 tS = tSource;
1134 tR = tReceiver;
1135 tM = tHorizontal;
1136 tG = tGamma;
1137}
1138
1139 inline size_t GreatCircle::memSize()
1140{
1141 //size_t n =
1142 //4 // sizeof(grid)
1143 //+ sizeof(phase)
1144 //+ sizeof(source)
1145 //+ sizeof(receiver)
1146 //+ sizeof(location)
1147 //+ sizeof(vtp)+3*sizeof(double)
1148 //+ sizeof(tTotal)
1149 //+ sizeof(actual_path_increment)
1150 //+ sizeof(distance)
1151 //+ sizeof(esaz)
1152 //+ sizeof(xSource)
1153 //+ sizeof(tSource)
1154 //+ sizeof(xReceiver)
1155 //+ sizeof(tReceiver)
1156 //+ sizeof(xHorizontal)
1157 //+ sizeof(tHorizontal)
1158 //+ sizeof(sourceIndex)
1159 //+ sizeof(receiverIndex);
1160 //for (int i=0; i<(int)profiles.size(); i++)
1161 // if (profiles[i]) n += profiles[i]->memSize();
1162
1163 size_t n =
1164 sizeof(&grid) // Grid&
1165 + sizeof(phase)
1166 + sizeof(headWaveInterface)
1167 + sizeof(source) // CrustalProfile*
1168 + sizeof(receiver) // CrustalProfile*
1169 + sizeof(location) // Location
1170 + sizeof(vtp) + 3 * sizeof(double) // vtp[3]
1171 + sizeof(profiles) // vector<LayerProfile*> profiles)
1172 + sizeof(solutionMethod) // string
1173 + sizeof(tTotal)
1174 + sizeof(actual_path_increment)
1175 + sizeof(distance)
1176 + sizeof(esaz)
1177 + sizeof(rayParameter)
1178 + sizeof(xSource)
1179 + sizeof(zSource)
1180 + sizeof(sSource)
1181 + sizeof(tSource)
1182 + sizeof(xReceiver)
1183 + sizeof(zReceiver)
1184 + sizeof(sReceiver)
1185 + sizeof(tReceiver)
1186 + sizeof(xHorizontal)
1187 + sizeof(tHorizontal)
1188 + sizeof(tGamma)
1189 + sizeof(sourceRayParameter)
1190 + sizeof(receiverRayParameter)
1191 + sizeof(turningRadius)
1192 + sizeof(sourceIndex)
1193 + sizeof(receiverIndex)
1194 + sizeof(ttHminus)
1195 + sizeof(ttHplus)
1196 //+ sizeof(ttZplus)
1197 + sizeof(ttHZplus)
1198 + sizeof(ttEast)
1199 + sizeof(ttWest)
1200 + sizeof(ttEastZ)
1201 + sizeof(ttNorth)
1202 + sizeof(ttSouth)
1203 + sizeof(ttNorthZ)
1204 ;
1205
1206 return n;
1207}
1208
1209 inline double GreatCircle::getActualPathIncrement(const int& i)
1210{
1211 // this horizontal segment lies completely in between the
1212 // source and receiver. return actual_path_increment.
1213 if (i > sourceIndex && i < receiverIndex)
1214 return actual_path_increment;
1215
1216 // if the source and receiver have the same index, it means the ray
1217 // hit the headwave interface in some horizontal segment, and left
1218 // the headwave interface before exiting the horizontal segment.
1219 // In this case, return the source-receiver separation minus the
1220 // horizontal offsets below the source and the receiver.
1221 if (i == sourceIndex && i == receiverIndex)
1222 return distance - xSource - xReceiver;
1223
1224 // the ray hit the interface in this segment. return only the
1225 // part of the horizontal segment that starts at the source pierce point
1226 // and ends at the profile just to the right.
1227 if (i == sourceIndex)
1228 return (sourceIndex+1)*actual_path_increment - xSource;
1229
1230 // this is the horizontal segment such that the ray left the
1231 // interface in this segment. return only the part of the
1232 // horizontal segment that starts at the profile that is the
1233 // left side of the horizontal segment and ends at the
1234 // receiver pierce point.
1235 if (i == receiverIndex)
1236 return distance - xReceiver - receiverIndex*actual_path_increment;
1237
1238 return 0.;
1239}
1240
1241 inline string GreatCircle::getPhaseString()
1242{
1243 return (phase==Pn ? "Pn" : (phase==Sn ? "Sn" : (phase==Pg ? "Pg" : (phase==Lg ? "Lg"
1244 : "unknown phase"))));
1245}
1246
1247 inline double GreatCircle::getFractionActive()
1248{
1249 int nactive = 0;
1250 for (int i=0; i<(int)profiles.size(); ++i)
1251 if (getProfile(i)->isActiveProfile())
1252 ++nactive;
1253 return ((double)nactive)/((double)profiles.size());
1254}
1255
1256 inline void GreatCircle::get_dtt_ddist(double& dtt_ddist)
1257{
1258 if (getTravelTime() > -1.)
1259 dtt_ddist = (get_ttHplus() - getTravelTime())/DEL_DISTANCE;
1260 else
1261 dtt_ddist = NA_VALUE;
1262}
1263
1264 inline void GreatCircle::get_dtt_dlat(double& dtt_dlat)
1265{
1266 if (getTravelTime() > -1.)
1267 dtt_dlat = (get_ttNorth() - getTravelTime())/DEL_DISTANCE;
1268 else
1269 dtt_dlat = NA_VALUE;
1270}
1271
1272 inline void GreatCircle::get_dtt_dlon(double& dtt_dlon)
1273{
1274 if (getTravelTime() > -1.)
1275 dtt_dlon = (get_ttEast() - getTravelTime())/DEL_DISTANCE;
1276 else
1277 dtt_dlon = NA_VALUE;
1278}
1279
1280//inline void GreatCircle::get_dtt_dlat_fast(double& dtt_dlat)
1281//{
1282// dtt_dlat = (get_ttHplus() - getTravelTime())/DEL_DISTANCE*cos(getEsaz()+PI);
1283//}
1284//
1285//inline void GreatCircle::get_dtt_dlon_fast(double& dtt_dlon)
1286//{
1287// dtt_dlon = (get_ttHplus() - getTravelTime())/DEL_DISTANCE*sin(getEsaz()+PI);
1288//}
1289//
1290
1291//inline void GreatCircle::get_dsh_ddist(double& dsh_ddist)
1292//{
1293// dsh_ddist = (get_ttHminus() - 2*getTravelTime() + get_ttHplus())
1294// /DEL_DISTANCE/DEL_DISTANCE;
1295//}
1296//
1297//inline void GreatCircle::get_dsh_dlat(double& dsh_dlat)
1298//{
1299// dsh_dlat = (get_ttNorth() - 2*getTravelTime() + get_ttSouth())
1300// /DEL_DISTANCE/DEL_DISTANCE;
1301//}
1302//
1303//inline void GreatCircle::get_dsh_dlon(double& dsh_dlon)
1304//{
1305// dsh_dlon = (get_ttEast() - 2*getTravelTime() + get_ttWest())
1306// /DEL_DISTANCE/DEL_DISTANCE;
1307//}
1308//
1309//inline void GreatCircle::get_dsh_ddepth(double& dsh_ddepth)
1310//{
1311// dsh_ddepth = (get_ttHZplus() - get_ttZplus()- get_ttHplus()
1312// + getTravelTime()) /DEL_DEPTH/DEL_DISTANCE;
1313//}
1314
1315} // end slbm namespace
1316
1317#endif // GreatCircle.h
LayerProfile.h
Location.h
SLBMGlobals.h
SLBM_EXP_IMP
#define SLBM_EXP_IMP
Definition SLBMGlobals.h:180
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::zSource
double zSource
The vertical distance from the source Location to the source pierce point, in km.
Definition GreatCircle.h:895
slbm::GreatCircle::sSource
double sSource
The ray length from the source Location to the source pierce point, in km.
Definition GreatCircle.h:903
slbm::GreatCircle::getClassCount
static int getClassCount()
slbm::GreatCircle::actual_path_increment
double actual_path_increment
The actual spacing between the elements of profiles, in radians.
Definition GreatCircle.h:864
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:1121
slbm::GreatCircle::ttEastZ
double ttEastZ
Definition GreatCircle.h:1047
slbm::GreatCircle::getSourceDistanceS
double getSourceDistanceS()
Retrieve the ray length below the source, in km.
Definition GreatCircle.h:300
slbm::GreatCircle::getHeadwaveDistanceKm
double getHeadwaveDistanceKm()
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
Definition GreatCircle.h:363
slbm::GreatCircle::getZhaoParameters
virtual void getZhaoParameters(double &Vm, double &Gm, double &H, double &C, double &Cm, int &udSign)=0
slbm::GreatCircle::getSourceRayParameter
double getSourceRayParameter()
Definition GreatCircle.h:207
slbm::GreatCircle::getPhase
int getPhase()
Retrieve the phase that this GreatCircle supports. Will be one of SLBMGlobals::Pn,...
Definition GreatCircle.h:179
slbm::GreatCircle::distance
double distance
The horizontal source-receiver separation, in radians.
Definition GreatCircle.h:869
slbm::GreatCircle::getSourceDistanceZ
double getSourceDistanceZ()
Retrieve vertical offset below the source, in km.
Definition GreatCircle.h:291
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::getRayParameter
double getRayParameter()
Definition GreatCircle.h:640
slbm::GreatCircle::depthReceiver
double depthReceiver
Definition GreatCircle.h:778
slbm::GreatCircle::getReceiverDistanceX
double getReceiverDistanceX()
Retrieve horizontal offset below the receiver, in radians.
Definition GreatCircle.h:318
slbm::GreatCircle::get_ttHminus
double get_ttHminus()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
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:975
slbm::GreatCircle::get_ttNorth
double get_ttNorth()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getReceiverRayParameter
double getReceiverRayParameter()
Definition GreatCircle.h:209
slbm::GreatCircle::DEL_DISTANCE
static double DEL_DISTANCE
Definition GreatCircle.h:1104
slbm::GreatCircle::ttHZplus
double ttHZplus
Definition GreatCircle.h:1029
slbm::GreatCircle::latSource
double latSource
Definition GreatCircle.h:773
slbm::GreatCircle::sourceRayParameter
double sourceRayParameter
Definition GreatCircle.h:963
slbm::GreatCircle::get_ttZminus
double get_ttZminus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::MAX_DEPTH
static double MAX_DEPTH
Definition GreatCircle.h:750
slbm::GreatCircle::getPathIncrement
static double getPathIncrement()
Definition GreatCircle.h:667
slbm::GreatCircle::getDelDepth
static double getDelDepth()
Definition GreatCircle.h:663
slbm::GreatCircle::getProfiles
vector< LayerProfile * > getProfiles()
Definition GreatCircle.h:236
slbm::GreatCircle::setDelDepth
static void setDelDepth(const double &del_depth)
Definition GreatCircle.h:661
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::getPgLgComponents
virtual void getPgLgComponents(double &tT, double &tTaup, double &tHeadwave, double &pTaup, double &pHeadwave, double &trTaup, double &trHeadwave)
Definition GreatCircle.h:646
slbm::GreatCircle::get_ttHZplus
double get_ttHZplus()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getFractionActive
double getFractionActive()
Definition GreatCircle.h:1247
slbm::GreatCircle::phase
int phase
The phase that this GreatCircle object is set up for (Pn, Sn, Pg or Lg).
Definition GreatCircle.h:771
slbm::GreatCircle::ttHplus
double ttHplus
Definition GreatCircle.h:1019
slbm::GreatCircle::computeTravelTime
virtual void computeTravelTime()=0
Method to compute the travel time from source to receiver, in seconds.
slbm::GreatCircle::greatCircleClassCount
static int greatCircleClassCount
Definition GreatCircle.h:756
slbm::GreatCircle::tTotal
double tTotal
The total travel time from source to receiver, in seconds.
Definition GreatCircle.h:857
slbm::GreatCircle::getSourceDistance
double getSourceDistance()
Retrieve horizontal offset below the source, in radians.
Definition GreatCircle.h:273
slbm::GreatCircle::tHorizontal
double tHorizontal
The time spent by the ray traveling horizontally as a head wave, in seconds.
Definition GreatCircle.h:955
slbm::GreatCircle::esaz
double esaz
The source-receiver azimuth, in radians.
Definition GreatCircle.h:874
slbm::GreatCircle::get_ttZplus
double get_ttZplus()
retrieve value of ttZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::receiverRayParameter
double receiverRayParameter
Definition GreatCircle.h:964
slbm::GreatCircle::getGrid
Grid & getGrid()
Retrieve a reference to the Grid object that this GreatCircle is associated with.
Definition GreatCircle.h:170
slbm::GreatCircle::lonReceiver
double lonReceiver
Definition GreatCircle.h:777
slbm::GreatCircle::xReceiver
double xReceiver
The horizontal distance from the receiver Location to the receiver pierce point, in radians.
Definition GreatCircle.h:918
slbm::GreatCircle::rayParameter
double rayParameter
Definition GreatCircle.h:879
slbm::GreatCircle::setDelDistance
static void setDelDistance(const double &del_distance)
Definition GreatCircle.h:657
slbm::GreatCircle::get_ttNorthZ
double get_ttNorthZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::get_dtt_dlat
void get_dtt_dlat(double &dtt_dlat)
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
Definition GreatCircle.h:1264
slbm::GreatCircle::lonSource
double lonSource
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::sReceiver
double sReceiver
The path length from the receiver Location to the receiver pierce point, in km.
Definition GreatCircle.h:934
slbm::GreatCircle::DEL_DEPTH
static double DEL_DEPTH
Definition GreatCircle.h:1110
slbm::GreatCircle::get_dtt_dlon
void get_dtt_dlon(double &dtt_dlon)
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
Definition GreatCircle.h:1272
slbm::GreatCircle::setPathIncrement
static void setPathIncrement(const double &path_increment)
Definition GreatCircle.h:665
slbm::GreatCircle::ttNorth
double ttNorth
Definition GreatCircle.h:1053
slbm::GreatCircle::operator=
GreatCircle & operator=(const GreatCircle &other)
Copy constructor.
slbm::GreatCircle::get_ttEastZ
double get_ttEastZ()
retrieve value of ttHZplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getReceiverDistanceZ
double getReceiverDistanceZ()
Retrieve vertical offset below the receiver, in km.
Definition GreatCircle.h:327
slbm::GreatCircle::getReceiverProfile
CrustalProfile * getReceiverProfile()
Retrieve a pointer to the receiver CrustalProfile.
Definition GreatCircle.h:205
slbm::GreatCircle::get_ttWest
double get_ttWest()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::location
Location location
A Location object used in a variety of places to manipulate Location information.
Definition GreatCircle.h:804
slbm::GreatCircle::setNAValues
void setNAValues()
slbm::GreatCircle::getTurningRadius
double getTurningRadius()
Definition GreatCircle.h:642
slbm::GreatCircle::source
CrustalProfile * source
The source CrustalProfile object.
Definition GreatCircle.h:794
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::receiver
CrustalProfile * receiver
The receiver CrustalProfile object.
Definition GreatCircle.h:800
slbm::GreatCircle::depthSource
double depthSource
Definition GreatCircle.h:775
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::xSource
double xSource
The horizontal distance from the source Location to the source pierce point, in radians.
Definition GreatCircle.h:887
slbm::GreatCircle::~GreatCircle
virtual ~GreatCircle()
Destructor. Deletes LayerProfile objects associated with this GreatCircle object.
slbm::GreatCircle::get_dtt_ddist
void get_dtt_ddist(double &dtt_ddist)
Retrieve the derivative of travel time wrt to source-receiver separation, in seconds/radian.
Definition GreatCircle.h:1256
slbm::GreatCircle::xHorizontal
double xHorizontal
The horizontal distance traveled by the ray as a head wave, in km.
Definition GreatCircle.h:948
slbm::GreatCircle::sqr
double sqr(const double &x)
Definition GreatCircle.h:1009
slbm::GreatCircle::latReceiver
double latReceiver
Definition GreatCircle.h:776
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::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::grid
Grid & grid
A reference to the Grid from which the source and receiver CrustalProfile objects and the LayerProfil...
Definition GreatCircle.h:763
slbm::GreatCircle::getPhaseString
string getPhaseString()
Retrieve a string representation fo the the phase that this GreatCircle supports. Will be one of 'Pn'...
Definition GreatCircle.h:1241
slbm::GreatCircle::turningRadius
double turningRadius
Definition GreatCircle.h:966
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.
slbm::GreatCircle::getSourceDistanceX
double getSourceDistanceX()
Retrieve horizontal offset below the source, in radians.
Definition GreatCircle.h:282
slbm::GreatCircle::vtp
double vtp[3]
The vector triple product of the source and receiver Locations. Used to compute Locations along the g...
Definition GreatCircle.h:814
slbm::GreatCircle::tGamma
double tGamma
The gradient correction term of the total travel time, in sec.
Definition GreatCircle.h:961
slbm::GreatCircle::getReceiverDistance
double getReceiverDistance()
Retrieve horizontal offset below the receiver, in radians.
Definition GreatCircle.h:309
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::tReceiver
double tReceiver
The time required for the ray to travel from the receiver pierce point to the receiver Location,...
Definition GreatCircle.h:941
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:984
slbm::GreatCircle::get_ttEast
double get_ttEast()
retrieve value of ttHminus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::profiles
vector< LayerProfile * > profiles
The LayerProfile objects which are positioned on the interface along which the head wave propagates.
Definition GreatCircle.h:842
slbm::GreatCircle::solutionMethod
string solutionMethod
The method used to calculate travel times.
Definition GreatCircle.h:849
slbm::GreatCircle::getDelDistance
static double getDelDistance()
Definition GreatCircle.h:659
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...
slbm::GreatCircle::getEsaz
double getEsaz()
Retrieve source-receiver azimuth, in radians.
slbm::GreatCircle::get_ttHplus
double get_ttHplus()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getActualPathIncrement
double getActualPathIncrement()
Retrieve horizontal separation of LayerProfiles, in radians.
Definition GreatCircle.h:369
slbm::GreatCircle::ttHminus
double ttHminus
Definition GreatCircle.h:1014
slbm::GreatCircle::memSize
virtual size_t memSize()
Definition GreatCircle.h:1139
slbm::GreatCircle::get_ttSouth
double get_ttSouth()
retrieve value of ttHplus. Compute the value if it is NA_VALUE.
slbm::GreatCircle::getSourceProfile
CrustalProfile * getSourceProfile()
Retrieve a pointer to the source CrustalProfile.
Definition GreatCircle.h:199
slbm::GreatCircle::getLayerProfileLocation
void getLayerProfileLocation(const int &i, Location &loc)
Retrieve the Location of a LayerProfile.
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::ttWest
double ttWest
Definition GreatCircle.h:1041
slbm::GreatCircle::getTravelTime
double getTravelTime()
Retrieve the travel time from the source to the receiver.
Definition GreatCircle.h:1125
slbm::GreatCircle::getNProfiles
int getNProfiles()
Retrieve the number of LayerProfile object positioned along the head wave interface.
Definition GreatCircle.h:243
slbm::GreatCircle::getDistance
double getDistance()
Retrieve source-receiver separation, in radians.
Definition GreatCircle.h:258
slbm::GreatCircle::ttEast
double ttEast
Definition GreatCircle.h:1035
slbm::GreatCircle::tSource
double tSource
The time required for the ray to travel from the source Location to piercePointSource,...
Definition GreatCircle.h:910
slbm::GreatCircle::ttSouth
double ttSouth
Definition GreatCircle.h:1059
slbm::GreatCircle::getReceiverDistanceS
double getReceiverDistanceS()
Retrieve the ray length below the receiver, in km.
Definition GreatCircle.h:336
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:186
slbm::GreatCircle::ttNorthZ
double ttNorthZ
Definition GreatCircle.h:1065
slbm::GreatCircle::zReceiver
double zReceiver
The vertical distance from the receiver Location to the receiver pierce point, in km.
Definition GreatCircle.h:926
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:788
slbm::GreatCircle::getHeadwaveDistance
double getHeadwaveDistance()
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
Definition GreatCircle.h:349
slbm::GreatCircle::MAX_DISTANCE
static double MAX_DISTANCE
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
Definition GreatCircle.h:749
slbm::Grid
A 2 dimensional, horizontal grid of GirdProfile objects.
Definition Grid.h:91
slbm::LayerProfile
A Profile object based on values interpolated from nearby GridProfile objects.
Definition LayerProfile.h:76
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
Definition CrustalProfile.h:59