diff --git a/pyro/advection/problems/smooth.py b/pyro/advection/problems/smooth.py index 3a62c92f7..b941c9a6a 100644 --- a/pyro/advection/problems/smooth.py +++ b/pyro/advection/problems/smooth.py @@ -1,8 +1,5 @@ -import sys - import numpy -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.smooth" @@ -16,12 +13,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the smooth advection problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in smooth.py") - print(my_data.__class__) - sys.exit() - dens = my_data.get_var("density") xmin = my_data.grid.xmin diff --git a/pyro/advection/problems/test.py b/pyro/advection/problems/test.py index ec60c4eaf..59229ff88 100644 --- a/pyro/advection/problems/test.py +++ b/pyro/advection/problems/test.py @@ -1,7 +1,3 @@ -import sys - -from pyro.mesh import patch - DEFAULT_INPUTS = None PROBLEM_PARAMS = {} @@ -11,12 +7,6 @@ def init_data(my_data, rp): """ an init routine for unit testing """ del rp # this problem doesn't use runtime params - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in sedov.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") diff --git a/pyro/advection/problems/tophat.py b/pyro/advection/problems/tophat.py index 9d39f35c0..b108d6119 100644 --- a/pyro/advection/problems/tophat.py +++ b/pyro/advection/problems/tophat.py @@ -1,6 +1,3 @@ -import sys - -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.tophat" @@ -14,12 +11,6 @@ def init_data(myd, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the tophat advection problem...") - # make sure that we are passed a valid patch object - if not isinstance(myd, patch.CellCenterData2d): - print("ERROR: patch invalid in tophat.py") - print(myd.__class__) - sys.exit() - dens = myd.get_var("density") xmin = myd.grid.xmin diff --git a/pyro/advection_nonuniform/problems/slotted.py b/pyro/advection_nonuniform/problems/slotted.py index a48418cf5..17c4ae922 100755 --- a/pyro/advection_nonuniform/problems/slotted.py +++ b/pyro/advection_nonuniform/problems/slotted.py @@ -1,6 +1,5 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.slotted" @@ -15,11 +14,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the slotted advection problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in slotted.py") - offset = rp.get_param("slotted.offset") omega = rp.get_param("slotted.omega") diff --git a/pyro/advection_nonuniform/problems/test.py b/pyro/advection_nonuniform/problems/test.py index 0a74a17c4..f99f6c860 100755 --- a/pyro/advection_nonuniform/problems/test.py +++ b/pyro/advection_nonuniform/problems/test.py @@ -1,6 +1,3 @@ -from pyro.mesh import patch -from pyro.util import msg - DEFAULT_INPUTS = None PROBLEM_PARAMS = {} @@ -10,11 +7,6 @@ def init_data(my_data, rp): """ an init routine for unit testing """ del rp # this problem doesn't use runtime params - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in slotted.py") - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") diff --git a/pyro/burgers/problems/converge.py b/pyro/burgers/problems/converge.py index eae07e997..5b7bf2500 100644 --- a/pyro/burgers/problems/converge.py +++ b/pyro/burgers/problems/converge.py @@ -1,8 +1,5 @@ -import sys - import numpy -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.converge.64" @@ -14,12 +11,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the smooth burgers convergence problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in converge.py") - print(my_data.__class__) - sys.exit() - u = my_data.get_var("x-velocity") v = my_data.get_var("y-velocity") diff --git a/pyro/burgers/problems/test.py b/pyro/burgers/problems/test.py index 339f0ce85..97dbd7b4c 100644 --- a/pyro/burgers/problems/test.py +++ b/pyro/burgers/problems/test.py @@ -1,6 +1,3 @@ -import sys - -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.test" @@ -14,12 +11,6 @@ def init_data(myd, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the burgers test problem...") - # make sure that we are passed a valid patch object - if not isinstance(myd, patch.CellCenterData2d): - print("ERROR: patch invalid in test.py") - print(myd.__class__) - sys.exit() - u = myd.get_var("x-velocity") v = myd.get_var("y-velocity") diff --git a/pyro/burgers/problems/tophat.py b/pyro/burgers/problems/tophat.py index d3371e17a..12bc595d3 100644 --- a/pyro/burgers/problems/tophat.py +++ b/pyro/burgers/problems/tophat.py @@ -1,6 +1,3 @@ -import sys - -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.tophat" @@ -12,12 +9,6 @@ def init_data(myd, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the tophat burgers problem...") - # make sure that we are passed a valid patch object - if not isinstance(myd, patch.CellCenterData2d): - print("ERROR: patch invalid in tophat.py") - print(myd.__class__) - sys.exit() - u = myd.get_var("x-velocity") v = myd.get_var("y-velocity") diff --git a/pyro/compressible/problems/acoustic_pulse.py b/pyro/compressible/problems/acoustic_pulse.py index b57a28589..3e00bb05e 100644 --- a/pyro/compressible/problems/acoustic_pulse.py +++ b/pyro/compressible/problems/acoustic_pulse.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import fv, patch from pyro.util import msg DEFAULT_INPUTS = "inputs.acoustic_pulse" @@ -18,12 +15,6 @@ def init_data(myd, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the acoustic pulse problem...") - # make sure that we are passed a valid patch object - if not isinstance(myd, (patch.CellCenterData2d, fv.FV2d)): - print("ERROR: patch invalid in acoustic_pulse.py") - print(myd.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = myd.get_var("density") xmom = myd.get_var("x-momentum") diff --git a/pyro/compressible/problems/advect.py b/pyro/compressible/problems/advect.py index 9a586f5ba..516ec71e8 100644 --- a/pyro/compressible/problems/advect.py +++ b/pyro/compressible/problems/advect.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.advect.64" @@ -16,12 +13,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the advect problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in advect.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/bubble.py b/pyro/compressible/problems/bubble.py index 1a81cfaef..bc72676f9 100644 --- a/pyro/compressible/problems/bubble.py +++ b/pyro/compressible/problems/bubble.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.bubble" @@ -22,12 +19,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the bubble problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in bubble.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/gresho.py b/pyro/compressible/problems/gresho.py index a3ff4429b..a11af9e39 100644 --- a/pyro/compressible/problems/gresho.py +++ b/pyro/compressible/problems/gresho.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.gresho" @@ -19,12 +16,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the Gresho vortex problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("Error: patch invalid in gresho.py") - print(my_data.__class__) - sys.exit() - # get the density and velocities dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/hse.py b/pyro/compressible/problems/hse.py index d3657a211..4d50b9d83 100644 --- a/pyro/compressible/problems/hse.py +++ b/pyro/compressible/problems/hse.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.hse" @@ -17,12 +14,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the HSE problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in hse.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/kh.py b/pyro/compressible/problems/kh.py index bbf32fb36..191d3b434 100644 --- a/pyro/compressible/problems/kh.py +++ b/pyro/compressible/problems/kh.py @@ -1,6 +1,5 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.kh" @@ -18,11 +17,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the Kelvin-Helmholtz problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in kh.py") - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/logo.py b/pyro/compressible/problems/logo.py index 8aa5ee25c..8f27c263a 100644 --- a/pyro/compressible/problems/logo.py +++ b/pyro/compressible/problems/logo.py @@ -1,9 +1,6 @@ -import sys - import matplotlib.pyplot as plt import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.logo" @@ -17,12 +14,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the logo problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in logo.py") - print(my_data.__class__) - sys.exit() - # create the logo myg = my_data.grid diff --git a/pyro/compressible/problems/quad.py b/pyro/compressible/problems/quad.py index ab3b213d4..ffbe38840 100644 --- a/pyro/compressible/problems/quad.py +++ b/pyro/compressible/problems/quad.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.quad" @@ -41,12 +38,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the quadrant problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in quad.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/ramp.py b/pyro/compressible/problems/ramp.py index 081e63df0..55d872344 100644 --- a/pyro/compressible/problems/ramp.py +++ b/pyro/compressible/problems/ramp.py @@ -1,9 +1,7 @@ import math -import sys import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.ramp" @@ -29,12 +27,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the double Mach reflection problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in ramp.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/rt.py b/pyro/compressible/problems/rt.py index efd31ce90..f22dec200 100644 --- a/pyro/compressible/problems/rt.py +++ b/pyro/compressible/problems/rt.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.rt" @@ -20,12 +17,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the rt problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in rt.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/rt2.py b/pyro/compressible/problems/rt2.py index 612a0d19f..b738f347e 100644 --- a/pyro/compressible/problems/rt2.py +++ b/pyro/compressible/problems/rt2.py @@ -3,11 +3,8 @@ how the growth rate depends on wavenumber. """ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.rt2" @@ -25,12 +22,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the rt problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in rt2.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/sedov.py b/pyro/compressible/problems/sedov.py index d3f9888e3..cafd1591a 100644 --- a/pyro/compressible/problems/sedov.py +++ b/pyro/compressible/problems/sedov.py @@ -1,9 +1,7 @@ import math -import sys import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.sedov" @@ -18,12 +16,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the sedov problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in sedov.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible/problems/sod.py b/pyro/compressible/problems/sod.py index 1da25b732..23ca97b5d 100644 --- a/pyro/compressible/problems/sod.py +++ b/pyro/compressible/problems/sod.py @@ -1,6 +1,3 @@ -import sys - -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.sod.x" @@ -20,12 +17,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the sod problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in sod.py") - print(my_data.__class__) - sys.exit() - # get the sod parameters dens_left = rp.get_param("sod.dens_left") dens_right = rp.get_param("sod.dens_right") diff --git a/pyro/compressible/problems/test.py b/pyro/compressible/problems/test.py index 1a561e22c..b2b5b2bf2 100644 --- a/pyro/compressible/problems/test.py +++ b/pyro/compressible/problems/test.py @@ -1,7 +1,3 @@ -import sys - -from pyro.mesh import patch - DEFAULT_INPUTS = None PROBLEM_PARAMS = {} @@ -11,12 +7,6 @@ def init_data(my_data, rp): """ an init routine for unit testing """ del rp # this problem doesn't use runtime params - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in sedov.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible_react/problems/flame.py b/pyro/compressible_react/problems/flame.py index 589c78ca3..3ee41b6fd 100644 --- a/pyro/compressible_react/problems/flame.py +++ b/pyro/compressible_react/problems/flame.py @@ -1,9 +1,7 @@ import math -import sys import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.flame" @@ -16,12 +14,6 @@ def init_data(my_data, rp): msg.bold("initializing the flame problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in flame.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/compressible_react/problems/rt.py b/pyro/compressible_react/problems/rt.py index beb181eb4..c51c1c73d 100644 --- a/pyro/compressible_react/problems/rt.py +++ b/pyro/compressible_react/problems/rt.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.rt" @@ -15,12 +12,6 @@ def init_data(my_data, rp): msg.bold("initializing the rt problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in rt.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables dens = my_data.get_var("density") xmom = my_data.get_var("x-momentum") diff --git a/pyro/diffusion/problems/gaussian.py b/pyro/diffusion/problems/gaussian.py index 02cc5fc4a..5ab52a10b 100644 --- a/pyro/diffusion/problems/gaussian.py +++ b/pyro/diffusion/problems/gaussian.py @@ -1,8 +1,5 @@ -import sys - import numpy -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.gaussian" @@ -25,12 +22,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the Gaussian diffusion problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in diffuse.py") - print(my_data.__class__) - sys.exit() - phi = my_data.get_var("phi") xmin = my_data.grid.xmin diff --git a/pyro/diffusion/problems/test.py b/pyro/diffusion/problems/test.py index a410c2c66..b34c09a6d 100644 --- a/pyro/diffusion/problems/test.py +++ b/pyro/diffusion/problems/test.py @@ -1,7 +1,3 @@ -import sys - -from pyro.mesh import patch - DEFAULT_INPUTS = None PROBLEM_PARAMS = {} @@ -11,12 +7,6 @@ def init_data(my_data, rp): """ an init routine for unit testing """ del rp # this problem doesn't use runtime params - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in test.py") - print(my_data.__class__) - sys.exit() - # get the density, momenta, and energy as separate variables phi = my_data.get_var("phi") phi[:, :] = 1.0 diff --git a/pyro/incompressible/problems/converge.py b/pyro/incompressible/problems/converge.py index e13c006f5..6d1e810fa 100644 --- a/pyro/incompressible/problems/converge.py +++ b/pyro/incompressible/problems/converge.py @@ -28,7 +28,6 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.converge.64" @@ -42,11 +41,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the incompressible converge problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in converge.py") - # get the velocities u = my_data.get_var("x-velocity") v = my_data.get_var("y-velocity") diff --git a/pyro/incompressible/problems/shear.py b/pyro/incompressible/problems/shear.py index 648b5f3a3..e2ce51da7 100644 --- a/pyro/incompressible/problems/shear.py +++ b/pyro/incompressible/problems/shear.py @@ -18,7 +18,6 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.shear" @@ -33,11 +32,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the incompressible shear problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in shear.py") - # get the necessary runtime parameters rho_s = rp.get_param("shear.rho_s") delta_s = rp.get_param("shear.delta_s") diff --git a/pyro/incompressible_viscous/problems/cavity.py b/pyro/incompressible_viscous/problems/cavity.py index 7ad429c96..deaffaf7b 100644 --- a/pyro/incompressible_viscous/problems/cavity.py +++ b/pyro/incompressible_viscous/problems/cavity.py @@ -10,7 +10,6 @@ https://www.fluid.tuwien.ac.at/HendrikKuhlmann?action=AttachFile&do=get&target=LidDrivenCavity.pdf """ -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.cavity" @@ -24,11 +23,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the lid-driven cavity problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in cavity.py") - myg = my_data.grid if (myg.xmin != 0 or myg.xmax != 1 or diff --git a/pyro/incompressible_viscous/problems/converge.py b/pyro/incompressible_viscous/problems/converge.py index 2c07bd9fe..e968ec678 100644 --- a/pyro/incompressible_viscous/problems/converge.py +++ b/pyro/incompressible_viscous/problems/converge.py @@ -27,7 +27,6 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.converge.64" @@ -41,11 +40,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the incompressible viscous converge problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in converge.py") - # get the velocities u = my_data.get_var("x-velocity") v = my_data.get_var("y-velocity") diff --git a/pyro/incompressible_viscous/problems/shear.py b/pyro/incompressible_viscous/problems/shear.py index 648b5f3a3..e2ce51da7 100644 --- a/pyro/incompressible_viscous/problems/shear.py +++ b/pyro/incompressible_viscous/problems/shear.py @@ -18,7 +18,6 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.shear" @@ -33,11 +32,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the incompressible shear problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in shear.py") - # get the necessary runtime parameters rho_s = rp.get_param("shear.rho_s") delta_s = rp.get_param("shear.delta_s") diff --git a/pyro/lm_atm/problems/bubble.py b/pyro/lm_atm/problems/bubble.py index 2f0254d8a..abdb2b0b4 100644 --- a/pyro/lm_atm/problems/bubble.py +++ b/pyro/lm_atm/problems/bubble.py @@ -1,8 +1,5 @@ -import sys - import numpy -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.bubble" @@ -22,12 +19,6 @@ def init_data(my_data, base, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the bubble problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in bubble.py") - print(my_data.__class__) - sys.exit() - # get the density and velocities dens = my_data.get_var("density") xvel = my_data.get_var("x-velocity") diff --git a/pyro/lm_atm/problems/gresho.py b/pyro/lm_atm/problems/gresho.py index 274febce4..430461087 100644 --- a/pyro/lm_atm/problems/gresho.py +++ b/pyro/lm_atm/problems/gresho.py @@ -1,8 +1,5 @@ -import sys - import numpy -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.gresho" @@ -21,12 +18,6 @@ def init_data(my_data, base, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the Gresho vortex problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in bubble.py") - print(my_data.__class__) - sys.exit() - # get the density and velocities dens = my_data.get_var("density") xvel = my_data.get_var("x-velocity") diff --git a/pyro/swe/problems/acoustic_pulse.py b/pyro/swe/problems/acoustic_pulse.py index a70599999..1deea825d 100644 --- a/pyro/swe/problems/acoustic_pulse.py +++ b/pyro/swe/problems/acoustic_pulse.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.acoustic_pulse" @@ -18,12 +15,6 @@ def init_data(myd, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the acoustic pulse problem...") - # make sure that we are passed a valid patch object - if not isinstance(myd, patch.CellCenterData2d): - print("ERROR: patch invalid in acoustic_pulse.py") - print(myd.__class__) - sys.exit() - # get the height, momenta as separate variables h = myd.get_var("height") xmom = myd.get_var("x-momentum") diff --git a/pyro/swe/problems/advect.py b/pyro/swe/problems/advect.py index b20921b64..ebf301eb1 100644 --- a/pyro/swe/problems/advect.py +++ b/pyro/swe/problems/advect.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.advect" @@ -16,12 +13,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the advect problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in advect.py") - print(my_data.__class__) - sys.exit() - # get the hity, momenta, and energy as separate variables h = my_data.get_var("height") xmom = my_data.get_var("x-momentum") diff --git a/pyro/swe/problems/dam.py b/pyro/swe/problems/dam.py index c7e8a8a39..8c555feab 100644 --- a/pyro/swe/problems/dam.py +++ b/pyro/swe/problems/dam.py @@ -1,6 +1,3 @@ -import sys - -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.dam.x" @@ -18,12 +15,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the dam problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in dam.py") - print(my_data.__class__) - sys.exit() - # get the dam parameters h_left = rp.get_param("dam.h_left") h_right = rp.get_param("dam.h_right") diff --git a/pyro/swe/problems/kh.py b/pyro/swe/problems/kh.py index b5b18727a..5d63ab8e9 100644 --- a/pyro/swe/problems/kh.py +++ b/pyro/swe/problems/kh.py @@ -1,6 +1,5 @@ import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.kh" @@ -17,11 +16,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the Kelvin-Helmholtz problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print(my_data.__class__) - msg.fail("ERROR: patch invalid in kh.py") - # get the heightity, momenta, and energy as separate variables height = my_data.get_var("height") xmom = my_data.get_var("x-momentum") diff --git a/pyro/swe/problems/logo.py b/pyro/swe/problems/logo.py index a88347f9d..e653f25c6 100644 --- a/pyro/swe/problems/logo.py +++ b/pyro/swe/problems/logo.py @@ -1,9 +1,6 @@ -import sys - import matplotlib.pyplot as plt import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.logo" @@ -17,12 +14,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the logo problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in sedov.py") - print(my_data.__class__) - sys.exit() - # create the logo myg = my_data.grid diff --git a/pyro/swe/problems/quad.py b/pyro/swe/problems/quad.py index 336f488c3..e55eca26f 100644 --- a/pyro/swe/problems/quad.py +++ b/pyro/swe/problems/quad.py @@ -1,8 +1,5 @@ -import sys - import numpy as np -from pyro.mesh import patch from pyro.util import msg DEFAULT_INPUTS = "inputs.quad" @@ -29,12 +26,6 @@ def init_data(my_data, rp): if rp.get_param("driver.verbose"): msg.bold("initializing the quadrant problem...") - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in quad.py") - print(my_data.__class__) - sys.exit() - # get the height, momenta, and energy as separate variables h = my_data.get_var("height") xmom = my_data.get_var("x-momentum") diff --git a/pyro/swe/problems/test.py b/pyro/swe/problems/test.py index eeffdc4b2..3ddf94761 100644 --- a/pyro/swe/problems/test.py +++ b/pyro/swe/problems/test.py @@ -1,7 +1,3 @@ -import sys - -from pyro.mesh import patch - DEFAULT_INPTUS = None PROBLEM_PARAMS = {} @@ -11,12 +7,6 @@ def init_data(my_data, rp): """ an init routine for unit testing """ del rp # this problem doesn't use runtime params - # make sure that we are passed a valid patch object - if not isinstance(my_data, patch.CellCenterData2d): - print("ERROR: patch invalid in sedov.py") - print(my_data.__class__) - sys.exit() - # get the hity, momenta, and energy as separate variables h = my_data.get_var("height") xmom = my_data.get_var("x-momentum")