Changeset 2808
- Timestamp:
- May 5, 2006, 5:01:16 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/parallel/documentation/report.tex
r2767 r2808 20 20 \documentclass{manual} 21 21 22 \usepackage{url} 22 %\usepackage{url} %Already defined in manual 23 23 \usepackage{graphicx} 24 24 -
inundation/pyvolution/domain.py
r2793 r2808 27 27 tagged_elements=None, geo_reference=None, 28 28 use_inscribed_circle=False, 29 mesh_filename=None): 29 mesh_filename=None, 30 use_cache=False, 31 verbose=False): 32 30 33 """Instantiate generic computational Domain. 34 31 35 Input: 32 source: Either a mesh filename or coordinates of mesh vertices. If it is a 33 filename values specified for triangles will be overridden. 36 source: Either a mesh filename or coordinates of mesh vertices. 37 If it is a filename values specified for triangles will 38 be overridden. 34 39 triangles: Mesh connectivity (see mesh.py for more information) 35 40 boundary: See mesh.py for more information 36 41 37 conserved_quantities: List of quantity names entering the conservation equations 42 conserved_quantities: List of quantity names entering the 43 conservation equations 38 44 other_quantities: List of other quantity names 39 45 … … 55 61 coordinates, triangles, boundary, vertex_quantity_dict, \ 56 62 tagged_elements, geo_reference = \ 57 pmesh_to_domain(file_name=mesh_filename) 63 pmesh_to_domain(file_name=mesh_filename, 64 use_cache=use_cache, 65 verbose=verbose) 58 66 59 67 -
inundation/pyvolution/general_mesh.py
r2778 r2808 302 302 #Register the vertices v as lists of 303 303 #(triangle_id, vertex_id) tuples associated with them 304 #This is used for smoothing304 #This is used for averaging multiple vertex values. 305 305 for vertex_id, v in enumerate([a,b,c]): 306 306 if vertexlist[v] is None: -
inundation/pyvolution/pmesh2domain.py
r2607 r2808 114 114 115 115 116 117 116 def pmesh_to_domain(file_name=None, 118 mesh_instance=None): 117 mesh_instance=None, 118 use_cache=False, 119 verbose=False): 120 """ 121 Convert a pmesh file or a pmesh mesh instance to a bunch of lists 122 that can be used to instanciate a domain object. 123 124 use_cache: True means that caching is attempted for the computed domain. 125 """ 126 127 if use_cache is True: 128 from caching import cache 129 result = cache(_pmesh_to_domain, (file_name, mesh_instance), 130 dependencies = [file_name], 131 verbose = verbose) 132 133 else: 134 result = apply(_pmesh_to_domain, (file_name, mesh_instance)) 135 136 return result 137 138 139 def _pmesh_to_domain(file_name=None, 140 mesh_instance=None, 141 use_cache=False, 142 verbose=False): 119 143 """ 120 144 Convert a pmesh file or a pmesh mesh instance to a bunch of lists -
inundation/pyvolution/shallow_water.py
r2731 r2808 101 101 self.store = True 102 102 self.format = 'sww' 103 self.smooth = True 103 self.set_store_vertices_uniquely(False) 104 105 self.quantities_to_be_stored = ['stage','xmomentum','ymomentum'] 106 107 108 def set_store_vertices_uniquely(self, flag, reduction=None): 109 """Decide whether vertex values should be stored uniquely as 110 computed in the model or whether they should be reduced to one 111 value per vertex using self.reduction. 112 """ 113 self.smooth = not flag 104 114 105 115 #Reduction operation for get_vertex_values 106 self.reduction = mean 107 #self.reduction = min #Looks better near steep slopes 108 109 self.quantities_to_be_stored = ['stage','xmomentum','ymomentum'] 110 116 if reduction is None: 117 self.reduction = mean 118 #self.reduction = min #Looks better near steep slopes 119 120 121 111 122 112 123 def set_quantities_to_be_stored(self, q): -
inundation/pyvolution/util.py
r2799 r2808 504 504 505 505 506 from pylab import *507 506 508 507 def sww2timeseries(swwfile, … … 585 584 586 585 """ 586 587 587 588 k = _sww2timeseries(swwfile, 588 589 gauge_filename, … … 606 607 title_on = None, 607 608 verbose = False): 609 610 from pylab import * #FIXME (Ole): List actual functions used rather than * 611 608 612 609 613 assert type(swwfile) == type(''),\
Note: See TracChangeset
for help on using the changeset viewer.