Obsidian
Probabilistic Geophysical Joint Inversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
obsidian::fwd::detail Namespace Reference

Typedefs

typedef boost::multi_array
< double, 3 > 
Array3d
 Data structure to represent a 3D array.
 

Functions

double gravSensFunc (double x, double y, double z, double, double, double)
 Computes the sensitivity for a particular point in the gravity. More...
 
double computeSensIntegral (int i, int j, int k, const Array3d &eZ)
 Compute the sensitivity integral at a particular point in the mesh. More...
 
Eigen::MatrixXd computeSensitivity (const Eigen::VectorXd &xEdges, const Eigen::VectorXd &yEdges, const Eigen::VectorXd &zEdges, const Eigen::VectorXd &xField, const Eigen::VectorXd &yField, const Eigen::VectorXd &zField, const Eigen::MatrixXd &locations, double(*sensFunc)(double, double, double, double, double, double))
 Computes the sensitivity for either gravity or magnetic. More...
 
double magSensFunc (double x, double y, double z, double bx, double by, double bz)
 Calculate the magnetic sensitivity at a particular position relative to the origin. More...
 
Eigen::Matrix2cd applyRotation (const Eigen::Matrix2cd &Z, double phaseBelow, double phaseAbove)
 Rotate the impedance matrix based on the phases of the layers. More...
 
double primaryAngle (double y, double x)
 Calculates the primary angle of a vector. More...
 

Variables

constexpr std::complex< double > I = std::complex<double>(0, 1)
 Constant representing the imaginary number i.
 
const double EPS = 1e-12
 A small number added to denominators to prevent them from being zero.
 
constexpr double MU = 4 * M_PI * 1e-7
 Constant for the permeability of free space.
 

Detailed Description

Namespace for internal functions used by forward models.

Function Documentation

Eigen::Matrix2cd obsidian::fwd::detail::applyRotation ( const Eigen::Matrix2cd &  Z,
double  phaseBelow,
double  phaseAbove 
)

Rotate the impedance matrix based on the phases of the layers.

Parameters
ZThe impedance matrix.
phaseBelowThe phase of the layer below.
phaseAboveThe phase of the layer above.
Returns
The rotated impedance matrix.
double obsidian::fwd::detail::computeSensIntegral ( int  i,
int  j,
int  k,
const Array3d &  eZ 
)

Compute the sensitivity integral at a particular point in the mesh.

Parameters
i,j,kThe indices of the mesh point
eZThe 3D array containing the sensitivities at each mesh grid point
Eigen::MatrixXd obsidian::fwd::detail::computeSensitivity ( const Eigen::VectorXd &  xEdges,
const Eigen::VectorXd &  yEdges,
const Eigen::VectorXd &  zEdges,
const Eigen::VectorXd &  xField,
const Eigen::VectorXd &  yField,
const Eigen::VectorXd &  zField,
const Eigen::MatrixXd &  locations,
double(*)(double, double, double, double, double, double)  sensFunc 
)

Computes the sensitivity for either gravity or magnetic.

Parameters
xEdges,yEdges,zEdgesThe coordinates of the mesh grid in the x, y, and z directions.
xField,yField,zFieldThe geological field values at each of the mesh grid points.
locationsA Nx3 matrix containing the coordinates of each. sensor observation location.
sensFuncThe function to compute the sensitivity.
double obsidian::fwd::detail::gravSensFunc ( double  x,
double  y,
double  z,
double  ,
double  ,
double   
)

Computes the sensitivity for a particular point in the gravity.

Parameters
x,y,zThe coordinate of the point in 3D space
double obsidian::fwd::detail::magSensFunc ( double  x,
double  y,
double  z,
double  bx,
double  by,
double  bz 
)

Calculate the magnetic sensitivity at a particular position relative to the origin.

Parameters
x,y,zThe coordinates of the position.
bx,by,bzThe magnetic field at this position
double obsidian::fwd::detail::primaryAngle ( double  y,
double  x 
)

Calculates the primary angle of a vector.

Parameters
yThe imaginary part of the phase.
xThe real part of the phase.
Returns
The primary angle of the vector.