Last change
on this file since 1266 was
1264,
checked in by steve, 20 years ago
|
Using vpython faces to speed up visualisation
|
File size:
922 bytes
|
Line | |
---|
1 | import sys |
---|
2 | from os import sep |
---|
3 | sys.path.append('..'+sep+'pyvolution') |
---|
4 | |
---|
5 | |
---|
6 | import least_squares |
---|
7 | |
---|
8 | alpha = 1.0 |
---|
9 | mesh_file = 'merimbula_10785.tsh' |
---|
10 | point_file = 'meri0.xya' |
---|
11 | mesh_output_file = 'merimbula_10785_%g.tsh'%alpha |
---|
12 | |
---|
13 | print mesh_output_file |
---|
14 | |
---|
15 | |
---|
16 | least_squares.fit_to_mesh_file(mesh_file, point_file, mesh_output_file, |
---|
17 | alpha=alpha, verbose= True, |
---|
18 | expand_search = False, |
---|
19 | data_origin = None, |
---|
20 | mesh_origin = None, |
---|
21 | precrop = False) |
---|
22 | |
---|
23 | |
---|
24 | from shallow_water import Domain |
---|
25 | from pmesh2domain import pmesh_to_domain_instance |
---|
26 | from util import file_function, Polygon_function, read_polygon |
---|
27 | from Numeric import zeros, Float |
---|
28 | |
---|
29 | #------- |
---|
30 | # Domain |
---|
31 | filename = mesh_output_file |
---|
32 | print 'Creating domain from', filename |
---|
33 | domain = pmesh_to_domain_instance(filename, Domain) |
---|
34 | print "Number of triangles = ", len(domain) |
---|
Note: See
TracBrowser
for help on using the repository browser.