User:Tom Allen/TensorExperimentsZ16
Jump to navigation
Jump to search
vSgDd2M=.[([(0{])@([(xdz smx"2 1 E1cn)zRef)hkxM),:@(S03xH{]) vSgDd2 =.gXZ(-@(([([(0{])@ch2k xRef@hkxM),:@(S03xH{]))+/"1@((<0 2)|:])@((0|:[)smx])(]*/])@(S02d1L{]))+-@vSgDd2M)] Initds2=.(gXZ([(0{])@mcv xRef@hkxM),:@Initx)+/^:2@:*(]*/])@Initdx gXcw =: 1 0 _ _ _ _"_ gXbAll=: _1 1 1 1 1 0"_ Initx =: 2.1095p1 , 0.5p1 , 1p1 , 0.5p1 "_ Initdx=: (0 , 0 , _0.01 , 0.5550"_)*%@(64"_) vS00xL =:Initx vS01dxL =:0,0,0,0: vS02d1L =:Initd1 vS06ds =:Initds vS07count=:(0,28"_)*64"_ pdDR=:vSgD@vS'' NB. ... pdDR to disk file ... pdDR arrayPut 'pdDR' arrayClose 'pdDR' NB. ... pdDS ... SOcn =.xdz smx"2 1 Ocn SOcncv =.xdz smx"2 zdx((0|:[)smx])"2 Ocncv SE1cn =.xdz smx"2 1 E1cn SE1cncv=.xdz smx"2 zdx((0|:[)smx])"2 E1cncv SJ1cn =.xdz smx"2 1 J1cn SJ1cncv=.xdz smx"2 zdx((0|:[)smx])"2 J1cncv SL1cn =.xdz smx"2 1 L1cn SL1cncv=.xdz smx"2 zdx((0|:[)smx])"2 L1cncv SX1cn =.xdz smx"2 1 X1cn SX1cncv=.xdz smx"2 zdx((0|:[)smx])"2 X1cncv pdDS=:(gXZ([(SOcn;SOcncv;SE1cn;SE1cncv;SJ1cn;SJ1cncv;SL1cn;SL1cncv;SX1cn;SX1cncv)zRef@hkxM)])@:((S00xL{])"2) pdDR NB. ... pdDS to disk files ... (>@(0{])@(pdDS"_)arrayPut'SOcn' "_)'' (>@(1{])@(pdDS"_)arrayPut'SOcncv' "_)'' (>@(2{])@(pdDS"_)arrayPut'SE1cn' "_)'' (>@(3{])@(pdDS"_)arrayPut'SE1cncv'"_)'' (>@(4{])@(pdDS"_)arrayPut'SJ1cn' "_)'' (>@(5{])@(pdDS"_)arrayPut'SJ1cncv'"_)'' (>@(6{])@(pdDS"_)arrayPut'SL1cn' "_)'' (>@(7{])@(pdDS"_)arrayPut'SL1cncv'"_)'' (>@(8{])@(pdDS"_)arrayPut'SX1cn' "_)'' (>@(9{])@(pdDS"_)arrayPut'SX1cncv'"_)'' arrayClose 'SOcn' arrayClose 'SOcncv' arrayClose 'SE1cn' arrayClose 'SE1cncv' arrayClose 'SJ1cn' arrayClose 'SJ1cncv' arrayClose 'SL1cn' arrayClose 'SL1cncv' arrayClose 'SX1cn' arrayClose 'SX1cncv'
NB. ... establish pdDR and pdDS if necessary ... arrayOpen 'pdDR' pdDR=:1793 8 4 arrayGet 'pdDR' NB. ... shape required ... arrayClose 'pdDR' arrayOpen 'SOcn' arrayOpen 'SOcncv' arrayOpen 'SE1cn' arrayOpen 'SE1cncv' arrayOpen 'SJ1cn' arrayOpen 'SJ1cncv' arrayOpen 'SL1cn' arrayOpen 'SL1cncv' arrayOpen 'SX1cn' arrayOpen 'SX1cncv' SOcn =.({.@$@(pdDR"_), 4:)arrayGet'SOcn' "_ SOcncv =.({.@$@(pdDR"_),4,4:)arrayGet'SOcncv' "_ SE1cn =.({.@$@(pdDR"_), 4:)arrayGet'SE1cn' "_ SE1cncv=.({.@$@(pdDR"_),4,4:)arrayGet'SE1cncv'"_ SJ1cn =.({.@$@(pdDR"_), 4:)arrayGet'SJ1cn' "_ SJ1cncv=.({.@$@(pdDR"_),4,4:)arrayGet'SJ1cncv'"_ SL1cn =.({.@$@(pdDR"_), 4:)arrayGet'SL1cn' "_ SL1cncv=.({.@$@(pdDR"_),4,4:)arrayGet'SL1cncv'"_ SX1cn =.({.@$@(pdDR"_), 4:)arrayGet'SX1cn' "_ SX1cncv=.({.@$@(pdDR"_),4,4:)arrayGet'SX1cncv'"_ pdDS=:(SOcn;SOcncv;SE1cn;SE1cncv;SJ1cn;SJ1cncv;SL1cn;SL1cncv;SX1cn;SX1cncv)'' arrayClose 'SOcn' arrayClose 'SOcncv' arrayClose 'SE1cn' arrayClose 'SE1cncv' arrayClose 'SJ1cn' arrayClose 'SJ1cncv' arrayClose 'SL1cn' arrayClose 'SL1cncv' arrayClose 'SX1cn' arrayClose 'SX1cncv'
NB. ... set up for plots ... Znum=:0+i.@(1449"_) ZRx0=:((<0 0){])"2@(Znum{])@(pdDR"_) ZRx3=:((<0 3){])"2@(Znum{])@(pdDR"_) ZOcn =:(Znum{])@>@(0{])@(pdDS"_) ZOcncv =:(Znum{])@>@(1{])@(pdDS"_) ZE1cn =:(Znum{])@>@(2{])@(pdDS"_) ZE1cncv=:(Znum{])@>@(3{])@(pdDS"_) ZJ1cn =:(Znum{])@>@(4{])@(pdDS"_) ZJ1cncv=:(Znum{])@>@(5{])@(pdDS"_) ZL1cn =:(Znum{])@>@(6{])@(pdDS"_) ZL1cncv=:(Znum{])@>@(7{])@(pdDS"_) ZX1cn =:(Znum{])@>@(8{])@(pdDS"_) ZX1cncv=:(Znum{])@>@(9{])@(pdDS"_)
load 'plot' Cnum=:40+i.@(41"_) pd ((Cnum{])@:(2.1095p1*cos@cx0"1);(Cnum{])@:(2.1095p1*sin@cx0"1)) pTtotal (_ 0p1 2p1 160,_ 0 0 0,_ 0 0 0,:_ 0 0 0"_)'' pd vSgDplot (Znum{])@(pdDR"_)'' pd 'aspect 1' pd 'pdf' pd 'show'
load 'plot' NB. pd (ZRx3;ZRx0)'' pd (ZRx3;(0{])"1@ZE1cn)'' NB. pd (ZRx3;(3{])"1@ZE1cn)'' NB. pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZE1cncv)'' NB. pd (ZRx3;((<3 3){])"2@ZE1cncv)'' NB. pd (ZRx3;+/@((<0 1)|:])"2@ZE1cncv)'' NB. pd (ZRx3;(0{])"1@ZJ1cn)'' NB. pd (ZRx3;(3{])"1@ZJ1cn)'' NB. pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZJ1cncv)'' pd (ZRx3;((<3 3){])"2@ZJ1cncv)'' NB. pd (ZRx3;+/@((<0 1)|:])"2@ZJ1cncv)'' NB. pd (ZRx3;(0{])"1@ZL1cn)'' NB. pd (ZRx3;(3{])"1@ZL1cn)'' NB. pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZL1cncv)'' NB. pd (ZRx3;((<3 3){])"2@ZL1cncv)'' NB. pd (ZRx3;+/@((<0 1)|:])"2@ZL1cncv)'' NB. pd (ZRx3;(0{])"1@ZX1cn)'' NB. pd (ZRx3;(3{])"1@ZX1cn)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' NB. pd (ZRx3;((<3 3){])"2@ZX1cncv)'' NB. pd (ZRx3;+/@((<0 1)|:])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRx3;(3{])"1@ZE1cn)'' pd (ZRx3;((<3 3){])"2@ZJ1cncv)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRx3;(3{])"1@ZE1cn)'' pd (ZRx3;+/@((<0 1)|:])"2@ZJ1cncv)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRx3;(0{])"1@ZJ1cn)'' pd (ZRx3;(3{])"1@ZJ1cn)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRx3;(0{])"1@ZJ1cn)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZJ1cncv)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRx3;(3{])"1@ZJ1cn)'' pd (ZRx3;((<3 3){])"2@ZJ1cncv)'' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRx3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZJ1cncv)'' pd (ZRx3;((<3 3){])"2@ZJ1cncv)'' pd (ZRx3;+/@((<0 1)|:])"2@ZJ1cncv)'' pd 'pdf' pd 'show'
Download MoinMoin source: File:TensorExperimentsZ16.ijs