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

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

#include <Grid.h>

Inheritance diagram for slbm::Grid:
slbm::GridGeoTess slbm::GridSLBM

Public Member Functions

 Grid ()
 Default constructor. More...
 
virtual ~Grid ()
 Destructor. More...
 
virtual bool operator== (const Grid &other)
 Equality operator. More...
 
virtual bool operator!= (const Grid &other)
 Inequality operator. More...
 
virtual void clear ()
 Clears and releases all memory held by this Grid object. More...
 
virtual void loadFromFile (const string &filename)
 Load the depth, velocity and gradient information from an ascii flat file. More...
 
virtual void loadFromDirectory (const string &dirName)
 Load the depth, velocity and gradient information from binary files in specified directory. More...
 
virtual void loadFromDataBuffer (util::DataBuffer &buffer)
 Load the depth, velocity and gradient information from DataBuffer. More...
 
virtual void saveVelocityModel (util::DataBuffer &buffer)
 Save the Earth model currently in memory, to a DataBuffer. More...
 
virtual void saveVelocityModel (const string &filename, const int &format)
 Save the Earth model currently in memory, to an ascii flat file. More...
 
virtual int getBufferSize () const
 
virtual bool is_directory (const string &dir)
 
virtual int getNNodes ()
 Retrieve the number of nodes in the model. More...
 
virtual int getNIntervals ()
 Retrieve the number of intervals in each Profile. More...
 
virtual GridProfilegetProfile (const int &nodeId)
 Retrieve a pointer to the GridProfile that is node (i, j) in this Grid. More...
 
