Changeset 8142
- Timestamp:
- Mar 10, 2011, 9:02:29 PM (14 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/damage_modelling/exposure.py
r7765 r8142 94 94 # described by a list of indexes representing the points 95 95 96 ##97 # @brief Create a comparison method.98 # @param self This object.99 # @param other The other object.100 # @return True if objects are 'same'.101 96 def __cmp__(self, other): 97 """Compare this and another object. 98 99 self this object 100 other the other object 101 102 Returns True if objects are the 'same'. 103 """ 104 102 105 #check that 'other' is an instance of this class 103 106 if isinstance(self, type(other)): … … 120 123 return 1 121 124 122 ##123 # @brief Get a list of column values given a column name.124 # @param column_name The name of the column to get values from.125 # @param use_refind_polygon Unused??126 125 def get_column(self, column_name, use_refind_polygon=False): 127 """ 128 Given a column name return a list of the column values 126 """Get a list of column values given a column name. 127 128 column_name The name of the column to get values from 129 use_refind_polygon if True, only return values in the refined polygon 130 (not yet implemented) 129 131 130 132 Note, the type of the values will be String! 131 133 do this to change a list of strings to a list of floats 132 134 time = [float(x) for x in time] 135 """ 136 137 if not self._attribute_dic.has_key(column_name): 138 msg = 'There is no column called %s!' % column_name 139 raise TitleValueError, msg 140 141 return self._attribute_dic[column_name] 142 143 def get_value(self, value_column_name, known_column_name, 144 known_values, use_refind_polygon=False): 145 """ 146 Do linear interpolation on the known_colum, using the known_value, 147 to return a value of the column_value_name. 148 """ 149 150 pass 151 152 def get_location(self, use_refind_polygon=False): 153 """ 154 Return a geospatial object which describes the 155 locations of the location file. 156 157 Note, if there is not location info, this returns None. 133 158 134 159 Not implemented: … … 137 162 """ 138 163 139 if not self._attribute_dic.has_key(column_name):140 msg = 'There is no column called %s!' % column_name141 raise TitleValueError, msg142 143 return self._attribute_dic[column_name]144 145 ##146 # @brief ??147 # @param value_column_name ??148 # @param known_column_name ??149 # @param known_values ??150 # @param use_refind_polygon ??151 def get_value(self, value_column_name, known_column_name,152 known_values, use_refind_polygon=False):153 """154 Do linear interpolation on the known_colum, using the known_value,155 to return a value of the column_value_name.156 """157 158 pass159 160 ##161 # @brief Get a geospatial object that describes the locations.162 # @param use_refind_polygon Unused??163 def get_location(self, use_refind_polygon=False):164 """165 Return a geospatial object which describes the166 locations of the location file.167 168 Note, if there is not location info, this returns None.169 170 Not implemented:171 if use_refind_polygon is True, only return values in the172 refined polygon173 """174 175 164 return self._geospatial 176 165 177 ##178 # @brief Add column to 'end' of CSV data.179 # @param column_name The new column name.180 # @param column_values The new column values.181 # @param overwrite If True, overwrites last column, doesn't add at end.182 166 def set_column(self, column_name, column_values, overwrite=False): 183 167 """ … … 210 194 self._attribute_dic[column_name] = column_values 211 195 212 ##213 # @brief Save the exposure CSV file.214 # @param file_name If supplied, use this filename, not original.215 196 def save(self, file_name=None): 216 """ 217 Save the exposure csv file 197 """Save the exposure csv file. 198 199 file_name if supplied write this to filename, not original 218 200 """ 219 201 -
trunk/anuga_core/source/anuga/shallow_water_balanced/swb_domain.py
r8124 r8142 11 11 ############################################################################## 12 12 13 ##14 # @brief Class for a shallow water balanced domain.15 13 class Domain(Sww_domain): 16 14 17 ##18 # @brief Instantiate a shallow water balanced domain.19 # @param coordinates20 # @param vertices21 # @param boundary22 # @param tagged_elements23 # @param geo_reference24 # @param use_inscribed_circle25 # @param mesh_filename26 # @param use_cache27 # @param verbose28 # @param full_send_dict29 # @param ghost_recv_dict30 # @param processor31 # @param numproc32 # @param number_of_full_nodes33 # @param number_of_full_triangles34 15 def __init__(self, 35 16 coordinates=None, … … 87 68 self.set_beta(1.0) 88 69 89 ##90 # @brief Run integrity checks on shallow water balanced domain.91 70 def check_integrity(self): 92 71 Sww_domain.check_integrity(self) … … 111 90 assert self.other_quantities[0] == 'friction', msg 112 91 113 ##114 # @brief115 92 def compute_fluxes(self): 116 93 #Call correct module function (either from this module or C-extension) … … 136 113 #print self.flux_timestep 137 114 138 ##139 # @brief140 115 def distribute_to_vertices_and_edges(self): 141 116 """Distribution from centroids to edges specific to the SWW eqn. … … 266 241 267 242 268 ##269 # @brief270 243 def distribute_to_vertices_and_edges_h(self): 271 244 """Distribution from centroids to edges specific to the SWW eqn. … … 393 366 394 367 395 ##396 # @brief Code to let us use old shallow water domain BCs397 368 def conserved_values_to_evolved_values(self, q_cons, q_evol): 398 369 """Mapping between conserved quantities and the evolved quantities.
Note: See TracChangeset
for help on using the changeset viewer.