Ignore:
Timestamp:
Oct 18, 2008, 9:13:18 PM (15 years ago)
Author:
steve
Message:

Changed parallel_api so that global mesh only needs to
be constructed on processor 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/advection/advection.py

    r5242 r5847  
    7373
    7474        #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       
    7778        self.smooth = True
    7879
     
    8283        msg = 'Conserved quantity must be "stage"'
    8384        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
    84108
    85109
     
    161185
    162186
    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 class
    170         """
    171 
    172         #Call basic machinery from parent class
    173         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 actions
    180             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)
    181205
    182206
Note: See TracChangeset for help on using the changeset viewer.