On Fri, Dec 2, 2011 at 9:25 AM, Treue, Frederik <span dir="ltr">&lt;<a href="mailto:frtr@risoe.dtu.dk">frtr@risoe.dtu.dk</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="DA" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a> [mailto:<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>] <b>On Behalf Of </b>Matthew Knepley<br>
<b>Sent:</b> Friday, December 02, 2011 4:01 PM<br><b>To:</b> PETSc users list<br><b>Subject:</b> Re: [petsc-users] newbie question on the parallel allocation of matrices<u></u><u></u></span></p></div><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">On Fri, Dec 2, 2011 at 8:58 AM, Treue, Frederik &lt;<a href="mailto:frtr@risoe.dtu.dk" target="_blank">frtr@risoe.dtu.dk</a>&gt; wrote:<u></u><u></u></p><div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a> [mailto:<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>] <b>On Behalf Of </b>Jed Brown<br>
<b>Sent:</b> Friday, December 02, 2011 1:32 PM<br><b>To:</b> PETSc users list<br><b>Subject:</b> Re: [petsc-users] newbie question on the parallel allocation of matrices</span><u></u><u></u></p></div><p class="MsoNormal">
 <u></u><u></u></p><div><p class="MsoNormal">On Fri, Dec 2, 2011 at 03:32, Treue, Frederik &lt;<a href="mailto:frtr@risoe.dtu.dk" target="_blank">frtr@risoe.dtu.dk</a>&gt; wrote:<u></u><u></u></p><p class="MsoNormal">OK, but that example seems to assume that you wish to connect only one matrix (the Jacobian) to a DA – I wish to specify many and I think I found this done in ksp ex39, is that example doing anything deprecated or will that work for me, e.g. with the various basic mat routines (matmult, matAXPY etc.) in a multiprocessor setup?<u></u><u></u></p>
</div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">What do you mean by wanting many matrices? How do you want to use them? <span lang="EN-US">There is DMCreateMatrix() (misnamed DMGetMatrix() in petsc-3.2), which you can use as many times as you want.<span style="color:#1f497d">`</span></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">And this was the one I needed. However I have another question: What does DMDA_BOUNDARY_GHOSTED do, compared to DMDA_BOUNDARY_PERIODIC? From experience I now know that the PERIODIC option automagically does the right thing when I’m defining matrices so I can simply specify the same stencil at all points. Does DMDA_BOUNDARY_GHOSTED do something similar? And if so, how is it controlled, ie. How do I specify if I’ve got Neumann or Dirichlet conditions, and what order extrapolation you want, and so forth? And if not, does it then ONLY make a difference if I’m working with more than on processor, ie. If everything is sequential, is DMDA_BOUNDARY_GHOSTED and DMDA_BOUNDARY_NONE equivalent?</span><u></u><u></u></p>
</div></div></div></blockquote></div><p class="MsoNormal"><br>GHOSTED adds extra space at the boundary so you can always use the same stencil, but you decide what goes in there. <u></u><u></u></p><div><p class="MsoNormal">
<span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Does this apply to both matrices and vectors, ie. Will the ghost points be considered part of my computational domain or not?</span></p>
</div></div></div></blockquote></div><br clear="all"><div>The ghost nodes only exist in local vectors, not the global vectors for the solver.</div><div><br></div><div>  Matt</div><div><br></div>-- <br>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<br>