Ignore:
Timestamp:
Oct 22, 2008, 3:07:29 PM (15 years ago)
Author:
ole
Message:

Much more work on caching and fitting.
Caching of set_quantity as per Okushiri example now works again.

Moreover, caching can now handle instances and ever circular references.

This should address ticket:244 and ticket:302

File:
1 edited

Legend:

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

    r5847 r5855  
    856856            raise msg
    857857
    858         if True: 
     858        if False: 
     859            # FIXME (Ole)
     860            # Use mesh as defined by domain
     861            # This causes problems for caching
     862            # due to quantities changing, but
     863            # it would work if we only passed in
     864            # the appropriate Mesh object.
    859865            vertex_attributes = fit_to_mesh(filename,
    860866                                            mesh=self.domain, 
     
    865871                                            max_read_lines=max_read_lines)
    866872        else:
    867        
     873            # This variant will cause Mesh object to be recreated
     874            # in fit_to_mesh thus doubling up on the neighbour structure
    868875            coordinates = self.domain.get_nodes(absolute=True)
    869876            triangles = self.domain.triangles      #FIXME
    870877            vertex_attributes = fit_to_mesh(filename,
    871878                                            coordinates, triangles,
     879                                            mesh=None,                                           
    872880                                            alpha=alpha,
    873881                                            attribute_name=attribute_name,
Note: See TracChangeset for help on using the changeset viewer.