import sys from os import sep sys.path.append('..'+sep+'pyvolution') import least_squares alpha = 5 mesh_file = 'merimbula_10785.tsh' point_file = 'meri0.xya' mesh_output_file = 'merimbula_10785_%g.tsh'%alpha print mesh_output_file least_squares.fit_to_mesh_file(mesh_file, point_file, mesh_output_file, alpha=alpha, verbose= True, expand_search = False, data_origin = None, mesh_origin = None, precrop = False) from shallow_water import Domain from pmesh2domain import pmesh_to_domain_instance from util import file_function, Polygon_function, read_polygon from Numeric import zeros, Float #------- # Domain filename = mesh_output_file print 'Creating domain from', filename domain = pmesh_to_domain_instance(filename, Domain) print "Number of triangles = ", len(domain)