<div dir="ltr"><div dir="ltr">On Wed, Jul 19, 2023 at 7:59 AM Karsten Bolding <<a href="mailto:karsten@bolding-bruggeman.com">karsten@bolding-bruggeman.com</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 dir="ltr">Hello<div><br></div><div>I'm re-implementing a model from mixed C/Fortran to Python where Petsc is used for matrix/vector operations.</div><div><br></div><div>In the C-code I have:</div><div>ierr = VecDuplicateVecs(templateVec,numTracers,&uef);</div><div>to create uef with numTracers vectors.</div><div><br></div><div>Later in the code looping is done of the individual vectors and a sequence of operations are performed.</div><div><br></div><div>I would like to follow the same idea in Python - but do not find any example. </div><div><br></div><div>An alternative would be to make a list of Vecs?</div></div></blockquote><div><br></div><div>There is no optimization here, so I would just make a list of duplicates.</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 dir="ltr"><div>Best Regards,</div><div>Karsten<br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Karsten Bolding<div><a href="mailto:karsten@bolding-bruggeman.com" target="_blank">karsten@bolding-bruggeman.com</a></div><div>+4564422058</div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><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>