-
-
Notifications
You must be signed in to change notification settings - Fork 657
Description
(from #31901 comment:22)
This will remove the appearance of mutability of Chart
s.
Deprecated chart declaration:
sage: M = Manifold(2, 'M', structure='topological')
sage: X.<x,y> = M.chart()
sage: X.add_restrictions(x^2+y^2<1)
sage: X.add_restrictions(x>0)
Replacement 1 (implemented):
sage: var("x y")
sage: X.<x,y> = M.chart(coord_restrictions=[x^2+y^2<1, x>0])
Replacement 2:
sage: x, y = M.var()
sage: X.<x,y> = M.chart(coord_restrictions=[x^2+y^2<1, x>0])
(x
, y
defined in the first line would be some temporary placeholder variables.)
Replacement 3 (implemented):
sage: in_disk(x,y) = x^2+y^2<1
sage: on_right(x,y) = x>0
sage: X.<x,y> = M.chart(coord_restrictions=[in_disk, on_right])
Replacement 4:
sage: X.<x,y> = M.chart(coord_restrictions=[lambda x,y: x^2+y^2<1, lambda x,y: x>0])
(chart initialization calls the lambdas on the symbolic variables x, y to get the symbolic relations)
Replacement 5 (implemented):
sage: X.<x,y> = M.chart(coord_restrictions=lambda x,y: [x^2+y^2<1, x>0])
(chart initialization calls the lambda on the symbolic variables x, y to get the list of symbolic relations)
Depends on #32116
Depends on #32009
CC: @egourgoulhon @mjungmath @tscrim @vbraun
Component: manifolds
Author: Matthias Koeppe
Branch/Commit: u/mkoeppe/chart__add_init_argument_coord_restrictions__deprecate_method_add_restrictions @ c218828
Reviewer: Eric Gourgoulhon
Issue created by migration from https://trac.sagemath.org/ticket/32102