<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>hi Matt,<br>
</p>
<div class="moz-cite-prefix">On 14/06/21 9:54 pm, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAMYG4Gnwbq-3--T-4PnHRV5tK8fR5i8HHCgx=8v5++HTYgo4=Q@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">Okay, I think it is not so hard to get
what you want in parallel. There are only two kinds of faces
with supportSize == 1:
<div><br>
</div>
<div> a) Faces on the global boundary</div>
<div><br>
</div>
<div> b) Faces which are "shared"</div>
</div>
</div>
</blockquote>
<p>I think there is an unfortunate corner case in which faces can be
both on the global boundary *and* shared.<br>
</p>
<p>For example: consider a square 2D mesh which is partitioned down
the middle, so one process has the left half. With overlap = 1, a
row of ghost cells will be added along the right-hand edge of this
half of the mesh. The two faces at top and bottom of this row of
ghost cells are on the global boundary and also shared.</p>
<p>With your algorithm these would be labelled as flux faces, but
they shouldn't be (as they are on the global boundary). I can't
see a way to eliminate those kinds of shared faces - can you?</p>
<p>- Adrian<br>
</p>
<blockquote type="cite" cite="mid:CAMYG4Gnwbq-3--T-4PnHRV5tK8fR5i8HHCgx=8v5++HTYgo4=Q@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>It is the second set that is somewhat confusing because
PetscSF does not have 2-sided information by default.
However, it can make it.</div>
<div>There is a two-step check for "shared":</div>
<div><br>
</div>
<div> 1) Is the face in the PetscSF? Here you just check for
it in the sorted "locals" array from PetscSFGetGraph()</div>
<div><br>
</div>
<div> 2) Is the face ghosted on another process? You can get
this from PetscSFGetRootRanks().</div>
<div><br>
</div>
<div>I just wrote a small function to check for "shared"
points. After that, I think you can just run</div>
<div><br>
</div>
<div> 1) After distribution, loop overall faces on current
process</div>
<div><br>
</div>
<div> If face on open boundary, label face as flux face</div>
<div><br>
</div>
<div> else:</div>
<div><br>
</div>
<div> if face has supportSize != 1 or (supportSize == 1
&& shared), label face as flux face</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt </div>
</div>
<br>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: <a class="moz-txt-link-abbreviated" href="mailto:a.croucher@auckland.ac.nz">a.croucher@auckland.ac.nz</a>
tel: +64 (0)9 923 4611</pre>
</body>
</html>