Ignore:
Timestamp:
May 30, 2006, 4:17:18 PM (19 years ago)
Author:
steve
Message:

updated timestep using only full cells

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/domain.py

    r2866 r3021  
    7979                      verbose=verbose)
    8080
    81         if verbose: print 'Initialising Domain'       
    82         from Numeric import zeros, Float, Int
     81        if verbose: print 'Initialising Domain'
     82        from Numeric import zeros, Float, Int, ones
    8383        from quantity import Quantity, Conserved_quantity
    8484
     
    117117        # List of other quantity names
    118118        if ghost_recv_dict  is None:
    119             self.ghost_recv_dict  = []
     119            self.ghost_recv_dict  = {}
    120120        else:
    121121            self.ghost_recv_dict  = ghost_recv_dict
     
    125125
    126126        # Setup Communication Buffers
    127            
     127
    128128        if verbose: print 'Domain: Set up communication buffers (parallel)'
    129129        self.nsys = len(self.conserved_quantities)
     
    136136            buffer_shape = self.ghost_recv_dict[key][0].shape[0]
    137137            self.ghost_recv_dict[key].append(zeros( (buffer_shape,self.nsys) ,Float))
     138
     139
     140        # Setup cell full flag
     141        # =1 for full
     142        # =0 for ghost
     143        N=self.number_of_elements
     144        self.tri_full_flag = ones(N, Int)
     145        for i in self.ghost_recv_dict.keys():
     146            for id in self.ghost_recv_dict[i][0]:
     147                self.tri_full_flag[id] = 0
     148
    138149
    139150        #Defaults
     
    186197            self.set_quantity_vertices_dict(vertex_quantity_dict)
    187198
    188            
     199
    189200        if verbose: print 'Domain: Done'
    190201
    191            
     202
    192203
    193204
     
    730741                self.number_of_steps = 0
    731742                self.number_of_first_order_steps = 0
    732                
     743
    733744
    734745    def evolve_to_end(self, finaltime = 1.0):
Note: See TracChangeset for help on using the changeset viewer.