<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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. 
<div><br>
</div>
<div>Is there a function in KSP similar to <span style="font-size: 10pt;">DMDASNESSetFunctionLocal in SNES? </span></div>
</div>
</body>
</html>