differential_geometry.dependence.DenseTensorDependence.__init__#
- DenseTensorDependence.__init__(coordinate_system: _CoordinateSystemBase, rank: int, /, *, dependent_axes: str | Sequence[str] | None = None) None [source]#
Initialize a dense tensor dependence object with a given rank and coordinate dependence.
This constructor extends DenseDependenceObject by inferring the shape of the tensor based on its rank and the dimensionality of the coordinate system. For example, a rank-2 tensor in a 3D coordinate system will have shape (3, 3).
- Parameters:
coordinate_system (
_CoordinateSystemBase
) – The coordinate system that defines the geometric context.rank (
int
) – The rank (number of tensor indices) of the tensor field. A rank of 0 indicates a scalar field.dependent_axes (
str
orSequence[str]
, optional) – The coordinate axes the tensor depends on. Can be a single axis name or a list. If None, the tensor is assumed to depend on all coordinate axes.