RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
slbm::GridGeoTess Class Reference

`#include <GridGeoTess.h>`

Inheritance diagram for slbm::GridGeoTess:

## Public Member Functions
| GridGeoTess ()
| Constructor.
virtual | ~GridGeoTess ()
| Copy constructor.
string | getGridType ()
| Returns the type of Grid.
GeoTessModelSLBM * | loadModel (const string &filename, const string &relGridPath="")
void | clear ()
| Clears and releases all memory held by this GridSLBM object.
void | loadFromFile (const string &filename)
| Load the depth, velocity and gradient information from an ascii flat file.
void | loadFromDirectory (const string &dirName)
| Load the depth, velocity and gradient information from binary files in specified directory.
void | loadFromDataBuffer (util::DataBuffer &buffer)
| Load the depth, velocity and gradient information from DataBuffer.
void | saveVelocityModel (const string &filename, const int &format)
| Save the Earth model currently in memory, to an ascii flat file.
void | saveVelocityModel (util::DataBuffer &buffer)
| Save the Earth model currently in memory, to a DataBuffer.
int | getBufferSize () const
| Returns the size of a DataBuffer object required to store this Grid objects model data.
double | getAverageMantleVelocity (const int &waveType)
| Retreive the average P or S wave velocity of the mantle, in km/sec.
void | setAverageMantleVelocity (const int &waveType, const double &velocity)
| Retreive the average P or S wave velocity of the mantle, in km/sec.
virtual bool | findProfile (Location &location, vector< GridProfile * > &neighbors, vector< int > &nodeIds, vector< double > &coefficients)
| Find the neighboring GridProfile objects and associated interpolation coefficients at a specified Location.
void | getNodeNeighbors (const int &nodeId, int neighbors[], int &nNeighbors)
| Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.
void | getNodeNeighbors (const int &nodeId, vector< int > &neighbors)
| Retrieve the grid node ids of the nodes that are direct neighbors of the specified grid node.
void | getActiveNodeNeighbors (const int &nodeid, int neighbors[], int &nNeighbors)
void | getActiveNodeNeighbors (const int &nodeid, vector< int > &neighbors)
void | getNodeNeighborInfo (const int &nodeid, int neighbors[], double distance[], double azimuth[], int &nNeighbors)
| Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.
void | getNodeNeighborInfo (const int &nodeid, vector< int > &neighbors, vector< double > &distance, vector< double > &azimuth)
| Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.
void | getNodeSeparation (const int &node1, const int &node2, double &distance)
| Retrieve the angular separation in radians between any pair of.
void | getNodeAzimuth (const int &node1, const int &node2, double &azimuth)
| Retrieve the azimuth in radians from one grid node to another.
size_t | memSize ()
string | getTessId ()
int | addGeoStack (GeoStack *geoStack)
GeoTessModelSLBM * | getModel ()
string | toString ()
void | setInterpolatorType (const string &interpolatorType)
string | getInterpolatorType ()
GeoTessPosition * | getPosition ()
Public Member Functions inherited from slbm::Grid
| Grid ()
| Default constructor.
virtual | ~Grid ()
| Virtual copy constructor.
virtual bool | operator== (const Grid &other)
| Equality operator.
virtual bool | operator!= (const Grid &other)
| Inequality operator.
virtual bool | is_directory (const string &dir)
virtual int | getNNodes ()
| Retrieve the number of nodes in the model.
virtual int | getNIntervals ()
| Retrieve the number of intervals in each Profile.
virtual GridProfile * | getProfile (const int &nodeId)
| Retrieve a pointer to the GridProfile that is node (i, j) in this Grid.
virtual GreatCircle * | getGreatCircle (const int &phase, const double &latSource, const double &lonSource, const double &depthSource, const double &latReceiver, const double &lonReceiver, const double &depthReceiver, const double &delta, const double &ch_max)
| Retrieve a GreatCircle object between a source and a receiver.
virtual CrustalProfile * | getReceiverProfile (const int &phase, const double &lat, const double &lon, const double &depth)
| Retrieve a CrustalProfile containing data appropriate for the specified phase at the specified location.
virtual CrustalProfile * | getSourceProfile (const int &phase, const double &lat, const double &lon, const double &depth)
virtual void | clearCrustalProfiles ()
| Delete all the CrustalProfile objects managed by this Grid.
virtual LayerProfile * | getLayerProfile (GreatCircle *greatCircle, Location &location)
| Retrieve a LayerProfile containing data appropriate for the specified GreatCircle, at the specified geographic latitude and longitude.
virtual QueryProfile * | getQueryProfile (Location &location)
| Retrieve a QueryProfile containing all available model information, at the latitude and longitude of the specified Location.
vector< vector< UncertaintyPIU * > > & | getUncertainty ()
vector< vector< UncertaintyPIU * > > & | getUncertaintyPIU ()
UncertaintyPIU & | getUncertaintyPIU (int phase, int attribute)
vector< UncertaintyPDU * > & | getUncertaintyPDU ()
UncertaintyPDU & | getUncertaintyPDU (int phase)
virtual int | getNCrustalProfiles ()
void | initializeActiveNodes (double activeNodeLatMin, double activeNodeLonMin, double activeNodeLatMax, double activeNodeLonMax)
| Specify the latitude, longitude range in radians that will define which grid nodes are also active nodes.
void | initializeActiveNodes (GeoTessPolygon *polygon)
| Specify the Polygon that will define which grid nodes are also active nodes.
virtual int | getNActiveNodes ()
| Retrieve the number of active nodes.
void | clearActiveNodes ()
virtual int | getGridNodeId (int activeNodeId)
| Retrieve the grid node id that corresponds to a specified active node id.
virtual int | getActiveNodeId (int nodeId)
| Retrieve the grid node id that corresponds to a specified active node id.
virtual void | getActiveNodeNeighborInfo (const int &nid, int neighbors[], double distance[], double azimuth[], int &nNeighbors)
virtual void | getActiveNodeNeighborInfo (const int &nid, vector< int > &neighbors, vector< double > &distance, vector< double > &azimuth)
virtual void | getNodeHitCount (const int &nodeId, int &hitCount)
virtual void | clearNodeHitCount ()
virtual size_t | memSizeCrustalProfiles ()
string & | getModelPath ()
string & | getOutputDirectory ()
void | specifyOutputDirectory (const string &outputDir)
virtual GeoTessPolygon * | getPolygon ()
virtual vector< GridProfile * > & | getProfiles ()
CrustalProfileStore * | getSources ()
CrustalProfileStore * | getReceivers ()

