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
Ease the display of tensor fields in a coordinate frame #27655
Comments
Commit: |
comment:4
Is there a better way than ducktyping to check if |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
Replying to @tscrim:
Done in the above commit.
Indeed. |
Reviewer: Travis Scrimshaw |
comment:7
Thank you. LGTM. |
comment:8
Thanks for the review! |
comment:9
That causes quite a lot of breakage, see patchbot |
comment:10
Replying to @vbraun:
Sorry for what is likely a dumb question, but are you sure it is this ticket? I just have absolutely no idea how those failures could be related to this ticket. I agree that all the patchbots for what seems to be just ticket have massive breakage, but it seems to come from the |
comment:11
It went away after unmerging this ticket, so seems to be the case |
comment:12
Replying to @vbraun:
I confirm the errors reported by the patchbot: on my computer, after merging the ticket branch in Sage 8.8.beta2, I get
The error raised in
However I am completely puzzled: how could possibly the code in this branch alter mpmath?
returns "All tests passed!", but the other parts of Sage are impacted as the patchbot says, for instance
returns "93 doctests failed"... |
comment:13
It touches free modules so presumably something screws up mpmath as free module over integers... |
comment:14
The culprit is the commit
from the top of the module |
comment:16
I am setting the ticket to "needs review" to draw the attention of the patchbot. The above commit, which simply makes the import of |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:18
I think I found the real culprit: in Since it is now harmless, I've restored the import of |
comment:19
IMO, that is still somewhat of a hack fix, but far less of one that the other. I am wondering if what is going on is this is changing the overall import order of things into Sage, and somehow things are more sensitive to this ordering than we thought. That means dealing with Sage's import hell. I am okay with the current state modulo an additional comment at the lazy import referencing this ticket and the general issue. Once done, positive review since it now passes on the patchbot (modulo one test which is unrelated). |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:21
Replying to @egourgoulhon:
The more I think about it, the more I am convinced that we shall not import anything from
instead of
In this way, we do not have to import |
comment:22
Replying to @tscrim:
Indeed.
In the current setting, the lazy import is no longer necessary (I have however kept it). Do you think the comment is still appropriate? Shall we revert to the direct import? What is the policy about lazy imports vs. direct imports. I've noticed that in the manifold part, all imports are lazy ones, except for the catalog, while here ( |
comment:23
Replying to @egourgoulhon:
I think that is a bad to false argument. The fact that this code means there is some interaction between the two. It is not that you want everything else to behave like a |
comment:24
Replying to @egourgoulhon:
It has to do with startup time. A lazy import means that it will not get resolved right away, which means things that are not needed at startup are not loaded. Since the manifolds has a lot of imports internally, we want to lazily import the block rather than do it at startup. While the import is usually not something we typically notice as humans, the startup time issue has a lot of these and is death by a 1000 needles. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:26
Replying to @tscrim:
True. Having to deal with a
so that for a vector field
Clearly, such a reorganization is beyond the scope of the current ticket and deserves its own ticket. So, for the time being, I've kept the import of
OK. As said above, we have now the explicit import of |
comment:27
Replying to @tscrim:
Thanks for your reply. It's clearly a good thing to set a lazy import for |
comment:28
Replying to @egourgoulhon:
This is not something of any real benefit as just that file is loaded (all of the other imports are done within the functions). The bigger things that need to be lazily imported are a lot of things in TL;DR. I wouldn't do that. |
comment:29
Replying to @egourgoulhon:
I will leave the higher level decisions to you on that. Just let me know what you want me to review.
Thank you. LGTM. |
comment:30
Thanks for the review and the discussion! |
Changed branch from public/manifolds/display_from_chart to |
Consider a manifold covered by two coordinate charts:
and define a vector field from its components in the manifold's default vector frame:
Currently (Sage 8.7), if we would like to express
v
in terms of the coordinates(u,v)
, we have to writeThis is because the first argument of
display
is the vector frame with respect to which the expansion ofv
is performed and the second argument is the chart in which the components are expressed. If the latter is omitted, the default chart is assumed:Now, it occurs quite often that one wants to express a tensor field entirely in terms of a given chart, i.e. with the components w.r.t. the coordinate frame associated to the chart and each component being expressed in terms of the coordinates of the chart. In Sage 8.7, if
Y
is not the default chart, this is possible only throughv.display(Y.frame(), Y)
. This ticket introduces the possibility to pass only the chart todisplay
, with the understanding that the vector frame with respect to which the expansion is to be performed is the coordinate frame associated with this chart. In other words,v.display(Y.frame(), Y)
can now be shorten tov.display(Y)
:CC: @tscrim
Component: geometry
Keywords: tensor field, coordinate frame
Author: Eric Gourgoulhon
Branch/Commit:
4060557
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/27655
The text was updated successfully, but these errors were encountered: