discretize.TensorMesh.get_edge_inner_product_line_deriv#

TensorMesh.get_edge_inner_product_line_deriv(model, invert_model=False, invert_matrix=False, **kwargs)[source]#

Get a function handle to multiply a vector with derivative of edge inner product line matrix (or its inverse).

Let \(\mathbf{M}(\mathbf{m})\) be the edge inner product line matrix constructed with a set of diagnostic property parameters \(\mathbf{m}\) (or its inverse) defined on mesh edges. get_edge_inner_product_line_deriv constructs a function handle

\[\mathbf{F}(\mathbf{u}) = \mathbf{u}^T \, \frac{\partial \mathbf{M}(\mathbf{m})}{\partial \mathbf{m}}\]

which accepts any numpy.array \(\mathbf{u}\) of shape (n_edges,). That is, get_edge_inner_product_line_deriv constructs a function handle for computing the dot product between a vector \(\mathbf{u}\) and the derivative of the edge inner product line matrix (or its inverse) with respect to the diagnostic parameters. When computed, \(\mathbf{F}(\mathbf{u})\) returns a scipy.sparse.csr_matrix of shape (n_edges, n_param).

The function handle can only be created for isotropic diagnostic properties.

Parameters:
model(n_edges, ) numpy.ndarray

Parameters defining the diagnostic property values for every edge in the mesh.

invert_modelbool, optional

The inverse of model is used as the diagnostic property.

invert_matrixbool, optional

Returns the inverse of the inner product line matrix.

Returns:
function

The function handle \(\mathbf{F}(\mathbf{u})\) which accepts a (n_edges) numpy.ndarray \(\mathbf{u}\). The function returns a (n_edges, n_params) scipy.sparse.csr_matrix.