RSTT 3.2.1 Regional Seismic Travel Time

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

A 2 dimensional, horizontal grid of GirdProfile objects. More...

`#include <Grid.h>`

Inheritance diagram for slbm::Grid:

## Public Member Functions
| 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 string | getGridType ()
| Returns the type of Grid.
virtual void | clear ()
| Clears and releases all memory held by this Grid object.
virtual void | loadFromFile (const string &filename)
| Load the depth, velocity and gradient information from an ascii flat file.
virtual void | loadFromDirectory (const string &dirName)
| Load the depth, velocity and gradient information from binary files in specified directory.
virtual void | loadFromDataBuffer (util::DataBuffer &buffer)
| Load the depth, velocity and gradient information from DataBuffer.
virtual void | saveVelocityModel (util::DataBuffer &buffer)
| Save the Earth model currently in memory, to a DataBuffer.
virtual void | saveVelocityModel (const string &filename, const int &format)
| Save the Earth model currently in memory, to an ascii flat file.
virtual int | getBufferSize () const
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 double | getAverageMantleVelocity (const int &waveType)
| Retrieve the average P or S wave velocity of the mantle, in km/sec.
virtual void | setAverageMantleVelocity (const int &waveType, const double &velocity)
| Retrieve the average P or S wave velocity of the mantle, in km/sec.
virtual int | getNCrustalProfiles ()
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 | 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 | 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.
virtual 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.
virtual 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.
virtual 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.
virtual void | getActiveNodeNeighbors (const int &nodeid, int neighbors[], int &nNeighbors)
virtual void | getActiveNodeNeighbors (const int &nodeid, vector< int > &neighbors)
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 | getNodeSeparation (const int &node1, const int &node2, double &distance)
| Retrieve the angular separation in radians between any pair of.
virtual void | getNodeAzimuth (const int &node1, const int &node2, double &azimuth)
| Retrieve the azimuth in radians from one grid node to another.
virtual void | getNodeHitCount (const int &nodeId, int &hitCount)
virtual void | clearNodeHitCount ()
virtual int | addGeoStack (GeoStack *geoStack)
virtual size_t | memSize ()
virtual size_t | memSizeCrustalProfiles ()
virtual string | getTessId ()
string & | getModelPath ()
virtual string | toString ()
virtual void | setInterpolatorType (const string &interpolatorType)
virtual string | getInterpolatorType ()
string & | getOutputDirectory ()
void | specifyOutputDirectory (const string &outputDir)
virtual GeoTessModelSLBM * | getModel ()
virtual GeoTessPolygon * | getPolygon ()
virtual vector< GridProfile * > & | getProfiles ()
virtual GeoTessPosition * | getPosition ()
CrustalProfileStore * | getSources ()
CrustalProfileStore * | getReceivers ()

## Static Public Member Functions
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.

## Protected Member Functions
void | writeBufferToFile (util::DataBuffer &buffer, string fileName)
void | reaDataBuffererFromFile (util::DataBuffer &buffer, string dirname, string fileName)

## Protected Attributes
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

A 2 dimensional, horizontal grid of GirdProfile objects.

A 2 dimensional, horizontal grid of GridProfile objects.

When an application or another object in the slbm library requests a CrustalProfile object by calling Grid::getCrustalProfile() Grid will check to see if it already has a pointer to a CrustalProfile object for the same phase and at the same Location. If it does, it will return a pointer to the existing CrustalProfile object. If it does not, it will create a new CrustalProfile object and return that. The map of crustalProfiles can be cleared by calling clearCrustalProfiles(). The CrustalProfile objects owned by a Grid object are deleted in the Grid destructor.

Definition at line 90 of file Grid.h.

## Constructor & Destructor Documentation

## ◆ Grid()

slbm::Grid::Grid | ( |  | ) |

Default constructor.

Default constructor.

## ◆ ~Grid()

virtual slbm::Grid::~Grid | ( |  | ) |
| virtual

Virtual copy constructor.

Virtual copy constructor.

Destructor.

Destructor.

## Member Function Documentation

## ◆ addGeoStack()

virtual int slbm::Grid::addGeoStack | ( | GeoStack * | geoStack | ) |
| virtual

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ class_name()

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

Returns the class name.

Returns the class name.

Definition at line 130 of file Grid.h.

## ◆ clear()

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

Clears and releases all memory held by this Grid object.

Clears and releases all memory held by this Grid object.

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ clearActiveNodes()

void slbm::Grid::clearActiveNodes | ( |  | ) |

## ◆ clearCrustalProfiles()

void slbm::Grid::clearCrustalProfiles | ( |  | ) |
| inline virtual

Delete all the CrustalProfile objects managed by this Grid.

Delete all the CrustalProfile objects managed by this Grid.

Definition at line 588 of file Grid.h.

## ◆ clearNodeHitCount()

void slbm::Grid::clearNodeHitCount | ( |  | ) |
| inline virtual

Definition at line 605 of file Grid.h.

## ◆ fileExists()

bool slbm::Grid::fileExists | ( | const string & | fileName | ) |
| inline static

Definition at line 611 of file Grid.h.

## ◆ findProfile()

virtual bool slbm::Grid::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 indices of the nodes correspondingn to each neighbor.
  coefficients | the interpolation coefficient corresponding to each neighbor.

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getActiveNodeId()

virtual int slbm::Grid::getActiveNodeId | ( | int | nodeId | ) |
| inline virtual

Retrieve the grid node id that corresponds to a specified active node id.

Retrieve the grid node id that corresponds to a specified active node id.

Definition at line 414 of file Grid.h.

## ◆ getActiveNodeNeighborInfo() [1/2]

virtual void slbm::Grid::getActiveNodeNeighborInfo | ( | const int & | nid,
|  | int | neighbors[],
|  | double | distance[],
|  | double | azimuth[],
|  | int & | nNeighbors )
| virtual

## ◆ getActiveNodeNeighborInfo() [2/2]

virtual void slbm::Grid::getActiveNodeNeighborInfo | ( | const int & | nid,
|  | vector< int > & | neighbors,
|  | vector< double > & | distance,
|  | vector< double > & | azimuth )
| virtual

## ◆ getActiveNodeNeighbors() [1/2]

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getActiveNodeNeighbors() [2/2]

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getAverageMantleVelocity()

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

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

Retrieve 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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getBufferSize()

virtual int slbm::Grid::getBufferSize | ( |  | ) | const
| virtual

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getGreatCircle()

virtual GreatCircle * slbm::Grid::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 )
| virtual

Retrieve a GreatCircle object between a source and a receiver.

Retrieve a GreatCircle object composed of two CrustalProfile objects, one at either end of the GreatCircle, and a number of equally spaced LayerProfile objects positioned along the interface where the head wave will travel.

Parameters

  phase | the phase that this GreatCircle is to support. Must be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg or SLBMGlobals::Lg.
  latSource | the geographic latitude at the source end of the GreatCircle, in radians.
  lonSource | the geographic longitude at the source end of the GreatCircle, in radians.
  depthSource | the depth of the source, km
  latReceiver | the geographic latitude at the receiver end of the GreatCircle, in radians.
  lonReceiver | the geographic longitude at the receiver end of the GreatCircle, in radians.
  depthReceiver | the depth of the receiver, in km.
  delta | the desired horizontal separation of the LayerProfile objects along the head wave interface, in radians. The actual separation will be reduced from the requested value somewhat in order that some number of equal sized increments will exactly fit between the source and receiver.
  ch_max | c is the zhao c parameter and h is the turning depth of the ray below the moho. Zhao method only valid for c*h << 1. When c*h > ch_max, then slbm will throw an exception.

## ◆ getGrid() [1/2]

Grid * slbm::Grid::getGrid | ( | const string & | modelDirectory | ) |
| static

## ◆ getGrid() [2/2]

Grid * slbm::Grid::getGrid | ( | util::DataBuffer & | buffer | ) |
| static

## ◆ getGridNodeId()

virtual int slbm::Grid::getGridNodeId | ( | int | activeNodeId | ) |
| inline virtual

Retrieve the grid node id that corresponds to a specified active node id.

Retrieve the grid node id that corresponds to a specified active node id.

Definition at line 406 of file Grid.h.

## ◆ getGridType()

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

Returns the type of Grid.

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

Definition at line 135 of file Grid.h.

## ◆ getInterpolatorType()

virtual string slbm::Grid::getInterpolatorType | ( |  | ) |
| virtual

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getLayerProfile()

LayerProfile * slbm::Grid::getLayerProfile | ( | GreatCircle * | greatCircle,
|  | Location & | location )
| inline virtual

