Changeset 4220


Ignore:
Timestamp:
Feb 6, 2007, 1:38:16 PM (17 years ago)
Author:
ole
Message:

Re-established caching of set_values_from_file until further notice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r4202 r4220  
    738738        triangles = self.domain.triangles      #FIXME
    739739
    740         vertex_attributes = fit_to_mesh(coordinates, triangles,filename,
    741                                         alpha=alpha,
    742                                         attribute_name=attribute_name,
    743                                         use_cache=use_cache,
    744                                         verbose=verbose)
    745                                 #, max_read_lines=max_read_lines)
     740
     741        # Use caching at this level until loading has been fixed.
     742        if use_cache is True:
     743            from anuga.caching import cache
     744            vertex_attributes = cache(fit_to_mesh,
     745                                      (coordinates, triangles, filename),
     746                                      {'alpha': alpha,
     747                                       'attribute_name': attribute_name,
     748                                       'use_cache': False,
     749                                       'verbose': verbose},
     750                                      verbose=verbose)
     751        else:
     752            vertex_attributes = fit_to_mesh(coordinates, triangles,filename,
     753                                            alpha=alpha,
     754                                            attribute_name=attribute_name,
     755                                            use_cache=use_cache,
     756                                            verbose=verbose)
     757           
     758                               
    746759        #Call underlying method using array values
    747760        self.set_values_from_array(vertex_attributes,
Note: See TracChangeset for help on using the changeset viewer.