GPLIB++
Public Types | Public Member Functions | Protected Attributes | List of all members
gplib::ThreeDMTModel Class Reference

The class 3DMTModel manages 3D models for magnetotelluric model calculations, at this point this is only for file management and plotting purposes. More...

#include <ThreeDMTModel.h>

Public Types

typedef boost::multi_array
< int, 3 > 
t3DModelData
 
typedef std::vector< double > t3DModelDim
 
typedef std::vector< double > t3DModelRes
 

Public Member Functions

const t3DModelDimGetXSizes ()
 Get the cell sizes in x-direction (North) in m. More...
 
const t3DModelDimGetYSizes ()
 Get the cell sizes in y-direction (East) in m. More...
 
const t3DModelDimGetZSizes ()
 Get the cell sizes in z-direction (down) in m. More...
 
const t3DModelResGetResistivities ()
 Return the table of resistivity values that correspond to the index values in GetModel. More...
 
const t3DModelDataGetModel ()
 Return a three dimensional multi-array with the indices of the resistivity values in each model cell, z varies fastest, then y then x. More...
 
int GetAirlayers ()
 Return the number of air layers in the model. More...
 
void SetAirlayers (const int n)
 Set the number of air layers in the model. More...
 
void ReadWinGLink (std::string filename)
 Read an ascii file in the format written by WinGLink. More...
 
void ReadMackie (std::string filename)
 Read an ascii file in the format use by Mackie's old code. More...
 
void WriteWinGLink (std::string filename)
 Write an ascii file in the format written by WinGLink. More...
 
void WriteMackie (std::string filename)
 Write an ascii file in the format use by Mackie's old code. More...
 
void WriteVTK (std::string filename)
 Write an ascii file in .vtk format for plotting. More...
 
void WriteNetCDF (std::string filename)
 Write the model in netcdf format. More...
 
 ThreeDMTModel ()
 
virtual ~ThreeDMTModel ()
 

Protected Attributes

t3DModelData Model
 
t3DModelRes Resistivities
 
t3DModelDim xsize
 
t3DModelDim ysize
 
t3DModelDim zsize
 
int airlayers
 

Detailed Description

The class 3DMTModel manages 3D models for magnetotelluric model calculations, at this point this is only for file management and plotting purposes.

This class provides basic storage, read/write and plotting capabilities for three dimensional MT models in Mackie's native or WinGLink format. There is no corresponding forward code in this library at this point.

Definition at line 17 of file ThreeDMTModel.h.

Member Typedef Documentation

typedef boost::multi_array<int, 3> gplib::ThreeDMTModel::t3DModelData

Definition at line 20 of file ThreeDMTModel.h.

typedef std::vector<double> gplib::ThreeDMTModel::t3DModelDim

Definition at line 21 of file ThreeDMTModel.h.

typedef std::vector<double> gplib::ThreeDMTModel::t3DModelRes

Definition at line 22 of file ThreeDMTModel.h.

Constructor & Destructor Documentation

gplib::ThreeDMTModel::ThreeDMTModel ( )

Definition at line 12 of file ThreeDMTModel.cpp.

gplib::ThreeDMTModel::~ThreeDMTModel ( )
virtual

Definition at line 17 of file ThreeDMTModel.cpp.

Member Function Documentation

int gplib::ThreeDMTModel::GetAirlayers ( )
inline

Return the number of air layers in the model.

Definition at line 60 of file ThreeDMTModel.h.

References airlayers.

const t3DModelData& gplib::ThreeDMTModel::GetModel ( )
inline

Return a three dimensional multi-array with the indices of the resistivity values in each model cell, z varies fastest, then y then x.

Definition at line 55 of file ThreeDMTModel.h.

References Model.

Referenced by main().

const t3DModelRes& gplib::ThreeDMTModel::GetResistivities ( )
inline

Return the table of resistivity values that correspond to the index values in GetModel.

Definition at line 50 of file ThreeDMTModel.h.

References Resistivities.

Referenced by main().

const t3DModelDim& gplib::ThreeDMTModel::GetXSizes ( )
inline

Get the cell sizes in x-direction (North) in m.

Definition at line 35 of file ThreeDMTModel.h.

References xsize.

Referenced by main().

const t3DModelDim& gplib::ThreeDMTModel::GetYSizes ( )
inline

Get the cell sizes in y-direction (East) in m.

Definition at line 40 of file ThreeDMTModel.h.

References ysize.

Referenced by main().

const t3DModelDim& gplib::ThreeDMTModel::GetZSizes ( )
inline

Get the cell sizes in z-direction (down) in m.

Definition at line 45 of file ThreeDMTModel.h.

References zsize.

Referenced by main().

void gplib::ThreeDMTModel::ReadMackie ( std::string  filename)

Read an ascii file in the format use by Mackie's old code.

Definition at line 77 of file ThreeDMTModel.cpp.

Referenced by main().

void gplib::ThreeDMTModel::ReadWinGLink ( std::string  filename)

Read an ascii file in the format written by WinGLink.

Definition at line 37 of file ThreeDMTModel.cpp.

Referenced by main().

void gplib::ThreeDMTModel::SetAirlayers ( const int  n)
inline

Set the number of air layers in the model.

Definition at line 65 of file ThreeDMTModel.h.

References airlayers.

void gplib::ThreeDMTModel::WriteMackie ( std::string  filename)

Write an ascii file in the format use by Mackie's old code.

Definition at line 158 of file ThreeDMTModel.cpp.

void gplib::ThreeDMTModel::WriteNetCDF ( std::string  filename)

Write the model in netcdf format.

Definition at line 197 of file ThreeDMTModel.cpp.

void gplib::ThreeDMTModel::WriteVTK ( std::string  filename)

Write an ascii file in .vtk format for plotting.

Definition at line 238 of file ThreeDMTModel.cpp.

void gplib::ThreeDMTModel::WriteWinGLink ( std::string  filename)

Write an ascii file in the format written by WinGLink.

Definition at line 119 of file ThreeDMTModel.cpp.

Member Data Documentation

int gplib::ThreeDMTModel::airlayers
protected

Definition at line 32 of file ThreeDMTModel.h.

Referenced by GetAirlayers(), and SetAirlayers().

t3DModelData gplib::ThreeDMTModel::Model
protected

Definition at line 27 of file ThreeDMTModel.h.

Referenced by GetModel().

t3DModelRes gplib::ThreeDMTModel::Resistivities
protected

Definition at line 28 of file ThreeDMTModel.h.

Referenced by GetResistivities().

t3DModelDim gplib::ThreeDMTModel::xsize
protected

Definition at line 29 of file ThreeDMTModel.h.

Referenced by GetXSizes().

t3DModelDim gplib::ThreeDMTModel::ysize
protected

Definition at line 30 of file ThreeDMTModel.h.

Referenced by GetYSizes().

t3DModelDim gplib::ThreeDMTModel::zsize
protected

Definition at line 31 of file ThreeDMTModel.h.

Referenced by GetZSizes().


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