_VectorOperator
Shared behaviour of the six vector-calculus operators.
Each carries the field or scalar e, the ordered coordinate tuple, and the coordinate system. The coordinates are excluded from children and carried through rebuild (the scalar._Taylor convention — see the package overview), so substitute cannot rewrite the variables the answer is phrased in.
Attributes
- Graph
-
- Supertypes
- Known subtypes
Members list
Value members
Abstract methods
The ordered coordinate tuple; free in the result, never substituted.
The ordered coordinate tuple; free in the result, never substituted.
Attributes
The scalar field or vector field the operator is applied to.
The scalar field or vector field the operator is applied to.
Attributes
The operator's own name, for toString.
The operator's own name, for toString.
Attributes
The coordinate system; only Cartesian evaluates today.
The coordinate system; only Cartesian evaluates today.
Attributes
Concrete methods
Sub-expressions subject to recursive structural traversal. Binder positions (e.g. the differentiation variable) are excluded.
Sub-expressions subject to recursive structural traversal. Binder positions (e.g. the differentiation variable) are excluded.
Attributes
- Definition Classes
Builds a column vector from its components, simplified.
Builds a column vector from its components, simplified.
Attributes
Reads e as an n×1 vector field: its components, or None when it is not one.
Reads e as an n×1 vector field: its components, or None when it is not one.
A literal matrix is read without evaluating it, and that ordering is load-bearing: the components must be differentiated before any point is substituted. Evaluating first would collapse [[x^2], [y^3]] to a dense _MatrixValue as soon as the coordinates happen to be bound — every cell a constant, every derivative zero, and a confidently wrong answer rather than a refusal.
Only a non-literal argument is evaluated, which covers the variable-bound-to-a-matrix case (the general lesson that matrix-vs-scalar cannot always be decided at parse time). An Environment holds _Values, so such a binding is necessarily a dense _MatrixValue: its cells are constants and their derivatives are legitimately zero.
A field is a column (n×1); a row vector is a different object and is refused.
Attributes
∂x/∂coords(i), simplified.
∂x/∂coords(i), simplified.
Attributes
Orientation of the ordered basis: +1 right-handed, -1 left-handed.
Orientation of the ordered basis: +1 right-handed, -1 left-handed.
Only curl reads this, and it must. The curl formula below is derived for a right-handed (q₁, q₂, q₃); SphericalMaths exchanges the last two coordinates of Spherical, and swapping two basis vectors flips the orientation, so the same formula returns −curl there. grad, div and laplacian involve no cross product and are orientation-free, which is why the sign lives here rather than in each operator.
Attributes
The Jacobian factor h₁·h₂·…, the volume element's coefficient.
The Jacobian factor h₁·h₂·…, the volume element's coefficient.
Attributes
The scale factors (h₁, h₂, …) for this coordinate system and tuple.
The scale factors (h₁, h₂, …) for this coordinate system and tuple.
Every operator below is written once, in terms of these; Cartesian is the h = 1 case, which is why generalising the formulas left its results untouched. None when the system cannot describe this tuple — cylindrical and spherical are three-dimensional, and a request in any other arity is refused rather than answered in the wrong geometry.
Attributes
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
Sums a list of terms, folding to 0 when empty.
Sums a list of terms, folding to 0 when empty.
Attributes
True when the request is one this tier can answer at all: a coordinate tuple with no repeats, in an arity the coordinate system supports. grad(f, x, x) names no basis and is refused rather than silently producing a duplicated component.
True when the request is one this tier can answer at all: a coordinate tuple with no repeats, in an arity the coordinate system supports. grad(f, x, x) names no basis and is refused rather than silently producing a duplicated component.
Attributes
Inherited and Abstract methods
Reduces this expression in the given environment.
Reduces this expression in the given environment.
Value parameters
- env
-
variable bindings and display precision
Attributes
- Returns
-
Right(v)when all free variables resolved to concrete values;Left(e)when reduction is partial or impossible - Inherited from:
- _Expression
Reconstructs the same node shape with replacement sub-expressions.
Reconstructs the same node shape with replacement sub-expressions.
Value parameters
- newChildren
-
replacements in the same order and count as
children
Attributes
- Inherited from:
- _Expression
Inherited fields
Cached set of free variable names; O(1) after the first access.
Cached set of free variable names; O(1) after the first access.
Attributes
- Inherited from:
- _Expression