Changeset 7830
- Timestamp:
- Jun 14, 2010, 8:56:00 PM (15 years ago)
- Location:
- anuga_work/development/flow_1d
- Files:
-
- 15 added
- 7 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/flow_1d/generic_1d/quantity.py
r7827 r7830 1126 1126 if __name__ == "__main__": 1127 1127 #from domain import Domain 1128 from sww_domain importDomain1128 from generic_domain import Generic_domain as Domain 1129 1129 1130 1130 points1 = [0.0, 1.0, 2.0, 3.0] -
anuga_work/development/flow_1d/generic_1d/test_quantity.py
r7827 r7830 473 473 474 474 #Assert that quantities are conserved 475 from Numeric import sum476 475 for k in range(quantity.centroid_values.shape[0]): 477 476 assert allclose (quantity.centroid_values[k], 478 sum(quantity.vertex_values[k,:])/2.0)477 numpy.sum(quantity.vertex_values[k,:])/2.0) 479 478 480 479 -
anuga_work/development/flow_1d/sww_flow
-
Property
svn:ignore
set to
.python_cache
-
Property
svn:ignore
set to
-
anuga_work/development/flow_1d/sww_flow/sww_boundary_conditions.py
r7827 r7830 7 7 __date__ ="$05/06/2010 5:44:05 PM$" 8 8 9 from generic_domain import *9 from flow_1d.generic_1d.generic_domain import * 10 10 11 11 class Dirichlet_boundary(Boundary): -
anuga_work/development/flow_1d/sww_flow/sww_domain.py
r7827 r7830 45 45 import numpy 46 46 47 from generic_domain import *47 from flow_1d.generic_1d.generic_domain import Generic_domain 48 48 from sww_boundary_conditions import * 49 49 from sww_forcing_terms import * … … 65 65 tagged_elements = tagged_elements) 66 66 67 from config import minimum_allowed_height, g, h067 from flow_1d.config import minimum_allowed_height, g, h0 68 68 self.minimum_allowed_height = minimum_allowed_height 69 69 self.g = g … … 84 84 85 85 #Reduction operation for get_vertex_values 86 from util import mean86 from flow_1d.utilities.util import mean 87 87 self.reduction = mean 88 88 #self.reduction = min #Looks better near steep slopes -
anuga_work/development/flow_1d/sww_flow/sww_forcing_terms.py
r7827 r7830 14 14 """ 15 15 16 from util import gradient16 from flow_1d.utilities.util import gradient 17 17 18 18 xmom = domain.quantities['xmomentum'].explicit_update … … 158 158 else: 159 159 try: 160 f = numpy.float(f)160 f = float(f) 161 161 except: 162 162 msg = 'Force field %s must be either a scalar' %f … … 166 166 167 167 168 if __name__ == "__main__":169 print "Hello World";
Note: See TracChangeset
for help on using the changeset viewer.