Changeset 1178 for inundation/ga/storm_surge/pyvolution/pmesh2domain.py
- Timestamp:
- Mar 31, 2005, 4:51:54 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/pmesh2domain.py
r969 r1178 14 14 from domain import Domain 15 15 16 vertex_coordinates, volumes, tag_dict, vertex_quantity_dict ,tagged_elements_dict = \ 17 pmesh_to_domain(fileName, 18 setting_function=setting_function) 16 vertex_coordinates, volumes, tag_dict, vertex_quantity_dict \ 17 ,tagged_elements_dict, geo_reference = \ 18 pmesh_to_domain(fileName, 19 setting_function=setting_function) 19 20 20 assert issubclass(DomainClass, Domain), 21 assert issubclass(DomainClass, Domain),"DomainClass is not a subclass of Domain." 21 22 22 23 23 24 24 25 domain = DomainClass(vertex_coordinates, volumes, tag_dict, 25 tagged_elements = tagged_elements_dict ) 26 tagged_elements = tagged_elements_dict, 27 geo_reference = geo_reference ) 26 28 27 29 … … 35 37 # This doesn't work on the domain instance. 36 38 # This is still needed so -ve elevations don't cuase 'lakes' 37 # The fixme we discussed was to only create a quantity when its values are set. 39 # The fixme we discussed was to only create a quantity when its values 40 #are set. 38 41 # I think that's the way to go still 39 42 … … 70 73 volumes = mesh_dict['triangles'] 71 74 72 #if setting_function:73 # if not type(setting_function) is ListType:74 # setting_function = [setting_function]75 # for funct in setting_function:76 # mesh_dict = funct(mesh_dict, vertices = mesh_vertices,77 # volumes = volumes)78 79 80 75 vertex_quantity_dict = {} 81 76 point_atts = transpose(mesh_dict['vertex_attributes']) 82 77 point_titles = mesh_dict['vertex_attribute_titles'] 78 geo_reference = mesh_dict['geo_reference'] 83 79 for quantity, value_vector in map (None, point_titles, point_atts): 84 80 vertex_quantity_dict[quantity] = value_vector 85 81 tag_dict = pmesh_dict_to_tag_dict(mesh_dict) 86 82 tagged_elements_dict = build_tagged_elements_dictionary(mesh_dict) 87 return vertex_coordinates, volumes, tag_dict, vertex_quantity_dict,tagged_elements_dict 83 return vertex_coordinates, volumes, tag_dict, vertex_quantity_dict,tagged_elements_dict, geo_reference 88 84 89 85
Note: See TracChangeset
for help on using the changeset viewer.