Opened 23 months ago
Last modified 19 months ago
#24623 closed enhancement
Euclidean spaces and vector calculus — at Version 14
Reported by:  egourgoulhon  Owned by:  

Priority:  major  Milestone:  sage8.3 
Component:  geometry  Keywords:  Euclidean space, vector calculus, gradient, divergence, curl, Laplacian 
Cc:  tmonteil  Merged in:  
Authors:  Eric Gourgoulhon  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  public/manifolds/Euclidean_spaces (Commits)  Commit:  70a2a749c2d5c07a85182c0d51fdc9f16d050b01 
Dependencies:  #24622, #24792  Stopgaps: 
Description (last modified by )
This ticket implements Euclidean spaces as Riemannian manifolds diffeomorphic to R^{n} and equipped with a flat metric. Using the operators introduced in #24622, it 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 ask.sagemath question for a motivation.
Some functionalities introduced by this ticket are illustrated in this Jupyter worksheet.
This work is part of the SageManifolds project, see #18528 for an overview.
Change History (14)
comment:1 Changed 23 months ago by
 Description modified (diff)
comment:2 Changed 23 months ago by
 Description modified (diff)
comment:3 Changed 22 months ago by
 Cc tmonteil added
comment:4 Changed 22 months ago by
 Branch set to public/manifolds/Euclidean_spaces
 Commit set to 4bf802027ddd8178ab17efa692bda2d877e0f8d6
comment:5 Changed 22 months ago by
 Dependencies changed from #24622 to #24622, #24792
#24792 introduces more flexibility in naming the elements of vector frames, for instance using (e_x, e_y, e_z)
for a coordinate frame instead of (d/dx, d/dy, d/dz)
. The current ticket will therefore be build on it for a better user interface.
comment:6 Changed 22 months ago by
 Commit changed from 4bf802027ddd8178ab17efa692bda2d877e0f8d6 to f24a5f96a25d12b75c9d98a1b6749513673b4faa
Branch pushed to git repo; I updated commit sha1. New commits:
a527e8e  First draft adding more flexibility in symbols of free module bases and vector frames

2d43a23  More refactoring in vector frames

0840d54  More work on vector frames

01681b8  Add documentation for new options of vector frames

f24a5f9  Merge branch 'public/manifolds/Euclidean_spaces' of git://trac.sagemath.org/sage into public/manifolds/more_basis_flexibility (branch of #24792)

comment:7 Changed 22 months ago by
 Commit changed from f24a5f96a25d12b75c9d98a1b6749513673b4faa to d9302b65668e7f62b54306c4e4c916c73c72dc31
Branch pushed to git repo; I updated commit sha1. New commits:
d9302b6  Add documentation and doctests for Euclidean spaces

comment:8 followup: ↓ 9 Changed 22 months ago by
I wonder whether some of this (in terms of the div/grad/curl) could be exposed in the symbolic calculus places, at least with some wellplaced and wellformed examples that would be understandable to someone teaching Calc III to engineers (in the US framework) who may not be a differential geometer.
comment:9 in reply to: ↑ 8 Changed 22 months ago by
Replying to kcrisman:
I wonder whether some of this (in terms of the div/grad/curl) could be exposed in the symbolic calculus places, at least with some wellplaced and wellformed examples that would be understandable to someone teaching Calc III to engineers (in the US framework) who may not be a differential geometer.
Indeed, the aim here is to provide some interface which does not require any knowledge of differential geometry on manifolds. The class EuclideanSpaceGeneric
does inherit from PseudoRiemannianManifold
, but the end user has not to know it if he is not interested by this aspect and prefers to focus on vector calculus. Regarding examples, I plan to prepare some Jupyter notebooks and will expose them here, when the ticket is ready for review. Already, you can have a glimpse of the div/grad/curl capabilities introduced in the dependency #24622 in this notebook.
comment:10 followup: ↓ 11 Changed 22 months ago by
That's great! The reason I brought it up is because folders like sage/calculus
and sage/symbolic
might benefit from some good examples that are easy to find.
Is there a way to use something like (say) vector([x^2+y,y^2+z,z^2+x])
as "vector field" immediately, without much (or any) of the formalism necessary in that notebook? I think that is how most end users I've talked to about this issue would want it. See e.g. https://ask.sagemath.org/question/10104/gradientdivergencecurlandvectorproducts/ and ticket:3021 for one version already in Sage  maybe these should be combined somehow, if possible.
comment:11 in reply to: ↑ 10 Changed 22 months ago by
Replying to kcrisman:
Is there a way to use something like (say)
vector([x^2+y,y^2+z,z^2+x])
as "vector field" immediately, without much (or any) of the formalism necessary in that notebook?
Yes, this is precisely the aim of the current ticket. The above notebook is still at the level of semiRiemannian manifolds (i.e. it illustrates only ticket #24622), while the user interface of the current ticket will be much simpler. It should also provide an easy way to change from Cartesian coordinates to e.g. polar or cylindrical ones.
See e.g. https://ask.sagemath.org/question/10104/gradientdivergencecurlandvectorproducts/ and ticket:3021 for one version already in Sage  maybe these should be combined somehow, if possible.
Thanks for pointing this version; I was not aware of it.
comment:12 Changed 22 months ago by
 Commit changed from d9302b65668e7f62b54306c4e4c916c73c72dc31 to 56a1a4a37f60f8f61ba8da18ece1e281c6c07aa9
Branch pushed to git repo; I updated commit sha1. New commits:
9ddc467  Add method set_name to classes VectorFrame and CoFrame

82c37b4  Cut long lines in src/sage/manifolds/differentiable/vectorframe.py

95b2736  Merge branch 'public/manifolds/more_basis_flexibility' of git://trac.sagemath.org/sage into Euclidean (to get latest version of the dependency #24792)

56a1a4a  Add method vector_field to Euclidean spaces + internal changes regarding charts and frames

comment:13 Changed 22 months ago by
 Commit changed from 56a1a4a37f60f8f61ba8da18ece1e281c6c07aa9 to 70a2a749c2d5c07a85182c0d51fdc9f16d050b01
Branch pushed to git repo; I updated commit sha1. New commits:
799066b  List entries of VectorFrame processed by __classcall_private__

da06d12  Small improvement in treatment of symbol attributes of free module bases

244c1f4  Merge branch 'public/manifolds/more_basis_flexibility' into 'public/manifolds/Euclidean_spaces' to get the latest version of dependency #24792 in #24623.

70a2a74  Vector fields on Euclidean spaces can be initialized from a vector of symbolic expressions

comment:14 Changed 22 months ago by
 Description modified (diff)
This is a first sketch (not ready yet).
Last 10 new commits:
Improve documentation of pseudoRiemannian manifolds
Remove method set_metric and improve doc of pseudoRiemannian manifolds
Add operators Laplacian, d'Alembertian and curl on pseudoRiemannian manifolds
Add dot product and cross product of vector fields
Add norm of vector fields.
Add method volume_form() to class PseudoRiemannianManifold
Add global functions grad, div, curl, etc. for vector/tensor operators on pseudoRiemannian manifolds
Improve documentation for operators on pseudoRiemannian manifolds
Merge branch 'public/manifolds/pseudoRiemannian' of git://trac.sagemath.org/sage into Sage 8.2.beta5
First draft of Euclidean spaces as Riemannian manifolds