## Static Public Member Functions
static string | class_name ()
| Returns the class name.
Static Public Member Functions inherited from slbm::Grid
static Grid * | getGrid (const string &modelDirectory)
static Grid * | getGrid (util::DataBuffer &buffer)
static bool | fileExists (const string &fileName)
static string | class_name ()
| Returns the class name.

## Additional Inherited Members
Protected Member Functions inherited from slbm::Grid
void | writeBufferToFile (util::DataBuffer &buffer, string fileName)
void | reaDataBuffererFromFile (util::DataBuffer &buffer, string dirname, string fileName)
Protected Attributes inherited from slbm::Grid
string | modelPath
| The name of the file or directory from which the velocity model was loaded.
vector< GridProfile * > | profiles
| The GridProfile objects which constitute the nodes in a Grid object.
vector< int > | activeNodes
GeoTessModelSLBM * | model
GeoTessPolygon * | polygon
CrustalProfileStore * | sources
CrustalProfileStore * | receivers
vector< vector< UncertaintyPIU * > > | piu
vector< UncertaintyPDU * > | pdu
string | outputDirectory

## Detailed Description

Definition at line 60 of file GridGeoTess.h.

## Constructor & Destructor Documentation

## ◆ GridGeoTess()

slbm::GridGeoTess::GridGeoTess | ( |  | ) |

Constructor.

Constructor.

## ◆ ~GridGeoTess()

virtual slbm::GridGeoTess::~GridGeoTess | ( |  | ) |
| virtual

Copy constructor.

Copy constructor.

Virtual copy constructor.

Virtual copy constructor.

Destructor.

Destructor.

## Member Function Documentation

## ◆ addGeoStack()

int slbm::GridGeoTess::addGeoStack | ( | GeoStack * | geoStack | ) |
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 288 of file GridGeoTess.h.

## ◆ class_name()

string slbm::GridGeoTess::class_name | ( |  | ) |
| inline static

Returns the class name.

Returns the class name.

Definition at line 87 of file GridGeoTess.h.

## ◆ clear()

void slbm::GridGeoTess::clear | ( |  | ) |
| virtual

Clears and releases all memory held by this GridSLBM object.

Clears and releases all memory held by this GridSLBM object.

Reimplemented from slbm::Grid.

## ◆ findProfile()

virtual bool slbm::GridGeoTess::findProfile | ( | Location & | location,
|  | vector< GridProfile * > & | neighbors,
|  | vector< int > & | nodeIds,
|  | vector< double > & | coefficients )
| virtual

