Changeset 2670 for trunk

Show
Ignore:
Timestamp:
07/14/2008 10:13:00 AM (6 months ago)
Author:
guyer
Message:

Patches from Tony Yu.
http://article.gmane.org/gmane.comp.python.fipy/1003

Location:
trunk/fipy
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/fipy/variables/faceVariable.py

    r2274 r2670  
    6060        return _MeshVariable._getArithmeticBaseClass(self, other) 
    6161 
     62    def copy(self): 
     63        return self.__class__(mesh = self.mesh,  
     64                              name = self.name + "_copy",  
     65                              value = self.getValue()) 
     66 
    6267    def getDivergence(self): 
    6368        """ 
  • trunk/fipy/viewers/matplotlibViewer/matplotlib2DViewer.py

    r2608 r2670  
    110110        self.collection = PolyCollection(polys) 
    111111        self.collection.set_linewidth(0) 
    112         ax.add_patch(self.collection) 
     112        try: 
     113            ax.add_patch(self.collection) 
     114        except: 
     115            # PolyCollection not child of PatchCollection in matplotlib 0.98 
     116            ax.add_collection(self.collection) 
    113117 
    114118        if self._getLimit('xmin') is None: