Ignore:
Timestamp:
Aug 24, 2005, 1:49:47 PM (19 years ago)
Author:
ole
Message:

Embedded caching functionality within quantity.set_values and modified validation example lwru2.py to illustrate the advantages that can be gained from supervised caching.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/domain.py

    r1752 r1753  
    1616    def __init__(self, coordinates, vertices, boundary = None,
    1717                 conserved_quantities = None, other_quantities = None,
    18                  tagged_elements = None, geo_reference = None, use_inscribed_circle=False):
     18                 tagged_elements = None, geo_reference = None,
     19                 use_inscribed_circle=False):
    1920
    2021        Mesh.__init__(self, coordinates, vertices, boundary,
     
    141142
    142143
    143     def set_quantity(self, name,
    144                      X,
    145                      location = 'vertices',
    146                      indices = None):
     144    def set_quantity(self, name, *args, **kwargs):
     145                     #X,
     146                     #location = 'vertices',
     147                     #indices = None):
    147148        """Set values for named quantity
    148149
     
    196197        #Set value
    197198        #FIXME: use **kwargs
    198         self.quantities[name].set_values(X,
    199                                          location = location,
    200                                          indices = indices)
    201 
     199        #self.quantities[name].set_values(X,
     200        #                                 location = location,
     201        #                                 indices = indices)
     202        self.quantities[name].set_values(*args, **kwargs)
    202203
    203204
Note: See TracChangeset for help on using the changeset viewer.