Skip to content
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

Remove old _function_arg_update attribute when setting DirichletBC value #3376

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

jrmaddison
Copy link
Contributor

Description

Fixes the following behaviour:

bc = DirichletBC(V, expression_depending_on_u_to_be_interpolated, sub_domain)
old_value = bc.function_arg
bc.homogenize()
u.assign(new_u_value)
new_value = bc.function_arg  # Modifies old_value

The second access to bc.function_arg modifies the value obtained in the first access, which seems inefficient/unintended.

Caused by an old update function, bc._function_arg_update, being retained after the bc.homogenize call.

@dham dham merged commit 48997eb into firedrakeproject:master Feb 14, 2024
10 checks passed
@jrmaddison jrmaddison deleted the bc_function_arg_update_fix branch February 14, 2024 17:35
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