| Data types in the atlas package Description: - In the atlas package any identifier is treated as 0-form i.e. as non-constant scalar (if it not declared as constant, p-form, tensor etc). To declare a variable as a constant, vector, tensor or p-form use atlas[Constants] , atlas[Vectors] , atlas[Tensors] , atlas[Forms] , respectively. To find out information about indexing facilities of the package see atlas[indexing] .
- The atlas package uses its own data types, called const, scalar, vect, tensor, form, func, domain, mapping, coframe, frame to represent corresponding objects. Use type to check the corresponding types.
Examples: restart: with(atlas): Declare some constants: Constants(lambda,alpha[1],C); ![{Catalan, I, _Z, Pi, lambda, C, -I, alpha[1]}](prod/atlas/help/images/types1.gif)
Verify that C is a constant using kind (see atlas[kind] ) and type procedures: kind(C); ![[0, 0]](prod/atlas/help/images/types2.gif)
type(C,const); 
Declare some vectors: Vectors(E[k],U[i],X,Y,z); ![{z, X, Y, E[k], U[i]}](prod/atlas/help/images/types4.gif)
Verify that E[i] is vector using kind and type procedures: kind(E[i]); ![[1, 0]](prod/atlas/help/images/types5.gif)
type(E[i],vect); 
Declare some forms: Forms(e[j]=1,u[k]=1,xi=2,theta=p); ![{e[j], u[k], theta, xi}](prod/atlas/help/images/types7.gif)
Verify that is p-form using kind and type procedures: kind(theta); ![[0, p]](prod/atlas/help/images/types9.gif)
type(theta,form); 
Obviously: type(theta,tensor); 
But: type(theta,vect); 
e[i]&^E[j]; kind(%); ![`&^`(e[i],E[j])](prod/atlas/help/images/types13.gif)
![[1, 1]](prod/atlas/help/images/types14.gif)
type(e[i]&^E[j],tensor); 
Functions(h[i]=h[i](z[k])); ![{h[i]}](prod/atlas/help/images/types16.gif)
type(h[0],func); 
type(h[k],func); 
type(h[0,k],func); 
Declare domain M: Domain(M); 
type(M,domain); 
type(N,domain); 
Declare coframe on M: Coframe(e[i]=d(x[i]),i=1..2); ![[e[1] = d(x[1]), e[2] = d(x[2])]](prod/atlas/help/images/types23.gif)
type(e[k],coframe); 
Declare frame on M: Frame(E[j]); ![[E[1] = Diff(``,x[1]), E[2] = Diff(``,x[2])]](prod/atlas/help/images/types25.gif)
type(E[1],frame); 
Declare domain N: Domain(N); 
type(N,domain); 
Declare coframe on N: Coframe(u[i]=d(y[i]),i=1..2); ![[u[1] = d(y[1]), u[2] = d(y[2])]](prod/atlas/help/images/types29.gif)
type(u[k],coframe); 
Frame(U[i]); ![[U[1] = Diff(``,y[1]), U[2] = Diff(``,y[2])]](prod/atlas/help/images/types31.gif)
e[k] are not coframe 1-forms on N: type(e[k],coframe); 
E[i] are not frame vectors on N: type(E[i],frame); 
Declare mapping F: Mapping(F,M,N); 

Who(F);
F: mapping
![TABLE([coframe = {u[1] = Diff(y[1],x[2])*e[2]+Diff(y[1],x[1])*e[1], u[2] = Diff(y[2],x[2])*e[2]+Diff(y[2],x[1])*e[1]}, natural = [Diff(``,x[2]) = Diff(y[1],x[2])*Diff(``,y[1])+Diff(y[2],x[2])*Diff(``,y...](prod/atlas/help/images/types42.gif)
type(F,mapping); 
Let's see "who is who" Who(); ![PIECEWISE([{N, M}, Domains],[{F}, Mappings],[{z, e[j], u[k], theta, X, Y, xi, E[k], U[i]}, Tensors],[{e[j], u[k], theta, xi}, Forms],[{Catalan, I, _Z, Pi, lambda, C, -I, alpha[1]}, Constants],[{h[i]}, ...](prod/atlas/help/images/types44.gif)
See Also: atlas , atlas[Functions] , atlas[Forms] , atlas[Vectors] , atlas[Tensors] , atlas[Who] . |