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:
466 bytes
|
Line | |
---|
1 | function pass = bcchange |
---|
2 | |
---|
3 | tol = chebfunpref('eps'); |
---|
4 | |
---|
5 | d = domain(-3,4); |
---|
6 | D = diff(d); I = eye(d); |
---|
7 | A = D*D + 4*D + I; |
---|
8 | A.lbc = -1; |
---|
9 | A.rbc = 'neumann'; |
---|
10 | f = chebfun( 'exp(sin(x))',d ); |
---|
11 | u = A\f; |
---|
12 | |
---|
13 | pass(1) = ( abs(u(d(1))+1)<1e-12*(tol/eps)); |
---|
14 | pass(2) = ( abs(feval(diff(u),d(2)))<1e-11*(tol/eps) ); |
---|
15 | |
---|
16 | A.lbc(1) = {eye(d),2}; |
---|
17 | A.lbc(2) = {D,0}; |
---|
18 | A.rbc = []; |
---|
19 | u = A\f; |
---|
20 | |
---|
21 | pass(3) = ( abs(feval(diff(u),d(1)))<1e-7*(tol/eps) ); |
---|
22 | pass(4) = ( abs(feval(u,d(1))-2)<1e-7*(tol/eps) ); |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.