User:Tom Allen/ta/AddendumCS01

From J Wiki
Jump to navigation Jump to search


... hkxV and hkyV store the same arrays ...
... arrays for both Cartesian coordinates and Spherical coordinates are stored ...


NB. ... script experimentalCS.ijs ...

ypts       =:>@((<0 0){])    NB. ... derivatives of y with respect to x ...
ydx        =:>@((<0 1){])
ydxdx      =:>@((<0 2){])
ydxdxdx    =:>@((<0 3){])
ydxdxdxdx  =:>@((<0 4){])
ydxdxdxdxdx=:>@((<0 5){])

xpts       =:>@((<1 0){])    NB. ... derivatives of x with respect to y ...
xdy        =:>@((<1 1){])
xdydy      =:>@((<1 2){])
xdydydy    =:>@((<1 3){])
xdydydydy  =:>@((<1 4){])
xdydydydydy=:>@((<1 5){])

mcv        =:>@((<2 0){])    NB. ... a covariant tensor (used to lower indices on tensors) ...
mcvdc      =:>@((<2 1){])
mcvdcdc    =:>@((<2 2){])
mcvdcdcdc  =:>@((<2 3){])
mcvdcdcdcdc=:>@((<2 4){])

mcn        =:>@((<3 0){])    NB. ... a contravariant tensor (used to raise indices on tensors) ...
mcndc      =:>@((<3 1){])
mcndcdc    =:>@((<3 2){])
mcndcdcdc  =:>@((<3 3){])

Ocn        =:>@((<4 0){])    NB. ... a contravariant tensor defining an energy distribution ...
Ocndc      =:>@((<4 1){])
Ocndcdc    =:>@((<4 2){])
Ocndcdcdc  =:>@((<4 3){])
Ocndcdcdcdc=:>@((<4 4){])


... select arrays for the coordinates being used (Cartesian or Spherical) ...


NB. ... script experimentalCS.ijs ...

yRef=:(0{]),(1{]),(2{]),(4{]),:6{]    NB. ... select arrays for y coordinates (Cartesian) ...
xRef=:(0{]),(1{]),(3{]),(5{]),:7{]    NB. ... select arrays for x coordinates (Spherical) ...


... from TensorExperiments07 ...


GCS0100C.jpg


NB. ... script experimentalCS.ijs ...

zfhcv        =:1 0 0 0,0 1 0 0,0 0 1 0,:0 0 0 _1"_
zfhcvdy      =:(3$4:)$0:
zfhcvdydy    =:(4$4:)$0:
zfhcvdydydy  =:(5$4:)$0:
zfhcvdydydydy=:(6$4:)$0:

zfhcvXXS=:zfhcv;zfhcvdy;zfhcvdydy;zfhcvdydydy;zfhcvdydydydy;1$_"_
zfhcvXX =:<@:>"1@(0|:])@([zfhcvXXS"_ 1 ypts)

hkxV01=:[(],zfhcvXX)hkxV00
hkyV01=:[(],zfhcvXX)hkyV00


GCS0101C.jpg


NB. ... script experimentalCS.ijs ...

zfgcv=:ydx([((0|:[)smx])"2((0|:[)smx])"2)zfhcv


GCS0102C.jpg


NB. ... script experimentalCS.ijs ...

zfgcvdxt0=:(   ])"3@(ydx  ((0|:[)smx])"2 3 ydxdx((0|:[)smx])"3 2 zfhcv)
zfgcvdxt1=:(1|:])"3@(ydxdx((0|:[)smx])"3 2 ydx  ((0|:[)smx])"2 2 zfhcv)

zfgcvdx=:zfgcvdxt0+zfgcvdxt1


GCS0103C.jpg


NB. ... script experimentalCS.ijs ...

zfgcvdxdxt0=:(     ])"4@(ydx    ((0|:[)smx])"2 4 ydxdxdx((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxt1=:(  1|:])"4@(ydxdx  ((0|:[)smx])"3 3 ydxdx  ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxt2=:(1 3|:])"4@(ydxdx  ((0|:[)smx])"3 3 ydxdx  ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxt3=:(1 2|:])"4@(ydxdxdx((0|:[)smx])"4 2 ydx    ((0|:[)smx])"2 2 zfhcv)

zfgcvdxdx=:zfgcvdxdxt0+zfgcvdxdxt1+zfgcvdxdxt2+zfgcvdxdxt3


GCS0104C.jpg


NB. ... script experimentalCS.ijs ...

zfgcvdxdxdxt0=:(       ])"5@(ydx      ((0|:[)smx])"2 5 ydxdxdxdx((0|:[)smx])"5 2 zfhcv)
zfgcvdxdxdxt1=:(    1|:])"5@(ydxdx    ((0|:[)smx])"3 4 ydxdxdx  ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxt2=:(  1 4|:])"5@(ydxdx    ((0|:[)smx])"3 4 ydxdxdx  ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxt3=:(  1 2|:])"5@(ydxdxdx  ((0|:[)smx])"4 3 ydxdx    ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxt4=:(1 3 4|:])"5@(ydxdx    ((0|:[)smx])"3 4 ydxdxdx  ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxt5=:(1 4 2|:])"5@(ydxdxdx  ((0|:[)smx])"4 3 ydxdx    ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxt6=:(1 2 4|:])"5@(ydxdxdx  ((0|:[)smx])"4 3 ydxdx    ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxt7=:(1 2 3|:])"5@(ydxdxdxdx((0|:[)smx])"5 2 ydx      ((0|:[)smx])"2 2 zfhcv)

