RSTT  3.1.0
Regional Seismic Travel Time
slbm::GeoTessModelPathUnc Class Reference

#include <GeoTessModelPathUnc.h>

Inheritance diagram for slbm::GeoTessModelPathUnc:
slbm::GeoTessModelSLBM

Public Member Functions

bool isPathDepUncModel ()
 
 GeoTessModelPathUnc (vector< UncertaintyPathDep * > &pathDepUncert, vector< vector< Uncertainty * > > &uncert)
 
 GeoTessModelPathUnc (const string &modelInputFile, const string &relativeGridPath, vector< UncertaintyPathDep * > &pathDepUncertainties, vector< vector< Uncertainty * > > &uncertainties)
 
 GeoTessModelPathUnc (const string &modelInputFile, vector< UncertaintyPathDep * > &pathDepUncertainties, vector< vector< Uncertainty * > > &uncertainties)
 
 GeoTessModelPathUnc (const string &gridFileName, GeoTessMetaData *metaData, vector< UncertaintyPathDep * > &pathDepUncertainties, vector< vector< Uncertainty * > > &uncertainties, double *avgMantleVel)
 
 GeoTessModelPathUnc (GeoTessGrid *grid, GeoTessMetaData *metaData, vector< UncertaintyPathDep * > &pathDepUncertainties, vector< vector< Uncertainty * > > &uncertainties, double *avgMantleVel)
 
virtual ~GeoTessModelPathUnc ()
 
- Public Member Functions inherited from slbm::GeoTessModelSLBM
 GeoTessModelSLBM (vector< vector< Uncertainty * > > &uncert, const GeoTessOptimizationType *optimization=&GeoTessOptimizationType::SPEED)
 
 GeoTessModelSLBM (const string &modelInputFile, const string &relativeGridPath, vector< vector< Uncertainty * > > &uncertainties, const GeoTessOptimizationType *optimization=&GeoTessOptimizationType::SPEED)
 
 GeoTessModelSLBM (const string &modelInputFile, vector< vector< Uncertainty * > > &uncertainties, const GeoTessOptimizationType *optimization=&GeoTessOptimizationType::SPEED)
 
 GeoTessModelSLBM (const string &gridFileName, GeoTessMetaData *metaData, vector< vector< Uncertainty * > > &uncertainties, double *avgMantleVel)
 
 GeoTessModelSLBM (GeoTessGrid *grid, GeoTessMetaData *metaData, vector< vector< Uncertainty * > > &uncertainties, double *avgMantleVel)
 
virtual ~GeoTessModelSLBM ()
 
void writeModelDataBuffer (util::DataBuffer &buffer)
 
double getAverageMantleVelocity (const int &index) const
 
void setAverageMantleVelocity (const int &index, const double &velocity)
 
void setIOUncertainty (bool io)
 
bool isIOUncertainty () const
 
int getBufferSize ()
 

Static Public Member Functions

static string class_name ()
 
static bool isGeoTessModelPathUnc (const string &fileName)
 
- Static Public Member Functions inherited from slbm::GeoTessModelSLBM
static void setNewModelStyleReadFormat (bool omsrf)
 
static string class_name ()
 
static bool isGeoTessModelSLBM (const string &fileName)
 

Protected Member Functions

void loadModelAscii (IFStreamAscii &input, const string &inputDirectory, const string &relGridFilePath)
 
void loadModelBinary (IFStreamBinary &input, const string &inputDirectory, const string &relGridFilePath)
 
void writeModelAscii (IFStreamAscii &output, const string &gridFileName)
 
void writeModelBinary (IFStreamBinary &output, const string &gridFileName)
 

Detailed Description

This is an SLBM extension of GeoTessModel for use by SLBM. Specific capabilities, beyond those of the base class, are management of the average mantle P and S velocity values required by SLBM and management of Uncertainty information for phases Pn, Sn, Pg and Lg for attributes TT, SH and AZ.

Definition at line 86 of file GeoTessModelPathUnc.h.

Constructor & Destructor Documentation

◆ GeoTessModelPathUnc() [1/5]

slbm::GeoTessModelPathUnc::GeoTessModelPathUnc ( vector< UncertaintyPathDep * > &  pathDepUncert,
vector< vector< Uncertainty * > > &  uncert 
)

Default constructor.

Parameters
pathDepUncertthe UncertaintyPathDep obects to set.
uncertthe Uncertainty obects to set.

