Changeset 8871
- Timestamp:
- May 20, 2013, 7:26:28 PM (11 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/compile_all.py
r8835 r8871 17 17 18 18 # Attempt to compile all ANUGA extensions 19 20 19 execfile('compile_all.py') 21 22 #os.chdir('utilities')23 #subprocess.call([sys.executable, 'compile.py', 'quad_tree.c'])24 #subprocess.call([sys.executable, 'compile.py', 'sparse_dok.c'])25 #subprocess.call([sys.executable, 'compile.py', 'sparse_csr.c'])26 #execfile('compile_all.py')27 #28 #os.chdir('..')29 #os.chdir('advection')30 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')31 #32 #os.chdir('..')33 #os.chdir('operators')34 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')35 #36 #os.chdir('..')37 #os.chdir('file_conversion')38 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')39 #40 #os.chdir('..')41 #os.chdir('geometry')42 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')43 #44 #os.chdir('..')45 #os.chdir('structures')46 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')47 #48 #os.chdir('..')49 #os.chdir('abstract_2d_finite_volumes')50 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')51 #52 #os.chdir('..')53 #os.chdir('file')54 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')55 #56 #os.chdir('..')57 #os.chdir('shallow_water')58 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')59 #60 #61 #os.chdir('..')62 #os.chdir('mesh_engine')63 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')64 #65 #os.chdir('..')66 #os.chdir('fit_interpolate')67 #subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'rand48.c'])68 #subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'ptinpoly.c'])69 #execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')70 20 71 21 -
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r8820 r8871 745 745 746 746 # Brute force 747 for i in range(len(indices)): 748 self.centroid_values[indices[i]] = values[i] 747 self.centroid_values[indices] = values 748 #for i in range(len(indices)): 749 # self.centroid_values[indices[i]] = values[i] 749 750 elif location == 'unique vertices': 750 751 msg = 'Values array must be 1d' … … 768 769 self.vertex_values[:] = values 769 770 else: 770 for element_index, value in map(None, indices, values): 771 self.vertex_values[element_index] = value 771 self.vertex_values[indices] = values 772 #for element_index, value in map(None, indices, values): 773 # self.vertex_values[element_index] = value 772 774 else: 773 775 msg = 'Values array must be 1d or 2d' -
trunk/anuga_core/source/anuga/operators/rate_operators.py
r8853 r8871 281 281 else: 282 282 rate = self.get_non_spatial_rate() # rate is a scalar 283 fid = self.full_indices 283 284 return num.sum(self.areas[fid]*rate)*self.factor 284 285 else: … … 337 338 min_rate = num.min(rate) 338 339 max_rate = num.max(rate) 339 message = indent + self.label + ': Min rate = %g, Max rate = %g '% (min_rate,max_rate) 340 Q = self.get_Q() 341 message = indent + self.label + ': Min rate = %g m/s, Max rate = %g m/s, Total Q = %g m^3/s'% (min_rate,max_rate, Q) 340 342 else: 341 message = indent + self.label + ': Rate = ' + str(self.get_non_spatial_rate()) 343 rate = self.get_non_spatial_rate() 344 Q = self.get_Q() 345 message = indent + self.label + ': Rate = %g m/s, Total Q = %g m^3/s' % (rate, Q) 342 346 343 347 -
trunk/anuga_core/source/anuga/operators/run_rate_spatial_operator.py
r8853 r8871 141 141 abd t a scalar 142 142 """ 143 if t< 10:143 if t<=5.0: 144 144 return (x+y) 145 145 else: 146 146 return 0*x 147 147 148 factor = 1e-3 149 op3 = Rate_operator(domain, rate = rain, factor=factor) 150 Q3 = numpy.sum(op3.get_spatial_rate()*domain.areas)*factor 148 151 149 #op3 = Rate_operator(domain, rate = rain, factor=1e-3) 150 area3 = numpy.sum(domain.areas) 151 Q3 = numpy.sum(op3.get_rate(t)*area3) 152 153 #op3() 154 #domain.fractional_step_operators.remove(op3) 155 152 156 153 157 #------------------------------------------------------------------------------ … … 169 173 170 174 print indent + 'Exact accumultion = ', accum 171 accum += (Q1+Q2)*yieldstep 175 dd = max(min(yieldstep,5.0-t),0.0) 176 accum += (Q1+Q2)*yieldstep + dd*Q3 172 177 173 178 -
trunk/anuga_core/source/anuga/structures/boyd_box_operator.py
r8861 r8871 75 75 self.culvert_height = self.get_culvert_height() 76 76 77 #FIXME SR: Why is this hard coded! 77 78 self.max_velocity = 10.0 78 79 … … 90 91 91 92 def discharge_routine(self): 93 """Procedure to determine the inflow and outflow inlets. 94 Then use boyd_box_function to do the actual calculation 95 """ 92 96 93 97 local_debug = False 94 98 99 # If the cuvert has been closed, then no water gets through 95 100 if self.culvert_height <= 0.0: 96 101 Q = 0.0 … … 102 107 103 108 109 # delta_total_energy will determine which inlet is inflow 104 110 if self.use_velocity_head: 105 111 self.delta_total_energy = \ … … 118 124 119 125 126 # Only calculate flow if there is some water at the inflow inlet. 120 127 if self.inflow.get_enquiry_depth() > 0.01: #this value was 0.01: 121 128 -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py
r8870 r8871 105 105 106 106 if myid == 0 and verbose: print 'DISTRIBUTING DOMAIN' 107 domain = distribute(domain )107 domain = distribute(domain, verbose=verbose) 108 108 109 109 #-------------------------------------------------------------------------- -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/carrier_greenspan_periodic
-
Property
svn:ignore
set to
.deps
-
Property
svn:ignore
set to
-
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/parabolic_basin
-
Property
svn:ignore
set to
.deps
-
Property
svn:ignore
set to
-
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/trapezoidal_channel
-
Property
svn:ignore
set to
.deps
-
Property
svn:ignore
set to
-
trunk/anuga_core/source/anuga_validation_tests/Case_studies/Merewether/merewether.py
r8833 r8871 137 137 138 138 domain.sww_merge() 139 140 141 finalize() -
trunk/anuga_core/source/anuga_validation_tests/Other_references/radial_dam_break_dry
-
Property
svn:ignore
set to
.deps
-
Property
svn:ignore
set to
Note: See TracChangeset
for help on using the changeset viewer.