Skip to content

Check dipoles are available before using it#93

Open
gaohao95 wants to merge 1 commit intoinducer:mainfrom
gaohao95:dist-pytential
Open

Check dipoles are available before using it#93
gaohao95 wants to merge 1 commit intoinducer:mainfrom
gaohao95:dist-pytential

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