Retrieve a LayerProfile containing data appropriate for the specified GreatCircle, at the specified geographic latitude and longitude.

Retrieve a LayerProfile containing data appropriate for the specified GreatCircle, at the specified geographic latitude and longitude. For phases Pn and Sn the profile will include data for the mantle. For Pg and Lg, the profile will include data for the middle crust. For Pn and Pg, the velocity stored in the profile will be the P wave velocity and for Sn and Lg the velocity will be the S wave velocity. For Pn and Sn, the gradient will be the P or S wave velocity gradient in the mantle. For Pg and Lg the gradient will be SLBMGlobals::NA_VALUE.

Parameters

  greatCircle | the GreatCircle that the returned LayerProfile object is to support.
  location | the Location of the LayerProfile

Definition at line 560 of file Grid.h.

## ◆ getModel()

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

Reimplemented in slbm::GridGeoTess.

Definition at line 498 of file Grid.h.

## ◆ getModelPath()

string & slbm::Grid::getModelPath | ( |  | ) |
| inline

Definition at line 486 of file Grid.h.

## ◆ getNActiveNodes()

virtual int slbm::Grid::getNActiveNodes | ( |  | ) |
| inline virtual

Retrieve the number of active nodes.

Retrieve the number of active nodes.

Definition at line 397 of file Grid.h.

## ◆ getNCrustalProfiles()

int slbm::Grid::getNCrustalProfiles | ( |  | ) |
| inline virtual

Definition at line 594 of file Grid.h.

## ◆ getNIntervals()

virtual int slbm::Grid::getNIntervals | ( |  | ) |
| inline virtual

Retrieve the number of intervals in each Profile.

Retrieve the number of intervals in each Profile. There will be one interval for each layer in the crust, plus one more for the mantle.

Definition at line 190 of file Grid.h.

## ◆ getNNodes()

virtual int slbm::Grid::getNNodes | ( |  | ) |
| inline virtual

Retrieve the number of nodes in the model.

Retrieve the number of nodes in the model.

Definition at line 184 of file Grid.h.

## ◆ getNodeAzimuth()

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

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

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

Reimplemented in slbm::GridGeoTess.

## ◆ getNodeHitCount()

virtual void slbm::Grid::getNodeHitCount | ( | const int & | nodeId,
|  | int & | hitCount )
| inline virtual

Definition at line 473 of file Grid.h.

## ◆ getNodeNeighborInfo() [1/2]

virtual void slbm::Grid::getNodeNeighborInfo | ( | const int & | nodeId,
|  | int | neighbors[],
|  | double | distance[],
|  | double | azimuth[],
|  | int & | nNeighbors )
| 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 returs the angular distance and azimuth from the specified grid node to each of its neighbors. Distances and azimuths are in radians.

Reimplemented in slbm::GridGeoTess.

## ◆ getNodeNeighborInfo() [2/2]

virtual void slbm::Grid::getNodeNeighborInfo | ( | const int & | nodeId,
|  | vector< int > & | neighbors,
|  | vector< double > & | distance,
|  | vector< double > & | azimuth )
| 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 in slbm::GridGeoTess.

## ◆ getNodeNeighbors() [1/2]

virtual void slbm::Grid::getNodeNeighbors | ( | const int & | nodeId,
|  | int | neighbors[],
|  | int & | nNeighbors )
| 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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getNodeNeighbors() [2/2]

virtual void slbm::Grid::getNodeNeighbors | ( | const int & | nodeId,
|  | vector< int > & | neighbors )
| 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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getNodeSeparation()

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

Retrieve the angular separation in radians between any pair of.

Retrieve the angular separation in radians between any pair of

Reimplemented in slbm::GridGeoTess.

## ◆ getOutputDirectory()

string & slbm::Grid::getOutputDirectory | ( |  | ) |
| inline

Definition at line 494 of file Grid.h.

## ◆ getPolygon()

virtual GeoTessPolygon * slbm::Grid::getPolygon | ( |  | ) |
| inline virtual

Definition at line 500 of file Grid.h.

## ◆ getPosition()

virtual GeoTessPosition * slbm::Grid::getPosition | ( |  | ) |
| virtual

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getProfile()

GridProfile * slbm::Grid::getProfile | ( | const int & | nodeId | ) |
| inline virtual

