Commit ff80ad70 authored by Markus Holzer's avatar Markus Holzer
Browse files

Minor fix

parent 371f8c04
Pipeline #35526 passed with stages
in 143 minutes and 43 seconds
......@@ -4,7 +4,6 @@ import waLBerla as wlb
import pystencils
from pystencils import make_slice
from tempfile import TemporaryDirectory
from pathlib import Path
from pystencils.boundaries import BoundaryHandling, Neumann
......@@ -138,11 +137,14 @@ def test_parallel_datahandling_boundary_conditions():
default_target=pystencils.Target.GPU)
src = dh.add_array('src', values_per_cell=1)
dh.fill("src", 0.0, ghost_layers=True)
dh.fill("src", 1.0, ghost_layers=False)
dh.fill(src.name, 0.0, ghost_layers=True)
dh.fill(src.name, 1.0, ghost_layers=False)
src2 = dh.add_array('src2', values_per_cell=1)
src_cpu = dh.add_array('src_cpu', values_per_cell=1, gpu=False)
dh.fill("src_cpu", 0.0, ghost_layers=True)
dh.fill("src_cpu", 1.0, ghost_layers=False)
dh.fill(src_cpu.name, 0.0, ghost_layers=True)
dh.fill(src_cpu.name, 1.0, ghost_layers=False)
boundary_stencil = [(1, 0), (-1, 0), (0, 1), (0, -1)]
boundary_handling_cpu = BoundaryHandling(dh, src_cpu.name, boundary_stencil,
......@@ -165,10 +167,10 @@ def test_parallel_datahandling_boundary_conditions():
boundary_handling()
dh.all_to_cpu()
for block in dh.iterate():
np.testing.assert_almost_equal(block["src_cpu"], block["src"])
np.testing.assert_almost_equal(block[src_cpu.name], block[src.name])
assert dh.custom_data_names == ('boundary_handling_cpuIndexArrays', 'boundary_handling_gpuIndexArrays')
dh.swap("src", "src2", gpu=True)
dh.swap(src.name, src2.name, gpu=True)
def test_save_data():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment