Esempio n. 1
0
 def tZ05():
     Mup = pt.MatrixM( False, "up" )
     Mdn = pt.MatrixM( False, "dn" )
     A = pt.Product( [pt.CoefficientFloat( 1.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn )] )
     B = pt.Product( [pt.CoefficientFloat( 2.0 ), pt.TermA(), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn )] )
     C = pt.areTermsCommon(A, B)
     return str( C )
Esempio n. 2
0
 def tZ07():
     Mup = pt.MatrixM( False, "up" )
     Mdn = pt.MatrixM( False, "dn" )
     Dup = pt.MatrixK( "up" )
     Dup.fourierTransform()
     Ddn = pt.MatrixK( "dn" )
     Ddn.fourierTransform()
     A = pt.Product( [pt.CoefficientFloat( 1.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Ddn, Dup ] )
     B = pt.Product( [pt.CoefficientFloat( 2.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Dup, Ddn ] )
     C = pt.areTermsCommon(A, B)
     return str( C )
Esempio n. 3
0
 def tZ08():
     Mup = pt.MatrixM( False, "up" )
     Mdn = pt.MatrixM( False, "dn" )
     Dup = pt.MatrixK( "up" )
     Dup.fourierTransform()
     Ddn = pt.MatrixK( "dn" )
     Ddn.fourierTransform()
     F1 = pt.FourierSum( [0,1,0,1], 4 )
     F2 = pt.FourierSum( [0,0,1,1], 4 )
     A = pt.Product( [pt.CoefficientFloat( 1.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Ddn, Dup, F1 ] )
     B = pt.Product( [pt.CoefficientFloat( 2.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Dup, Ddn, F2 ] )
     C = pt.areTermsCommon(A, B)
     return str( C )
Esempio n. 4
0
 def tY01():
     Mup = pt.MatrixM( False, "up" )
     Mdn = pt.MatrixM( False, "dn" )
     Dup = pt.MatrixK( "up" )
     Dup.fourierTransform()
     Dup.indices = 0
     Ddn = pt.MatrixK( "dn" )
     Ddn.fourierTransform()
     Ddn.indices = 0
     A = pt.Product( [pt.CoefficientFloat( 1.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Ddn, Dup ] )
     B = pt.Product( [pt.CoefficientFloat( 2.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Dup, Ddn ] )
     C = pt.Sum( [ A, B ] )
     D = pt.combineLikeTerms( C )
     D.simplify()
     return str( D )
Esempio n. 5
0
 def tY04():
     Mup = pt.MatrixM( False, "up" )
     Mdn = pt.MatrixM( False, "dn" )
     Dup = pt.MatrixK( "up" )
     Dup.fourierTransform()
     Dup.indices = 0
     Ddn = pt.MatrixK( "dn" )
     Ddn.fourierTransform()
     Ddn.indices = 0
     A1 = pt.Product( [pt.CoefficientFloat( 1.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Ddn, Dup ] )
     A2 = pt.Product( [pt.CoefficientFloat( 9.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Dup, Dup ] )
     A3 = pt.Product( [pt.CoefficientFloat( 2.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Dup, Ddn ] )
     A4 = pt.Product( [pt.CoefficientFloat( 5.0 ), pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn ), Dup, Dup ] )
     D = pt.Sum( [ A3, A2, A4, A1 ] )
     E = pt.combineLikeTerms( D )
     E.simplify()
     return str( E )
Esempio n. 6
0
import PTSymbolicObjects as pt
import PTMultithreading as ptmt
import sys
import PTOutput as ptout

Mup = pt.MatrixM(True, "")
Mdn = pt.MatrixM(True, "")

detMup = pt.DetM(Mup)
detMdn = pt.DetM(Mdn)

print "Calculating first derivative..."
D1up = detMup.derivative()
D1dn = detMdn.derivative()
D1up.reduceTree()
D1dn.reduceTree()
D1up = D1up.getExpandedExpr()
D1dn = D1dn.getExpandedExpr()
D1up.reduceTree()
D1dn.reduceTree()
D1up = pt.distributeAllTraces(D1up)
D1dn = pt.distributeAllTraces(D1dn)
D1up.reduceTree()
D1dn.reduceTree()
D1up = D1up.getExpandedExpr()
D1dn = D1dn.getExpandedExpr()
D1up.reduceTree()
D1dn.reduceTree()

print "Calculating second derivative..."
D2up = D1up.derivative()
Esempio n. 7
0
 def tA06():
     A = pt.MatrixM( True, "up" )
     B = A.derivative().derivative()
     return str( B )
Esempio n. 8
0
 def tA04():
     A = pt.MatrixM( False, "up" )
     return str( A )
Esempio n. 9
0
 def tA03():
     A = pt.MatrixM( True, "up" )
     return str( A )
Esempio n. 10
0
 def tA02():
     A = pt.MatrixM( False )
     return str( A )
Esempio n. 11
0
 def tA01():
     A = pt.MatrixM()
     return str( A )
Esempio n. 12
0
 def tZ02():
     Mup = pt.MatrixM( False, "up" )
     Mdn = pt.MatrixM( False, "dn" )
     A = pt.Product( [pt.TermA(), pt.DetM( Mup ), pt.DetM( Mdn )] )
     B = pt.areTermsCommon(A, A)
     return str( B )
Esempio n. 13
0
 def tC04():
     A = pt.MatrixM()
     B = pt.DetM( A )
     C = B.derivative().derivative()
     C.reduceTree()
     return str( C )
Esempio n. 14
0
 def tC03():
     A = pt.MatrixM()
     B = pt.DetM( A )
     C = B.derivative()
     return str( C )
Esempio n. 15
0
 def tC02():
     A = pt.MatrixM()
     B = pt.DetM( A, True, True )
     return str( B )
Esempio n. 16
0
 def tC01():
     A = pt.MatrixM()
     B = pt.DetM( A )
     return str( B )