# SimPEG.utils.inverse_property_tensor#

SimPEG.utils.inverse_property_tensor(mesh, tensor, return_matrix=False, **kwargs)[source]#

Construct the inverse of the physical property tensor.

For a given mesh, the input parameter tensor is a numpy.ndarray defining the constitutive relationship (e.g. Ohm’s law) between two discrete vector quantities $$\boldsymbol{j}$$ and $$\boldsymbol{e}$$ living at cell centers. Where $$\boldsymbol{M}$$ is the physical property tensor, inverse_property_tensor explicitly constructs the inverse of the physical property tensor $$\boldsymbol{M^{-1}}$$ for all cells such that:

>>> e = Mi @ j


where the Cartesian components of the discrete vectors are organized according to:

>>> j = np.r_[jx, jy, jz]
>>> e = np.r_[ex, ey, ez]

Parameters
meshdiscretize.base.BaseMesh

A mesh

tensor
• Scalar: A float is entered.

• Isotropic: A 1D numpy.ndarray with a property value for every cell.

• Anisotropic: A (nCell, dim) numpy.ndarray where each row defines the diagonal-anisotropic property parameters for each cell. nParam = 2 for 2D meshes and nParam = 3 for 3D meshes.

• Tensor: A (nCell, nParam) numpy.ndarray where each row defines the full anisotropic property parameters for each cell. nParam = 3 for 2D meshes and nParam = 6 for 3D meshes.

return_matrixbool, optional
• True: the function returns the inverse of the property tensor.

• False: the function returns the non-zero elements of the inverse of the property tensor in a numpy.ndarray in the same order as the input argument tensor.

Returns
numpy.ndarray or scipy.sparse.coo_matrix
• If return_matrix = False, the function outputs the parameters defining the inverse of the property tensor in a numpy.ndarray with the same dimensions as the input argument tensor

• If return_natrix = True, the function outputs the inverse of the property tensor as a scipy.sparse.coo_matrix.

Notes

The relationship between a quantity and its response to external stimuli (e.g. Ohm’s law) in each cell can be defined by a scalar function $$\sigma$$ in the isotropic case, or by a tensor $$\Sigma$$ in the anisotropic case, i.e.:

$\vec{j} = \sigma \vec{e} \;\;\;\;\;\; \textrm{or} \;\;\;\;\;\; \vec{j} = \Sigma \vec{e}$

where

$\begin{split}\Sigma = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\ \sigma_{xy} & \sigma_{yy} & \sigma_{yz} \\ \sigma_{xz} & \sigma_{yz} & \sigma_{zz} \end{bmatrix}\end{split}$

Examples