3.1. Define a tensor

Now we can define tensors. In xTensor` we always work with tensor fields on zero, one or several manifolds, having indices on zero, one or several of their vbundles.

DefTensor                Define a tensor
UndefTensor                Undefine a tensor
xTensorQ                Check a tensor
$Tensors                List of defined tensors

Definition of tensors.

Define a tensor field T on M3 with two contravariant indices and one covariant index, and two other tensors. The actual indices used in the definition are irrelevant, and are only meant to specify the vbundle associated to each slot

In[106]:=

DefTensor[T[a, b, -c], M3]

** DefTensor: Defining tensor T[a, b, -c] .

In[107]:=

DefTensor[S[a, b], M3]

** DefTensor: Defining tensor S[a, b] .

In[108]:=

DefTensor[v[-a], M3]

** DefTensor: Defining tensor v[-a] .

Define a scalar field r (do not forget the empty pair of brackets!)

In[109]:=

DefTensor[r[], M3]

** DefTensor: Defining tensor r[] .

Define a tensor U on M3 and S2 with two contravariant indices and one covariant index, The tensor is also a function of the parameter time:

In[110]:=

DefTensor[U[a, b, -C], {M3, S2, time}]

** DefTensor: Defining tensor U[a, b, -C] .

The tensor is identified by a symbol and we shall associate to that symbol all definitions related to the tensor. This is internally done using UpSet (^=) rather than Set (=). The definitions can then be collected using ?

In[111]:=

? U

Global`U

Dagger[U]^=U
DependenciesOfTensor[U]^={time,M3,S2}
Info[U]^={tensor,}
PrintAs[U]^=U
SlotsOfTensor[U]^={TangentM3,TangentM3,-TangentS2}
SymmetryGroupOfTensor[U]^=StrongGenSet[{},GenSet[]]
TensorID[U]^={}
xTensorQ[U]^=True

A tensor can be undefined. Its properties are lost, and the symbol is removed.

In[112]:=

UndefTensor[U]

** UndefTensor: Undefined tensor U

In[113]:=

? U

Information :: notfound : Symbol U not found. More…

An object with indices on a given vbundle is considered to be necessarily a field on the base manifold of that vbundle. xTensor` checks that point. See the discussion below on Constant objects.

The tensor U with indices on vbundles TangentM3 and TangentS2 is defined to live only on M3. xTensor` adds the manifold S2 to the list DependenciesOfTensor[U].

In[114]:=

DefTensor[U[a, A], M3]

** DefTensor: Defining tensor U[a, A] .

In[115]:=

? U

Global`U

Dagger[U]^=U
DependenciesOfTensor[U]^={M3,S2}
Info[U]^={tensor,}
PrintAs[U]^=U
SlotsOfTensor[U]^={TangentM3,TangentS2}
SymmetryGroupOfTensor[U]^=StrongGenSet[{},GenSet[]]
TensorID[U]^={}
xTensorQ[U]^=True

In[116]:=

UndefTensor[U]

** UndefTensor: Undefined tensor U


Created by Mathematica  (May 16, 2008) Valid XHTML 1.1!