Changeset 3847
- Timestamp:
- Oct 24, 2006, 1:44:30 PM (19 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py
r3649 r3847 162 162 163 163 class File_boundary(Boundary): 164 """Boundary values obtained from file and interpolated. 165 conserved quantities as a function of time. 164 """The File_boundary reads values for the conserved 165 quantities from an sww NetCDF file, and returns interpolated values 166 at the midpoints of each associated boundary segment. 167 Time dependency is interpolated linearly. 166 168 167 169 Assumes that file contains a time series and possibly 168 also spatial info. 169 See docstring for File_function in util.py for details about 170 admissible file formats 171 172 The full solution history is not exactly the same as if 173 the models were coupled: 170 also spatial info. See docstring for File_function in util.py 171 for details about admissible file formats 172 174 173 File boundary must read and interpolate from *smoothed* version 175 174 as stored in sww and cannot work with the discontinuos triangles. 176 175 177 """ 176 Example: 177 Bf = File_boundary('source_file.sww', domain) 178 179 180 Note that the resulting solution history is not exactly the same as if 181 the models were coupled as there is no feedback into the source model. 182 """ 183 184 # FIXME (Ole): I kind of like the name Spatio_Temporal_boundary for this 185 # rather than File_boundary 178 186 179 187 def __init__(self, filename, domain, verbose = False): … … 190 198 #Compute midpoint coordinates for all boundary elements 191 199 #Only a subset may be invoked when boundary is evaluated but 192 #we don't know which ones at this stage since this object can be attached to 200 #we don't know which ones at this stage since this object can 201 #be attached to 193 202 #any tagged boundary later on. 194 203 -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r3804 r3847 166 166 167 167 168 def set_all_limiters(beta): 169 """Shorthand to assign one constant value [0,1[ to all limiters. 170 0 Corresponds to first order, where as larger values make use of 171 the second order scheme. 172 """ 173 174 self.beta_w = beta 175 self.beta_w_dry = beta 176 self.beta_uh = beta 177 self.beta_uh_dry = beta 178 self.beta_vh = beta 179 self.beta_vh_dry = beta 180 self.beta_h = beta 181 168 182 169 183 def set_store_vertices_uniquely(self, flag, reduction=None): … … 1363 1377 1364 1378 1365 #class Spatio_temporal_boundary(Boundary):1366 # """The spatio-temporal boundary, reads values for the conserved1367 # quantities from an sww NetCDF file, and returns interpolated values1368 # at the midpoints of each associated boundaty segment.1369 # Time dependency is interpolated linearly as in util.File_function.#1370 #1371 # Example:1372 # Bf = Spatio_temporal_boundary('source_file.sww', domain)1373 #1374 # """1375 Spatio_temporal_boundary = File_boundary1376 1377 1378 1379 1379 1380 -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r3846 r3847 3488 3488 # Boundary conditions 3489 3489 Br = Reflective_boundary(domain2) 3490 Bf = Spatio_temporal_boundary(domain1.get_name() + '.' +\ 3491 domain1.format, domain2) 3490 #Bf = Spatio_temporal_boundary(domain1.get_name() + '.' +\ 3491 # domain1.format, domain2) 3492 Bf = File_boundary(domain1.get_name() + '.' +\ 3493 domain1.format, domain2) 3492 3494 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) 3493 3495 domain2.check_integrity() … … 3627 3629 # Boundary conditions 3628 3630 Br = Reflective_boundary(domain2) 3629 Bf = Spatio_temporal_boundary(domain1.get_name() + '.' + domain1.format, 3630 domain2) 3631 #Bf = Spatio_temporal_boundary(domain1.get_name() + '.' + domain1.format, 3632 # domain2) 3633 Bf = File_boundary(domain1.get_name() + '.' + domain1.format, 3634 domain2) 3631 3635 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) 3632 3636 domain2.check_integrity()
Note: See TracChangeset
for help on using the changeset viewer.