### boundary condition

184

views

0

Hello,

I've read the already answered questions on this topic, but I still do not understand why I get this warning. Can anyone help?

warning : found no facets matching domain for bouandary condition

Here is an extract of my code. To give you a little background, I'm trying I tried to apply boundary conditions on the top circle edge and a bottom circle

center1 = [20.,100.]

radius = 5

tol=0.001

def on_circlehaut(x, on_boundary):

on_circlehaut = ((x[0]-center1[0])*(x[0]-center1[0]) + (x[1]-center1[1])*(x[1]-center1[1]))

return abs(on_circlehaut-25.)<= 0.05

center2 = [20.,20.]

radius = 5.

def on_circlebas(x, on_boundary):

on_circlebas = ((x[0]-center2[0])*(x[0]-center2[0]) + (x[1]-center2[1])*(x[1]-center2[1]))

return abs(on_circlebas-25.)<= 0.05

I've read the already answered questions on this topic, but I still do not understand why I get this warning. Can anyone help?

warning : found no facets matching domain for bouandary condition

Here is an extract of my code. To give you a little background, I'm trying I tried to apply boundary conditions on the top circle edge and a bottom circle

center1 = [20.,100.]

radius = 5

tol=0.001

def on_circlehaut(x, on_boundary):

on_circlehaut = ((x[0]-center1[0])*(x[0]-center1[0]) + (x[1]-center1[1])*(x[1]-center1[1]))

return abs(on_circlehaut-25.)<= 0.05

center2 = [20.,20.]

radius = 5.

def on_circlebas(x, on_boundary):

on_circlebas = ((x[0]-center2[0])*(x[0]-center2[0]) + (x[1]-center2[1])*(x[1]-center2[1]))

return abs(on_circlebas-25.)<= 0.05

Community: FEniCS Project

Please login to add an answer/comment or follow this question.

Also, consider the following MWE with two options for the return value (on a domain with a circular hole). You are in fact using option 1, but my experience is that option 2 is more robust (it is definitely the preferred option when the interior of the circles do not belong to your domain of interest)