Exemplo n.º 1
0
def _paralleleval_distributeAllTraces(args):
    i = args[0]
    nTerms = args[1]
    term = args[2]
    print ">> [MT] Evaluating trace distribution and simplification for " + str(
        i) + " of " + str(nTerms) + "."

    return pt.distributeAllTraces(term)
Exemplo n.º 2
0
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()
D2dn = D1dn.derivative()
D2up.reduceTree()
D2dn.reduceTree()
D2up = D2up.getExpandedExpr()
D2dn = D2dn.getExpandedExpr()