From 511cca0fc561599f499e496ee2e45673bc5b1a96 Mon Sep 17 00:00:00 2001 From: Robert Speck Date: Sun, 24 Dec 2023 13:26:13 +0100 Subject: [PATCH] Update fenics_sdc.py --- pySDC/playgrounds/FEniCS/fenics_sdc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pySDC/playgrounds/FEniCS/fenics_sdc.py b/pySDC/playgrounds/FEniCS/fenics_sdc.py index e0419915c5..5c8bc5b95d 100644 --- a/pySDC/playgrounds/FEniCS/fenics_sdc.py +++ b/pySDC/playgrounds/FEniCS/fenics_sdc.py @@ -43,6 +43,7 @@ def uexact(t, order, V): # set boundary values bc = df.DirichletBC(V, df.Constant(1.0), Boundary) +bh = df.DirichletBC(V, df.Constant(0.0), Boundary) # Stiffness term (Laplace) u_trial = df.TrialFunction(V) @@ -117,6 +118,7 @@ def uexact(t, order, V): for j in range(nnodes + 1): res -= dt * Q[m + 1, j] * (fimpl[j] + fexpl[j]) res = df.project(res, V) + bh.apply(res.vector()) res_norm.append(df.norm(res, 'L2')) uex = uexact(t0 + dt, order, V)