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