◆ GeoTessModelPathUnc() [2/5]

slbm::GeoTessModelPathUnc::GeoTessModelPathUnc ( const string &  modelInputFile,
const string &  relativeGridPath,
vector< UncertaintyPathDep * > &  pathDepUncertainties,
vector< vector< Uncertainty * > > &  uncertainties 
)

Construct a new GeoTessModel object and populate it with information from the specified file.

Parameters
modelInputFilename of file containing the model.
relativeGridPaththe relative path from the directory where the model is stored to the directory where the grid is stored. Often, the model and grid are stored together in the same file in which case this parameter is ignored. Sometimes, however, the grid is stored in a separate file and only the name of the grid file (without path information) is stored in the model file. In this case, the code needs to know which directory to search for the grid file. The default is "" (empty string), which will cause the code to search for the grid file in the same directory in which the model file resides. Bottom line is that the default value is appropriate when the grid is stored in the same file as the model, or the model file is in the same directory as the model file.
pathDepUncertthe UncertaintyPathDep obects to set.
uncertaintiesthe Uncertainty obects to set.
optimizationeither OptimizationType.SPEED or OptimizationType.MEMORY. This argument is deprecated and has no effect.

◆ GeoTessModelPathUnc() [3/5]

slbm::GeoTessModelPathUnc::GeoTessModelPathUnc ( const string &  modelInputFile,
vector< UncertaintyPathDep * > &  pathDepUncertainties,
vector< vector< Uncertainty * > > &  uncertainties 
)

Construct a new GeoTessModel object and populate it with information from the specified file.

relativeGridPath is assumed to be "" (empty string), which is appropriate when the grid information is stored in the same file as the model or when the grid is stored in a separate file located in the same directory as the model file.

Parameters
modelInputFilename of file containing the model.
pathDepUncertthe UncertaintyPathDep obects to set.
uncertaintiesthe Uncertainty obects to set.

◆ GeoTessModelPathUnc() [4/5]

slbm::GeoTessModelPathUnc::GeoTessModelPathUnc ( const string &  gridFileName,
GeoTessMetaData *  metaData,
vector< UncertaintyPathDep * > &  pathDepUncertainties,
vector< vector< Uncertainty * > > &  uncertainties,
double *  avgMantleVel 
)

Parameterized constructor, specifying the grid and metadata for the model. The grid is constructed and the data structures are initialized based on information supplied in metadata. The data structures are not populated with any information however (all Profiles are null). The application should populate the new model's Profiles after this constructor completes.

Before calling this constructor, the supplied MetaData object must be populated with required information by calling the following MetaData methods:

  • setDescription()
  • setLayerNames()
  • setAttributes()
  • setDataType()
  • setLayerTessIds() (only required if grid has more than one multi-level tessellation)
  • setOptimization() (optional: defaults to SPEED)
Parameters
gridFileNamename of file from which to load the grid.
metaDataMetaData the new GeoTessModel instantiates a reference to the supplied metaData. No copy is made.
pathDepUncertthe UncertaintyPathDep obects to set.
uncertaintiesthe Uncertainty obects to set.
avgMantleVela 2-element array containing the average P and S velocity of the upper mantle.
Exceptions
GeoTessExceptionif metadata is incomplete.

◆ GeoTessModelPathUnc() [5/5]

slbm::GeoTessModelPathUnc::GeoTessModelPathUnc ( GeoTessGrid *  grid,
GeoTessMetaData *  metaData,
vector< UncertaintyPathDep * > &  pathDepUncertainties,
vector< vector< Uncertainty * > > &  uncertainties,
double *  avgMantleVel 
)

Parameterized constructor, specifying the grid and metadata for the model. The grid is constructed and the data structures are initialized based on information supplied in metadata. The data structures are not populated with any information however (all Profiles are null). The application should populate the new model's Profiles after this constructor completes.

Before calling this constructor, the supplied MetaData object must be populated with required information by calling the following MetaData methods:

  • setDescription()
  • setLayerNames()
  • setAttributes()
  • setDataType()
  • setLayerTessIds() (only required if grid has more than one multi-level tessellation)
  • setOptimization() (optional: defaults to SPEED)
  • setSoftwareVersion()
  • setGenerationDate()