Retrieve a pointer to the GridProfile that is node (i, j) in this Grid.

Retrieve a pointer to the GridProfile that is node (i, j) in this Grid.

Parameters

  nodeId | the node index of the desired grid node.

Definition at line 546 of file Grid.h.

## ◆ getProfiles()

virtual vector< GridProfile * > & slbm::Grid::getProfiles | ( |  | ) |
| inline virtual

Definition at line 502 of file Grid.h.

## ◆ getQueryProfile()

QueryProfile * slbm::Grid::getQueryProfile | ( | Location & | location | ) |
| inline virtual

Retrieve a QueryProfile containing all available model information, at the latitude and longitude of the specified Location.

Retrieve a QueryProfile containing all available model information, at the latitude and longitude of the specified Location.

Parameters

  location | the Location of the QueryProfile

Returns
  the QueryProfile

Definition at line 571 of file Grid.h.

## ◆ getReceiverProfile()

CrustalProfile * slbm::Grid::getReceiverProfile | ( | const int & | phase,
|  | const double & | lat,
|  | const double & | lon,
|  | const double & | depth )
| inline virtual

Retrieve a CrustalProfile containing data appropriate for the specified phase at the specified location.

Retrieve a CrustalProfile at the specified location. For phases Pn and Sn the profile will include all intervals down to and including the mantle. For Pg and Lg, the profile will include intervals down to and including the middle crust. For Pn and Pg, the velocities stored in the profile will be P wave velocities and for Sn and Lg the velocities will be S wave velocities. No gradient information is stored in CrustalProfile objects.

Parameters

  phase | the phase for which the CrustalProfile is appropriate. Must be one of Pn, Sn, Pg, Lg which are int constants defined in SLBMGlobals.h
  lat | the geographic latitude in radians.
  lon | the geographic longitude in radians.
  depth | the depth of the source or receiver, in km.

Definition at line 582 of file Grid.h.

## ◆ getReceivers()

CrustalProfileStore * slbm::Grid::getReceivers | ( |  | ) |
| inline

Definition at line 507 of file Grid.h.

## ◆ getSourceProfile()

CrustalProfile * slbm::Grid::getSourceProfile | ( | const int & | phase,
|  | const double & | lat,
|  | const double & | lon,
|  | const double & | depth )
| inline virtual

Definition at line 576 of file Grid.h.

## ◆ getSources()

CrustalProfileStore * slbm::Grid::getSources | ( |  | ) |
| inline

Definition at line 506 of file Grid.h.

## ◆ getTessId()

virtual string slbm::Grid::getTessId | ( |  | ) |
| virtual

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ getUncertainty()

vector< vector< UncertaintyPIU * > > & slbm::Grid::getUncertainty | ( |  | ) |
| inline

Retrieve an nPhases by nAttributes array of UncertaintyPIU objects. The 4 phases are 0:Pn, 1:Sn, 2:Pg, 3:Lg. The 3 attributes are 0:TT, 1:SH, 2:AZ.

Definition at line 305 of file Grid.h.

## ◆ getUncertaintyPDU() [1/2]

vector< UncertaintyPDU * > & slbm::Grid::getUncertaintyPDU | ( |  | ) |
| inline

Retrieve an nPhases array of UncertaintyPDU objects. The 4 phases are 0:Pn, 1:Sn, 2:Pg, 3:Lg.

Definition at line 320 of file Grid.h.

## ◆ getUncertaintyPDU() [2/2]

UncertaintyPDU & slbm::Grid::getUncertaintyPDU | ( | int | phase | ) |
| inline

Retrieve the path-dependent uncertainty for specified phase

Parameters

  phase | one of 0:Pn, 1:Sn, 2:Pg, 3:Lg.

Returns
  reference to an uncertaintyPDU object.

Definition at line 327 of file Grid.h.

## ◆ getUncertaintyPIU() [1/2]

vector< vector< UncertaintyPIU * > > & slbm::Grid::getUncertaintyPIU | ( |  | ) |
| inline

Definition at line 306 of file Grid.h.

## ◆ getUncertaintyPIU() [2/2]

UncertaintyPIU & slbm::Grid::getUncertaintyPIU | ( | int | phase,
|  | int | attribute )
| inline

Retrieve the uncertainty for specified phase and attribute

