You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/galgebra_guide.rst
+52-36Lines changed: 52 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,6 +225,8 @@ Then
225
225
226
226
where :math:`\breve{a}_{i}` indicates that :math:`a_{i}` is to be deleted from the product. In the standard notation if a vector is denoted with a subscript the reciprocal vector is denoted with a superscript. The set of reciprocal vectors will be calculated if a coordinate set is given when a geometric algebra is instantiated since they are required for geometric differentiation when the ``Ga`` member function ``Ga.mvr()`` is called to return the reciprocal basis in terms of the basis vectors.
227
227
228
+
.. _sect_manifold:
229
+
228
230
Manifolds and Submanifolds
229
231
--------------------------
230
232
@@ -417,6 +419,8 @@ Additionally, one can calculate the connection of the normalized basis as follow
417
419
418
420
where :math:`{{\displaystyle\frac{\partial {{\eb}_{i}}}{\partial {x^{j}}}}}` is expanded in terms of the :math:`{\boldsymbol{\hat{e}}}_{i}`\ ’s.
The implementation of equations [splitopV] and [splitopM] is described in sections [makeMV] and [makeMVD].
588
+
The implementation of equations :math:`\ref{splitopV}` and :math:`\ref{splitopM}` is described in sections :ref:`makeMV` and :ref:`makeMVD`.
589
+
590
+
.. _Ltrans:
585
591
586
592
Linear Transformations/Outermorphisms
587
593
-------------------------------------
@@ -685,6 +691,8 @@ that has the proper symmetry for self adjoint transformations :math:`(a\cdot{{T}
685
691
686
692
Any program/code that represents :math:`T` should allow one to define :math:`T` in terms of :math:`T_{ij}` or :math:`T_{j}^{l}` and likewise given a linear transformation :math:`T` obtain both :math:`T_{ij}` and :math:`T_{j}^{l}` from it. Please note that these considerations come into play for any non-Euclidean metric with respect to the trace and adjoint of a linear transformation since calculating either requires a dot product.
687
693
694
+
.. _MLtrans:
695
+
688
696
Multilinear Functions
689
697
---------------------
690
698
@@ -728,7 +736,7 @@ The arguments (vectors) of the multilinear function can be represented in terms
Equation ([vrep]) gives :math:`a_{j}` in terms of the basis vectors and eq ([rvrep]) in terms of the reciprocal basis vectors. The index :math:`j` refers to the argument slot and the indices :math:`i_{j}` the components of the vector in terms of the basis. The covariant representation of the tensor is defined by
739
+
Equation (:math:`\ref{vrep}`) gives :math:`a_{j}` in terms of the basis vectors and eq (:math:`\ref{rvrep}`) in terms of the reciprocal basis vectors. The index :math:`j` refers to the argument slot and the indices :math:`i_{j}` the components of the vector in terms of the basis. The covariant representation of the tensor is defined by
Equation ([114a]) is the standard formula for contraction between upper and lower indexes of a mixed tensor.
823
+
Equation (:math:`\ref{114a}`) is the standard formula for contraction between upper and lower indexes of a mixed tensor.
816
824
817
825
Finally if :math:`{{T}\lp {a_{1},\dots,a_{r}} \rp }` is a tensor field (implicitly a function of position) the tensor derivative is defined as
818
826
@@ -993,19 +1001,23 @@ The basic geometric algebra operations will be implemented in python by defining
993
1001
994
1002
.. math:: \be F +\sum_{r=1}^{n}F^{i_{1}\dots i_{r}}\eb_{i_{1}}\dots\eb_{i_{r}} \ee
995
1003
996
-
where the :math:`F`\ ’s are *sympy* symbolic constants or functions of the coordinates and a multivector class, *Mv*, that wraps *Ga* and overloads the python operators to provide all the needed multivector operations as shown in Table [ops] where :math:`A` and :math:`B` are any two multivectors (In the case of :math:`+`, :math:`-`, :math:`*`, :math:`{\wedge}`, :math:`|`, :math:`<`, and :math:`>` the operation is also defined if :math:`A` or :math:`B` is a *sympy* symbol or a *sympy* real
1004
+
where the :math:`F`\ ’s are *sympy* symbolic constants or functions of the coordinates and a multivector class, *Mv*, that wraps *Ga* and overloads the python operators to provide all the needed multivector operations as shown in Table :ref:`ops` where :math:`A` and :math:`B` are any two multivectors (In the case of :math:`+`, :math:`-`, :math:`*`, :math:`{\wedge}`, :math:`|`, :math:`<`, and :math:`>` the operation is also defined if :math:`A` or :math:`B` is a *sympy* symbol or a *sympy* real
where :math:`A_{r}` is a multivector of grade :math:`r` and :math:`b` is a vector. For our example basis the result is shown in Table [bladexpand].
1196
+
where :math:`A_{r}` is a multivector of grade :math:`r` and :math:`b` is a vector. For our example basis the result is shown in Table :ref:`bladexpand`.
1183
1197
1184
-
[h]
1185
-
1186
-
.. code:: python
1198
+
.. code-block:: python
1199
+
:caption: Blade expansions
1200
+
:name: bladexpand
1187
1201
1188
1202
1=1
1189
1203
a0 = a0
@@ -1194,11 +1208,11 @@ where :math:`A_{r}` is a multivector of grade :math:`r` and :math:`b` is a vecto
The important thing to notice about Table :ref:`bladexpand` is that it is a triagonal (lower triangular) system of equations so that using a simple back substitution algorithm we can solve for the pseudo bases in terms of the blades giving Table :ref:`baseexpand`.
1198
1212
1199
-
The important thing to notice about Table [bladexpand] is that it is a triagonal (lower triangular) system of equations so that using a simple back substitution algorithm we can solve for the pseudo bases in terms of the blades giving Table [baseexpand].
1200
-
1201
-
.. code:: python
1213
+
.. code-block:: python
1214
+
:caption: Base expansions
1215
+
:name: baseexpand
1202
1216
1203
1217
1=1
1204
1218
a0 = a0
@@ -1209,9 +1223,7 @@ The important thing to notice about Table [bladexpand] is that it is a triagona
Using Table [baseexpand] and simple substitution we can convert from a base multivector representation to a blade representation. Likewise, using Table [bladexpand] we can convert from blades to bases.
1226
+
Using Table :ref:`baseexpand` and simple substitution we can convert from a base multivector representation to a blade representation. Likewise, using Table :ref:`bladexpand` we can convert from blades to bases.
1215
1227
1216
1228
Using the blade representation it becomes simple to program functions that will calculate the grade projection, reverse, even, and odd multivector functions.
1217
1229
@@ -1252,7 +1264,7 @@ The geometric algebra class is instantiated with
The ``basis`` and ``g`` parameters were described in section [BasisMetric]. If the metric is a function of position, if we have multivector fields, or we wish to calculate geometric derivatives a coordinate set, ``coords``, is required. ``coords`` is a list of *sympy* symbols. For the case of instantiating a 3-d geometric algebra in spherical coordinates we have
1267
+
The ``basis`` and ``g`` parameters were described in section :ref:`BasisMetric`. If the metric is a function of position, if we have multivector fields, or we wish to calculate geometric derivatives a coordinate set, ``coords``, is required. ``coords`` is a list of *sympy* symbols. For the case of instantiating a 3-d geometric algebra in spherical coordinates we have
1256
1268
1257
1269
.. code:: python
1258
1270
@@ -1321,7 +1333,7 @@ In addition to the basis vectors, if coordinates are defined for the geometric a
1321
1333
1322
1334
(grad,rgrad) = sp3d.grads()
1323
1335
1324
-
for the spherical 3-d geometric algebra. The left derivative :math:`{\lp {{\texttt{grad}} ={\boldsymbol{\nabla}}} \rp }` and the right derivative :math:`{\lp {{\texttt{rgrad}} = {\boldsymbol{\bar{\nabla}}}} \rp }` have been explained in section [ldops]. Again the names ``grad`` and ``rgrad`` used in a program are whatever the user chooses them to be. In the previous example ``grad`` and ``rgrad`` are used.
1336
+
for the spherical 3-d geometric algebra. The left derivative :math:`{\lp {{\texttt{grad}} ={\boldsymbol{\nabla}}} \rp }` and the right derivative :math:`{\lp {{\texttt{rgrad}} = {\boldsymbol{\bar{\nabla}}}} \rp }` have been explained in section :ref:`ldops`. Again the names ``grad`` and ``rgrad`` used in a program are whatever the user chooses them to be. In the previous example ``grad`` and ``rgrad`` are used.
for the instantiation of various objects from the ``Ga`` class. This means that in order to instantiate any of these objects we need only to import ``Ga`` into our program.
1363
1375
1376
+
.. _makeMV:
1377
+
1364
1378
Instantiating a Multivector
1365
1379
---------------------------
1366
1380
@@ -1441,7 +1455,7 @@ If one wished to calculate the left and right geometric derivatives of ``F`` and
1441
1455
dFrop = rgrad*F
1442
1456
dBrop = rgrad*B
1443
1457
1444
-
``dFop``, ``dBop``, ``dFrop``, and ``dBrop`` are all multivector differential operators (again see section [ldops]).
1458
+
``dFop``, ``dBop``, ``dFrop``, and ``dBrop`` are all multivector differential operators (again see section :ref:`ldops`).
1445
1459
1446
1460
Backward Compatibility Class MV
1447
1461
-------------------------------
@@ -1714,6 +1728,8 @@ Basic Multivector Functions
1714
1728
1715
1729
If ``A`` is a multivector return ``A.rotate_multivector(itheta,hint)`` where ``itheta`` is the bi-vector blade defining the rotation. For the use of ``hint`` see the member function ``Mv.rotate_multivector(self,itheta,hint)``.
1716
1730
1731
+
.. _makeMVD:
1732
+
1717
1733
Multivector Derivatives
1718
1734
-----------------------
1719
1735
@@ -1766,7 +1782,7 @@ all return multivector linear differential operators.
1766
1782
Submanifolds
1767
1783
------------
1768
1784
1769
-
In general the geometric algebra that the user defines exists on the tangent space of a manifold (see section [sect_manifold]). The submanifold class, ``Sm``, is derived from the ``Ga`` class and allows one to define a submanifold of a manifold by defining a coordinate mapping between the submanifold coordinates and the manifold coordinates. What is returned as the submanifold is the geometric algebra of the tangent space of the submanifold. The submanifold for a geometric algebra is
1785
+
In general the geometric algebra that the user defines exists on the tangent space of a manifold (see section :ref:`sect_manifold`). The submanifold class, ``Sm``, is derived from the ``Ga`` class and allows one to define a submanifold of a manifold by defining a coordinate mapping between the submanifold coordinates and the manifold coordinates. What is returned as the submanifold is the geometric algebra of the tangent space of the submanifold. The submanifold for a geometric algebra is
1770
1786
instantiated with
1771
1787
1772
1788
``Ga.sm(map,coords,root='e',norm=False)``
@@ -1790,7 +1806,7 @@ instantiated with
1790
1806
Linear Transformations
1791
1807
----------------------
1792
1808
1793
-
The mathematical background for linear transformations is in section [Ltrans]. Linear transformations on the tangent space of the manifold are instantiated with the ``Ga`` member function ``lt`` (the actual class being instantiated is ``Lt``) as shown in lines 12, 20, 26, and 44 of the code listing ``Ltrans.py``. In all of the examples in ``Ltrans.py`` the default instantiation is used which produces a general (all the coefficients of the linear transformation are symbolic constants) linear
1809
+
The mathematical background for linear transformations is in section :ref:`Ltrans`. Linear transformations on the tangent space of the manifold are instantiated with the ``Ga`` member function ``lt`` (the actual class being instantiated is ``Lt``) as shown in lines 12, 20, 26, and 44 of the code listing ``Ltrans.py``. In all of the examples in ``Ltrans.py`` the default instantiation is used which produces a general (all the coefficients of the linear transformation are symbolic constants) linear
1794
1810
transformation. *Note that to instantiate linear transformations coordinates, :math:`{\left \{ {{\eb}_{i}} \rbrc}`, must be defined when the geometric algebra associated with the linear transformation is instantiated. This is due to the naming conventions of the general linear transformation (coordinate names are used) and for the calculation of the trace of the linear transformation which requires taking a divergence.* To instantiate a specific linear transformation the usage of ``lt()`` is
1795
1811
``Ga.lt(M,f=False,mode='g')``
1796
1812
@@ -1861,7 +1877,7 @@ The output of this code is.
1861
1877
Differential Operators
1862
1878
----------------------
1863
1879
1864
-
For the mathematical treatment of linear multivector differential operators see section [ldops]. The is a differential operator class ``Dop``. However, one never needs to use it directly. The operators are constructed from linear combinations of multivector products of the operators ``Ga.grad`` and ``Ga.rgrad`` as shown in the following code for both orthogonal rectangular and spherical 3-d coordinate systems.
1880
+
For the mathematical treatment of linear multivector differential operators see section :ref:`ldops`. The is a differential operator class ``Dop``. However, one never needs to use it directly. The operators are constructed from linear combinations of multivector products of the operators ``Ga.grad`` and ``Ga.rgrad`` as shown in the following code for both orthogonal rectangular and spherical 3-d coordinate systems.
1865
1881
1866
1882
.. literalinclude:: python/Dop.py
1867
1883
@@ -1874,7 +1890,7 @@ Note that for print an operator in the IPython notebook one must implement (yet
1874
1890
Instantiating a Multi-linear Functions (Tensors)
1875
1891
------------------------------------------------
1876
1892
1877
-
The mathematical background for multi-linear functions is in section [MLtrans]. To instantiate a multi-linear function use
1893
+
The mathematical background for multi-linear functions is in section :ref:`MLtrans`. To instantiate a multi-linear function use
1878
1894
1879
1895
``Mlt(self, f, Ga, nargs=None, fct=False)``
1880
1896
@@ -1898,7 +1914,7 @@ The mathematical background for multi-linear functions is in section [MLtrans].
1898
1914
Basic Multilinear Function Class Functions
1899
1915
------------------------------------------
1900
1916
1901
-
If we can instantiate multilinear functions we can use all the multilinear function class functions as described as follows. See section [MLtrans] for the mathematical description of each operation.
1917
+
If we can instantiate multilinear functions we can use all the multilinear function class functions as described as follows. See section :ref:`MLtrans` for the mathematical description of each operation.
1902
1918
1903
1919
``self(kargs)``
1904
1920
@@ -1914,7 +1930,7 @@ If we can instantiate multilinear functions we can use all the multilinear funct
1914
1930
1915
1931
``self.cderiv()``
1916
1932
1917
-
Returns covariant derivative of tensor field. If ``T`` is a tensor of rank :math:`k` then ``T.cderiv()`` is a tensor of rank :math:`k+1`. The operation performed is defined in section [MLtrans].
1933
+
Returns covariant derivative of tensor field. If ``T`` is a tensor of rank :math:`k` then ``T.cderiv()`` is a tensor of rank :math:`k+1`. The operation performed is defined in section :ref:`MLtrans`.
1918
1934
1919
1935
Standard Printing
1920
1936
-----------------
@@ -2116,7 +2132,7 @@ Since the expressions for multivectors or differential operators can be very lon
If l is a list or tuple to print in the LaTeX environment use the command
@@ -2226,7 +2242,7 @@ Since the expressions for multivectors or differential operators can be very lon
2226
2242
Preprocessing do not occur for the Ipython notebook and the string post processing commands ``%`` and ``#`` are not used in this case.
2227
2243
2228
2244
.. [26]
2229
-
The formatting of each element is respected as applied by ``A.Fmt(fmt=1,2, or 3)`` where ``A`` is an element of ``obj``\ so that if multivector/differential operation have been formatted to print on multiple lines it will printed on multiple lines.[Fmt_format]
2245
+
The formatting of each element is respected as applied by ``A.Fmt(fmt=1,2, or 3)`` where ``A`` is an element of ``obj``\ so that if multivector/differential operation have been formatted to print on multiple lines it will printed on multiple lines.
0 commit comments