Changeset 5847 for anuga_core/source/anuga/advection/advection.py
- Timestamp:
- Oct 18, 2008, 9:13:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/advection/advection.py
r5242 r5847 73 73 74 74 #Only first is implemented for advection 75 self.default_order = self.order = 1 76 75 self.set_default_order(1) 76 self.set_beta(1.0) 77 77 78 self.smooth = True 78 79 … … 82 83 msg = 'Conserved quantity must be "stage"' 83 84 assert self.conserved_quantities[0] == 'stage', msg 85 86 87 def distribute_to_vertices_and_edges(self): 88 """Extrapolate conserved quantities from centroid to 89 vertices and edge-midpoints for each volume 90 91 Default implementation is straight first order, 92 i.e. constant values throughout each element and 93 no reference to non-conserved quantities. 94 """ 95 96 for name in self.conserved_quantities: 97 Q = self.quantities[name] 98 if self._order_ == 1: 99 Q.extrapolate_first_order() 100 elif self._order_ == 2: 101 Q.extrapolate_second_order_and_limit_by_edge() 102 #Q.limit() 103 else: 104 raise 'Unknown order' 105 #Q.interpolate_from_vertices_to_edges() 106 107 84 108 85 109 … … 161 185 162 186 163 def evolve(self,164 yieldstep = None,165 finaltime = None,166 duration = None,167 skip_initial_step = False):168 169 """Specialisation of basic evolve method from parent class170 """171 172 #Call basic machinery from parent class173 for t in Generic_domain.evolve(self,174 yieldstep=yieldstep,175 finaltime=finaltime,176 duration=duration,177 skip_initial_step=skip_initial_step):178 179 #Pass control on to outer loop for more specific actions180 yield(t)187 ## def evolve(self, 188 ## yieldstep = None, 189 ## finaltime = None, 190 ## duration = None, 191 ## skip_initial_step = False): 192 193 ## """Specialisation of basic evolve method from parent class 194 ## """ 195 196 ## #Call basic machinery from parent class 197 ## for t in Generic_domain.evolve(self, 198 ## yieldstep=yieldstep, 199 ## finaltime=finaltime, 200 ## duration=duration, 201 ## skip_initial_step=skip_initial_step): 202 203 ## #Pass control on to outer loop for more specific actions 204 ## yield(t) 181 205 182 206
Note: See TracChangeset
for help on using the changeset viewer.