Find the neighboring GridProfile objects and associated interpolation coefficients at a specified Location.

Given a Location, find the GridProfile objects that surround the Location and compute the interpolation coefficient for each of those surrounding GridProfile objects. Interpolated values will equal the sum of the values at the GridProfile objects times the corresponding interpolation coefficient.

This method is called by getCrustalProfile() and getMantleProfile() to compute InterpolatedProfile objects.

Parameters

  location | the Location of the desired profile.
  neighbors | the GridProfile objects which surround the specified Location.
  nodeIds | the node indices of the neighbors
  coefficients | the interpolation coefficient corresponding to each neighbor.

Returns
  true if successful, false if location is outside valid range of the model.

Reimplemented from slbm::Grid.

## ◆ getActiveNodeNeighbors() [1/2]

void slbm::GridGeoTess::getActiveNodeNeighbors | ( | const int & | nodeid,
|  | int | neighbors[],
|  | int & | nNeighbors )
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 360 of file GridGeoTess.h.

## ◆ getActiveNodeNeighbors() [2/2]

void slbm::GridGeoTess::getActiveNodeNeighbors | ( | const int & | nodeid,
|  | vector< int > & | neighbors )
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 381 of file GridGeoTess.h.

## ◆ getAverageMantleVelocity()

double slbm::GridGeoTess::getAverageMantleVelocity | ( | const int & | waveType | ) |
| inline virtual

Retreive the average P or S wave velocity of the mantle, in km/sec.

Retreive the average P or S wave velocity of the mantle. These values are retrieved from the header information in the velocity model file.

Parameters

  waveType | either SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.

Returns
  the average P or S wave mantle velocity, in km/sec.

Reimplemented from slbm::Grid.

Definition at line 144 of file GridGeoTess.h.

## ◆ getBufferSize()

int slbm::GridGeoTess::getBufferSize | ( |  | ) | const
| inline virtual

Returns the size of a DataBuffer object required to store this Grid objects model data.

Returns the size of a DataBuffer object required to store this Grid objects model data.

Reimplemented from slbm::Grid.

Definition at line 136 of file GridGeoTess.h.

## ◆ getGridType()

string slbm::GridGeoTess::getGridType | ( |  | ) |
| inline virtual

Returns the type of Grid.

Returns the type of Grid (Grid, GridSLBM, or GridGeotess).

Reimplemented from slbm::Grid.

Definition at line 92 of file GridGeoTess.h.

## ◆ getInterpolatorType()

string slbm::GridGeoTess::getInterpolatorType | ( |  | ) |
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 297 of file GridGeoTess.h.

## ◆ getModel()

GeoTessModelSLBM * slbm::GridGeoTess::getModel | ( |  | ) |
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 291 of file GridGeoTess.h.

## ◆ getNodeAzimuth()

void slbm::GridGeoTess::getNodeAzimuth | ( | const int & | node1,
|  | const int & | node2,
|  | double & | azimuth )
| inline virtual

Retrieve the azimuth in radians from one grid node to another.

Retrieve the azimuth in radians from one grid node to another.

Reimplemented from slbm::Grid.

Definition at line 407 of file GridGeoTess.h.

## ◆ getNodeNeighborInfo() [1/2]

void slbm::GridGeoTess::getNodeNeighborInfo | ( | const int & | nodeid,
|  | int | neighbors[],
|  | double | distance[],
|  | double | azimuth[],
|  | int & | nNeighbors )
| inline virtual

Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.

Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node. Also returns the angular distance and azimuth from the specified grid node to each of its neighbors. Distances and azimuths are in radians.

Reimplemented from slbm::Grid.

Definition at line 218 of file GridGeoTess.h.

## ◆ getNodeNeighborInfo() [2/2]

void slbm::GridGeoTess::getNodeNeighborInfo | ( | const int & | nodeId,
|  | vector< int > & | neighbors,
|  | vector< double > & | distance,
|  | vector< double > & | azimuth )
| inline virtual

Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.

Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node. Also returns the angular distance and azimuth from the specified grid node to each of its neighbors. Distances and azimuths are in radians.

Reimplemented from slbm::Grid.

Definition at line 243 of file GridGeoTess.h.

## ◆ getNodeNeighbors() [1/2]

void slbm::GridGeoTess::getNodeNeighbors | ( | const int & | nodeId,
|  | int | neighbors[],
|  | int & | nNeighbors )
| inline virtual

Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.