virtual GreatCirclegetGreatCircle (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. More...
 
virtual CrustalProfilegetReceiverProfile (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. More...
 
virtual CrustalProfilegetSourceProfile (const int &phase, const double &lat, const double &lon, const double &depth)
 
virtual void clearCrustalProfiles ()
 Delete all the CrustalProfile objects managed by this Grid. More...
 
virtual LayerProfilegetLayerProfile (GreatCircle *greatCircle, Location &location)
 Retrieve a LayerProfile containing data appropriate for the specified GreatCircle, at the specified geographic latitude and longitude. More...
 
virtual QueryProfilegetQueryProfile (Location &location)
 Retrieve a QueryProfile containing all available model information, at the latitude and longitude of the specified Location. More...
 
vector< vector< UncertaintyPIU * > > & getUncertainty ()
 
vector< vector< UncertaintyPIU * > > & getUncertaintyPIU ()
 
UncertaintyPIUgetUncertaintyPIU (int phase, int attribute)
 
vector< UncertaintyPDU * > & getUncertaintyPDU ()
 
UncertaintyPDUgetUncertaintyPDU (int phase)
 
virtual double getAverageMantleVelocity (const int &waveType)
 Retrieve the average P or S wave velocity of the mantle, in km/sec. More...
 
virtual void setAverageMantleVelocity (const int &waveType, const double &velocity)
 Retrieve the average P or S wave velocity of the mantle, in km/sec. More...
 
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. More...
 
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. More...
 
void initializeActiveNodes (GeoTessPolygon *polygon)
 Specify the Polygon that will define which grid nodes are also active nodes. More...
 
virtual int getNActiveNodes ()
 Retrieve the number of active nodes. More...
 
void clearActiveNodes ()
 
virtual int getGridNodeId (int activeNodeId)
 Retrieve the grid node id that corresponds to a specified active node id. More...
 
virtual int getActiveNodeId (int nodeId)
 Retrieve the grid node id that corresponds to a specified active node id. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void getNodeAzimuth (const int &node1, const int &node2, double &azimuth)
 Retrieve the azimuth in radians from one grid node to another. More...
 
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 ()
 
const string getOutputDirectory ()
 
void specifyOutputDirectory (const string &outputDir)
 
virtual GeoTessModelSLBMgetModel ()
 

Static Public Member Functions

static GridgetGrid (const string &modelDirectory)
 
static GridgetGrid (util::DataBuffer &buffer)
 
static bool fileExists (const string &fileName)
 
static string 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. More...
 
vector< GridProfile * > profiles
 The GridProfile objects which constitute the nodes in a Grid object. More...
 
vector< int > activeNodes
 
GeoTessModelSLBMmodel
 
GeoTessPolygon * polygon
 
CrustalProfileStoresources
 
CrustalProfileStorereceivers
 
vector< vector< UncertaintyPIU * > > piu
 
vector< UncertaintyPDU * > pdu
 

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

Destructor.

Destructor.

Member Function Documentation

◆ addGeoStack()

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

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

◆ class_name()

static string slbm::Grid::class_name ( )
inlinestatic

Returns the class name.

Definition at line 124 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::GridSLBM, and slbm::GridGeoTess.

◆ clearActiveNodes()

void slbm::Grid::clearActiveNodes ( )

◆ clearCrustalProfiles()

void slbm::Grid::clearCrustalProfiles ( )
inlinevirtual

Delete all the CrustalProfile objects managed by this Grid.

Delete all the CrustalProfile objects managed by this Grid.

Definition at line 567 of file Grid.h.

◆ clearNodeHitCount()

void slbm::Grid::clearNodeHitCount ( )
inlinevirtual

Definition at line 584 of file Grid.h.

◆ fileExists()

bool slbm::Grid::fileExists ( const string &  fileName)
inlinestatic

Definition at line 590 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
locationthe Location of the desired profile
neighborsthe GridProfile objects which surround the specified Location.
nodeIdsthe indices of the nodes correspondingn to each neighbor.
coefficientsthe interpolation coefficient corresponding to each neighbor.
Returns
true if successful, false if location is outside valid range of the model.

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

◆ getActiveNodeId()

virtual int slbm::Grid::getActiveNodeId ( int  nodeId)
inlinevirtual

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

◆ getActiveNodeNeighbors() [2/2]

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

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

◆ 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
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
Returns
the average P or S wave mantle velocity, in km/sec.

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

◆ getBufferSize()

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

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

◆ 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
phasethe phase that this GreatCircle is to support. Must be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg or SLBMGlobals::Lg.
latSourcethe geographic latitude at the source end of the GreatCircle, in radians.
lonSourcethe geographic longitude at the source end of the GreatCircle, in radians.
depthSourcethe depth of the source, km
latReceiverthe geographic latitude at the receiver end of the GreatCircle, in radians.
lonReceiverthe geographic longitude at the receiver end of the GreatCircle, in radians.
depthReceiverthe depth of the receiver, in km.
deltathe 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_maxc 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]

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

◆ getGrid() [2/2]

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

◆ getGridNodeId()

virtual int slbm::Grid::getGridNodeId ( int  activeNodeId)
inlinevirtual

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 395 of file Grid.h.

◆ getInterpolatorType()

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

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

◆ getLayerProfile()

LayerProfile * slbm::Grid::getLayerProfile ( GreatCircle greatCircle,
Location location 
)
inlinevirtual

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
greatCirclethe GreatCircle that the returned LayerProfile object is to support.
locationthe Location of the LayerProfile

Definition at line 539 of file Grid.h.

◆ getModel()

virtual GeoTessModelSLBM* slbm::Grid::getModel ( )
inlinevirtual

Reimplemented in slbm::GridGeoTess.

Definition at line 487 of file Grid.h.

◆ getModelPath()

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

Definition at line 475 of file Grid.h.

◆ getNActiveNodes()

virtual int slbm::Grid::getNActiveNodes ( )
inlinevirtual

Retrieve the number of active nodes.

Retrieve the number of active nodes.

Definition at line 386 of file Grid.h.

◆ getNCrustalProfiles()

int slbm::Grid::getNCrustalProfiles ( )
inlinevirtual

Definition at line 573 of file Grid.h.

◆ getNIntervals()

virtual int slbm::Grid::getNIntervals ( )
inlinevirtual

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 179 of file Grid.h.

◆ getNNodes()

virtual int slbm::Grid::getNNodes ( )
inlinevirtual

Retrieve the number of nodes in the model.

Retrieve the number of nodes in the model.

Definition at line 173 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 
)
inlinevirtual

