How do you put Dirichlet conditions to a circle inside a rectangle? I don’t know how to mark the domain of the circle. The rectangle must have Neumann conditions on all sides which i also don’t know how to code
base= Rectangle(Point(0.0, 0.0), Point(X,Y)) hole= Circle(Point(xc, yc), r) mesh3= generate_mesh(base-hole, nx)
Hi, see for instance this demo on using subdomain marking. How to implement Neumann conditions is dependent on your variational form, as they appear after integration by parts. See for instance Poisson with pure neumann conditions or Heat equation with pure Neumann boundary conditions or Define boundaries for intersection of two cylinders