<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;">
<div>I'm thinking about defining a distributed Vec using grid information. The usual way to do that is to call VecCreateMPI, or VecCreate and VecSetSizes<span style="font-size: 10pt;">. However, that does not necessarily distribute Vec according to the grid
information, DM. I'm thinking of doing something like:</span></div>
<div>
<p style="margin-right: 0px; margin-left: 0px; font-size: 11px; font-family: Menlo;">
ierr = DMDAGetInfo(da,<span style="color: rgb(39, 42, 216);">0</span>,&mx,&my,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>,<span style="color: rgb(39, 42, 216);">0</span>);CHKERRQ(ierr);</p>
</div>
<div>
<p style="margin-right: 0px; margin-left: 0px; font-size: 11px; font-family: Menlo;">
ierr = DMDAGetCorners(da,&xs,&ys,<span style="color: #bb2ca2">NULL</span>,&xm,&ym,<span style="color: #bb2ca2">NULL</span>);</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 11px; font-family: Menlo;">
<br>
</p>
<p style="margin-right: 0px; margin-left: 0px;"><span style="font-family: Tahoma; font-size: 10pt;">and then define the Vec according to (xs,ys,xm,ym). But I'm not sure what exactly should I do. </span><span style="font-size: 10pt;">There are functions KSPSetDM
and SNESSetDM that allows one to pass the DM information into the KSP and SNES. Are there some functions that allow one to pass DM info to a Vec or Mat? </span></p>
</div>
<div><br>
</div>
</div>
</body>
</html>