[petsc-dev] stencils, ex2f.F, openmp

Jed Brown jedbrown at mcs.anl.gov
Thu Nov 7 22:47:06 CST 2013


Svetlana Tkachenko <svetlana.tkachenko at fastmail.fm> writes:
> The example has a line to compute matrix A from Ax = b, and a line to compute source term (vector b).
>
>> call KSPSetComputeOperators(ksp,ComputeMatrix,ctx,ierr)
>> call KSPSetComputeRHS(ksp,ComputeRHS,ctx,ierr)
>
> What do I use to give it the initial guess on x?

Those lines are registering callbacks, in order to have a uniform
interface that can rediscretize the original operator and on coarse
levels of multigrid.  Look at the implementation of ComputeMatrix and
ComputeRHS for more.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131107/c37113a3/attachment.sig>


More information about the petsc-dev mailing list