coordinates.core.CurvilinearCoordinateSystem.inverse_metric_tensor#

property CurvilinearCoordinateSystem.inverse_metric_tensor: Callable#

Returns the callable function for the inverse metric tensor of the coordinate system.

The inverse metric tensor \(g^{ij}\) is the inverse of \(g_{ij}\) and is used to raise indices, compute dual bases, and perform coordinate transformations. This function returns a callable representation of \(g^{ij}\), allowing evaluation at specific coordinate points.

Returns:

A function that computes the inverse metric tensor \(g^{ij}\) when evaluated at specific coordinates. The returned function takes numerical coordinate values as inputs and outputs a NumPy array of shape (ndim, ndim).

Return type:

Callable

Example

cs = MyCoordinateSystem()
g_inv = cs.inverse_metric_tensor(x=1, y=2, z=3)  # Evaluates g^{ij} at (1,2,3)
print(g_inv.shape)  # Output: (ndim, ndim)