SLBM  3.0
Regional Seismic Travel Time
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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 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.

Constructor & Destructor Documentation

slbm::GeoStack::GeoStack ( )

Default constructor.

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

Destructor.

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

Copy constructor.

Member Function Documentation

void slbm::GeoStack::decRefCount ( )
inline
static int slbm::GeoStack::getClassCount ( )
static
void slbm::GeoStack::getData ( double *  depths,
double *  pvelocity,
double *  svelocity,
double *  gradient 
)
inline

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.
double slbm::GeoStack::getDepth ( const int &  k)
inline

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

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

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

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
void slbm::GeoStack::getMantleGradient ( double *  g)
inline

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

int slbm::GeoStack::getRefCount ( )
inline
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.

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
kthe index of the desired interval. The shallowest interval is index 0.
void slbm::GeoStack::getVelocity ( const int &  waveType,
double *  velocity 
)
inline

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
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.

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

Inequality operator.

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

Equal operator.

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

Equality operator.

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.

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.
void slbm::GeoStack::setDepth ( const vector< double > &  z)
inline

Set the layer depths to specified values.

Parameters
zthe depths of the layers below surface of solid earth
void slbm::GeoStack::setGradient ( const vector< double > &  gradient)
inline

Set the P and S velocity gradients to specified values.

Parameters
gradientthe P and S velocity gradients, in km/sec.
void slbm::GeoStack::setIndex ( const int &  idx)
inline
void slbm::GeoStack::setRefCount ( const int &  count)
inline
void slbm::GeoStack::setVelocity ( const int &  waveType,
const vector< double > &  velocity 
)
inline

Set the P or S velocity to specified values.

Parameters
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
velocitythe P or S velocity, in km/sec.
bool slbm::GeoStack::thicknessTest ( )
string slbm::GeoStack::toString ( )

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

Member Data Documentation

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

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.

int slbm::GeoStack::geoStackClassCount
staticprotected
double slbm::GeoStack::gradient[2]
protected

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

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

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.

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

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