Exemple #1
0
    def __init__(self, chart1, chart2, *transformations):
        r"""
        Construct a transition map.

        TESTS::

            sage: M = Manifold(2, 'M')
            sage: X.<x,y> = M.chart()
            sage: Y.<u,v> = M.chart()
            sage: X_to_Y = X.transition_map(Y, [x+y, x-y])
            sage: X_to_Y
            Change of coordinates from Chart (M, (x, y)) to Chart (M, (u, v))
            sage: type(X_to_Y)
            <class 'sage.manifolds.differentiable.chart.DiffCoordChange'>
            sage: TestSuite(X_to_Y).run(skip='_test_pickling')

        .. TODO::

            fix _test_pickling

        """
        CoordChange.__init__(self, chart1, chart2, *transformations)
        # Jacobian matrix:
        self._jacobian  = self._transf.jacobian()
        # Jacobian determinant:
        if self._n1 == self._n2:
            self._jacobian_det = self._transf.jacobian_det()
Exemple #2
0
    def __init__(self, chart1, chart2, *transformations):
        r"""
        Construct a transition map.

        TESTS::

            sage: M = Manifold(2, 'M')
            sage: X.<x,y> = M.chart()
            sage: Y.<u,v> = M.chart()
            sage: X_to_Y = X.transition_map(Y, [x+y, x-y])
            sage: X_to_Y
            Change of coordinates from Chart (M, (x, y)) to Chart (M, (u, v))
            sage: type(X_to_Y)
            <class 'sage.manifolds.differentiable.chart.DiffCoordChange'>
            sage: TestSuite(X_to_Y).run(skip='_test_pickling')

        .. TODO::

            fix _test_pickling

        """
        CoordChange.__init__(self, chart1, chart2, *transformations)
        # Jacobian matrix:
        self._jacobian = self._transf.jacobian()
        # Jacobian determinant:
        if self._n1 == self._n2:
            self._jacobian_det = self._transf.jacobian_det()
        # If the two charts are on the same open subset, the Jacobian matrix is
        # added to the dictionary of changes of frame:
        if chart1._domain == chart2._domain:
            domain = chart1._domain
            frame1 = chart1._frame
            frame2 = chart2._frame
            vf_module = domain.vector_field_module()
            ch_basis = vf_module.automorphism()
            ch_basis.add_comp(frame1)[:, chart1] = self._jacobian
            ch_basis.add_comp(frame2)[:, chart1] = self._jacobian
            vf_module._basis_changes[(frame2, frame1)] = ch_basis
            for sdom in domain._supersets:
                sdom._frame_changes[(frame2, frame1)] = ch_basis
            # The inverse is computed only if it does not exist already
            # (because if it exists it may have a simpler expression than that
            #  obtained from the matrix inverse)
            if (frame1, frame2) not in vf_module._basis_changes:
                ch_basis_inv = ch_basis.inverse()
                vf_module._basis_changes[(frame1, frame2)] = ch_basis_inv
                for sdom in domain._supersets:
                    sdom._frame_changes[(frame1, frame2)] = ch_basis_inv
Exemple #3
0
    def __init__(self, chart1, chart2, *transformations):
        r"""
        Construct a transition map.

        TESTS::

            sage: M = Manifold(2, 'M')
            sage: X.<x,y> = M.chart()
            sage: Y.<u,v> = M.chart()
            sage: X_to_Y = X.transition_map(Y, [x+y, x-y])
            sage: X_to_Y
            Change of coordinates from Chart (M, (x, y)) to Chart (M, (u, v))
            sage: type(X_to_Y)
            <class 'sage.manifolds.differentiable.chart.DiffCoordChange'>
            sage: TestSuite(X_to_Y).run(skip='_test_pickling')

        .. TODO::

            fix _test_pickling

        """
        CoordChange.__init__(self, chart1, chart2, *transformations)
        # Jacobian matrix:
        self._jacobian  = self._transf.jacobian()
        # If the two charts are on the same open subset, the Jacobian matrix is
        # added to the dictionary of changes of frame:
        if chart1._domain == chart2._domain:
            domain = chart1._domain
            frame1 = chart1._frame
            frame2 = chart2._frame
            vf_module = domain.vector_field_module()
            ch_basis = vf_module.automorphism()
            ch_basis.add_comp(frame1)[:, chart1] = self._jacobian
            ch_basis.add_comp(frame2)[:, chart1] = self._jacobian
            vf_module._basis_changes[(frame2, frame1)] = ch_basis
            for sdom in domain._supersets:
                sdom._frame_changes[(frame2, frame1)] = ch_basis
            # The inverse is computed only if it does not exist already
            # (because if it exists it may have a simpler expression than that
            #  obtained from the matrix inverse)
            if (frame1, frame2) not in vf_module._basis_changes:
                ch_basis_inv = ch_basis.inverse()
                vf_module._basis_changes[(frame1, frame2)] = ch_basis_inv
                for sdom in domain._supersets:
                    sdom._frame_changes[(frame1, frame2)] = ch_basis_inv