convert routines of the DifferentialGeometry package - Maple Programming Help

Home : Support : Online Help : Mathematics : DifferentialGeometry : DifferentialGeometry/Convert

convert routines of the DifferentialGeometry package

 Calling Sequence convert(A, DGArray) convert(B, DGvector) convert(C, DGform) convert(C, DGspinor) convert(E, DGtensor) convert(F, DGjet) convert(F, DGdiff) convert(G, DGbiform, bidegree)

Parameters

 A - a tensor B - a Matrix, a tensor, or the infinitesimal symmetry generators for a system of differential equations, as calculated by PDEtools:-Infinitesimals C - a differential form or a differential biform E - an Array, a vector, a differential form, or a spinor-tensor F - a Maple expression G - a differential form

Description

 • convert(A, DGArray) converts a rank r tensor A to an r-dimensional array.  For example, if A= a * dx1 &t dx2 &t dx3 and T = convert(A, DGArray), then T[1, 2, 3] = a and all other entries of T are 0.
 • If B is a square matrix, then convert(B, DGvector) returns a linear vector field.
 • If B is a a rank 1 contravariant tensor, then convert(B, DGvector) returns the corresponding vector field.
 • If B is a list of infinitesimal symmetry generators for a system of differential equations, as calculated by PDEtools:-Infinitesimals, then convert(B, DGvector) returns a list of vector fields.
 • If C is a rank 1 covariant tensor, then convert(B, DGform) returns a differential 1-form.
 • If C is a differential biform, that is, a form expressed in terms of the contact forms on a jet space, then convert(C, DGform) returns the differential form on jet space obtained by replacing the contact forms by their coordinate formulas.
 • If E is a spin-tensor, then convert(E, DGspinor, sigma, indexlist) converts tensorial indices of E to pairs of spinorial indices.
 • If E is an Array, then convert(E, DGtensor, indextype) converts E to an r-dimensional array.
 • If E is a vector field, then convert(E, DGtensor) converts E to a rank 1 contravariant tensor.
 • If E is a differential p-form, then convert(E, DGtensor) converts E to a rank p contravariant tensor.
 • If E is a spinor-tensor, convert(E, DGtensor, sigma, indexlist) converts pairs of spinorial indices of E to tensorial indices.
 • convert(F, DGjet) converts a Maple expression F involving the Maple command diff, applied to functions u(x, y, z, ...), v(x, y, z, ...), ... to the standard indexed notation for derivatives, for example, diff(u(x, y, z), x) -> u[1], diff(u(x, y, z), x, y, z, z) -> u[1, 2, 3, 3] etc.
 • convert(F, DGdiff) performs the inverse to the conversion command convert/DGjet: it converts expressions F involving the indexed notation for derivatives to expressions containing the Maple diff command.
 • convert(G, DGbiform) converts a differential p-form G, defined on a jet space J^k(M, N) , into a list of (p + 1)-biforms, Theta = [theta_0, theta_1, theta_2, .. theta_p], where theta_k has contact degree k, and G = theta_0 + theta_1 + theta_2 + ... + theta_p.

Examples

convert/DGArray

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$

Example 1.

We define a manifold M with coordinates [x, y, z]. On M we define two tensors T1 and T2.  We convert these tensors to a Maple Array

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $\mathrm{T1}≔\mathrm{evalDG}\left(\mathrm{D_z}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_x}+\mathrm{D_x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_y}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"con_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{1}\right]{,}{1}\right]\right]\right]\right)$ (1)
 > $\mathrm{T2}≔\mathrm{evalDG}\left(2\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\left(\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_z}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"con_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}\right]{,}{2}\right]{,}\left[\left[{3}{,}{3}{,}{1}\right]{,}{1}\right]\right]\right]\right)$ (2)
 > $\mathrm{A1}≔\mathrm{convert}\left(\mathrm{T1},\mathrm{DGArray}\right)$
 $\left[\begin{array}{rrr}0& 1& 0\\ 0& 0& 0\\ 1& 0& 0\end{array}\right]$ (3)
 > $\mathrm{A2}≔\mathrm{convert}\left(\mathrm{T2},\mathrm{DGArray}\right)$
 ${{\mathrm{_rtable}}}_{{18446884624618929798}}$ (4)
 > $\mathrm{A2}\left[1,1,2\right]$
 ${2}$ (5)

convert/DGvector

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{Tensor}\right):$

Example 1.

We define a manifold M with coordinates [x, y, z].  We convert a matrix to a linear vector field.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $A≔\mathrm{Matrix}\left(\left[\left[1,0,1\right],\left[0,2,0\right],\left[0,3,0\right]\right]\right)$
 $\left[\begin{array}{rrr}1& 0& 1\\ 0& 2& 0\\ 0& 3& 0\end{array}\right]$ (6)
 > $\mathrm{convert}\left(A,\mathrm{DGvector}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[{}\right]\right]{,}\left[\left[\left[{1}\right]{,}{x}{+}{z}\right]{,}\left[\left[{2}\right]{,}{2}{}{y}\right]{,}\left[\left[{3}\right]{,}{3}{}{y}\right]\right]\right]\right)$ (7)

Example 2.

We define a manifold M with coordinates [x, y, z].  On M we define two tensors T1 and T2 and contract the 1st and 3rd indices of T1 against the 1st and second indices of T2.  The result is a contravariant rank 1 tensor S on M.  We then convert S to a vector field X.

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$
 > $\mathrm{T1}≔\mathrm{evalDG}\left(2\left(\mathrm{dx}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dy}+\left(\mathrm{dz}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_z}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{dx}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"con_bas"}{,}{"cov_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}{,}{2}\right]{,}{2}\right]{,}\left[\left[{3}{,}{3}{,}{1}\right]{,}{1}\right]\right]\right]\right)$ (8)
 > $\mathrm{T2}≔\mathrm{evalDG}\left(\mathrm{D_z}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_x}+\mathrm{D_x}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&t\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{D_y}\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"con_bas"}{,}{"con_bas"}\right]{,}\left[{}\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{3}{,}{1}\right]{,}{1}\right]\right]\right]\right)$ (9)
 > $S≔\mathrm{ContractIndices}\left(\mathrm{T1},\mathrm{T2},\left[\left[1,1\right],\left[3,2\right]\right]\right)$
 ${\mathrm{_DG}}{}\left(\left[\left[{"tensor"}\right]\right]\right)$