discretize.CurvilinearMesh.get_edge_inner_product_surface_deriv#

CurvilinearMesh.get_edge_inner_product_surface_deriv(model, invert_model=False, invert_matrix=False, **kwargs)[source]#

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

Let M(m) be the edge inner product surface matrix constructed with a set of diagnostic property parameters m (or its inverse) defined on mesh faces. get_edge_inner_product_surface_deriv constructs a function handle

F(u)=uTM(m)m

which accepts any numpy.array u of shape (n_edges,). That is, get_edge_inner_product_surface_deriv constructs a function handle for computing the dot product between a vector u and the derivative of the edge inner product surface matrix (or its inverse) with respect to the property parameters. When computed, F(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_faces, ) numpy.ndarray

Parameters defining the diagnostic property values for every face 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 surface matrix.

Returns:
function

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