[petsc-users] KSPSetComputeRHS and KSPSetComputeOperators

iwaddington . iwaddington at gmail.com
Thu Nov 21 17:44:34 CST 2013


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 ?

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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131121/bedcc168/attachment.html>


More information about the petsc-users mailing list