-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sphere: improve handling of default charts #32953
Comments
Replying to @tobiasdiez:
This is because the volume form is defined with respect to the orientation provided by the frame of stereographic coordinates on S2-{SP}. The frame of stereographic coordinates on S2-{NP} having the opposite orientation, a vector frame A side remark:
can be shorten to
Note that the class |
comment:2
Replying to @egourgoulhon:
An example of bug is
One would certainly expect the components of |
comment:3
Thanks for having a look at this. So the vector frame I had a look at the implementation and would propose to circumvent this problem completely by slightly generalizing the way an orientation is represented in sage. What do you think? |
comment:4
In general, this is a good idea. Then the question is, how do we assign these values when we introduce new charts? Currently, this is not necessary because we have reference frames/charts in the aforementioned list. Instead of giving every frame/chart a sign, I'd suggest to keep such a list of references but assign to each frame/chart only in that list a sign as you propose. (Is this user-friendly?) I presume, however, a much better way would incorporate Chech cohomology, which goes in the direction of what you suggested in terms of cohomology. As soon as we have implemented Chech cohomology, the notion of "orientation" can easily be generalized. I think this is the proper way of doing it. |
comment:5
Replying to @tobiasdiez:
Indeed, and Sage will do it automatically if required, because it knows all the automorphisms connecting the various frames. In particular, it knows the automorphism linking
I am not sure to understand what your problem is. At the initialization of the volume form, only the minimal amount of information is stored in the attribute
As you noticed,
Note that the attribute
Invoking
|
comment:6
I agree with Eric, there is no major problem here. Though I also agree with Tobias in the sense that introducing a dummy frame in order to get the orientation is not "nice" either. |
comment:7
My (originial) problem was that the following code
fails with the error "ValueError: no common chart for the multiplication" (in the last line). I thought that this might be a result of the difference in vector vs coordinate frame. I've opened #32974 for the idea to improve the orientation of manifolds (using a general framework). |
comment:8
Replying to @tobiasdiez:
No,
(cf. line 2826 of
if you plan to work with stereographic coordinates. Then |
comment:9
Replying to @tobiasdiez:
This declaration of the scalar field |
comment:10
Oh, then I misunderstood your comment above.
This works perfectly, thanks! I've updated the ticket description accordingly. |
This comment has been minimized.
This comment has been minimized.
comment:11
Replying to @egourgoulhon:
What I intended to do was to create a new function in each chart, i.e. just represent a general function on a manifold. What would be the correct way to do this? Simply use a different name for each chart function, or can one disable the injection of the local function in the global namespace? Side remark: I agree that using the same name might be confusing, but at least in the area I work in it seems standard to denote the chart representation of a function by the same symbol and make the distinction only by the arguments, i.e. if |
comment:12
By the way, I really appreciate that you guys take the time to clarify and explain to me the inner workings of the manifold code! |
comment:13
Spheres are automatically initialized with spherical coordinates if not stated otherwise. That means, at the point of initialization, the default chart is set to the one given by spherical coordinates. I bet this to be the culprit of that "inconsistency". If you want to initialize the sphere with stereographic coordinates right from the start, you can use One would probably have to transcribe the Incidental remark 1: Ticket #31894 attempts to solve the covering issue of spherical coordinates. Incidental remark 2: remark 1 is also related to the orientation #31324 issue. |
comment:14
Replying to @mjungmath:
This sounds a good idea! |
comment:15
Replying to @tobiasdiez:
I would say like this:
Thanks to add_expr_by_continuation, the scalar field is defined in a consistent way on all the manifold.
I see your point, but I am afraid that using this in a computer algebra system may lead to some false results. |
comment:16
Replying to @mjungmath:
The issue is rather that the spherical chart appears as well as the default one on the domain of stereographic coordinates:
One would rather expect |
comment:17
Replying to @egourgoulhon:
Why is this output unexpected? Wouldn't you expect open subsets |
comment:18
I find this default chart concept in case of non-parallelizable manifolds a bit cumbersome, anyways. What if we replace In addition, I'd opt for what I said earlier in comment:13. |
comment:19
Replying to @mjungmath:
No, not in general. Especially in the present case, where the spherical chart,
If one creates a new open subset of
which is fortunate, since IMHO, the solution would be that |
comment:21
Replying to @egourgoulhon:
Here is an example of such false result. Suppose you define a scalar field the way you would like:
Then it will always take identical values at the North and South poles:
which is certainly not what you want for a generic scalar field on the sphere. |
comment:22
Replying to @egourgoulhon:
Don't you think this should be attacked on the level of the general manifolds implementation? Those (non-obvious) things can still happen if you define manifolds on the fly. |
comment:23
Replying to @mjungmath:
I don't see any general strategy here. Probably we should leave this to the user defining the manifold on the fly. But in the specific case of the sphere, we should implement the standard charts (spherical, stereographic) in such a way that they are the default ones on their domains. |
comment:24
I agree, it wouldn't hurt to add this for spheres. What about my idea before, using dictionaries instead? Perhaps Travis has an idea? |
comment:25
I don't really like the idea of using dictionaries because you further increase the burden on keeping all of the information consistent when the information you want can just be directly attached to the subsets in question. So you have |
Commit: |
Author: Eric Gourgoulhon |
comment:27
Replying to @mjungmath:
Here we go... New commits:
|
Changed keywords from none to sphere |
comment:28
Green bot (morally). I am setting this to a positive review. Feel free to revert if there are any objections. |
Reviewer: Travis Scrimshaw |
comment:29
Thank you for the review! |
Changed branch from public/manifolds/sphere_default_charts-32953 to |
If one uses the method
stereographic_coordinates
to initialize steographic coordinates (instead of as via the constructor argument), then there are some inconsistencies.For example,
One would certainly expect the components of g to be expressed in terms of (y1,y2), i.e. the chart XN, which is the only chart that covers entirely U = S^2-{NP}.
CC: @tscrim @nthiery @mjungmath @egourgoulhon
Component: manifolds
Keywords: sphere
Author: Eric Gourgoulhon
Branch/Commit:
20b9cb0
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32953
The text was updated successfully, but these errors were encountered: