User:Tom Allen/TensorExperimentsB05

From J Wiki
Jump to: navigation, search


load 'plot'

gXcw   =:  1      0     _      _     _"_
gXpAll =:  0.5    0.5   0.5    4    _1"_
gXq2All=:  0.06   0.06  0.06   0     _"_
gXq3All=:  0     _0.7   4     _1     0"_
gXq4All=:  0.06   0.06  0.06   0     _"_
gXq5All=:  1      1     3      1    _3"_
gXq6All=:  0.1    0.1   0.1    0     _"_
gXq7All=:  1      0.5   3      0.5  _2"_

yCpts=:_ 5 83 300,_ 0 0 0,_ 0 0 0,:_ 0 0 0"_

pd (gXB(cy0"_ 1;cfXX0@OyA0XX"_ 1)]) pTtotal yCpts''

gXcw   =:  1      0     _      _     _"_
gXpAll =:  0.5    0.5   0.5    0    _1"_
gXq2All=:  0.06   0.06  0.06  _1.5   _"_
gXq3All=:  0     _0.7   4     _1     0"_
gXq4All=:  0.06   0.06  0.06   1     _"_
gXq5All=:  1      1     3      1    _3"_
gXq6All=:  0.1    0.1   0.1    0     _"_
gXq7All=:  1      0.5   3      0.5  _2"_

yCpts=:_ 5 83 300,_ 0 0 0,_ 0 0 0,:_ 0 0 0"_

pd (gXB(cy0"_ 1;OyBcK0"_ 1)]) pTtotal yCpts''

gXcw   =:  1      0     _      _     _"_
gXpAll =:  0.5    0.5   0.5    0    _1"_
gXq2All=:  0.06   0.06  0.06   0     _"_
gXq3All=:  0     _0.7   4     _1     0"_
gXq4All=:  0.06   0.06  0.06   0     _"_
gXq5All=:  1      1     3      1    _3"_
gXq6All=:  0.1    0.1   0.1    2     _"_
gXq7All=:  1      0.5   3      0.5  _2"_

yCpts=:_ 5 83 300,_ 0 0 0,_ 0 0 0,:_ 0 0 0"_

pd (gXB(cy0"_ 1;OyBcK3"_ 1)]) pTtotal yCpts''

pd 'pdf'
pd 'show'


Egraphic0500.jpg
... some numbers for calculating derivatives ...


...

... entangle ...

...


NB. ... script experimentalB.ijs ...

NB. ... linear ...

hkxI=:hkxF((0 1 2 3{[),((4{[)+&.>4{]),:(5{[)+&.>5{])hkxH
hkyI=:hkyF((0 1 2 3{[),((4{[)+&.>4{]),:(5{[)+&.>5{])hkyH


NB. ... execute (ijx) ...

   gXcw   =:  1.1    0.1   _      _     _  "_
   gXpAll =:  0.51   0.52  0.53   4    _1  "_
   gXq2All=:  0.04   0.05  0.06  _1.5   _  "_
   gXq3All=:  0.1   _0.7   4     _1     0.1"_
   gXq4All=:  0.06   0.05  0.04   1     _  "_
   gXq5All=:  1      1     3      1    _3  "_
   gXq6All=:  0.11   0.12  0.13   2     _  "_
   gXq7All=:  1      0.5   3      0.5  _2  "_

   xCpts=:_ 9 83 26,_ 0 1p1 26,_ 0 2p1 26,:_ 0 3 26"_

NB. ... derivatives ...

   A=:(gXB([Ocndc xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXB((0|:[:(gXB([(0{])@Ocn xRef@hkxI),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_13)qteq[;])"2 B
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

   A=:(gXB([Ocndcdc xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXB((0|:[:(gXB([(0{])@Ocndc xRef@hkxI),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_10)qteq[;])"3 B
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

   A=:(gXB([Ocndcdcdc xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXB((0|:[:(gXB([(0{])@Ocndcdc xRef@hkxI),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_10)qteq[;])"4 B
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

   A=:(gXB([Ocndcdcdcdc xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXB((0|:[:(gXB([(0{])@Ocndcdcdc xRef@hkxI),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_08)qteq[;])"5 B
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... divergence is 0 ...

   (0=]) ((2^_44)qtsz]) (gXB([+/@((<0 1)|:])"2@Ocncv xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

   (0=]) ((2^_44)qtsz]) (gXB([+/@((<0 1)|:])"2@Ocncv yRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


NB. ... execute (ijx) ...

   gXcw   =:  1.1    0.1   _      _     _  "_
   gXpAll =:  0.51   0.52  0.53   4    _1  "_
   gXq2All=:  0.04   0.05  0.06  _1.5   _  "_
   gXq3All=:  0.1   _0.7   4     _1     0.1"_
   gXq4All=:  0.06   0.05  0.04   1     _  "_
   gXq5All=:  1      1     3      1    _3  "_
   gXq6All=:  0.11   0.12  0.13   2     _  "_
   gXq7All=:  1      0.5   3      0.5  _2  "_

   xCpts=:_ 9 83 26,_ 0 1p1 26,_ 0 2p1 26,:_ 0 3 26"_

NB. ... a tensor ...

   vA =:[R xRef
   vB0=:((0|:[)smx])"2 5
   vB1=:((0|:[)smx])"2 5
   vB2=:((0|:[)smx])"2 5
   vB3=:((0|:[)smx])"2 5
   vB4=:((   [)smx])"2 5
   vB =:[(xdy vB4 ydx vB3 ydx vB2 ydx vB1 ydx vB0 R)yRef

   (gXB([(vA(((2^_44);2^_25)qteq[;])"5 vB)hkxI)]) ((0.1;50"_)pTRandom xCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... EM ...

   *./^:3"3 (0=]) ((2^_43)qtsz]) (gXB([(]+0|:])"2@:((0 1|:])"3)@(+/"1@((<0 1)|:])"5@R)xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... Maxwell's equation ...

   *./^:3"3 (0=]) ((2^_43)qtsz]) (gXB([(+/"1@((<0 1)|:])"5@Lam++/"1@((<0 1)|:])"5@Xi)xRef@hkxI)]) ((0.1;50"_)pTRandom xCpts)''
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1



Download MoinMoin source: File:TensorExperimentsB05.ijs