Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
TopologicalManifold._init_open_subset: Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 16, 2021
1 parent ef1614a commit 265b0e2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/sage/manifolds/manifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,29 @@ def open_subset(self, name, latex_name=None, coord_def={}):
return resu

def _init_open_subset(self, resu, coord_def):
r"""
Initialize ``resu`` as an open subset of ``self``.
INPUT:
- ``resu`` -- an instance of ``:class:`TopologicalManifold` or
a subclass.
- ``coord_def`` -- (default: {}) definition of the subset in
terms of coordinates; ``coord_def`` must a be dictionary with keys
charts on the manifold and values the symbolic expressions formed
by the coordinates to define the subset
EXAMPLES::
sage: M = Manifold(2, 'R^2', structure='topological')
sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2
sage: from sage.manifolds.manifold import TopologicalManifold
sage: U = TopologicalManifold(2, 'U', field=M._field, structure=M._structure, base_manifold=M)
sage: M._init_open_subset(U, coord_def={c_cart: x^2+y^2<1})
sage: U
Open subset U of the 2-dimensional topological manifold R^2
"""
resu._calculus_method = self._calculus_method
resu._supersets.update(self._supersets)
for sd in self._supersets:
Expand Down

0 comments on commit 265b0e2

Please sign in to comment.