Message Boards Message Boards

GROUPS:

How to split the boundary of a region object into four pieces?

Posted 9 years ago
2408 Views
|
0 Replies
|
0 Total Likes
|

I am building a function which needs as input (among other things) a region and four points $z_1, z_2, z_3$ and $z_4$ on its boundary. The function will call NDSolve with separate boundary conditions set on each of the arcs $(z_1,z_2), (z_2, z_3),$ and so on. Is there a way of extracting these arcs from just the region and the four points? Or some other neat way of specifying a DirichletCondition on one of these arcs?

As an additional question, is it possible to do this with an ElementMesh and four boundary nodes?

In both cases, the regions are known to be simply connected and the boundary is not self-intersecting.

Just to clarify, in the normal case one might have something like this:

region = Rectangle[{0,0},{1,1}]; (* unit square region *)
BCs = {DirichletCondition[u[x,y] == 0, x == 0], DirichletCondition[u[x,y] == 1, x == 1]};

and what I'd like to be able to do is get the same result without having to know that the sides satisfy $x=0$ and $x=1$, instead just giving the points $(0,0), (1,0),$ and so on.

EDIT: I failed to mention this, but the points $z_1, z_2, z_3$ and $z_4$ are guaranteed to be in sequence, so that if you trace along the boundary, you will find the points in that exact order. The arcs I want are then e.g. the arc between $z_1$ and $z_2$ that does not contain the points $z_3$ and $z_4$.

POSTED BY: Jonatan Lehtonen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract