# Changeset 823679 in git

Ignore:
Timestamp:
Nov 7, 2013, 10:42:07 AM (9 years ago)
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
a97ac01c3b64767f26ac2bbccd84652d536f371ddcd92ddcba49d3aa5461148604e8d6f4e99d4625
Parents:
2fa80a36c041e00aa30582d92c55f22cc3fe47d8
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-11-07 10:42:07+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-11-07 10:42:48+01:00
Message:
`chg: new schubert.lib (using parallel.lib)`
File:
1 edited

Unmodified
Added
Removed
• ## Singular/LIB/schubert.lib

 r2fa80a corresponding the number of rational curves on a general Calabi-Yau threefold sumofquotients(stack,list)          prepare a command for parallel computation part(poly,int)                      compute a homogeneous component of a polynomial. LIB "general.lib"; LIB "homolog.lib"; LIB "parallel.lib"; //////////////////////////////////////////////////////////////////////////////// } proc sumofquotients(stack M, list F, list #) "USAGE:     sumofquotient(M,F,#); M stack, F list, # list RETURN:     number THEORY:     This is useful for the parallel computation of rationalCurve. KEYWORDS:   Gromov-Witten invariants, rational curves on Calabi-Yau threefolds EXAMPLE:    example sumofquotients; shows an example " { if (size(#) == 0) {list l = 5;} else {list l = #;} number sum = 0; number s, t; int i,j; for (i = size(F); i > 0; i--) { s = 1; for (j=1;j<=size(l);j++) { s = s*contributionBundle(M,F[i][1],list(l[j])); } t = F[i][2]*normalBundle(M,F[i][1]); sum = sum + s/t; } return(sum); } example { "EXAMPLE:"; echo=2; ring r = 0,x,dp; variety P = projectiveSpace(4); stack M = moduliSpace(P,2); list F = fixedPoints(M); sumofquotients(M,F); sumofquotients(M,F,list(5)); } proc rationalCurve(int d, list #) "USAGE:     rationalCurve(d,#); d int, # list def R = basering; setring R; int n,i,j; int n,i; if (size(#) == 0) {n = 4; list l = 5;} else {n = size(#)+3; list l = #;} stack M = moduliSpace(P,d); def F = fixedPoints(M); int ncpus = system("cpu"); int sizeF = size(F); list args; int from = 1; int to; for (i = 1; i <= ncpus; i++) { to = (sizeF*i) div ncpus; args[i] = list(M, list(F[from..to]), l); from = to+1; } list results = parallelWaitAll("sumofquotients", args); number r = 0; for (i=1;i<=size(F);i++) { graph G = F[i][1]; number s = 1; for (j=1;j<=size(l);j++) { s = s*contributionBundle(M,G,list(l[j])); } number t = F[i][2]*normalBundle(M,G); r = r + s/t; kill s,t,G; for (i = 1; i <= ncpus; i++) { r = r + results[i]; } return (r); rationalCurve(4,list(3,2,2)); rationalCurve(4,list(2,2,2,2)); */ }
Note: See TracChangeset for help on using the changeset viewer.