|   | 1 |  initial version  | 
You can define a vector field by providing its components in the default frame like this:
v = E.vector_field((function('v_r')(r, θ, ϕ), 
                    function('v_θ')(r, θ, ϕ), 
                    function('v_ϕ')(r, θ, ϕ)),
                   name='v')
and then compute its divergence and curl via
v.divergence().display()
and
v.curl().display()
See https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/vectorfield.html#sage.manifolds.differentiable.vectorfield.VectorFieldParal for more details.
|   | 2 |  No.2 Revision  | 
You can define a vector field by providing its components in the default frame like this:
v = E.vector_field((function('v_r')(r, θ, ϕ), 
                    function('v_θ')(r, θ, ϕ), 
                    function('v_ϕ')(r, θ, ϕ)),
                   name='v')
and then compute its divergence and curl via
v.divergence().display()
and
v.curl().display()
See https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/vectorfield.html#sage.manifolds.differentiable.vectorfield.VectorFieldParal
https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/vectorfield.html#sage.manifolds.differentiable.vectorfield.VectorFieldParal and
https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/manifold.html#sage.manifolds.differentiable.manifold.DifferentiableManifold.vector_field
for more details. details.
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.