Definition at line 462 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::GridSLBM, and slbm::GridGeoTess.

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

◆ 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()

const string slbm::Grid::getOutputDirectory ( )
inline

Definition at line 483 of file Grid.h.

◆ getProfile()

GridProfile * slbm::Grid::getProfile ( const int &  nodeId)
inlinevirtual

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
nodeIdthe node index of the desired grid node.

Definition at line 525 of file Grid.h.

◆ getQueryProfile()

QueryProfile * slbm::Grid::getQueryProfile ( Location location)
inlinevirtual

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
locationthe Location of the QueryProfile
Returns
the QueryProfile

Definition at line 550 of file Grid.h.

◆ getReceiverProfile()

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

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
phasethe phase for which the CrustalProfile is appropriate. Must be one of Pn, Sn, Pg, Lg which are int constants defined in SLBMGlobals.h
latthe geographic latitude in radians.
lonthe geographic longitude in radians.
depththe depth of the source or receiver, in km.

Definition at line 561 of file Grid.h.

◆ getSourceProfile()

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

Definition at line 555 of file Grid.h.

◆ getTessId()

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

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

◆ 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 294 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 309 of file Grid.h.

◆ getUncertaintyPDU() [2/2]

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

Retrieve the path-dependent uncertainty for specified phase

Parameters
phaseone of 0:Pn, 1:Sn, 2:Pg, 3:Lg.
Returns
reference to an uncertaintyPDU object.

Definition at line 316 of file Grid.h.

◆ getUncertaintyPIU() [1/2]

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

Definition at line 295 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
phaseone of 0:Pn, 1:Sn, 2:Pg, 3:Lg.
attributeone of 0:TT, 1:SH, 2:AZ.
Returns
reference to an UncertaintyPIU object.

Definition at line 303 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
bufferthe DataBuffer from which to load the model

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

◆ 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
dirNamethe name of directory from which to load the model

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

◆ 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
filenamethe name of the ascii flat file containing the data.

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

◆ memSize()

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

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

◆ memSizeCrustalProfiles()

size_t slbm::Grid::memSizeCrustalProfiles ( )
inlinevirtual

Definition at line 579 of file Grid.h.

◆ operator!=()

virtual bool slbm::Grid::operator!= ( const Grid other)
inlinevirtual

Inequality operator.

Inequality operator

Definition at line 119 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
bufferthe DataBuffer to which to save the model

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

◆ 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
waveTypeeither SLBMGlobals::PWAVE or SLBMGlobals::SWAVE.
velocity(output) the average P or S wave mantle velocity, in km/sec.

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

◆ setInterpolatorType()

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

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

◆ specifyOutputDirectory()

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

◆ toString()

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

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

◆ writeBufferToFile()

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

Member Data Documentation

◆ activeNodes

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

Definition at line 501 of file Grid.h.

◆ model

GeoTessModelSLBM* slbm::Grid::model
protected

Definition at line 503 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 494 of file Grid.h.

◆ pdu

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

Definition at line 512 of file Grid.h.

◆ piu

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

Definition at line 510 of file Grid.h.

◆ polygon

GeoTessPolygon* slbm::Grid::polygon
protected

Definition at line 505 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 499 of file Grid.h.

◆ receivers

CrustalProfileStore* slbm::Grid::receivers
protected

Definition at line 508 of file Grid.h.

◆ sources

CrustalProfileStore* slbm::Grid::sources
protected

Definition at line 507 of file Grid.h.


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