def __init__(self, vector_field_module, name=None, latex_name=None, is_identity=False): r""" Construct a field of tangent-space automorphisms. TESTS:: sage: Manifold._clear_cache_() # for doctests only sage: M = Manifold(2, 'M') sage: X.<x,y> = M.chart() sage: a = M.automorphism_field(name='a') ; a field of tangent-space automorphisms 'a' on the 2-dimensional manifold 'M' sage: a[:] = [[1+x^2, x*y], [0, 1+y^2]] sage: a.parent() General linear group of the free module X(M) of vector fields on the 2-dimensional manifold 'M' sage: a.parent() is M.automorphism_field_group() True sage: TestSuite(a).run() """ FreeModuleAutomorphism.__init__(self, vector_field_module, name=name, latex_name=latex_name, is_identity=is_identity) # TensorFieldParal attributes: self._vmodule = vector_field_module self._domain = vector_field_module._domain self._ambient_domain = vector_field_module._ambient_domain # Initialization of derived quantities: TensorFieldParal._init_derived(self)
def _del_derived(self, del_restrictions=True): r""" Delete the derived quantities INPUT: - ``del_restrictions`` -- (default: True) determines whether the restrictions of ``self`` to subdomains are deleted. """ TensorFieldParal._del_derived(self, del_restrictions=del_restrictions) self._exterior_derivative = None
def _del_derived(self, del_restrictions=True): r""" Delete the derived quantities INPUT: - ``del_restrictions`` -- (default: True) determines whether the restrictions of ``self`` to subdomains are deleted. """ TensorFieldParal._del_derived(self, del_restrictions=del_restrictions) VectorField._del_derived(self) self._del_dependencies()
def __init__(self, vector_field_module, name=None, latex_name=None): FiniteRankFreeModuleElement.__init__(self, vector_field_module, name=name, latex_name=latex_name) # TensorFieldParal attributes: self._domain = vector_field_module._domain self._ambient_domain = vector_field_module._ambient_domain # VectorField attributes: self._vmodule = vector_field_module # Initialization of derived quantities: TensorFieldParal._init_derived(self) VectorField._init_derived(self) # Initialization of list of quantities depending on self: self._init_dependencies()
def _del_derived(self, del_restrictions=True): r""" Delete the derived quantities INPUT: - ``del_restrictions`` -- (default: True) determines whether the restrictions of ``self`` to subdomains are deleted. """ # Delete the derived quantities pertaining to the mother classes: FreeModuleAutomorphism._del_derived(self) TensorFieldParal._del_derived(self, del_restrictions=del_restrictions)
def __call__(self, *args): r""" Redefinition of :meth:`~sage.tensor.modules.free_module_tensor.FreeModuleTensor.__call__` to allow for domain treatment """ return TensorFieldParal.__call__(self, *args)
def _init_derived(self): r""" Initialize the derived quantities """ TensorFieldParal._init_derived(self) self._exterior_derivative = None
def restrict(self, subdomain, dest_map=None): r""" Return the restriction of ``self`` to some subset of its domain. If such restriction has not been defined yet, it is constructed here. This is a redefinition of :meth:`sage.geometry.manifolds.tensorfield.TensorFieldParal.restrict` to take into account the identity map. INPUT: - ``subdomain`` -- open subset `U` of ``self._domain`` (must be an instance of :class:`~sage.geometry.manifolds.domain.ManifoldOpenSubset`) - ``dest_map`` -- (default: ``None``) destination map `\Phi:\ U \rightarrow V`, where `V` is a subset of ``self._codomain`` (type: :class:`~sage.geometry.manifolds.diffmapping.DiffMapping`) If None, the restriction of ``self._vmodule._dest_map`` to `U` is used. OUTPUT: - instance of :class:`AutomorphismFieldParal` representing the restriction. EXAMPLES: Restriction of an automorphism field defined on `\RR^2` to a disk:: sage: M = Manifold(2, 'R^2') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2 sage: D = M.open_subset('D') # the unit open disc sage: c_cart_D = c_cart.restrict(D, x^2+y^2<1) sage: a = M.automorphism_field(name='a') ; a field of tangent-space automorphisms 'a' on the 2-dimensional manifold 'R^2' sage: a[:] = [[1, x*y], [0, 3]] sage: a.restrict(D) field of tangent-space automorphisms 'a' on the open subset 'D' of the 2-dimensional manifold 'R^2' sage: a.restrict(D)[:] [ 1 x*y] [ 0 3] Restriction to the disk of the field of tangent-space identity maps:: sage: id = M.tangent_identity_field() ; id field of tangent-space identity maps on the 2-dimensional manifold 'R^2' sage: id.restrict(D) field of tangent-space identity maps on the open subset 'D' of the 2-dimensional manifold 'R^2' sage: id.restrict(D)[:] [1 0] [0 1] sage: id.restrict(D) == D.tangent_identity_field() True """ if subdomain == self._domain: return self if subdomain not in self._restrictions: if not self._is_identity: return TensorFieldParal.restrict(self, subdomain, dest_map=dest_map) # Special case of the identity map: if not subdomain.is_subset(self._domain): raise ValueError("The provided domain is not a subset of " + "the field's domain.") if dest_map is None: dest_map = self._fmodule._dest_map.restrict(subdomain) elif not dest_map._codomain.is_subset(self._ambient_domain): raise ValueError("Argument dest_map not compatible with " + "self._ambient_domain") smodule = subdomain.vector_field_module(dest_map=dest_map) self._restrictions[subdomain] = smodule.identity_map() return self._restrictions[subdomain]