Retrieve the grid node id of the nodes that are direct neighbors of the specified grid node.

Reimplemented from slbm::Grid.

Definition at line 336 of file GridGeoTess.h.

## ◆ getNodeNeighbors() [2/2]

void slbm::GridGeoTess::getNodeNeighbors | ( | const int & | nodeId,
|  | vector< int > & | neighbors )
| inline virtual

Retrieve the grid node ids of the nodes that are direct neighbors of the specified grid node.

Retrieve the grid node ids of the nodes that are direct neighbors of the specified grid node.

Reimplemented from slbm::Grid.

Definition at line 348 of file GridGeoTess.h.

## ◆ getNodeSeparation()

void slbm::GridGeoTess::getNodeSeparation | ( | const int & | node1,
|  | const int & | node2,
|  | double & | distance )
| inline virtual

Retrieve the angular separation in radians between any pair of.

Retrieve the angular separation in radians between any pair of

Reimplemented from slbm::Grid.

Definition at line 401 of file GridGeoTess.h.

## ◆ getPosition()

GeoTessPosition * slbm::GridGeoTess::getPosition | ( |  | ) |
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 299 of file GridGeoTess.h.

## ◆ getTessId()

string slbm::GridGeoTess::getTessId | ( |  | ) |
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 286 of file GridGeoTess.h.

## ◆ loadFromDataBuffer()

void slbm::GridGeoTess::loadFromDataBuffer | ( | util::DataBuffer & | buffer | ) |
| virtual

Load the depth, velocity and gradient information from DataBuffer.

Load the Earth model information from DataBuffer

Parameters

  buffer | the DataBuffer from which to load the model

Reimplemented from slbm::Grid.

## ◆ loadFromDirectory()

void slbm::GridGeoTess::loadFromDirectory | ( | const string & | dirName | ) |
| virtual

Load the depth, velocity and gradient information from binary files in specified directory.

Load the Earth model information from binary files in specified directory

Parameters

  dirName | the name of directory from which to load the model

Reimplemented from slbm::Grid.

## ◆ loadFromFile()

void slbm::GridGeoTess::loadFromFile | ( | const string & | filename | ) |
| virtual

Load the depth, velocity and gradient information from an ascii flat file.

Load the Earth model information from an ascii flat file.

Parameters

  filename | the name of the ascii flat file containing the data.

Reimplemented from slbm::Grid.

## ◆ loadModel()

GeoTessModelSLBM * slbm::GridGeoTess::loadModel | ( | const string & | filename,
|  | const string & | relGridPath = "" )

## ◆ memSize()

size_t slbm::GridGeoTess::memSize | ( |  | ) |
| virtual

Reimplemented from slbm::Grid.

## ◆ saveVelocityModel() [1/2]

void slbm::GridGeoTess::saveVelocityModel | ( | const string & | filename,
|  | const int & | format )
| virtual

Save the Earth model currently in memory, to an ascii flat file.

Save the Earth model currently in memory, to an ascii flat file. An exception will be thrown if the speficied filename is the same as the name of the file from which the Earth model was originally loaded with loadVelocityModel()

Reimplemented from slbm::Grid.

## ◆ saveVelocityModel() [2/2]

void slbm::GridGeoTess::saveVelocityModel | ( | util::DataBuffer & | buffer | ) |
| virtual

Save the Earth model currently in memory, to a DataBuffer.

Save the Earth model currently in memory, to to a DataBuffer.

Parameters

  buffer | the DataBuffer to which to save the model

Reimplemented from slbm::Grid.

## ◆ setAverageMantleVelocity()

void slbm::GridGeoTess::setAverageMantleVelocity | ( | const int & | waveType,
|  | const double & | velocity )
| inline virtual

Retreive the average P or S wave velocity of the mantle, in km/sec.

Retreive the average P or S wave velocity of the mantle. These values are retrieved from the header information in the velocity model file.

Parameters

  waveType | either SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
  velocity | (output) the average P or S wave mantle velocity, in km/sec.

Reimplemented from slbm::Grid.

Definition at line 153 of file GridGeoTess.h.

## ◆ setInterpolatorType()

void slbm::GridGeoTess::setInterpolatorType | ( | const string & | interpolatorType | ) |
| inline virtual

Reimplemented from slbm::Grid.

Definition at line 309 of file GridGeoTess.h.

## ◆ toString()

string slbm::GridGeoTess::toString | ( |  | ) |
| virtual

Reimplemented from slbm::Grid.

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

- rstt_v3.2.1/SLBM/include/GridGeoTess.h