<div dir="ltr"><div dir="ltr">On Fri, Jan 6, 2023 at 6:22 PM Venugopal, Vysakh (venugovh) via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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 class="msg1169784742409684257">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_1169784742409684257WordSection1">
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Hello,<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 have created a global vector V using DMCreateGlobalVector of size m. For n processes, the local size of V is m/n.<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">Subsequently, I am using VecScatterCreateToAll to get a sequential copy of the V, let's call it V_seq of local size m. It passes through a function and outputs the vector V_seq_hat (of local
size m).<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 for me to substitute the values of V_seq_hat (at the correct indices) to the original V (with local size m/n)?<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">When I use VecScatterCreateToAll (with SCATTER_REVERSE), I am getting a vector V with new values from V_seq_hat but with local size m. This is causing issues in the rest of my code where the
size of V needs to be m/n.</span></p></div></div></div></blockquote><div><br></div><div>You do not create a new scatter. You use the same scatter you got in the first place, but with SCATTER_REVERSE.</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 class="msg1169784742409684257"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_1169784742409684257WordSection1">
<p class="MsoNormal"><span style="font-family:Arial,sans-serif">Any help would be really appreciated!<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">Thanks,<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><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">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>