/[escript]/trunk/doc/examples/usersguide/poisson_vtk.py
ViewVC logotype

Contents of /trunk/doc/examples/usersguide/poisson_vtk.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4154 - (show annotations)
Tue Jan 22 09:30:23 2013 UTC (6 years, 7 months ago) by jfenwick
File MIME type: text/x-python
File size: 1305 byte(s)
Round 1 of copyright fixes
1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2013 by University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development since 2012 by School of Earth Sciences
13 #
14 ##############################################################################
15
16 __copyright__="""Copyright (c) 2003-2013 by University of Queensland
17 http://www.uq.edu.au
18 Primary Business: Queensland, Australia"""
19 __license__="""Licensed under the Open Software License version 3.0
20 http://www.opensource.org/licenses/osl-3.0.php"""
21 __url__="https://launchpad.net/escript-finley"
22
23 from esys.escript import *
24 from esys.escript.linearPDEs import Poisson
25 from esys.finley import Rectangle
26 from esys.weipa import saveVTK
27 # generate domain:
28 mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
29 # define characteristic function of Gamma^D
30 x = mydomain.getX()
31 gammaD = whereZero(x[0])+whereZero(x[1])
32 # define PDE and get its solution u
33 mypde = Poisson(domain=mydomain)
34 mypde.setValue(f=1,q=gammaD)
35 u = mypde.getSolution()
36 # write u to an external file
37 saveVTK("u.vtu",sol=u)
38

  ViewVC Help
Powered by ViewVC 1.1.26