From 1a568160dbe08de140c8632bdaa39e9d2ca56103 Mon Sep 17 00:00:00 2001 From: ksagiyam Date: Thu, 12 Dec 2024 00:14:15 +0000 Subject: [PATCH] k --- firedrake/variational_solver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firedrake/variational_solver.py b/firedrake/variational_solver.py index 4a1ac396c5..8af6a8b5ff 100644 --- a/firedrake/variational_solver.py +++ b/firedrake/variational_solver.py @@ -301,7 +301,8 @@ def solve(self, bounds=None): problem_dms.append(solution_dm) for dbc in problem.dirichlet_bcs(): - dbc.apply(problem.u_restrict) + if dbc.function_space_parent == problem.u_restrict.function_space(): + dbc.apply(problem.u_restrict) if bounds is not None: lower, upper = bounds