RSTT  3.2.0
Regional Seismic Travel Time
All Classes Namespaces Files Functions Variables Typedefs Friends Macros
slbm::GeoStack Class Reference

Manages all information related to a single node in a Grid object. More...

#include <GeoStack.h>

Public Member Functions

 GeoStack ()
 Default constructor. More...
 
 GeoStack (const int &index, double *depths, double *pvelocities, double *svelocities, double *gradients)
 
 ~GeoStack ()
 Destructor. More...
 
 GeoStack (const GeoStack &GeoStack)
 Copy constructor. More...
 
GeoStackoperator= (const GeoStack &other)
 Equal operator. More...
 
bool operator== (const GeoStack &other)
 Equality operator. More...
 
bool operator!= (const GeoStack &other)
 Inequality operator. More...
 
int getRefCount ()
 
void incRefCount ()
 
void decRefCount ()
 
void setRefCount (const int &count)
 
int getIndex ()
 
void setIndex (const int &idx)
 
void getData (double *depths, double *pvelocity, double *svelocity, double *gradient)
 Retrieve all the data associated with this Profile. More...
 
void setData (double *depths, double *pvelocities, double *svelocities, double *gradients)
 Set the P and S velocities and gradients associated with this GeoStack object to specified values. More...
 
void setDepth (const vector< double > &z)
 Set the layer depths to specified values. More...
 
void setVelocity (const int &waveType, const vector< double > &velocity)
 Set the P or S velocity to specified values. More...
 
void setGradient (const vector< double > &gradient)
 Set the P and S velocity gradients to specified values. More...
 
double getDepth (const int &k)
 Retrieve the depth of the k'th interval, in km. More...
 
double * getDepth ()
 
double getVelocity (const int &waveType, const int &k)
 Retrieve the P or S velocity of the k'th interval, in km/sec. More...
 
double getMantleGradient (const int &waveType)
 Retrieve the P or S velocity gradient in the mantle, in 1/sec. More...
 
void getVelocity (const int &waveType, double *velocity)
 Retrieve the P or S velocities of all intervals, in km/sec. More...
 
void getMantleGradient (double *g)
 Retrieve the P and S velocity gradients in the mantle, in 1/sec. More...
 
bool hasLowVelocityZone ()
 Return true if (1) any finite thickness layer above the middle crust has a velocity that exceeds the Pg/Lg velocity of the middle crust or (2) any finite thickness crustal layer has a velocity that exceeds the mantle velocity. More...
 
string toString ()
 Return the information content of this GeoStack formatted in small text table. More...
 
bool thicknessTest ()
 

Static Public Member Functions

static int getClassCount ()
 

Protected Attributes

int index
 
int refCount
 
double depth [NLAYERS]
 depth of the top of each interval, in km. More...
 
double pvelocity [NLAYERS]
 The P and S velocity of each layer, in km/sec. More...
 
double svelocity [NLAYERS]
 
double gradient [2]
 P and S velocity gradients in the mantle, in 1/sec. More...
 

Static Protected Attributes

static int geoStackClassCount
 

Detailed Description

Manages all information related to a single node in a Grid object.

Manages all information related to a single node in a Grid object including: the depths of all model interfaces, the P and S velocities of each model interval, and the P and S velocity gradients in the mantle.

GeoStack objects are created in Grid::loadVelocityModel() and deleted in Grid::~Grid.

Definition at line 56 of file GeoStack.h.

Constructor & Destructor Documentation

◆ GeoStack() [1/3]

slbm::GeoStack::GeoStack ( )

Default constructor.

Default constructor.

◆ GeoStack() [2/3]

slbm::GeoStack::GeoStack ( const int &  index,
double *  depths,
double *  pvelocities,
double *  svelocities,
double *  gradients 
)

◆ ~GeoStack()

slbm::GeoStack::~GeoStack ( )

Destructor.

Destructor.

◆ GeoStack() [3/3]

slbm::GeoStack::GeoStack ( const GeoStack GeoStack)

Copy constructor.

Copy constructor.

Member Function Documentation

◆ decRefCount()

void slbm::GeoStack::decRefCount ( )
inline

Definition at line 106 of file GeoStack.h.

◆ getClassCount()

static int slbm::GeoStack::getClassCount ( )
static

◆ getData()

void slbm::GeoStack::getData ( double *  depths,
double *  pvelocity,
double *  svelocity,
double *  gradient 
)
inline

Retrieve all the data associated with this Profile.

Retrieve all the data associated with this Profile.

Parameters
depthsthe depths of the top of each interval associated with this Profile.
pvelocitythe P velocities of each interval, in km/sec.
svelocitythe S velocities of each interval, in km/sec.
gradienta 2-element array specifying the P and S velocity gradient in the mantle, in 1/sec.

Definition at line 248 of file GeoStack.h.

◆ getDepth() [1/2]

double* slbm::GeoStack::getDepth ( )
inline

Definition at line 162 of file GeoStack.h.

◆ getDepth() [2/2]

double slbm::GeoStack::getDepth ( const int &  k)
inline

Retrieve the depth of the k'th interval, in km.

Retrieve the depth of the k'th interval, in km.

Definition at line 160 of file GeoStack.h.

◆ getIndex()

int slbm::GeoStack::getIndex ( )
inline

Definition at line 110 of file GeoStack.h.

◆ getMantleGradient() [1/2]

double slbm::GeoStack::getMantleGradient ( const int &  waveType)
inline

Retrieve the P or S velocity gradient in the mantle, in 1/sec.

Retrieve the P or S velocity gradient in the mantle, in 1/sec.

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.

Definition at line 282 of file GeoStack.h.

◆ getMantleGradient() [2/2]

