Skip to content
Snippets Groups Projects

Adaption to new API

Merged Markus Holzer requested to merge holzer/lbmpy:Fixes into master
1 file
+ 4
10
Compare changes
  • Side-by-side
  • Inline
@@ -5,7 +5,7 @@ import pystencils as ps
@@ -5,7 +5,7 @@ import pystencils as ps
from lbmpy.enums import ForceModel, Method, Stencil
from lbmpy.enums import ForceModel, Method, Stencil
from lbmpy.scenarios import create_lid_driven_cavity
from lbmpy.scenarios import create_lid_driven_cavity
from poiseuille import poiseuille_channel
from lbmpy_tests.poiseuille import poiseuille_channel
def test_poiseuille_channel_quicktest():
def test_poiseuille_channel_quicktest():
@@ -25,9 +25,9 @@ def test_entropic_methods():
@@ -25,9 +25,9 @@ def test_entropic_methods():
lid_velocity=0.05, compressible=True, force=(-1e-10, 0),
lid_velocity=0.05, compressible=True, force=(-1e-10, 0),
force_model=ForceModel.LUO)
force_model=ForceModel.LUO)
sc_srt.run(100)
sc_srt.run(1000)
sc_kbc.run(100)
sc_kbc.run(1000)
sc_entropic.run(100)
sc_entropic.run(1000)
assert np.isnan(np.max(sc_srt.velocity[:, :]))
assert np.isnan(np.max(sc_srt.velocity[:, :]))
assert np.isfinite(np.max(sc_kbc.velocity[:, :]))
assert np.isfinite(np.max(sc_kbc.velocity[:, :]))
assert np.isfinite(np.max(sc_entropic.velocity[:, :]))
assert np.isfinite(np.max(sc_entropic.velocity[:, :]))
@@ -37,11 +37,5 @@ def test_cumulant_ldc():
@@ -37,11 +37,5 @@ def test_cumulant_ldc():
sc_cumulant = create_lid_driven_cavity((20, 20), method=Method.CUMULANT, relaxation_rate=1.999999,
sc_cumulant = create_lid_driven_cavity((20, 20), method=Method.CUMULANT, relaxation_rate=1.999999,
compressible=True, force=(-1e-10, 0))
compressible=True, force=(-1e-10, 0))
sc_cumulant_3D = create_lid_driven_cavity((20, 20, 3), method=Method.CUMULANT, relaxation_rate=1.999999,
compressible=True, force=(-1e-10, 0, 0),
galilean_correction=True)
sc_cumulant.run(100)
sc_cumulant.run(100)
sc_cumulant_3D.run(100)
assert np.isfinite(np.max(sc_cumulant.velocity[:, :]))
assert np.isfinite(np.max(sc_cumulant.velocity[:, :]))
assert np.isfinite(np.max(sc_cumulant_3D.velocity[:, :, :]))
Loading