User:Tom Allen/TensorExperimentsZ22
Jump to navigation
Jump to search
gXsAll=. _1 1 1 1 1 0"_ Initu =. _2.1095p1 , 0 , 0 , 0.5p1"_ Initdu=. ( 0 , 0.013685 , 0 , 0.1 "_)*%@(32"_) Initds=.%:@|@((gXS([(0{])@mcv uRef@hkuR),:@Initu)+/^:2@:*(]*/])@Initdu) vS00xL =.Initu vS01dxL =.0,0,0,0: vS02d1L =.Initdu%Initds vS06ds =.Initds vS07count=.(0,150"_)*32"_ vSgDd2=.gXS([-@([(0{])@E1cn uRef@hkuR),:@(S03xH{]))] pdDR=:vSgD@vS'' NB. ... pdDR to disk file ... pdDR arrayPut 'pdDR' arrayClose 'pdDR' NB. ... pdDS ... SLHS=.(([udw"_ 1 wc"_ 1);wdu"_ 1) SRHS=.([(Ocn;Ocncv;E1cn;E1cncv;J1cn;J1cncv;L1cn;L1cncv;X1cn;X1cncv)uRef@hkuR) SOcn =.>@(1{[)smx"2 1 >@(0{]) SOcncv =.>@(1{[)smx"2 2>@(0{[)((0|:[)smx])"2 2>@(1{]) SE1cn =.>@(1{[)smx"2 1 >@(2{]) SE1cncv=.>@(1{[)smx"2 2>@(0{[)((0|:[)smx])"2 2>@(3{]) SJ1cn =.>@(1{[)smx"2 1 >@(4{]) SJ1cncv=.>@(1{[)smx"2 2>@(0{[)((0|:[)smx])"2 2>@(5{]) SL1cn =.>@(1{[)smx"2 1 >@(6{]) SL1cncv=.>@(1{[)smx"2 2>@(0{[)((0|:[)smx])"2 2>@(7{]) SX1cn =.>@(1{[)smx"2 1 >@(8{]) SX1cncv=.>@(1{[)smx"2 2>@(0{[)((0|:[)smx])"2 2>@(9{]) pdDS=:(gXS(SLHS(SOcn;SOcncv;SE1cn;SE1cncv;SJ1cn;SJ1cncv;SL1cn;SL1cncv;SX1cn;SX1cncv)SRHS)])@:((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=:4801 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.@(4018"_) ZRw3=:((<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@]"1);(Cnum{])@(2.1095p1*sin@]"1)) pTsteps _ 0p1 2p1 160 pd <"1@(0|:])@:((cu0,cu1)@(S00xL{])"2) (Znum{])@(pdDR"_)'' pd 'aspect 1' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(0{])"1@ZE1cn)'' NB. pd (ZRw3;(3{])"1@ZE1cn)'' NB. pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZE1cncv)'' NB. pd (ZRw3;((<3 3){])"2@ZE1cncv)'' NB. pd (ZRw3;+/@((<0 1)|:])"2@ZE1cncv)'' NB. pd (ZRw3;(0{])"1@ZJ1cn)'' NB. pd (ZRw3;(3{])"1@ZJ1cn)'' NB. pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZJ1cncv)'' pd (ZRw3;((<3 3){])"2@ZJ1cncv)'' NB. pd (ZRw3;+/@((<0 1)|:])"2@ZJ1cncv)'' NB. pd (ZRw3;(0{])"1@ZL1cn)'' NB. pd (ZRw3;(3{])"1@ZL1cn)'' NB. pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZL1cncv)'' NB. pd (ZRw3;((<3 3){])"2@ZL1cncv)'' NB. pd (ZRw3;+/@((<0 1)|:])"2@ZL1cncv)'' NB. pd (ZRw3;(0{])"1@ZX1cn)'' NB. pd (ZRw3;(3{])"1@ZX1cn)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' NB. pd (ZRw3;((<3 3){])"2@ZX1cncv)'' NB. pd (ZRw3;+/@((<0 1)|:])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(3{])"1@ZE1cn)'' pd (ZRw3;((<3 3){])"2@ZJ1cncv)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(3{])"1@ZE1cn)'' pd (ZRw3;+/@((<0 1)|:])"2@ZJ1cncv)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(0{])"1@ZJ1cn)'' pd (ZRw3;(3{])"1@ZJ1cn)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(0{])"1@ZJ1cn)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZJ1cncv)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(3{])"1@ZJ1cn)'' pd (ZRw3;((<3 3){])"2@ZJ1cncv)'' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZX1cncv)'' pd 'pdf' pd 'show'
load 'plot' pd (ZRw3;(((<0 0){])+((<1 1){])+(<2 2){])"2@ZJ1cncv)'' pd (ZRw3;((<3 3){])"2@ZJ1cncv)'' pd (ZRw3;+/@((<0 1)|:])"2@ZJ1cncv)'' pd 'pdf' pd 'show'
Download MoinMoin source: File:TensorExperimentsZ22.ijs