Convert - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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) 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

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

_DGtensor,M,con_bas,con_bas,,1,2,1,3,1,1

(1)

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

_DGtensor,M,cov_bas,con_bas,cov_bas,,1,1,2,2,3,3,1,1

(2)

A1convertT1,DGArray

010000100

(3)

A2convertT2,DGArray

A21,1,2

2

(4)

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

101020030

(5)

convertA,DGvector

_DGvector,M,,1,x+z,2,2y,3,3y

(6)

 

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.

DGsetupx,y,z,M:

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

_DGtensor,M,cov_bas,con_bas,cov_bas,,1,1,2,2,3,3,1,1

(7)

T2evalDGD_z &t D_x+D_x &t D_y

_DGtensor,M,con_bas,con_bas,,1,2,1,3,1,1

(8)

SContractIndicesT1,T2,1,1,3,2

_DGtensor,M,con_bas,,1,2,3,1

(9)

XconvertS,DGvector

_DGvector,M,,1,2,3,1

(10)

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

tensor,vector

(11)

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,2x2v