ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 17 Jul 2020 17:54:10 +0200Computing gradients of vector fields?https://ask.sagemath.org/question/52529/computing-gradients-of-vector-fields/Premise, I'm not working with special/general relativity, so it may be that the way the formalism is thought in SageMath does not fit perfectly my needs.
I'm trying to define vector and tensor fields in Euclidean space and then differentiate them. For example, I'm interested in calculating the gradient of a vector field, namely, the tensor field
$$
T_{ij} = \frac{dv_i}{dx_j}
$$
. However classes like `EuclideanSpace` only allow me to produce vector fields on which I can compute divergence and curl. Should I just create three scalar fields, one for each component, and go with that? Or are there ways to get `nabla` out as a vector and use it directly to operate on actual vectors and tensors (in which case I could use the tensor product, $T = \nabla \otimes v$)?Okarin86Fri, 17 Jul 2020 17:54:10 +0200https://ask.sagemath.org/question/52529/