38 #ifndef GRIDPROFILEGEOTESS_H_
39 #define GRIDPROFILEGEOTESS_H_
51 #include "CPPGlobals.h"
52 #include "GeoTessProfile.h"
54 using namespace geotess;
64 class InterpolatedProfile;
121 void getData(
double* depths,
double* pvelocity,
double* svelocity,
double* gradient);
133 void setData(
double depths[NLAYERS],
double pvelocities[NLAYERS],
134 double svelocities[NLAYERS],
double gradients[2]);
147 void setVelocity(
const int& waveType,
const vector<double>& velocity);
159 {
return gtProfiles[NLAYERS-k]->getRadiusTop(); }
167 {
return earthRadius - gtProfiles[NLAYERS-k]->getRadiusTop(); }
176 {
return gtProfiles[NLAYERS-k]->getValueTop(waveType); };
183 {
return gtProfiles[0]->getValueTop(waveType); };
188 void getInterfaceDepths(vector<double>& depths);
198 {
for (
int k=0; k<NLAYERS; k++) velocities[k] = gtProfiles[NLAYERS-k]->getValueTop(waveType); }
206 { g[PWAVE] = gtProfiles[0]->getValueTop(PWAVE); g[SWAVE] = gtProfiles[0]->getValueTop(SWAVE); }
209 {
return gtProfiles[NLAYERS]->getRadiusTop()-gtProfiles[NLAYERS-1]->getRadiusTop(); }
229 inline void GridProfileGeoTess::getData(
double* d,
230 double* pv,
double* sv,
double* g)
232 for (
int k=0; k<NLAYERS; k++)
234 d[k] = getEarthRadius()-gtProfiles[NLAYERS-k]->getRadiusTop();
235 pv[k] = gtProfiles[NLAYERS-k]->getValueTop(PWAVE);
236 sv[k] = gtProfiles[NLAYERS-k]->getValueTop(SWAVE);
238 g[PWAVE] = gtProfiles[0]->getValueTop(PWAVE);
239 g[SWAVE] = gtProfiles[0]->getValueTop(SWAVE);
242 inline void GridProfileGeoTess::getInterfaceDepths(vector<double>& depths)
244 depths.resize(NLAYERS);
245 for (
int k=0; k<NLAYERS; k++)
246 depths[k] = earthRadius - gtProfiles[NLAYERS-k]->getRadiusTop();
A 2 dimensional, horizontal grid of GirdProfile objects.
Manages all information related to a single node in a Grid object.
void setDepths(const vector< double > &depths)
Set the layer depths to specified values.
void setGradient(const vector< double > &gradient)
Set the P and S velocity gradients to specified values.
int getGeoStackId()
Retrieve the index of the GeoStack that holds the information about model interfaces,...
double getVelocity(const int &waveType, const int &k)
Retrieve the P or S velocity of the k'th interval, in km/sec.
~GridProfileGeoTess()
Destructor.
double getInterfaceDepth(const int &k)
Retrieve the depth of the k'th interval, in km relative sea level.
GridProfileGeoTess(Grid &g, const int &nodeId, Location &location)
Parameterized constructor.
void setVelocity(const int &waveType, const vector< double > &velocity)
Set the P or S velocity to specified values.
GeoTessProfile ** gtProfiles
static string class_name()
double getMantleGradient(const int &waveType)
Retrieve the P or S velocity gradient in the mantle, in 1/sec.
double getInterfaceRadius(const int &k)
Retrieve the radius of the k'th interval, in km.
bool hasLowVelocityZone()
void getMantleGradient(double *g)
Retrieve the P and S velocity gradients in the mantle, in 1/sec.
GridProfileGeoTess(const GridProfileGeoTess &other)
Copy constructor.
void setData(double depths[NLAYERS], double pvelocities[NLAYERS], double svelocities[NLAYERS], double gradients[2])
Set the P and S velocities and gradients associated with this GridProfileGeoTess object to specified ...
void getVelocity(const int &waveType, double *velocities)
Retrieve the P or S velocities of all intervals, in km/sec.
Manages all information related to a single node in a Grid object.
The Location Class manages a single point in/on the Earth, which is described by the GRS80 ellipsoid.