1 |
# $Id$ |
# $Id$ |
2 |
from mytools import * |
from mytools import Helmholtz |
3 |
from esys.escript import * |
from esys.escript import Lsup |
4 |
import esys.finley |
from esys.finley import Rectangle |
5 |
#... set some parameters ... |
#... set some parameters ... |
6 |
|
kappa=1. |
7 |
omega=0.1 |
omega=0.1 |
8 |
eta=10. |
eta=10. |
9 |
#... generate domain ... |
#... generate domain ... |
12 |
mypde=Helmholtz(mydomain) |
mypde=Helmholtz(mydomain) |
13 |
n=mydomain.getNormal() |
n=mydomain.getNormal() |
14 |
x=mydomain.getX() |
x=mydomain.getX() |
15 |
mypde.setValue(1,omega,omega*x[0],eta,n[0]+eta*x[0]) |
mypde.setValue(kappa,omega,omega*x[0],eta,kappa*n[0]+eta*x[0]) |
16 |
#... calculate error of the PDE solution ... |
#... calculate error of the PDE solution ... |
17 |
u=mypde.getSolution() |
u=mypde.getSolution() |
18 |
print "error is ",Lsup(u-x[0]) |
print "error is ",Lsup(u-x[0]) |
19 |
|
# output should be similar to "error is 1.e-7" |