Parameters
grida pointer to the GeoTessGrid that will support this GeoTessModel. GeoTessModel assumes ownership of the supplied grid object and will delete it when it is done with it.
metaDataMetaData the new GeoTessModel instantiates a reference to the supplied metaData. No copy is made.
pathDepUncertthe UncertaintyPathDep obects to set.
uncertaintiesthe Uncertainties to set.
avgMantleVela 2-element array containing the average P and S velocity of the top of the mantle, in km/sec
Exceptions
GeoTessExceptionif metadata is incomplete.

◆ ~GeoTessModelPathUnc()

virtual slbm::GeoTessModelPathUnc::~GeoTessModelPathUnc ( )
virtual

Destructor.

Member Function Documentation

◆ class_name()

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

Returns the class name.

Returns
class name

Definition at line 313 of file GeoTessModelPathUnc.h.

◆ isGeoTessModelPathUnc()

static bool slbm::GeoTessModelPathUnc::isGeoTessModelPathUnc ( const string &  fileName)
static

Tests the input file (fileName) to see if this is a GeoTessModelPathUnc file.

◆ isPathDepUncModel()

bool slbm::GeoTessModelPathUnc::isPathDepUncModel ( )
inlinevirtual

Returns true. The virtual method is also declared in GeoTessModelSLBM where it returns false.

Reimplemented from slbm::GeoTessModelSLBM.

Definition at line 162 of file GeoTessModelPathUnc.h.

◆ loadModelAscii()

void slbm::GeoTessModelPathUnc::loadModelAscii ( IFStreamAscii &  input,
const string &  inputDirectory,
const string &  relGridFilePath 
)
protectedvirtual

Load a model (3D grid and data) from an ascii File.

The format of the file is:
int fileFormatVersion (currently only recognizes 1).
String gridFile: either *, or relative path to gridFile.
int nVertices, nLayers, nAttributes, dataType(DOUBLE or FLOAT).
int[] tessellations = new int[nLayers];
Profile[nVertices][nLayers]: data

Parameters
inputascii stream that provides input
inputDirectorythe directory where the model file resides
relGridFilePaththe relative path from the directory where the model file resides to the directory where the grid file resides.
Exceptions
GeoTessException

Reimplemented from slbm::GeoTessModelSLBM.

◆ loadModelBinary()

void slbm::GeoTessModelPathUnc::loadModelBinary ( IFStreamBinary &  input,
const string &  inputDirectory,
const string &  relGridFilePath 
)
protectedvirtual

Load a model (3D grid and data) from a binary File.

The format of the file is:
int fileFormatVersion (currently only recognizes 1).
String gridFile: either *, or relative path to gridFile.
int nVertices, nLayers, nAttributes, dataType(DOUBLE or FLOAT).
int[] tessellations = new int[nLayers];
Profile[nVertices][nLayers]: data

Parameters
inputbinary stream that provides input
inputDirectorythe directory where the model file resides
relGridFilePaththe relative path from the directory where the model file resides to the directory where the grid file resides.
Exceptions
GeoTessException

Reimplemented from slbm::GeoTessModelSLBM.

◆ writeModelAscii()

void slbm::GeoTessModelPathUnc::writeModelAscii ( IFStreamAscii &  output,
const string &  gridFileName 
)
protectedvirtual

Write the model currently in memory to an ascii file. A model can be stored with the data and grid in the same or separate files. This method will write the data from the 3D model to the specified outputfile. If the supplied gridFileName is the single character "*", then the grid information is written to the same file as the data. If the gridFileName is anything else, it is assumed to be the relative path from the data file to an existing file where the grid information is stored. In the latter case, the grid information is not actually written to the specified file; all that happens is that the relative path is stored in the data file.

Reimplemented from slbm::GeoTessModelSLBM.

◆ writeModelBinary()

void slbm::GeoTessModelPathUnc::writeModelBinary ( IFStreamBinary &  output,
const string &  gridFileName 
)
protectedvirtual

Write the model currently in memory to a binary file. A model can be stored with the data and grid in the same or separate files. This method will write the data from the 3D model to the specified outputfile. If the supplied gridFileName is the single character "*", then the grid information is written to the same file as the data. If the gridFileName is anything else, it is assumed to be the relative path from the data file to an existing file where the grid information is stored. In the latter case, the grid information is not actually written to the specified file; all that happens is that the relative path is stored in the data file.

Reimplemented from slbm::GeoTessModelSLBM.


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