Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion HT/partitioned-heat/fenics-fenics/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
File, solve, lhs, rhs, grad, inner, dot, dx, ds, interpolate, VectorFunctionSpace, MeshFunction, MPI
from fenicsprecice import Adapter
from errorcomputation import compute_errors
from my_enums import ProblemType, Subcycling
from my_enums import ProblemType, Subcycling, DomainPart
import argparse
import numpy as np
from problem_setup import get_geometry, get_problem_setup
Expand Down Expand Up @@ -211,6 +211,10 @@ def determine_gradient(V_g, u, flux):
precice.store_checkpoint(u_n, t, n)

read_data = precice.read_data()
if problem is ProblemType.DIRICHLET and (domain_part is DomainPart.CIRCULAR or domain_part is DomainPart.RECTANGLE):
# We have to data for an arbitrary point that is not on the circle, to obtain exact solution.
# See https://github.com/precice/fenics-adapter/issues/113 for details.
read_data[(0, 0)] = u_D(0, 0)

# Update the coupling expression with the new read data
precice.update_coupling_expression(coupling_expression, read_data)
Expand Down