<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 21, 2013 at 5:44 PM, iwaddington . <span dir="ltr"><<a href="mailto:iwaddington@gmail.com" target="_blank">iwaddington@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>HI everybody, I have a doubt concerning how the function KSPSetComputeRHS works, because according to its prototype one of its arguments is a pointer to a function that takes a vector object as argument, not a pointer towards a vector object, so how is it able to set the rhs if the passage of the vector is done by value and not by reference ?<br>
</div></div></blockquote><div><br></div><div>The values of the Vec can be set, rather than changing the object pointer itself.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div></div>Another thing is the functioning of  KSPSetComputeOperators. I want to set the linear system matrix and I want the preconditioning matrix to be equal, so can I just set the linar system matrix in the function that is argument of KSPSetComputeOperators, or do I need to make a matcopy in it ?<br>


</div>
</blockquote></div><br>No, just give the same argument twice.</div><div class="gmail_extra"><br></div><div class="gmail_extra">   Matt<br clear="all"><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
</div></div>