tensor(deprecated)/get_compts - Maple Help

tensor

 get_compts
 return the components field of a tensor_type
 get_char
 return the index character field of a tensor_type
 get_rank
 return the rank of a tensor_type

 Calling Sequence get_compts(A) get_char(A) get_rank(A)

Parameters

 A - tensor_type object

Description

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 • The function get_compts(A) returns the components of the tensor_type A.
 • The function get_char(A) returns the index character of the tensor_type A.
 • The function get_rank(A) returns the rank of the tensor_type A.
 • These procedures are not absolutely necessary since the fields of any table can be accessed directly. However, they provide a uniform and controlled access of the information contained in the tensor_type data type.
 • These functions are part of the tensor package, and so can be used in the form get_compts(..) / get_char(..) only after performing the command with(tensor), or with(tensor, get_compts) / with(tensor, get_char).  These functions can always be accessed in the long form tensor[get_compts](..) / tensor[get_char](..).

Examples

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

Get the components, index character, and rank of the tensor T:

 > $\mathrm{with}\left(\mathrm{tensor}\right):$
 > $T≔\mathrm{create}\left(\left[1,-1\right],\mathrm{array}\left(\left[\left[w,x,0\right],\left[y,z,0\right],\left[0,{y}^{2},xyw\right]\right]\right)\right)$
 ${T}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{ccc}{w}& {x}& {0}\\ {y}& {z}& {0}\\ {0}& {{y}}^{{2}}& {x}{}{y}{}{w}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{1}{,}{-1}\right]\right]\right)$ (1)
 > $\mathrm{get_compts}\left(T\right)$
 $\left[\begin{array}{ccc}{w}& {x}& {0}\\ {y}& {z}& {0}\\ {0}& {{y}}^{{2}}& {x}{}{y}{}{w}\end{array}\right]$ (2)
 > $\mathrm{get_char}\left(T\right)$
 $\left[{1}{,}{-1}\right]$ (3)
 > $\mathrm{get_rank}\left(T\right)$
 ${2}$ (4)