Last change
on this file since 4 was
4,
checked in by zhangj, 11 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
373 bytes
|
Line | |
---|
1 | function pass = systemtest1 |
---|
2 | |
---|
3 | % Test solution of a 2x2 system |
---|
4 | % TAD |
---|
5 | |
---|
6 | d=domain(-1,1); |
---|
7 | D=diff(d); |
---|
8 | I=eye(d); |
---|
9 | Z=zeros(d); |
---|
10 | A=[D+I 2*I;D-I D]; |
---|
11 | x=d(:); |
---|
12 | f=[ exp(x) chebfun(1,d) ]; |
---|
13 | A.lbc = [I+D Z]; |
---|
14 | A.rbc = [Z D]; |
---|
15 | u = A\f; |
---|
16 | |
---|
17 | u1 = u(:,1); u2 = u(:,2); |
---|
18 | pass(1) = norm( diff(u1)+u1+2*u2-exp(x)) < 1e4*chebfunpref('eps'); |
---|
19 | pass(2) = norm( diff(u1)-u1+diff(u2)-1 ) < 1e4*chebfunpref('eps'); |
---|
Note: See
TracBrowser
for help on using the repository browser.