File: release_sanity.py

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (27 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# Very basic sanity checks following a build
# It is important that this script does not create any files unless
# it is _certain_ they are removed when finished or failed.
# We do not want the source directory polluted by actions here


from esys.escript import *
from esys.escript.linearPDEs import Poisson
import esys.ripley as ripley
import esys.finley as finley
import esys.speckley as speckley
from esys.weipa import saveVTK

mydomain = finley.Rectangle(l0=1.,l1=1.,n0=40, n1=20)
# define characteristic function of Gamma^D
x = mydomain.getX()
gammaD = whereZero(x[0])+whereZero(x[1])
# define PDE and get its solution u
mypde = Poisson(domain=mydomain)
mypde.setValue(f=1,q=gammaD)
u = mypde.getSolution()
# write u to an external file  
#saveVTK("u.vtu",sol=u)