/[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 3346 - (hide annotations)
Fri Nov 12 01:19:02 2010 UTC (8 years, 11 months ago) by caltinay
File MIME type: text/x-python
File size: 1243 byte(s)
Replaced usage of esys.escript.util.saveVTK by weipa.saveVTK in all python
scripts.

1 ksteube 1811
2     ########################################################
3     #
4 jfenwick 2881 # Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 # 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 jfenwick 2881 __copyright__="""Copyright (c) 2003-2010 by University of Queensland
15 ksteube 1811 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 caltinay 3346 from esys.weipa import saveVTK
26 jgs 102 # generate domain:
27 jfenwick 2035 mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
28 jgs 102 # define characteristic function of Gamma^D
29     x = mydomain.getX()
30 gross 327 gammaD = whereZero(x[0])+whereZero(x[1])
31 jgs 102 # define PDE and get its solution u
32 gross 327 mypde = Poisson(domain=mydomain)
33     mypde.setValue(f=1,q=gammaD)
34 jfenwick 2035 u = mypde.getSolution()
35 jfenwick 2578 # write u to an external file
36     saveVTK("u.vtu",sol=u)
37 caltinay 2534

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/lapack2681/doc/examples/usersguide/poisson.py:2682-2741 /branches/restext/doc/examples/usersguide/poisson.py:2610-2624 /trunk/doc/examples/usersguide/poisson.py:1388-2483

  ViewVC Help
Powered by ViewVC 1.1.26