zfgcvdxdxdx=:zfgcvdxdxdxt0+zfgcvdxdxdxt1+zfgcvdxdxdxt2+zfgcvdxdxdxt3+zfgcvdxdxdxt4+zfgcvdxdxdxt5+zfgcvdxdxdxt6+zfgcvdxdxdxt7


GCS0105C.jpg


NB. ... script experimentalCS.ijs ...

zfgcvdxdxdxdxt00=:(         ])"6@(ydx        ((0|:[)smx])"2 6 ydxdxdxdxdx((0|:[)smx])"6 2 zfhcv)
zfgcvdxdxdxdxt01=:(      1|:])"6@(ydxdx      ((0|:[)smx])"3 5 ydxdxdxdx  ((0|:[)smx])"5 2 zfhcv)
zfgcvdxdxdxdxt02=:(    1 5|:])"6@(ydxdx      ((0|:[)smx])"3 5 ydxdxdxdx  ((0|:[)smx])"5 2 zfhcv)
zfgcvdxdxdxdxt03=:(    1 2|:])"6@(ydxdxdx    ((0|:[)smx])"4 4 ydxdxdx    ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxdxt04=:(  1 4 5|:])"6@(ydxdx      ((0|:[)smx])"3 5 ydxdxdxdx  ((0|:[)smx])"5 2 zfhcv)
zfgcvdxdxdxdxt05=:(  1 5 2|:])"6@(ydxdxdx    ((0|:[)smx])"4 4 ydxdxdx    ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxdxt06=:(  1 2 5|:])"6@(ydxdxdx    ((0|:[)smx])"4 4 ydxdxdx    ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxdxt07=:(  1 2 3|:])"6@(ydxdxdxdx  ((0|:[)smx])"5 3 ydxdx      ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxdxt08=:(1 3 4 5|:])"6@(ydxdx      ((0|:[)smx])"3 5 ydxdxdxdx  ((0|:[)smx])"5 2 zfhcv)
zfgcvdxdxdxdxt09=:(1 4 5 2|:])"6@(ydxdxdx    ((0|:[)smx])"4 4 ydxdxdx    ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxdxt10=:(1 4 2 5|:])"6@(ydxdxdx    ((0|:[)smx])"4 4 ydxdxdx    ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxdxt11=:(1 5 2 3|:])"6@(ydxdxdxdx  ((0|:[)smx])"5 3 ydxdx      ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxdxt12=:(1 2 4 5|:])"6@(ydxdxdx    ((0|:[)smx])"4 4 ydxdxdx    ((0|:[)smx])"4 2 zfhcv)
zfgcvdxdxdxdxt13=:(1 2 5 3|:])"6@(ydxdxdxdx  ((0|:[)smx])"5 3 ydxdx      ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxdxt14=:(1 2 3 5|:])"6@(ydxdxdxdx  ((0|:[)smx])"5 3 ydxdx      ((0|:[)smx])"3 2 zfhcv)
zfgcvdxdxdxdxt15=:(1 2 3 4|:])"6@(ydxdxdxdxdx((0|:[)smx])"6 2 ydx        ((0|:[)smx])"2 2 zfhcv)

zfgcvdxdxdxdxt0=:zfgcvdxdxdxdxt00+zfgcvdxdxdxdxt01
zfgcvdxdxdxdxt1=:zfgcvdxdxdxdxt02+zfgcvdxdxdxdxt03
zfgcvdxdxdxdxt2=:zfgcvdxdxdxdxt04+zfgcvdxdxdxdxt05
zfgcvdxdxdxdxt3=:zfgcvdxdxdxdxt06+zfgcvdxdxdxdxt07
zfgcvdxdxdxdxt4=:zfgcvdxdxdxdxt08+zfgcvdxdxdxdxt09
zfgcvdxdxdxdxt5=:zfgcvdxdxdxdxt10+zfgcvdxdxdxdxt11
zfgcvdxdxdxdxt6=:zfgcvdxdxdxdxt12+zfgcvdxdxdxdxt13
zfgcvdxdxdxdxt7=:zfgcvdxdxdxdxt14+zfgcvdxdxdxdxt15

zfgcvdxdxdxdx=:zfgcvdxdxdxdxt0+zfgcvdxdxdxdxt1+zfgcvdxdxdxdxt2+zfgcvdxdxdxdxt3+zfgcvdxdxdxdxt4+zfgcvdxdxdxdxt5+zfgcvdxdxdxdxt6+zfgcvdxdxdxdxt7


NB. ... script experimentalCS.ijs ...

zfgcvXX=:zfgcv;zfgcvdx;zfgcvdxdx;zfgcvdxdxdx;zfgcvdxdxdxdx;[(1$_"_)"_ 1 xpts

hkxV02=:[(],zfgcvXX)hkxV01
hkyV02=:[(],zfgcvXX)hkyV01



Download: File:LCS0100C.txt
Download: File:LCS0101C.txt
Download: File:LCS0102C.txt
Download: File:LCS0103C.txt
Download: File:LCS0104C.txt
Download: File:LCS0105C.txt