aboutsummaryrefslogtreecommitdiff
path: root/ldc_2d.py
diff options
context:
space:
mode:
Diffstat (limited to 'ldc_2d.py')
-rw-r--r--ldc_2d.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldc_2d.py b/ldc_2d.py
index 979f7be..40edf89 100644
--- a/ldc_2d.py
+++ b/ldc_2d.py
@@ -17,9 +17,9 @@ def generate_moment_plots(lattice, moments):
for i, m in enumerate(moments):
print("Generating plot %d of %d." % (i+1, len(moments)))
- velocity = numpy.ndarray(shape=tuple(reversed(lattice.geometry.inner_span())))
+ velocity = numpy.ndarray(shape=tuple(reversed(lattice.geometry.inner_size())))
for x, y in lattice.geometry.inner_cells():
- velocity[y-1,x-1] = numpy.sqrt(m[1,lattice.idx(x,y)]**2 + m[2,lattice.idx(x,y)]**2)
+ velocity[y-1,x-1] = numpy.sqrt(m[1,lattice.gid(x,y)]**2 + m[2,lattice.gid(x,y)]**2)
plt.figure(figsize=(10, 10))
plt.imshow(velocity, origin='lower', cmap=plt.get_cmap('seismic'))