id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
24623,Euclidean spaces and vector calculus,egourgoulhon,,"This ticket implements Euclidean spaces as Riemannian manifolds diffeomorphic to '''R'''^n^ and equipped with a flat metric, which defines the Euclidean dot product. Using the operators introduced in #24622, this provides the standard operators of vector calculus: dot product, norm, cross product, gradient, divergence, curl and Laplacian, along with the standard coordinate systems (Cartesian, spherical, cylindrical, etc.).
See this [https://ask.sagemath.org/question/40792/div-grad-and-curl-once-again/ ask.sagemath question] for a motivation.
The implementation is performed via the parent class `EuclideanSpaceGeneric`, which inherits from `PseudoRiemannianManifold` (introduced in #24622). Two subclasses are devoted to specific cases:
- `EuclideanPlane` for n=2
- `Euclidean3dimSpace` for n=3
The user interface for constructing an Euclidean space relies on a single function: `EuclideanSpace`.
The implementation through the manifold framework allows for an easy use of various coordinate systems, along with the related transformations. However, the user interface does not assume any knowledge of Riemannian geometry. In particular, no direct manipulation of the metric tensor is required.
A minimal example is
{{{
sage: E. = EuclideanSpace(3)
sage: v = E.vector_field(-y, x, 0)
sage: v.display()
-y e_x + x e_y
sage: v[:]
[-y, x, 0]
sage: w = v.curl()
sage: w.display()
2 e_z
sage: w[:]
[0, 0, 2]
}}}
The transformation to spherical coordinates:
{{{
sage: spherical. = E.spherical_coordinates()
sage: spherical_frame = E.spherical_frame() # orthonormal frame (e_r, e_th, e_ph)
sage: v.display(spherical_frame, spherical)
r*sin(th) e_ph
sage: v[spherical_frame, :, spherical]
[0, 0, r*sin(th)]
sage: w.display(spherical_frame, spherical)
2*cos(th) e_r - 2*sin(th) e_th
sage: w[spherical_frame, :, spherical]
[2*cos(th), -2*sin(th), 0]
}}}
More detailed examples are in the following Jupyter notebooks:
- [http://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/vector_calc_cartesian.ipynb vector calculus in Cartesian coordinates]
- [http://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/vector_calc_spherical.ipynb vector calculus in spherical coordinates]
- [http://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/vector_calc_cylindrical.ipynb vector calculus in cylindrical coordinates]
- [http://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/vector_calc_change.ipynb changing coordinates in the Euclidean 3-space]
- [http://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/vector_calc_advanced.ipynb Advanced aspects: Euclidean spaces as Riemannian manifolds]
- [http://nbviewer.jupyter.org/github/egourgoulhon/SageMathTest/blob/master/Worksheets/Euclidean_plane.ipynb the Euclidean plane]
This work is part of the [http://sagemanifolds.obspm.fr/ SageManifolds project], see #18528 for an overview.",enhancement,new,major,sage-8.2,geometry,,"Euclidean space, vector calculus, gradient, divergence, curl, Laplacian",tmonteil,,Eric Gourgoulhon,,N/A,,public/manifolds/Euclidean_spaces,de74bb734f9f531bb6d991b14af20e58e6ebd683,"#24622, #24792",