summaryrefslogtreecommitdiff
path: root/src/simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/simple.py')
-rw-r--r--src/simple.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simple.py b/src/simple.py
index 524e6fb..5ffe690 100644
--- a/src/simple.py
+++ b/src/simple.py
@@ -174,7 +174,7 @@ class SIMPLE:
def avg_error(self):
return np.absolute(self.b).sum()
- def plot(self, normalize=False, density=1):
+ def plot(self, normalize=False, density=False):
if self.patch:
self.patch.remove()
if self.colorbar:
@@ -194,6 +194,8 @@ class SIMPLE:
u = u / factor
v = v / factor
+ density = density or int((max(self.domain_size) / self.step) / 40)
+
self.plt = plt.quiver(
self.x[::density, ::density],
self.y[::density, ::density],