convert routines of the DifferentialGeometry package - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

convert routines of the DifferentialGeometry package

 

Calling Sequence

Parameters

Description

Examples

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) will convert 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) will return a linear vector field.

• 

If B is a a rank 1 contravariant tensor, then convert(B, DGvector) will return 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) will return a list of vector fields.

• 

If C is a rank 1 covariant tensor, then convert(B, DGform) will return 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) will return 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) will convert tensorial indices of E to pairs of spinorial indices.

• 

If E is an Array, then convert(E, DGtensor, indextype) will convert E to an r-dimensional array.

• 

If E is a vector field, then convert(E, DGtensor) will convert E to a rank 1 contravariant tensor.

• 

If E is a differential p-form, then convert(E, DGtensor) will convert E to a rank p contravariant tensor.

• 

If E is a spinor-tensor, convert(E, DGtensor, sigma, indexlist) will convert pairs of spinorial indices of E to tensorial indices.

• 

convert(F, DGjet) will convert 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 will convert expressions F involving the indexed notation for derivatives to expressions containing the Maple  diff command.

• 

convert(G, DGbiform) will convert 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

withDifferentialGeometry:

 

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

DGsetupx,y,z,M:

T1evalDGD_z &t D_x+D_x &t D_y

T1D_xD_y+D_zD_x

(1)

T2evalDG2dx &t D_x &t dy+dz &t D_z &t dx

T22dxD_xdy+dzD_zdx

(2)

A1convertT1,DGArray

A1010000100

(3)

A2convertT2,DGArray

A2 1..3 x 1..3 x 1..3 ArrayData Type: anythingStorage: rectangularOrder: Fortran_order

(4)

A21,1,2

2

(5)

convert/DGvector

withDifferentialGeometry:withTensor:

 

Example 1.

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

DGsetupx,y,z,M:

AMatrix1,0,1,0,2,0,0,3,0

A101020030

(6)

convertA,DGvector

x+zD_x+2yD_y+3yD_z

