Skip to content

Differing source and target matrix sizes causes error #51

@Referee1405

Description

@Referee1405

While attempting to utilize this repository for research, I ran across an issue that I believe to be a very quick fix. Essentially, the standard code lines for Laplace, for example, work perfectly:

using IFGF
targets = rand(3,100)
sources = rand(3,100)
charges = rand(100)
IFGF.laplace3d(targets, sources; charges, tol=1e-4)

However, when I changed the size of the targets to not match the sources, the code threw an error complaining about the output size:

using IFGF
targets = rand(3,99)
sources = rand(3,100)
charges = rand(100)
IFGF.laplace3d(targets, sources; charges, tol=1e-4)

After some work, I tracked the issue to the following line in the individual kernel code files. I know for sure the line exists in both the Laplace and Helmholtz, in particular.

out = grad ? zeros(T, 3, m) : zeros(T, n)

The code runs after changing "n" to "m". I just want to make sure that the necessary changes are uploaded and everything continues to work as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions