Skip to content

Leo/nested interpolate#5097

Draft
leo-collins wants to merge 2 commits into
mainfrom
leo/nested-interpolate
Draft

Leo/nested interpolate#5097
leo-collins wants to merge 2 commits into
mainfrom
leo/nested-interpolate

Conversation

@leo-collins
Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +186 to +188
lowered_operand = NestedInterpolateLowerer()(operand)
if lowered_operand is not operand:
return get_interpolator(self._ufl_expr_reconstruct_(lowered_operand))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't this approach freeze the nested expression? What if we change the numeric values between different calls to assemble on the same expression?

@DAGTraverser.postorder
def _(self, o: UFLInterpolate, operand: Expr) -> Expr:
from firedrake.assemble import assemble
return as_ufl(assemble(o._ufl_expr_reconstruct_(operand)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't BaseFormAssembler the intended way of traversing the DAG for assemble?

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