pylops.SecondDirectionalDerivative#
- class pylops.SecondDirectionalDerivative(dims, v, sampling=1, edge=False, dtype='float64', name='S')[source]#
Second Directional derivative.
Apply a second directional derivative operator to a multi-dimensional array along either a single common axis or different axes for each point of the array.
Note
At least 2 dimensions are required, consider using
pylops.SecondDerivative
for 1d arrays.- Parameters
- dims
tuple
Number of samples for each dimension.
- v
np.ndarray
, optional Single direction (array of size \(n_\text{dims}\)) or group of directions (array of size \([n_\text{dims} \times n_{d_0} \times ... \times n_{d_{n_\text{dims}}}]\))
- sampling
tuple
, optional Sampling steps for each direction.
- edge
bool
, optional Use reduced order derivative at edges (
True
) or ignore them (False
).- dtype
str
, optional Type of elements in input array.
- dims
Notes
The SecondDirectionalDerivative applies a second-order derivative to a multi-dimensional array along the direction defined by the unitary vector \(\mathbf{v}\):
\[d^2f_\mathbf{v} = - D_\mathbf{v}^T [D_\mathbf{v} f]\]where \(D_\mathbf{v}\) is the first-order directional derivative implemented by
pylops.SecondDirectionalDerivative
.This operator is sometimes also referred to as directional Laplacian in the literature.
Methods
__init__
(dims, v[, sampling, edge, dtype, name])adjoint
()apply_columns
(cols)Apply subset of columns of operator
cond
([uselobpcg])Condition number of linear operator.
conj
()Complex conjugate operator
div
(y[, niter, densesolver])Solve the linear problem \(\mathbf{y}=\mathbf{A}\mathbf{x}\).
dot
(x)Matrix-matrix or matrix-vector multiplication.
eigs
([neigs, symmetric, niter, uselobpcg])Most significant eigenvalues of linear operator.
matmat
(X)Matrix-matrix multiplication.
matvec
(x)Matrix-vector multiplication.
reset_count
()Reset counters
rmatmat
(X)Matrix-matrix multiplication.
rmatvec
(x)Adjoint matrix-vector multiplication.
todense
([backend])Return dense matrix.
toimag
([forw, adj])Imag operator
toreal
([forw, adj])Real operator
tosparse
()Return sparse matrix.
trace
([neval, method, backend])Trace of linear operator.
transpose
()