Skip to content

Commit

Permalink
Use time at end of time step for Neumann BC
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRodenberg committed Nov 16, 2023
1 parent fef8f25 commit 29fa60b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions partitioned-heat-conduction/fenics/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ def determine_gradient(V_g, u, flux):
vs = split(v)
for i in range(tsm.num_stages):
bc.append(DirichletBC(Vbig.sub(i), du_dt[i], remaining_boundary))
F += vs[i] * coupling_expressions[i] * dolfin.ds
F += vs[i] * coupling_expressions[-1] * dolfin.ds
else:
if problem is ProblemType.DIRICHLET:
bc.append(DirichletBC(Vbig, du_dt[0], remaining_boundary))
bc.append(DirichletBC(Vbig, coupling_expressions[0], coupling_boundary))
else:
bc.append(DirichletBC(Vbig, du_dt[0], remaining_boundary))
F += v * coupling_expressions[0] * dolfin.ds
F += v * coupling_expressions[-1] * dolfin.ds


# get lhs and rhs of variational form
Expand Down

0 comments on commit 29fa60b

Please sign in to comment.