Add boundary lifting case to restore full SDC order with time-dependent BCs (FEniCS playground)#633
Add boundary lifting case to restore full SDC order with time-dependent BCs (FEniCS playground)#633Copilot wants to merge 2 commits into
Conversation
…for full-order SDC Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com> Agent-Logs-Url: https://github.com/Parallel-in-Time/pySDC/sessions/e779943f-1db6-43de-b754-0662b9de5907
… order_reduction playground Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com> Agent-Logs-Url: https://github.com/Parallel-in-Time/pySDC/sessions/2c36aac4-ef83-455d-b575-cdf0b6c3cbb3
Done in commit
|
The current branch (
No tutorial or problem class files appear in that diff. However, the integration token doesn't have permission to change a PR's base branch programmatically — could you please update the base of PR #633 from |
Adds a third case
fenics_heat_mass_timebc_liftto thepySDC/playgrounds/FEniCS/order_reduction/playground (alongside the existing homogeneous-BC and time-dependent-BC cases) that uses boundary lifting to restore full order of convergence when solving the heat equation with time-dependent Dirichlet boundary conditions, as described in Dutt, Greengard, Rokhlin — Mathematics of Computation, 2001.Approach
The boundary lifting technique decomposes the solution as
where$E(x, t) = (1-2x)\cos(t) + c$ is a linear lift satisfying the time-dependent boundary conditions, and $v(x,t)$ satisfies homogeneous Dirichlet BCs. Applying SDC to $v$ (with homogeneous BCs) restores the full order of convergence that is lost when time-dependent BCs are applied directly.
The equation for the transformed variable$v = u - E$ becomes:
Since$E$ is linear in $x$ , $\Delta E = 0$ and $\partial E/\partial t = -(1-2x)\sin(t)$ , giving:
The exact transformed solution is$v(x,t) = \cos(t)(\cos(\pi x) - 1 + 2x)$ .
Changes
pySDC/playgrounds/FEniCS/order_reduction/problem_classes.py(new file)fenics_heat_mass_timebc_liftinheriting fromfenics_heat_mass_timebc:__init__: overridesself.gwith the modified forcingsolve_system: usesbc_hom(homogeneous BCs) instead of the time-dependentbcu_exact: returns the exact transformed variablepySDC/playgrounds/FEniCS/order_reduction/run_convergence.py(new file)pySDC/playgrounds/FEniCS/order_reduction/test_order_reduction.py(new file)test_sine_no_order_reduction: sine case achieves expected SDC ordertest_cosine_order_reduction: cosine case exhibits order reductiontest_cosine_has_lower_order_than_sine: order reduction is present relative to sine casetest_lifting_restores_full_order: lifting case recovers full SDC convergence order (≥ 2M − 2)test_lifting_has_higher_order_than_timebc: lifting order exceeds plain time-dependent BC order by more than 1.0Security Summary
No security vulnerabilities introduced or found. CodeQL analysis returned 0 alerts.
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.