Last change
on this file since 8697 was
3514,
checked in by duncan, 18 years ago
|
Hi all,
I'm doing a change in the anuga structure, moving the code to
\anuga_core\source\anuga
After you have done an svn update, the PYTHONPATH has to be changed to;
PYTHONPATH = anuga_core/source/
This is part of changes required to make installation of anuga quicker and reducing the size of our sandpits.
If any imports are broken, try fixing them. With adding anuga. to them for example. If this seems to have really broken things, email/phone me.
Cheers
Duncan
|
File size:
1.2 KB
|
Line | |
---|
1 | """ |
---|
2 | Script to view tsh file using faster vpython graphics |
---|
3 | """ |
---|
4 | import sys |
---|
5 | from os import sep, path |
---|
6 | sys.path.append('..'+sep+'pyvolution') |
---|
7 | |
---|
8 | |
---|
9 | from shallow_water import Domain |
---|
10 | from pmesh2domain import pmesh_to_domain_instance |
---|
11 | from anuga.pyvolution.util import file_function, Polygon_function, read_polygon |
---|
12 | from Numeric import zeros, Float, maximum, minimum |
---|
13 | from realtime_visualisation_new import * |
---|
14 | |
---|
15 | #------- |
---|
16 | # Domain |
---|
17 | |
---|
18 | |
---|
19 | #------------------------------------------------------------- |
---|
20 | if __name__ == "__main__": |
---|
21 | """ |
---|
22 | View a mesh and data points with attributes. |
---|
23 | """ |
---|
24 | import os, sys |
---|
25 | usage = "usage: %s mesh_input.tsh scale_z"%os.path.basename(sys.argv[0]) |
---|
26 | |
---|
27 | #print len(sys.argv) |
---|
28 | #print sys.argv |
---|
29 | |
---|
30 | if len(sys.argv) < 2: |
---|
31 | print usage |
---|
32 | else: |
---|
33 | mesh_file = sys.argv[1] |
---|
34 | |
---|
35 | scale_z = 1.0 |
---|
36 | if len(sys.argv) > 2: |
---|
37 | scale_z = float(sys.argv[2]) |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | print 'Creating domain from', mesh_file |
---|
42 | domain = pmesh_to_domain_instance(mesh_file, Domain) |
---|
43 | print "Number of triangles = ", len(domain) |
---|
44 | |
---|
45 | visualiser = Visualiser(domain, scale_z = scale_z) |
---|
46 | visualiser.update_quantity('stage') |
---|
Note: See
TracBrowser
for help on using the repository browser.