1 | initial version |
Well, I would say that this is caused by a somewhat strange operation that you are asking for. When you write
v = E.vector_field([r_1,0,0], frame=spherf, chart=cart)
v.apply_map(lambda c:c.subs(ph==ph_1, th==th_1))
you are initializing the vector field with components in the frame spherf
(orthonormal frame associated with spherical coordinates), while the second line asks for an apply_map
in the default frame, which is cartf
. But at this stage, such components are not known. Such a substitution is thus not very meaningful. If you add v.display()
before v.apply_map
, as in your second example, this triggers the computations of the components with respect to cartf
, so that the substitution becomes meaningful. If you want to stick to the first example, then you enforce apply_map
to act on the components w.r.t spherf
, by adding the argument frame=spherf
:
v = E.vector_field([r_1,0,0], frame=spherf, chart=cart)
v.apply_map(lambda c:c.subs(ph==ph_1, th==th_1), frame=spherf)
Then everything is OK.
2 | No.2 Revision |
Well, I would say that this is caused by a somewhat strange operation that you are asking for. When you write
v = E.vector_field([r_1,0,0], frame=spherf, chart=cart)
v.apply_map(lambda c:c.subs(ph==ph_1, th==th_1))
you are initializing the vector field with components in the frame spherf
(orthonormal frame associated with spherical coordinates), while the second line asks for an apply_map
in the default frame, which is cartf
. But at this stage, such components are not known. Such a substitution is thus not very meaningful. If you add v.display()
before v.apply_map
, as in your second example, this triggers the computations computation of the components with respect to cartf
, so that the substitution becomes meaningful. If you want to stick to the first example, then you enforce apply_map
to act on the components w.r.t spherf
, by adding the argument frame=spherf
:
v = E.vector_field([r_1,0,0], frame=spherf, chart=cart)
v.apply_map(lambda c:c.subs(ph==ph_1, th==th_1), frame=spherf)
Then everything is OK.
3 | No.3 Revision |
Well, I would say that this is caused by a somewhat strange operation that you are asking for. When you write
v = E.vector_field([r_1,0,0], frame=spherf, chart=cart)
v.apply_map(lambda c:c.subs(ph==ph_1, th==th_1))
you are initializing the vector field with components in the frame spherf
(orthonormal frame associated with spherical coordinates), while the second line asks for an apply_map
in the default frame, which is cartf
. But at this stage, such components are not known. Such a substitution is thus not very meaningful. If you add v.display()
before v.apply_map
, as in your second example, this triggers the computation of the components with respect to cartf
, so that the substitution becomes meaningful. If you want to stick to the first example, then you should enforce apply_map
to act on the components w.r.t spherf
, by adding the argument frame=spherf
:
v = E.vector_field([r_1,0,0], frame=spherf, chart=cart)
v.apply_map(lambda c:c.subs(ph==ph_1, th==th_1), frame=spherf)
Then everything is OK.