source: MML/trunk/machine/SOLEIL/common/toolbox/chebfun_v2_0501/chebfun/chebtests/bvp2.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 395 bytes
Line 
1function pass = bvp2
2
3tol = chebfunpref('eps');
4
5d = domain(-1,0);
6D = diff(d);  I = eye(d);
7A = D*D + 4*D + 200;
8A.lbc = {D+2,1};
9A.rbc = D;
10f = chebfun( 'x.*sin(3*x).^2',d );
11u = A\f;
12du = diff(u);
13
14pass = norm( diff(u,2) + 4*diff(u) + 200*u - f ) < 1e-10*(tol/eps);
15pass = pass && ( abs(du(d(1))+2*u(d(1))-1)<1e-11*(tol/eps) );
16pass = pass && ( abs(feval(diff(u),d(2)))<1e-11*(tol/eps) );
17
18
19
Note: See TracBrowser for help on using the repository browser.