-
Notifications
You must be signed in to change notification settings - Fork 210
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
Adds methods to mask_immersed_field!
for BinaryOperations
#3683
Conversation
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.
Well done.
I think the only place this will fail is for number ^ field since we can never make this zero. We could do: b_value = ifelse(a < 0, Inf, -Inf) but this also fails in the case of |
Co-authored-by: Gregory L. Wagner <wagner.greg@gmail.com>
Is it actually important to support the operation |
You don't need to use |
Note that the masking operation is really supposed to set the field to some prescribed value. Not always "0". So it's going to be challenge to cover all cases it would seem. Do we have to support operations that involve numbers and fields? We could just support fields with fields. Things are easier. Also there is a problem if a field appears "on its own", and also in a binary operation. Then one masking operation could cancel the other for operations like |
I think it would be a lot more straight forward to support just + and - and we can guarantee the value is correct then too |
Ok, let's do that |
As discussed in #3676, this PR attempts to add methods to
mask_immersed_field!
forBinaryOperations
so they can be passed as auxiliary fields.This works for binary operations which combine fields or a field and a number. To make + and - work I have to set the value to -/+ the number value for the field.