/[escript]/trunk/modellib/test/python/run_flow.py
ViewVC logotype

Annotation of /trunk/modellib/test/python/run_flow.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 700 - (hide annotations)
Thu Apr 6 00:13:40 2006 UTC (16 years, 9 months ago) by gross
File MIME type: text/x-python
File size: 1443 byte(s)
A few changes in the build mechanism and the file structure so scons can build release tar files:

  * paso/src/Solver has been moved to paso/src 
  * all test_.py are now run_.py files and are assumed to be passing python tests. they can run by 
    scons py_tests and are part of the release test set
  * escript/py_src/test_ are moved to escript/test/python and are installed in to the build directory 
    (rather then the PYTHONPATH).
  * all py files in test/python which don't start with run_ or test_ are now 'local_py_tests'. they are installed i
    by not run automatically.
  * CppUnitTest is now treated as a escript module (against previous decisions).
  * scons realse builds nor tar/zip files with relvant source code (src and tests in seperate files)

the python tests don't pass yet due to path problems.


1 jgs 147 # $Id$
2    
3     #
4     # small test problem fro temperture advection:
5     #
6     # p=(x0+x1)*t
7     #
8 elspeth 628 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
9     http://www.access.edu.au
10     Primary Business: Queensland, Australia"""
11     __license__="""Licensed under the Open Software License version 3.0
12     http://www.opensource.org/licenses/osl-3.0.php"""
13    
14 jgs 150 from esys.escript.modelframe import Link,Simulation
15     from esys.modellib.geometry import RectangularDomain,VectorConstrainer
16     from esys.modellib.input import Sequencer
17     from esys.modellib.probe import Probe,EvaluateExpression
18     from esys.modellib.flow import SteadyIncompressibleFlow
19 jgs 147
20     dom=RectangularDomain()
21     dom.order=2
22    
23     constraints=VectorConstrainer()
24     constraints.domain=Link(dom)
25     constraints.left=[1,0,0]
26     constraints.right=[1,0,0]
27     constraints.top=[0,1,0]
28     constraints.bottom=[0,1,0]
29     constraints.front=[0,0,1]
30     constraints.back=[0,0,1]
31    
32     sqe=Sequencer()
33     sqe.dt_max=0.3
34     sqe.t_end=1.
35    
36     source=EvaluateExpression()
37     source.domain=Link(dom)
38     source.t=Link(sqe)
39     source.expression=["t","t"]
40    
41     flow=SteadyIncompressibleFlow()
42     flow.domain=Link(dom)
43     flow.internal_force=Link(source,"out")
44     flow.location_prescribed_velocity=Link(constraints,"location_of_constraint")
45     flow.prescribed_velocity=[0.,0.]
46    
47     ptest=Probe()
48     ptest.expression="(x[0]+x[1]-1.)*t"
49     ptest.t=Link(sqe)
50     ptest.value=Link(flow,"pressure")
51    
52 jgs 148 s=Simulation([dom,sqe,Simulation([flow],debug=True),ptest],debug=True)
53 jgs 147 s.writeXML()
54     s.run()

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26