TensorDependenceMixin#

class differential_geometry.dependence.TensorDependenceMixin[source]#

Mixin class providing tensor-specific operations for symbolic dependence objects.

This mixin extends OperatorsMixin by adding operations that rely on tensor structure, such as raising/lowering indices, adjusting variance signatures, and computing divergence in addition to the general-purpose gradient and Laplacian.

It assumes the object exposes:
  • coordinate_system: a coordinate system with symbolic metric data,

  • rank: an integer rank for the tensor (0 = scalar, 1 = vector, etc.),

  • symbolic_proxy: a SymPy scalar or array-like expression,

  • from_symbolic_proxy: a method to reconstruct a new instance from a proxy.

Notes

Unlike OperatorsMixin, which applies differential operators to each component independently, this mixin enables true tensorial operations that respect index variance (covariant/contravariant behavior).

Methods

__init__()

adjust_tensor_signature(variance_in, ...[, ...])

Adjust the tensor variance (covariant/contravariant) of each index.

divergence(*[, basis, as_field])

Compute the divergence of a rank-1 tensor field.

element_wise_gradient(*[, basis, as_field])

Compute the component-wise gradient of the field.

element_wise_laplacian(*[, as_field])

Compute the component-wise Laplacian of the field.

gradient(*[, basis, as_field])

Compute the elementwise gradient of the tensor field.

laplacian(*[, as_field])

Compute the Laplacian of the tensor field (component-wise).

lower_index(axis, /, *[, as_field])

Lower a tensor index along the specified axis using the metric tensor.

raise_index(axis, /, *[, as_field])

Raise a tensor index along the specified axis using the inverse metric tensor.