-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Introduce MixedMesh + handle restrictions on MixedMesh #264
base: main
Are you sure you want to change the base?
Introduce MixedMesh + handle restrictions on MixedMesh #264
Conversation
e07f9fa
to
d574909
Compare
e66d41d
to
d3e72fb
Compare
ufl/exproperators.py
Outdated
|
||
def _restrict(self, side): | ||
"""Restrict.""" | ||
if side == "+": | ||
return PositiveRestricted(self) | ||
if side == "-": | ||
return NegativeRestricted(self) | ||
if side == "|": | ||
return SingleValueRestricted(self) |
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.
unneeded?
23696eb
to
ae55b3b
Compare
ae55b3b
to
4ced3a7
Compare
7e4dd44
to
ef8fd99
Compare
restriction = t._side | ||
t, = t.ufl_operands | ||
elif t._ufl_terminal_modifiers_: | ||
raise ValueError("Missing handler for terminal modifier type %s, object is %s." % (type(t), repr(t))) |
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.
Is there a reason for not using f-strings
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.
No. I will fix it when I tidy this up. Thanks.
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.
Fixed.
# Only split mixed coefficients | ||
return o | ||
# Reference value expected | ||
assert reference_value |
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.
Should this throw a run-time error instead of an assertion, as something has clearly gone wrong if you have gotten here without t
being a Coefficient and ReferenceValue.
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.
Yes, fixed.
24006ee
to
988189f
Compare
Co-authored-by: Jørgen Schartum Dokken <[email protected]>
Co-authored-by: Jørgen Schartum Dokken <[email protected]>
988189f
to
36559fc
Compare
Need rebasing.