<div dir="ltr"><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 3, 2023 at 4:01 PM Venugopal, Vysakh (venugovh) via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg5889953437619729617">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_5889953437619729617WordSection1">
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Suppose I have a vector ‘V’ of global size m divided into 2 processes (making local size m/2). This vector V is derived from a DM object using DMCreateGlobalVector.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">I am using VecScatterCreateToAll to get a vector V_SEQ.</span></p></div></div></div></blockquote><div>V_SEQ on each process has a size m </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 class="msg5889953437619729617"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_5889953437619729617WordSection1"><p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Is there a way to distribute the V_SEQ to V (where each V has a local size of m/2)?</span></p></div></div></div></blockquote><div><br></div><div>I assume you want to sum V_SEQ into V, since each entry of V will receive two contributions from the two V_SEQ.</div><div>If that's the case, you could use VecScatterBegin/End(toall, V_SEQ, V, ADD_VALUES, SCATTER_REVERSE), where 'toall' is the VecScatter you created with <span style="font-family:Arial,sans-serif">VecScatterCreateToAll.</span><br></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 class="msg5889953437619729617"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_5889953437619729617WordSection1"><p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">I am happy to explain if my question is not clear. Thank you!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Arial,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:Arial,sans-serif;color:black;border:1pt none windowtext;padding:0in">---<u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:Arial,sans-serif;color:black;border:1pt none windowtext;padding:0in">Vysakh Venugopal</span><span style="font-family:Arial,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:Arial,sans-serif;color:black;border:1pt none windowtext;padding:0in">Ph.D. Candidate</span><span style="font-family:Arial,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:Arial,sans-serif;color:black;border:1pt none windowtext;padding:0in">Department of Mechanical Engineering</span><span style="font-family:Arial,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="background:white"><span style="font-family:Arial,sans-serif;color:black;border:1pt none windowtext;padding:0in">University of Cincinnati, Cincinnati, OH 45221-0072</span><span style="font-family:Arial,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></blockquote></div></div>