Skip to content

Commit

Permalink
Update fenics_sdc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pancetta committed Dec 24, 2023
1 parent 850b4ec commit 511cca0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pySDC/playgrounds/FEniCS/fenics_sdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 511cca0

Please sign in to comment.