<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'm trying to work on 4 Poisson's equations defined on a DMDA grid, Hence the parameter dof in <span style="background-color: rgb(255, 255, 255); font-size: 10pt;">DMDACreate3d
 should be 4, and I've set stencil width to be 4, and stencil type to be star. </span>
<div><span style="background-color: rgb(255, 255, 255); font-size: 10pt;"><br>
</span></div>
<div><span style="background-color: rgb(255, 255, 255); font-size: 10pt;">If I run the code with -pc_type ilu and -ksp_type gmres, it works alright. </span></div>
<div><span style="background-color: rgb(255, 255, 255); font-size: 10pt;"><br>
</span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font size="2">However, if I run with pc_type mg, it gives me an error saying that when it is doing MatSetValues, the argument is out of range, and there is a new nonzero at (60,64) in the matrix. However,
 that new nonzero is expected to be there, the row number 60 corresponds to i=15 and c=0 in x direction, and the column number 64 corresponds to i=16 and c=0 in x direction. So they are next to each other, and the star stencil with width 1 should include that.
 I have also checked with the memory allocations, and I'm found no problem. </font></span></div>
<div><span style="background-color: rgb(255, 255, 255);"><font size="2"><br>
</font></span></div>
<div><font size="2"><span style="background-color: rgb(255, 255, 255);">So I'm wondering if there is any problem of using multigrid on a DMDA with dof greater than 1? </span></font></div>
<div><font size="2"><span style="background-color: rgb(255, 255, 255);"><br>
</span></font></div>
<div><font size="2"><span style="background-color: rgb(255, 255, 255);">Thank you! </span></font></div>
</div>
</body>
</html>