File: SoftwareM2.tst.m2

package info (click to toggle)
macaulay2 1.24.11%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 171,648 kB
  • sloc: cpp: 107,850; ansic: 16,307; javascript: 4,188; makefile: 3,947; lisp: 682; yacc: 604; sh: 476; xml: 177; perl: 114; lex: 65; python: 33
file content (39 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
needsPackage "NumericalAlgebraicGeometry"
needs "NumericalAlgebraicGeometry/benchmarks.m2"

--NAGtrace 100
for predictor in {RungeKutta4,
     --Multistep,
     Tangent,Euler,Secant} do (
     (S,T,solsS) = smallExample();
     M = track(S,T,solsS, gamma=>0.6+0.8*ii, Software=>M2, Predictor=>predictor);
     SM = sortSolutions M;
     assert areEqual(SM/coordinates, {{-1, 0}, {0, -1}, {0, 1}, {1, 0}} );
     )
(S,T,solsS) = smallInfinityExample()
M = track(S,T,solsS, gamma=>0.6+0.8*ii, Software=>M2);
SM = sortSolutions M;
assert all({0,3}, i->status SM#i=!=Regular) 
assert all({1,2}, i->status SM#i===Regular) 

for predictor in {RungeKutta4,Certified} do (
     (S,T,solsS) = smallExample();
     M = track(S,T,solsS, gamma=>0.6+0.8*ii, Software=>M2, Predictor=>predictor, Projectivize=>true, Normalize=>true);
     SM = sortSolutions M;
     print SM;
     assert areEqual(SM/coordinates, {{-1, 0}, {0, -1}, {0, 1}, {1, 0}}, Tolerance=>1e-3 );
     )

					     
-- T = cyclic(5,CC) -- runs for a minute
T = example2()
SM = solveSystem(T_*, Software=>M2, PostProcess=>false)
assert(  
    #select(SM,s->status s === Regular) == 2
     and #select(SM,s->status s === Infinity) +
     #select(SM,s->status s === MinStepFailure) == 14 
     )

end
restart
load "NumericalAlgebraicGeometry/TST/SoftwareM2.tst.m2"