<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hello Matt,<br>
<br>
I am sorry that I have not replied before now.<br>
<br>
I think that the reason you did not understand the question was that
the question was silly but I'll try to explain my thought process
anyway.<br>
<br>
If you have a periodic boundary condition then when you construct a
matrix to be used by a KSP it can address the ghost points
corresponding to the periodic boundaries. So, I wondered if when you
have ghosted boundary conditions you could refer to those ghosted
points too when constructing the matrix. This led on to the question
of how those values would be obtained when the linear solver came to
be executed.<br>
<br>
At this point I expect you are asking why on earth I would want to
do that and I do not have an adequate response.<br>
<br>
I am sorry I wasted your time and thanks for your help,<br>
<br>
David<br>
<br>
<div class="moz-cite-prefix">On 18/02/2020 20:23, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAMYG4G=ifm4dE1mtHadmWkO7vFb1Ucp5MeCMm9ubyyGeX8Oa1Q@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">On Tue, Feb 18, 2020 at 10:23 AM SCOTT David <<a href="mailto:d.scott@epcc.ed.ac.uk" moz-do-not-send="true">d.scott@epcc.ed.ac.uk</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<tt>Hello Matt,<br>
<br>
Thanks for the quick response.<br>
<br>
Sorry to be dense but I want the ghost(ed) values to be
used by KSPSolve where the KSP has an associated DM. I
can, of course create a local vector using
DMGetLocalVector and then populate the ghosted locations
but I do not know how to get the KSPSolve to use these
values in the way that automatically generated periodic,
ghost values would be.<br>
</tt></div>
</blockquote>
<div><br>
</div>
<div>Let me try and understand. We normally distinguish
between global vectors and local vectors. Global vectors,
used in the solver, describe the entire space. Local
vectors, used in assembly, describe overlapping patches of
the space. The ghost values would only be used in assembly,
not in the solver, since they help make the correct value,
but have no equation associated with themselves. Am I
misunderstanding something?</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div><tt>
Thanks,<br>
<br>
David<br>
</tt><br>
<div>On 18/02/2020 12:42, Matthew Knepley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">On Tue, Feb 18, 2020 at 6:03 AM David
Scott <<a href="mailto:d.scott@epcc.ed.ac.uk" target="_blank" moz-do-not-send="true">d.scott@epcc.ed.ac.uk</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Hello,<br>
<br>
I wish to solve a channel flow problem with
different boundary<br>
conditions. In the streamwise direction I may have
periodic or<br>
inlet/outlet BCs. I would like to make my code for
the two cases as<br>
similar as possible. If I use DM_BOUNDARY_PERIODIC
then when performing<br>
a linear solve the ghost values will be set
automatically. For the<br>
inlet/outlet case can I use DM_BOUNDARY_GHOSTED
instead and somehow<br>
arrange for values that I specify to be placed in
the ghost locations?<br>
</blockquote>
<div><br>
</div>
<div>Yes, that is the intent.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Thanks,<br>
<br>
David<br>
<br>
The University of Edinburgh is a charitable body,
registered in Scotland, with registration number
SC005336.<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for
granted before they begin their
experiments is infinitely more
interesting than any results to which
their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before
they begin their experiments is infinitely more
interesting than any results to which their
experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>