Skip to content
Snippets Groups Projects
Commit 1b472a22 authored by Markus Holzer's avatar Markus Holzer
Browse files

[BUGFIX] Jacobi codegen test case

parent 05508ef8
No related merge requests found
...@@ -8,10 +8,10 @@ with CodeGeneration() as ctx: ...@@ -8,10 +8,10 @@ with CodeGeneration() as ctx:
# ----- Jacobi 2D - created by specifying weights in nested list -------------------------- # ----- Jacobi 2D - created by specifying weights in nested list --------------------------
src, dst = ps.fields("src, src_tmp: [2D]") src, dst = ps.fields("src, src_tmp: [2D]")
stencil = [[0, -1, 0], stencil = [[0, 1, 0],
[-1, 4, -1], [1, 0, 1],
[0, -1, 0]] [0, 1, 0]]
assignments = ps.assignment_from_stencil(stencil, src, dst, normalization_factor=4 * h**2) assignments = ps.assignment_from_stencil(stencil, src, dst, normalization_factor=0.25 * h**2)
generate_sweep(ctx, 'CudaJacobiKernel2D', assignments, field_swaps=[(src, dst)], target="gpu") generate_sweep(ctx, 'CudaJacobiKernel2D', assignments, field_swaps=[(src, dst)], target="gpu")
# ----- Jacobi 3D - created by using kernel_decorator with assignments in '@=' format ----- # ----- Jacobi 3D - created by using kernel_decorator with assignments in '@=' format -----
......
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