Changeset 2324
- Timestamp:
- Feb 2, 2006, 3:18:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/pmesh2domain.py
r2319 r2324 7 7 """ 8 8 9 # FXME (DSG-DSG): Combine with function pmesh_to_domain_instance10 9 def pmesh_instance_to_domain_instance(mesh, 11 DomainClass, 12 setting_function=None): 10 DomainClass): 13 11 """ 14 12 """ … … 18 16 vertex_coordinates, vertices, tag_dict, vertex_quantity_dict \ 19 17 ,tagged_elements_dict, geo_reference = \ 20 pmesh_to_domain(mesh_instance=mesh, 21 setting_function=setting_function) 18 _pmesh_to_domain(mesh_instance=mesh) 22 19 23 20 … … 39 36 return domain 40 37 41 def pmesh_to_domain_instance(file Name, DomainClass, setting_function = None):38 def pmesh_to_domain_instance(file_name, DomainClass): 42 39 """ 40 Converts a mesh file(.tsh or .msh), to a Domain instance. 41 42 file_name is the name of the mesh file to convert, including the extension 43 44 DomainClass is the Class that will be returned. 45 It must be a subclass of Domain, with the same interface as domain. 46 43 47 """ 44 48 #FIXME: If this is part of the public interface it needs a good docstring! … … 49 53 vertex_coordinates, vertices, tag_dict, vertex_quantity_dict \ 50 54 ,tagged_elements_dict, geo_reference = \ 51 pmesh_to_domain(fileName=fileName, 52 setting_function=setting_function) 55 _pmesh_to_domain(file_name=file_name) 53 56 54 57 … … 86 89 87 90 88 def pmesh_to_domain(fileName=None, 89 mesh_instance=None, 90 setting_function=None): 91 def _pmesh_to_domain(file_name=None, 92 mesh_instance=None): 91 93 """ 92 94 convert a pmesh dictionary to a list of Volumes. … … 105 107 from load_mesh.loadASCII import import_mesh_file 106 108 107 if file Name is None:109 if file_name is None: 108 110 mesh_dict = mesh_instance.Mesh2IODict() 109 111 else: 110 mesh_dict = import_mesh_file(file Name)112 mesh_dict = import_mesh_file(file_name) 111 113 #print "mesh_dict",mesh_dict 112 114 vertex_coordinates = mesh_dict['vertices']
Note: See TracChangeset
for help on using the changeset viewer.