예제 #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 )
예제 #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 )
예제 #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 )
예제 #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 )
예제 #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 )
예제 #6
0
파일: main.py 프로젝트: aloheac/amaunet
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()
예제 #7
0
 def tA06():
     A = pt.MatrixM( True, "up" )
     B = A.derivative().derivative()
     return str( B )
예제 #8
0
 def tA04():
     A = pt.MatrixM( False, "up" )
     return str( A )
예제 #9
0
 def tA03():
     A = pt.MatrixM( True, "up" )
     return str( A )
예제 #10
0
 def tA02():
     A = pt.MatrixM( False )
     return str( A )
예제 #11
0
 def tA01():
     A = pt.MatrixM()
     return str( A )
예제 #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 )
예제 #13
0
 def tC04():
     A = pt.MatrixM()
     B = pt.DetM( A )
     C = B.derivative().derivative()
     C.reduceTree()
     return str( C )
예제 #14
0
 def tC03():
     A = pt.MatrixM()
     B = pt.DetM( A )
     C = B.derivative()
     return str( C )
예제 #15
0
 def tC02():
     A = pt.MatrixM()
     B = pt.DetM( A, True, True )
     return str( B )
예제 #16
0
 def tC01():
     A = pt.MatrixM()
     B = pt.DetM( A )
     return str( B )