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

Annotation of /trunk/doc/examples/usersguide/poisson.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2484 - (hide annotations)
Mon Jun 22 04:22:19 2009 UTC (9 years, 7 months ago) by gross
File MIME type: text/x-python
File size: 1211 byte(s)
numarray removed from docu; Locator revised.
1 ksteube 1811
2     ########################################################
3     #
4     # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7     #
8     # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11     #
12     ########################################################
13    
14     __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15     Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18     __license__="""Licensed under the Open Software License version 3.0
19     http://www.opensource.org/licenses/osl-3.0.php"""
20 jfenwick 2344 __url__="https://launchpad.net/escript-finley"
21 ksteube 1811
22 gross 565 from esys.escript import *
23 gross 567 from esys.escript.linearPDEs import Poisson
24 jfenwick 2035 from esys.finley import Rectangle
25 jgs 102 # generate domain:
26 jfenwick 2035 mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
27 jgs 102 # define characteristic function of Gamma^D
28     x = mydomain.getX()
29 gross 327 gammaD = whereZero(x[0])+whereZero(x[1])
30 jgs 102 # define PDE and get its solution u
31 gross 327 mypde = Poisson(domain=mydomain)
32     mypde.setValue(f=1,q=gammaD)
33 jfenwick 2035 u = mypde.getSolution()
34 jgs 102 # write u to an external file
35 jfenwick 2035 saveVTK("u.xml",sol=u)

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo

  ViewVC Help
Powered by ViewVC 1.1.26