Skip to content

Commit 6465b9a

Browse files
committed
sometimes we read in just a CellCenterData2d object, so make this work for
that case too
1 parent e0e6ad3 commit 6465b9a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

analysis/plotvar.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import matplotlib.pyplot as plt
55
import argparse
66
from util import io
7+
import mesh.patch as patch
78

89
# plot a single variable from an output file
910
#
@@ -15,7 +16,11 @@ def makeplot(plotfile, variable, outfile,
1516
log=False, compact=False, quiet=False):
1617

1718
sim = io.read(plotfile)
18-
myd = sim.cc_data
19+
20+
if isinstance(sim, patch.CellCenterData2d):
21+
myd = sim
22+
else:
23+
myd = sim.cc_data
1924
myg = myd.grid
2025

2126
plt.figure(num=1, figsize=(width, height), dpi=100, facecolor='w')

0 commit comments

Comments
 (0)