summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-06-23 17:32:12 +0200
committerEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-06-23 17:32:12 +0200
commit26fc318bbacfc9a27049a9397d43402975525820 (patch)
tree81e9241ca56a1ac844bc9a7fa24afc10849dfb19
parentIntroduce Chart._init_coordinates() to simplify constructors of Chart and Rea... (diff)
Modifications in CoordChange to allow for subclasses.
-rw-r--r--src/sage/manifolds/chart.py14
-rw-r--r--src/sage/manifolds/manifold.py18
2 files changed, 13 insertions, 19 deletions
diff --git a/src/sage/manifolds/chart.py b/src/sage/manifolds/chart.py
index 08fe4eb..46dd7d3 100644
--- a/src/sage/manifolds/chart.py
+++ b/src/sage/manifolds/chart.py
@@ -34,9 +34,7 @@ REFERENCES:
from sage.structure.sage_object import SageObject
from sage.structure.unique_representation import UniqueRepresentation
-from sage.structure.element import RingElement
from sage.symbolic.ring import SR
-from sage.rings.integer import Integer
from sage.rings.infinity import Infinity
from sage.misc.latex import latex
from sage.manifolds.manifold import TopManifold
@@ -1813,7 +1811,7 @@ class CoordChange(SageObject):
"transformation; use set_inverse() to set the inverse " +
"manually")
x2_to_x1 = list_x2_to_x1[0]
- self._inverse = CoordChange(self._chart2, self._chart1, *x2_to_x1)
+ self._inverse = self.__class__(self._chart2, self._chart1, *x2_to_x1)
return self._inverse
@@ -1871,8 +1869,8 @@ class CoordChange(SageObject):
check = kwds['check']
else:
check = True
- self._inverse = CoordChange(self._chart2, self._chart1,
- *transformations)
+ self._inverse = self.__class__(self._chart2, self._chart1,
+ *transformations)
if check:
print "Check of the inverse coordinate transformation:"
x1 = self._chart1._xx
@@ -1922,7 +1920,7 @@ class CoordChange(SageObject):
# transf = self(*(other._transf.expr()))
#*# for now:
transf = self(*(other._transf))
- return CoordChange(other._chart1, self._chart2, *transf)
+ return self.__class__(other._chart1, self._chart2, *transf)
def restrict(self, dom1, dom2=None):
r"""
@@ -1956,10 +1954,10 @@ class CoordChange(SageObject):
if dom2 is None:
dom2 = dom1
#*# when MultiCoordFunction will be implemented (trac #18640):
- # return CoordChange(self._chart1.restrict(dom1),
+ # return self.__class__(self._chart1.restrict(dom1),
# self._chart2.restrict(dom2), *(self._transf.expr()))
#*# for now:
- return CoordChange(self._chart1.restrict(dom1),
+ return self.__class__(self._chart1.restrict(dom1),
self._chart2.restrict(dom2), *(self._transf))
def display(self):
diff --git a/src/sage/manifolds/manifold.py b/src/sage/manifolds/manifold.py
index 4eef364..c221802 100644
--- a/src/sage/manifolds/manifold.py
+++ b/src/sage/manifolds/manifold.py
@@ -255,6 +255,7 @@ REFERENCES:
- J.M. Lee : *Introduction to Topological Manifolds*, 2nd ed., Springer (New
York) (2011)
+- D. Huybrechts : *Complex Geometry*, Springer (Berlin) (2005)
"""
@@ -268,7 +269,6 @@ REFERENCES:
# http://www.gnu.org/licenses/
#*****************************************************************************
-from sage.structure.unique_representation import UniqueRepresentation
from sage.categories.fields import Fields
#*# Before #18175:
from sage.categories.sets_cat import Sets
@@ -302,12 +302,12 @@ class TopManifold(TopManifoldSubset):
- 'real' for a manifold over `\RR`
- 'complex' for a manifold over `\CC`
- - any object in the category of fields (see
+ - an object in the category of fields (see
:class:`~sage.categories.fields.Fields`) for more general manifolds
- ``start_index`` -- (default: 0) integer; lower value of the range of
indices used for "indexed objects" on the manifold, e.g. coordinates
- in a chart.
+ in a chart
- ``category`` -- (default: ``None``) to specify the categeory; the
default being ``Sets()`` (``Manifolds()`` after :trac:`18175` is
implemented)
@@ -475,15 +475,9 @@ class TopManifold(TopManifoldSubset):
# that are not subcharts of charts on larger subsets
self._def_chart = None # default chart
self._coord_changes = {} # dictionary of transition maps
- # list of charts that individually cover self, i.e. whose
+ # List of charts that individually cover self, i.e. whose
# domains are self (if non-empty, self is a coordinate domain):
self._covering_charts = []
- # algebra of scalar fields defined on self:
- #*# self._scalar_field_algebra = ScalarFieldAlgebra(self)
- # the zero scalar field:
- #*# self._zero_scalar_field = self._scalar_field_algebra.zero()
- # the identity map on self:
- #*# self._identity_map = Hom(self, self).one()
def _repr_(self):
r"""
@@ -1123,7 +1117,9 @@ class TopManifold(TopManifoldSubset):
Create an open subset of the manifold.
An open subset is a set that is (i) included in the manifold and (ii)
- open with respect to the manifold's topology.
+ open with respect to the manifold's topology. It is a topological
+ manifold by itself. Hence the returned object is an instance of
+ :class:`TopManifold`.
INPUT: