[petsc-users] Using operators in KSP

Sun, Hui hus003 at ucsd.edu
Sat Jun 14 17:18:32 CDT 2014


I try to program 2D Stokes equation solver, so it is a linear PDE, and there are u, v, p on every grid point. One way on my mind is to form a matrix-free block matrix. In that way, if the discretization is n by n, then the matrix is 3n by 3n. However, I'm also thinking if it is possible to define the PDE operator as what DMDASNESSetFunctionLocal does in SNES example ex19? In that example, the unknowns (u, v, omega, T) are defined as a struct of four PestsScalar on every grid point, and then the interface converts PestcScalar** to Vec, and an operator instead of a matrix is formed.

Is there a function in KSP similar to DMDASNESSetFunctionLocal in SNES?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140614/68d8452f/attachment.html>


More information about the petsc-users mailing list