fields.mixins.dense_mathops.DenseTensorFieldDMOMixin.determine_op_dependence#
- DenseTensorFieldDMOMixin.determine_op_dependence(opname: str, *args, **kwargs)#
Infer the symbolic coordinate dependence resulting from a differential operation.
This utility method performs symbolic dependence tracking by delegating to the internal dependence object (
self.dependence
) and extracting the resulting coordinate axis dependencies after applying the specified operation.It is commonly used by high-level field and component operations to automatically annotate new objects (e.g., gradients, divergences, Laplacians) with their correct symbolic dependence.
- Parameters:
opname (
str
) – The name of the symbolic operation to perform (e.g.,"gradient"
,"laplacian"
,"divergence"
,"raise_index"
, etc.). This must be a method ofself.dependence
.*args (
tuple
) – Positional arguments passed directly to the method being invoked.**kwargs (
dict
) – Keyword arguments passed directly to the method being invoked.
- Returns:
A list of coordinate axis names (e.g.,
["r", "theta"]
) on which the resulting field depends after the symbolic operation.- Return type:
List[str]
- Raises:
ValueError – If the given operation name is not a valid method of
self.dependence
.
Examples
>>> field.determine_op_dependence("gradient", basis="covariant") ['r', 'theta']
>>> field.determine_op_dependence("laplacian") ['r', 'theta']
Notes
This method is purely symbolic and does not perform any numerical evaluation. It is used for metadata propagation and symbolic analysis of coordinate dependence.