Parameters

  phase | one of 0:Pn, 1:Sn, 2:Pg, 3:Lg.
  attribute | one of 0:TT, 1:SH, 2:AZ.

Returns
  reference to an UncertaintyPIU object.

Definition at line 314 of file Grid.h.

## ◆ initializeActiveNodes() [1/2]

void slbm::Grid::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.

Specify the latitude, longitude range in radians that will define which grid nodes are also active nodes. Active nodes are defined as follows: Each triangle in the tessellation is visited. If any one of the three nodes which define the triangle is located within the specified latitude, longitude range, then all three of the nodes are active nodes.

## ◆ initializeActiveNodes() [2/2]

void slbm::Grid::initializeActiveNodes | ( | GeoTessPolygon * | polygon | ) |

Specify the Polygon that will define which grid nodes are also active nodes.

Specify the Polygon that will define which grid nodes are also active nodes. Active nodes are defined as follows: Visit every node in the grid. If it is inside the polygon, then set it to be an active node and set all of its immediate neighbors active as well.

## ◆ is_directory()

virtual bool slbm::Grid::is_directory | ( | const string & | dir | ) |
| virtual

## ◆ loadFromDataBuffer()

virtual void slbm::Grid::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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ loadFromDirectory()

virtual void slbm::Grid::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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ loadFromFile()

virtual void slbm::Grid::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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ memSize()

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ memSizeCrustalProfiles()

size_t slbm::Grid::memSizeCrustalProfiles | ( |  | ) |
| inline virtual

Definition at line 600 of file Grid.h.

## ◆ operator!=()

virtual bool slbm::Grid::operator!= | ( | const Grid & | other | ) |
| inline virtual

Inequality operator.

Inequality operator

Definition at line 125 of file Grid.h.

## ◆ operator==()

virtual bool slbm::Grid::operator== | ( | const Grid & | other | ) |
| virtual

Equality operator.

Equality operator.

## ◆ reaDataBuffererFromFile()

void slbm::Grid::reaDataBuffererFromFile | ( | util::DataBuffer & | buffer,
|  | string | dirname,
|  | string | fileName )
| protected

## ◆ saveVelocityModel() [1/2]

virtual void slbm::Grid::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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ saveVelocityModel() [2/2]

virtual void slbm::Grid::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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ setAverageMantleVelocity()

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

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

Retrieve 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 in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ setInterpolatorType()

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ specifyOutputDirectory()

void slbm::Grid::specifyOutputDirectory | ( | const string & | outputDir | ) |

## ◆ toString()

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

Reimplemented in slbm::GridGeoTess, and slbm::GridSLBM.

## ◆ writeBufferToFile()

void slbm::Grid::writeBufferToFile | ( | util::DataBuffer & | buffer,
|  | string | fileName )
| protected

## Member Data Documentation

## ◆ activeNodes

vector<int> slbm::Grid::activeNodes
| protected

Definition at line 522 of file Grid.h.

## ◆ model

GeoTessModelSLBM* slbm::Grid::model
| protected

Definition at line 524 of file Grid.h.

## ◆ modelPath

string slbm::Grid::modelPath
| protected

The name of the file or directory from which the velocity model was loaded.

The name of the file or directory from which the velocity model was loaded.

Definition at line 515 of file Grid.h.

## ◆ outputDirectory

string slbm::Grid::outputDirectory
| protected

Definition at line 542 of file Grid.h.

## ◆ pdu

vector<UncertaintyPDU*> slbm::Grid::pdu
| protected

Definition at line 533 of file Grid.h.

## ◆ piu

vector<vector<UncertaintyPIU*> > slbm::Grid::piu
| protected

Definition at line 531 of file Grid.h.

## ◆ polygon

GeoTessPolygon* slbm::Grid::polygon
| protected

Definition at line 526 of file Grid.h.

## ◆ profiles

vector<GridProfile*> slbm::Grid::profiles
| protected

The GridProfile objects which constitute the nodes in a Grid object.

The GridProfile objects which constitute the nodes in a Grid object.

Definition at line 520 of file Grid.h.

## ◆ receivers

CrustalProfileStore* slbm::Grid::receivers
| protected

Definition at line 529 of file Grid.h.

## ◆ sources

CrustalProfileStore* slbm::Grid::sources
| protected

Definition at line 528 of file Grid.h.

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

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