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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4853 - (show annotations)
Wed Apr 9 05:41:57 2014 UTC (5 years, 6 months ago) by jfenwick
File MIME type: text/x-python
File size: 1404 byte(s)
Added import division and changed a few / to //

1 from __future__ import division
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2014 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 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 __copyright__="""Copyright (c) 2003-2014 by University of Queensland
18 http://www.uq.edu.au
19 Primary Business: Queensland, Australia"""
20 __license__="""Licensed under the Open Software License version 3.0
21 http://www.opensource.org/licenses/osl-3.0.php"""
22 __url__="https://launchpad.net/escript-finley"
23
24 from esys.escript import *
25 from esys.escript.linearPDEs import Poisson
26 from esys.finley import Rectangle
27 from esys.weipa import saveVTK
28 # generate domain:
29 mydomain = Rectangle(l0=1.,l1=1.,n0=40, n1=20)
30 # define characteristic function of Gamma^D
31 x = mydomain.getX()
32 gammaD = whereZero(x[0])+whereZero(x[1])
33 # define PDE and get its solution u
34 mypde = Poisson(domain=mydomain)
35 mypde.setValue(f=1,q=gammaD)
36 u = mypde.getSolution()
37 # write u to an external file
38 saveVTK("u.vtu",sol=u)
39

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/pasowrap/doc/examples/usersguide/poisson.py:3661-3674 /branches/py3_attempt2/doc/examples/usersguide/poisson.py:3871-3891 /branches/restext/doc/examples/usersguide/poisson.py:2610-2624 /branches/ripleygmg_from_3668/doc/examples/usersguide/poisson.py:3669-3791 /branches/symbolic_from_3470/doc/examples/usersguide/poisson.py:3471-3974 /branches/symbolic_from_3470/ripley/test/python/doc/examples/usersguide/poisson.py:3517-3974 /trunk/doc/examples/usersguide/poisson.py:1388-2483 /trunk/ripley/test/python/doc/examples/usersguide/poisson.py:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26