Changeset 1753 for inundation/validation/LWRU2/lwru2.py
- Timestamp:
- Aug 24, 2005, 1:49:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/validation/LWRU2/lwru2.py
r1747 r1753 11 11 12 12 13 read_mesh = True #Use large unstructured mesh generated from create_mesh.py14 #read_mesh = False #Use small structured mesh13 #read_mesh = True #Use large unstructured mesh generated from create_mesh.py 14 read_mesh = False #Use small structured mesh 15 15 16 16 import sys … … 128 128 domain.filename, _ = os.path.splitext(base) 129 129 130 #LS code to be included in set_quantity 131 print 'Reading points' 132 from pyvolution import util, least_squares 133 #points, attributes = util.read_xya(filenames.bathymetry_filename[:-4] + '.pts') 134 points, attributes = cache(util.read_xya, 135 filenames.bathymetry_filename[:-4] + '.pts') 130 print 'Initial values' 136 131 137 elevation = attributes['elevation'] 138 139 #Fit attributes to mesh 140 #vertex_attributes = least_squares.fit_to_mesh(domain.coordinates, 141 # domain.triangles, 142 # points, 143 # attributes['elevation'], 144 # alpha = 0.0001, 145 # verbose=True) 146 147 vertex_attributes = cache(least_squares.fit_to_mesh, 148 (domain.coordinates, domain.triangles, 149 points, elevation) , 150 {'alpha': 0.0001, 'verbose': True}) 151 152 print 'Initial values' 153 domain.set_quantity('elevation', vertex_attributes) 154 #domain.set_quantity('elevation', points=points, attributes=attributes['elevation'], alpha=0.0001) 132 domain.set_quantity('elevation', 133 filename=filenames.bathymetry_filename[:-4] + '.pts', 134 alpha = 0.0001, 135 verbose = True, 136 use_cache = True) 137 155 138 domain.set_quantity('friction', 0.0) 156 139 domain.set_quantity('stage', 0.0)
Note: See TracChangeset
for help on using the changeset viewer.