-
Notifications
You must be signed in to change notification settings - Fork 31
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
Expanding mask converter #108
Expanding mask converter #108
Conversation
I am not sure what happened with the failed test... has anyone seen this error before? |
Don't worry about the test @bernardopacini. There's currently a known problem (conda-forge/petsc-feedstock#147) with the conda installer for petsc that's causing the test to fail. I believe I heard from @swryan, that changing |
We can talk about the conda/mambc petsc issue in the telecon today. @bernardopacini, Tim has a unit test for the original mask converter functionality. Can you add one for your multiple variable version? |
I added a test following @timryanb's format and added a warning for the unmasking case where values could conflict. The PR should be good to go, though if we prefer to wait until the Conda issue is sorted out we can hold off on merging this for now (as of now I think I am the only one using the multiple mask functionality). |
For reference.. the PR that should fix the conda issue is here.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me as well. Thanks for incorporating that test.
petsc metadata issue should be fixed now. |
As @minrk says, the problem seems to be resolved now and the CI is working again. Think we can go ahead and merge as-is |
The mask converter was previously only usable in the following scenarios:
Masking: 1 input / 1 output
Unmasking: 1 input / 1 output
In some situations, it would be useful to be able to mask several outputs from the same input, and unmask several inputs into the same output. The updated behavior is:
Masking: 1 input / n outputs
Unmasking: n inputs / 1 output
I am using this in DAFoam to redirect specific information to different components and it works as expected. However, it may be helpful to add in a few more warning messages for edge cases if you think that would be worthwhile (for example, to help a user catch overlapping input masks that would overwrite each other).