void slbm::GeoStack::getMantleGradient ( double *  g)
inline

Retrieve the P and S velocity gradients in the mantle, in 1/sec.

Retrieve the P and S velocity gradients in the mantle, in 1/sec.

Definition at line 188 of file GeoStack.h.

◆ getRefCount()

int slbm::GeoStack::getRefCount ( )
inline

Definition at line 102 of file GeoStack.h.

◆ getVelocity() [1/2]

double slbm::GeoStack::getVelocity ( const int &  waveType,
const int &  k 
)
inline

Retrieve the P or S velocity of the k'th interval, in km/sec.

Retrieve the P or S velocity of the k'th interval, in km/sec.

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
kthe index of the desired interval. The shallowest interval is index 0.

Definition at line 275 of file GeoStack.h.

◆ getVelocity() [2/2]

void slbm::GeoStack::getVelocity ( const int &  waveType,
double *  velocity 
)
inline

Retrieve the P or S velocities of all intervals, in km/sec.

Retrieve the P or S velocities of all intervals, in km/sec.

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
velocity(output) this argument will be populated with the P or S velocity in km/sec

Definition at line 287 of file GeoStack.h.

◆ hasLowVelocityZone()

bool slbm::GeoStack::hasLowVelocityZone ( )

Return true if (1) any finite thickness layer above the middle crust has a velocity that exceeds the Pg/Lg velocity of the middle crust or (2) any finite thickness crustal layer has a velocity that exceeds the mantle velocity.

Return true if (1) any finite thickness layer above the middle crust has a velocity that exceeds the Pg/Lg velocity of the middle crust or (2) any finite thickness crustal layer has a velocity that exceeds the mantle velocity.

◆ incRefCount()

void slbm::GeoStack::incRefCount ( )
inline

Definition at line 104 of file GeoStack.h.

◆ operator!=()

bool slbm::GeoStack::operator!= ( const GeoStack other)
inline

Inequality operator.

Inequality operator.

Definition at line 100 of file GeoStack.h.

◆ operator=()

GeoStack& slbm::GeoStack::operator= ( const GeoStack other)

Equal operator.

Equal operator.

◆ operator==()

bool slbm::GeoStack::operator== ( const GeoStack other)

Equality operator.

Equality operator.

◆ setData()

void slbm::GeoStack::setData ( double *  depths,
double *  pvelocities,
double *  svelocities,
double *  gradients 
)
inline

Set the P and S velocities and gradients associated with this GeoStack object to specified values.

Set the P and S velocities and gradients associated with this GeoStack object to specified values.

Parameters
depthsthe depths of the layers below sea level, in km.
pvelocitiesthe P velocities stored in this GeoStack, in km/sec.
svelocitiesthe S velocities stored in this GeoStack, in km/sec.
gradientsa 2-element vector specifying the P and S velocity gradients in the mantle, in 1/sec.

Definition at line 260 of file GeoStack.h.

◆ setDepth()

void slbm::GeoStack::setDepth ( const vector< double > &  z)
inline

Set the layer depths to specified values.

Set the layer depths to specified values.

Parameters
zthe depths of the layers below surface of solid earth

Definition at line 297 of file GeoStack.h.

◆ setGradient()

void slbm::GeoStack::setGradient ( const vector< double > &  gradient)
inline

Set the P and S velocity gradients to specified values.

Set the P and S velocity gradients to specified values.

Parameters
gradientthe P and S velocity gradients, in km/sec.

Definition at line 315 of file GeoStack.h.

◆ setIndex()

void slbm::GeoStack::setIndex ( const int &  idx)
inline

Definition at line 112 of file GeoStack.h.

◆ setRefCount()

void slbm::GeoStack::setRefCount ( const int &  count)
inline

Definition at line 108 of file GeoStack.h.

◆ setVelocity()

void slbm::GeoStack::setVelocity ( const int &  waveType,
const vector< double > &  velocity 
)
inline

Set the P or S velocity to specified values.

Set the P or S velocity to specified values.

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
velocitythe P or S velocity, in km/sec.

Definition at line 305 of file GeoStack.h.

◆ thicknessTest()

bool slbm::GeoStack::thicknessTest ( )

◆ toString()

string slbm::GeoStack::toString ( )

Return the information content of this GeoStack formatted in small text table.

Return the information content of this GeoStack formatted in small text table.

Member Data Documentation

◆ depth

double slbm::GeoStack::depth[NLAYERS]
protected

depth of the top of each interval, in km.

depth of the top of each interval, in km. There will be n elements, one for each crustal layer, and one more for the mantle. The last element will be the depth of the Moho.

Definition at line 225 of file GeoStack.h.

◆ geoStackClassCount

int slbm::GeoStack::geoStackClassCount
staticprotected

Definition at line 214 of file GeoStack.h.

◆ gradient

double slbm::GeoStack::gradient[2]
protected

P and S velocity gradients in the mantle, in 1/sec.

2-element vector containing the P and S velocity gradients in the mantle, in 1/sec.

Definition at line 238 of file GeoStack.h.

◆ index

int slbm::GeoStack::index
protected

Definition at line 216 of file GeoStack.h.

◆ pvelocity

double slbm::GeoStack::pvelocity[NLAYERS]
protected

The P and S velocity of each layer, in km/sec.

The P and S velocity of each layer, in km/sec. This will be an 2 x n vector, where n is the number of intervals. The last elements are the velocity in the mantle.

Definition at line 232 of file GeoStack.h.

◆ refCount

int slbm::GeoStack::refCount
protected

Definition at line 218 of file GeoStack.h.

◆ svelocity

double slbm::GeoStack::svelocity[NLAYERS]
protected

Definition at line 233 of file GeoStack.h.


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