structure tOrder = struct local structure E = Ein structure P= Printer structure O= OrderEin structure N = NormalizeEin in val line="-----------------------------------------------" fun testO(e)= ( print line; print (P.printerE e ); print(" => "); let val u=(O.orderfn e) in (print(P.printerE(u));print(" => "); let val (u2,c)=N.normalize(u) in print(P.printerE(u2)) end ) end ) fun createO(b)= testO(Ein.EIN{params=[], index=[], body=b}) val o1=E.Prod[E.Sum([(E.V 1,0,3)], E.Prod[E.Tensor(0,[E.V 1]), E.Tensor(1, [E.V 1])]), E.Sum([(E.V 2,0,3), (E.V 3,0,3)], E.Prod[E.Epsilon(0,2,3), E.Tensor(2,[E.V 2]), E.Tensor(3, [E.V 3])])] val o2 =E.Apply(E.Partial([E.V 1]),E.Sum([(E.V 1,0,3)],E.Prod[E.Sum([(E.V 3,0,3),( E.V 4,0,3)],E.Prod[E.Epsilon(2, 3, 4), E.Tensor(0, [E.V 3]), E.Tensor(1, [E.V 4])]) ,E.Epsilon(0,1,2)])) (*S11(AxB) x (CxD)*) val o3=E.Prod[E.Sum([(E.V 1,0,3), (E.V 2,0,3)], E.Prod[E.Epsilon(0,1,2), E.Sum([(E.V 3,0,3), (E.V 4,0,3)],E.Prod[E.Epsilon(1,3,4),E.Tensor(0,[E.V 3]), E.Tensor(1, [E.V 4])]), E.Sum([(E.V 5,0,3), (E.V 6,0,3)], E.Prod[E.Epsilon(2,5,6), E.Tensor(2,[E.V 5]), E.Tensor(3, [E.V 6]) ])] )] val o4=E.Prod[E.Epsilon(2,5,6),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6),E.Tensor(0,[E.V 1]),E.Epsilon(0,5,6)] val o5=E.Prod[E.Sum([(E.V 5,0,3), (E.V 6,0,3)],E.Prod[E.Epsilon(2,5,6),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6)]),E.Sum([(E.V 1,0,3), (E.V 2,0,3)],E.Prod[E.Tensor(0,[E.V 1]),E.Epsilon(0,5,6)])] val o6=E.Prod[ E.Sum([(E.V 5,0,3), (E.V 6,0,3)], E.Prod[E.Epsilon(2,0,3),E.Delta(E.V 1,E.V 2),E.Epsilon(1,5,6),E.Tensor(1,[E.V 0])]), E.Sum([(E.V 1,0,3), (E.V 2,0,3)], E.Prod[E.Tensor(0,[E.V 1]),E.Value(1), E.Tensor(1,[]),E.Epsilon(0,5,6)])] (* val r=List.map createO [o1,o2,o3,o4,o5,o6] *) end; (* local *) end (* local *)
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: ,6)])] (* val r=List.map createO [o1,o2,o3,o4,o5,o6] *) end; (* local *) end (* local *)