pysdic.ReparametrizedTransformation._invert#

ReparametrizedTransformation._invert(x_o, *, dx=False, dp=False, **kwargs)[source]#

Apply the inverse map \(T^{-1}\) to the output points \(\vec{x_o}\) with the parameters \(\vec{p} = P(\vec{q})\).

\[\vec{x_i} = T^{-1}(\vec{x_o}; P(\vec{q}))\]

The Jacobian with respect to the parameters is computed using the chain rule:

\[\mathbf{J}_q = \frac{\partial T^{-1}}{\partial \vec{p}} \cdot \frac{\partial P}{\partial \vec{q}}\]
Parameters:
  • x_o (numpy.ndarray) – The output points to invert, with shape \((n_\text{points}, n_o)\).

  • dx (bool, optional (default: False)) – If True, compute the Jacobian with respect to the output points.

  • dp (bool, optional (default: False)) – If True, compute the Jacobian with respect to the parameters \(\vec{q}\).

  • **kwargs – Additional arguments passed to the invert method of the transformation.

Returns:

  • numpy.ndarray – The inverted input points, with shape \((n_\text{points}, n_i)\).

  • Optional[numpy.ndarray] – The Jacobian matrix with respect to the output points if dx=True, with shape \((n_\text{points}, n_i, n_o)\), or None if dx=False.

  • Optional[numpy.ndarray] – The Jacobian matrix with respect to the parameters \(\vec{q}\) if dp=True, with shape \((n_\text{points}, n_i, n_q)\), or None if dp=False.

Return type:

Tuple[ndarray, ndarray | None, ndarray | None]