Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14 laplacian tests #22

Merged
merged 26 commits into from
Jul 24, 2024
Merged

14 laplacian tests #22

merged 26 commits into from
Jul 24, 2024

Conversation

lorenzovarese
Copy link
Collaborator

Closes #14

@lorenzovarese lorenzovarese added the enhancement New feature or request label Jul 17, 2024
@lorenzovarese lorenzovarese self-assigned this Jul 17, 2024
@lorenzovarese lorenzovarese linked an issue Jul 17, 2024 that may be closed by this pull request
2 tasks
test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
function lap_ground_truth(in_field::Matrix{Float64})::Matrix{Float64}
nrows, ncols = size(in_field)
out_field = zeros(Float64, nrows, ncols) # Initialize out_field as a matrix of zeros
out_field .= in_field # Copy inplace: to keep the initial values in the border
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this required? For simplicity I would simply keep the boundary values zero. Also it feels a little odd to mix the laplacian of some vector with the actual values.

Copy link
Collaborator Author

@lorenzovarese lorenzovarese Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this copy incorrectly thinking of the case where the edge values were to be saved. However, it is better to start with an empty matrix and handle the edge values differently.
However, since the values at the edges are not touched by the Laplacian. For now I can keep the values at zero, but then it will have to be changed to the actual values of the input.

test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
test/gt2py_fo_exec.jl Show resolved Hide resolved
test/gt2py_fo_exec.jl Show resolved Hide resolved
test/gt2py_fo_exec.jl Show resolved Hide resolved
test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
test/gt2py_fo_exec.jl Outdated Show resolved Hide resolved
Co-authored-by: Till Ehrengruber <[email protected]>
@lorenzovarese lorenzovarese merged commit 8653a38 into main Jul 24, 2024
1 of 3 checks passed
@lorenzovarese lorenzovarese deleted the 14-laplacian-tests branch July 24, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Laplacian Tests
2 participants