Changeset 8262


Ignore:
Timestamp:
Dec 5, 2011, 12:16:35 PM (13 years ago)
Author:
steve
Message:

Added in unit test for dump_triangulation

Location:
trunk/anuga_core/source/anuga_parallel
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py

    r8260 r8262  
    2222#Import matplotlib
    2323
    24 import matplotlib
    25 matplotlib.use('Agg')
    26 import matplotlib.pyplot as plt
    27 import matplotlib.tri as tri
     24
    2825
    2926class Parallel_domain(Domain):
     
    145142    def dump_triangulation(self, filename="domain.png"):
    146143        # Get vertex coordinates, partition full and ghost triangles based on self.tri_full_flag
     144
     145        try:
     146            import matplotlib
     147            matplotlib.use('Agg')
     148            import matplotlib.pyplot as plt
     149            import matplotlib.tri as tri
     150        except:
     151            print "Couldn't import module from matplotlib, probably you need to update matplotlib"
     152            raise
     153
    147154        vertices = self.get_vertex_coordinates()
    148155        full_mask = num.repeat(self.tri_full_flag == 1, 3)
Note: See TracChangeset for help on using the changeset viewer.