Changeset 2866 for inundation/pyvolution
- Timestamp:
- May 15, 2006, 2:26:21 PM (19 years ago)
- Location:
- inundation/pyvolution
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/domain.py
r2852 r2866 76 76 # Initialise underlying mesh structure 77 77 Mesh.__init__(self, coordinates, triangles, boundary, 78 tagged_elements, geo_reference, use_inscribed_circle) 79 78 tagged_elements, geo_reference, use_inscribed_circle, 79 verbose=verbose) 80 81 if verbose: print 'Initialising Domain' 80 82 from Numeric import zeros, Float, Int 81 83 from quantity import Quantity, Conserved_quantity … … 123 125 124 126 # Setup Communication Buffers 127 128 if verbose: print 'Domain: Set up communication buffers (parallel)' 125 129 self.nsys = len(self.conserved_quantities) 126 130 for key in self.full_send_dict: … … 179 183 # If the mesh file passed any quantity values 180 184 # , initialise with these values. 185 if verbose: print 'Domain: Initialising quantity values' 181 186 self.set_quantity_vertices_dict(vertex_quantity_dict) 182 187 188 189 if verbose: print 'Domain: Done' 190 191 183 192 184 193 -
inundation/pyvolution/general_mesh.py
r2808 r2866 53 53 #input 54 54 def __init__(self, coordinates, triangles, 55 geo_reference=None): 55 geo_reference=None, 56 verbose=False): 56 57 """ 57 58 Build triangles from x,y coordinates (sequence of 2-tuples or … … 62 63 If specified coordinates are assumed to be relative to this origin. 63 64 """ 65 66 if verbose: print 'General_mesh: Building basic mesh structure' 64 67 65 68 from Numeric import array, zeros, Int, Float, sqrt, sum … … 108 111 109 112 #Initialise each triangle 113 if verbose: 114 print 'General_mesh: Computing areas, normals and edgelenghts' 115 110 116 for i in range(N): 111 #if i % (N/10) == 0: print '(%d/%d)' %(i, N) 117 if verbose and i % ((N+10)/10) == 0: print '(%d/%d)' %(i, N) 118 112 119 113 120 x0 = V[i, 0]; y0 = V[i, 1] … … 157 164 158 165 #Build vertex list 166 if verbose: print 'Building vertex list' 159 167 self.build_vertexlist() 160 168 -
inundation/pyvolution/mesh.py
r2778 r2866 60 60 61 61 62 def __init__(self, coordinates, triangles, boundary = None, 63 tagged_elements = None, geo_reference = None, 64 use_inscribed_circle = False): 62 def __init__(self, coordinates, triangles, 63 boundary=None, 64 tagged_elements=None, 65 geo_reference=None, 66 use_inscribed_circle=False, 67 verbose=False): 65 68 """ 66 69 Build triangles from x,y coordinates (sequence of 2-tuples or … … 73 76 from Numeric import array, zeros, Int, Float, maximum, sqrt, sum 74 77 75 76 General_mesh.__init__(self, coordinates, triangles, geo_reference) 78 General_mesh.__init__(self, coordinates, triangles, 79 geo_reference, verbose=verbose) 80 81 if verbose: print 'Initialising mesh' 77 82 78 83 N = self.number_of_elements … … 94 99 95 100 #Initialise each triangle 101 if verbose: print 'Mesh: Computing centroids and radii' 96 102 for i in range(N): 97 #if i % (N/10) == 0: print '(%d/%d)' %(i, N)103 if verbose and i % ((N+10)/10) == 0: print '(%d/%d)' %(i, N) 98 104 99 105 x0 = V[i, 0]; y0 = V[i, 1] … … 144 150 145 151 #Build neighbour structure 152 if verbose: print 'Mesh: Building neigbour structure' 146 153 self.build_neighbour_structure() 147 154 148 155 #Build surrogate neighbour structure 156 if verbose: print 'Mesh: Building surrogate neigbour structure' 149 157 self.build_surrogate_neighbour_structure() 150 158 151 159 #Build boundary dictionary mapping (id, edge) to symbolic tags 160 if verbose: print 'Mesh: Building boundary dictionary' 152 161 self.build_boundary_dictionary(boundary) 153 162 154 163 #Build tagged element dictionary mapping (tag) to array of elements 164 if verbose: print 'Mesh: Building tagged elements dictionary' 155 165 self.build_tagged_elements_dictionary(tagged_elements) 156 166 … … 159 169 160 170 #FIXME check integrity? 171 if verbose: print 'Mesh: Done' 161 172 162 173 def __repr__(self):
Note: See TracChangeset
for help on using the changeset viewer.