summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/examples/odetest.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
committerKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
commitdddce3148a2bc785603576b18ffcf72d39adbe47 (patch)
tree14f4c79ef11bcf0820a8d4ff2ab0c5ac009c365c /Build/source/utils/asymptote/examples/odetest.asy
parenta01e51b01f5819b6091af48cdca581e9f2a9282e (diff)
asy 1.93
git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/examples/odetest.asy')
-rw-r--r--Build/source/utils/asymptote/examples/odetest.asy19
1 files changed, 9 insertions, 10 deletions
diff --git a/Build/source/utils/asymptote/examples/odetest.asy b/Build/source/utils/asymptote/examples/odetest.asy
index 68a7a2eca67..69f8ea3fd07 100644
--- a/Build/source/utils/asymptote/examples/odetest.asy
+++ b/Build/source/utils/asymptote/examples/odetest.asy
@@ -8,7 +8,7 @@ write();
write("system integration test");
real[] f(real t, real[] x) {return new real[] {x[1],1.5*x[0]^2};}
write(integrate(new real[] {4,-8},f,0,1,n=100,dynamic=true,tolmin=0.0002,
- tolmax=0.0004,RK3BS,verbose=true));
+ tolmax=0.0004,RK3BS,verbose=false));
write();
write("simultaneous newton test");
@@ -29,16 +29,15 @@ real[] initial(real[] x) {
}
real[] discrepancy(real[] x) {
- write("Error: ",x[0]-1);
- return new real[] {x[0]-1};
+ real error=x[0]-1;
+ write("Error: ",error);
+ return new real[] {error};
}
-write(solveBVP(f,0,1,n=10,initial,discrepancy,guess=new real[] {-30},RK4,
- iterations=10));
+real[] w0=solveBVP(f,0,1,n=10,dynamic=true,tolmin=0.0002,tolmax=0.0004,RK3BS,
+ initial,discrepancy,guess=new real[] {-30},iterations=10);
+write(w0);
write();
-write(solveBVP(f,0,1,n=100,initial,discrepancy,guess=new real[] {-30},RK4,
- iterations=10));
-write();
-write(solveBVP(f,0,1,n=10000,initial,discrepancy,guess=new real[] {-30},RK4,
- iterations=10));
+write(integrate(w0,f,0,1,n=10,dynamic=true,tolmin=0.0002,tolmax=0.0004,RK3BS,
+ verbose=false));
write();