(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 3 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.

DGsetupx,y,z,M:

T1evalDG2dx &t D_x &t dy+dz &t D_z &t dx

T12dxD_xdy+dzD_zdx

(8)

T2evalDGD_z &t D_x+D_x &t D_y

T2D_xD_y+D_zD_x

(9)

SContractIndicesT1,T2,1,1,3,2

S2D_x+D_z

(10)

XconvertS,DGvector

X2D_x+D_z

(11)

Tools:-DGinfoS,ObjectType,Tools:-DGinfoX,ObjectType

tensor,vector

(12)

lprintS,lprintX

_DG([["tensor", M, [["con_bas"], []]], [[[1], 2], [[3], 1]]])

_DG([["vector", M, []], [[[1], 2], [[3], 1]]])

 

Example 3.

We use the PDEtools:-Infinitesimals program to find the infinitesimals symmetries of a system of differential equations.  We convert the output of this program, which lists of the components of the infinitesimal symmetries, to a list of vector fields on the manifold of independent and dependent variables.

DE2yxux,y=vx,y2,2x2vx,y=ux,y

DE2yxux,y=vx,y2,2x2vx,y=ux,y

(13)

SymPDEtools:-InfinitesimalsDE,u,v

Sym_ξxx,y,u,v=0,_ξyx,y,u,v=1,_ηux,y,u,v=0,_ηvx,y,u,v=0,_ξxx,y,u,v=1,_ξyx,y,u,v=0,_ηux,y,u,v=0,_ηvx,y,u,v=0,_ξxx,y,u,v=0,_ξyx,y,u,v=y,_ηux,y,u,v=u,_ηvx,y,u,v=v,_ξxx,y,u,v=x,_ξyx,y,u,v=0,_ηux,y,u,v=5u,_ηvx,y,u,v=3v

(14)

DGsetupx,y,u,v,J,2

frame name: J

(15)

convertSym,DGvector

D_y,D_x,yD_yuD_uvD_v,xD_x5uD_u3vD_v

(16)

convert/DGform

withDifferentialGeometry:withTensor:

 

Example 1.

We define a manifold M with coordinates [x, y, z].  On M we define a tensor T and contract the 1st and 3rd indices of T.  The result is a covariant rank 1 tensor S on M.  We then convert S to a differential 1-form alpha.

DGsetupx,y,z,M:

T1evalDG2dx &t D_x &t dy+dz &t D_z &t dx

T12dxD_xdy+dzD_zdx

(17)

SContractIndicesT1,1,2

Sdx+2dy

(18)

XconvertS,DGform

Xdx+2dy

(19)

The  tensor S and the 1 form alpha both have the same external displays but are have different internal representations.  We can see this using DGinfo or lprint.

Tools:-DGinfoS,ObjectType,Tools:-DGinfoX,ObjectType

tensor,form

(20)

lprintS,lprintX

_DG([["tensor", M, [["cov_bas"], []]], [[[1], 1], [[2], 2]]])

_DG([["form", M, 1], [[[1], 1], [[2], 2]]])

 

Example 2.

DGsetupx,y,u,Jet,2:

θ1,θ2,θ3Cu[],Cu1,Cu2

θ1,θ2,θ3Cu,Cu1,Cu2

(21)

convertθ1,DGform

u1dxu2dy+du

(22)

convertθ2,DGform

u1,1dxu1,2dy+du1

(23)

convertθ3,DGform

u1,2dxu2,2dy+du2

(24)

convert/DGspinor

The solder form sigma is the fundamental spin-tensor in spinor algebra.  It provides for a 1-1 correspondence between vectors and rank 2 Hermitian spinors. The convert/DGspinor uses a user-specified solder form to convert tensor indices of a given spinor-tensor to pairs of spinor indices.

withDifferentialGeometry:withTensor:

To illustrate this convert procedure we first construct a solder form. Define a vector bundle over M with base coordinates [x, y, z, t] and fiber coordinates [z1, z2, w1, w2].

DGsetupt,x,y,z,z1,z2,w1,w2,M

frame name: M

(25)

Define a spacetime metric g on M. Our spinor conventions assume the metric has signature [1, -1, -1, -1].

gevalDGdt &t dtdx &t dxdy &t dydz &t dz

gdtdtdxdxdydydzdz

(26)

Define an orthonormal frame on M with respect to the metric g.

FD_t,D_x,D_y,D_z

FD_t,D_x,D_y,D_z

(27)

Calculate the solder form sigma from the frame F.  See Spinor, SolderForm.

σSolderFormF

σ2dt2D_z1D_w1+2dt2D_z2D_w2+2dx2D_z1D_w2+2dx2D_z2D_w1I22dyD_z1D_w2+I22dyD_z2D_w1+2dz2D_z1D_w12dz2D_z2D_w2

(28)

Example 1.

Define a vector X and convert it to a contravariant rank 2 spinor psi.  The convert/DGspinor command requires the solder form as a 3rd argument and a list of tensorial indices to be converted to spinorial indices as a 4th argument.

XevalDGaD_t+bD_y

XaD_t+bD_y

(29)

ψconvertX,DGspinor,σ,1

ψ2aD_z12D_w1I22bD_z1D_w2+I22bD_z2D_w1+2aD_z22D_w2

(30)

Example 2.

Define a rank 3 tensor and convert the 1st and 3rd indices to pairs of spinor indices to obtain a rank 5 spin-tensor chi. Note that the spinorial indices are moved to the right.

TevalDGD_x &t D_y &t dz

TD_xD_ydz

(31)

χconvertT,DGspinor,σ,1,3

χD_y2D_z1D_w2dz1dw1D_y2D_z1D_w2dz2dw2+D_y2D_z2D_w1dz1dw1D_y2D_z2D_w1dz2dw2

(32)

Example 3.

With the convert/DGspinor command, the spinor psi. can be converted back to the vector X and the spin-tensor chi back to the tensor T.

convertψ,DGtensor,σ,1,2

aD_t+bD_y

(33)

convertχ,DGtensor,σ,2,3,4,5

D_yD_xdz

(34)

convert/DGtensor

withDifferentialGeometry:withTensor:

 

We define a manifold M with coordinates [x, y, z].

DGsetupx,y,z,M:

 

Example 1.

We define a Matrix' A1 and convert it to a rank 2 tensor in 4 different ways:

A1Matrix1,0,2,0,2,4,1,0,0

A1102024100

(35)

convertA1,DGtensor,con_bas,con_bas,

D_xD_x+2D_xD_z+2D_yD_y+4D_yD_z+D_zD_x

(36)

convertA1,DGtensor,cov_bas,con_bas,

dxD_x+2dxD_z+2dyD_y+4dyD_z+dzD_x

(37)

convertA1,DGtensor,con_bas,cov_bas,

D_xdx+2D_xdz+2D_ydy+4D_ydz+D_zdx

(38)

convertA1,DGtensor,cov_bas,cov_bas,

dxdx+2dxdz+2dydy+4dydz+dzdx

(39)

Example 2.

We define an 4 dimensional array and convert it to a rank 4 covariant tensor.

A2Array1..3,1..3,1..3,1..3:

A21,2,2,3m

A21,