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

Check dipoles are available before using it #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gaohao95
Copy link
Contributor

This PR checks the dipoles are available before using it. This is to support distributed implementation in potential: inducer/pytential#224.

self.use_dipoles = dipole_vec is not None
if self.use_dipoles:
assert dipole_vec.shape == (self.dim, self.tree.nsources)
if not hasattr(self, "use_dipoles"):
Copy link
Owner

Choose a reason for hiding this comment

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

Add a comment on how we could possibly get here with use_dipoles already set.

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

Successfully merging this pull request may close these issues.

2 participants