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

Density-likes should not be wrangler-global #79

Open
inducer opened this issue Sep 11, 2023 · 2 comments
Open

Density-likes should not be wrangler-global #79

inducer opened this issue Sep 11, 2023 · 2 comments

Comments

@inducer
Copy link
Owner

inducer commented Sep 11, 2023

Specifically, this code here:

# FIXME: dipole_vec shouldn't be stored here! Otherwise, we'll recompute
# bunches of tree-dependent stuff for every new dipole vector.
# It's not super bad because the dipole vectors are typically geometry
# normals and thus change about at the same time as the tree... but there's
# still no reason for them to be here.
self.use_dipoles = dipole_vec is not None
if self.use_dipoles:
assert dipole_vec.shape == (self.dim, self.tree.nsources)
if not dipoles_already_reordered:
dipole_vec = self.reorder_sources(dipole_vec)
self.dipole_vec = dipole_vec.copy(order="F")
else:
self.dipole_vec = None

should not exist.

cc @gaohao95

@inducer
Copy link
Owner Author

inducer commented Sep 11, 2023

It turns out that source arguments are wrangler-global in sumpy as well:

https://github.com/inducer/sumpy/blob/e1048b0a4c0c8512d0765e4eef09963dcc77ab0f/sumpy/fmm.py#L314

So both need to change.

@inducer inducer changed the title Dipole vector should not be wrangler-global Density-likes should not be wrangler-global Sep 11, 2023
@inducer
Copy link
Owner Author

inducer commented Sep 11, 2023

So the way that this should go IMO is that we need to change the drive_fmm interface to take in a dictionary (containing densities, and, if needed, dipole vectors and other per-source arguments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant