We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71132d6 commit 2276093Copy full SHA for 2276093
pyro/compressible_fv4/simulation.py
@@ -1,3 +1,5 @@
1
+import numpy as np
2
+
3
import pyro.compressible_fv4.fluxes as flx
4
from pyro import compressible_rk
5
from pyro.compressible import get_external_sources, get_sponge_factor
@@ -70,6 +72,9 @@ def preevolve(self):
70
72
this solver assumes that the initialization was done to
71
73
cell-centers and converts it to cell-averages."""
74
75
+ # this should only work for dx == dy
76
+ assert np.abs(self.cc_data.grid.dx - self.cc_data.grid.dy) < 1.e-12 * self.cc_data.grid.dx, "grid cells need to be square"
77
78
# we just initialized cell-centers, but we need to store averages
79
for var in self.cc_data.names:
80
self.cc_data.from_centers(var)
pyro/solver-test.ipynb
0 commit comments