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 )
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 )
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 )
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 )
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 )
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()
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 )
def tC04(): A = pt.MatrixM() B = pt.DetM( A ) C = B.derivative().derivative() C.reduceTree() return str( C )
def tC03(): A = pt.MatrixM() B = pt.DetM( A ) C = B.derivative() return str( C )
def tC02(): A = pt.MatrixM() B = pt.DetM( A, True, True ) return str( B )
def tC01(): A = pt.MatrixM() B = pt.DetM( A ) return str( B )