<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:12.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hello All,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I have a problem with DMDA matrix, I hope you can help. I am solving big PDE with TS object and my main data structure is 3D DMDA which has large number of degrees of freedom. I solve this system implicitly
with JFNK. Essentially, I do something like this (J is jacobian, P is preconditioner):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">MatCreateSNESMF(snes,&J); <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">DMCreateMatrix(da,&P);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">SNESSetJacobian(snes,J,P,form_P,env);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">In form_P I form P, but not J, and all works. I also sometimes use 3D DMDA for 2D and 1D problems, just setting Ny=Nz=1 and periodic boundary conditions. I have many degrees of freedom in my DMDA, so I need
blocks to be sparse. So I tried to use DMDASetBlockFillsSparse, before DMCreateMatrix. However, it gives me an error connected that size of each dimension should be divisible by (2*stencil_size +1) to make efficient coloring, which makes using 3D DMDA for
2D problems not optimal. Moreover, it becomes super slow… I am not sure why it needs coloring. Essentially, everything works fine without DMDASetBlockFillsSparse, but once I use it, it complains and becomes slow. Do I do something wrong here? Do I need this
coloring? All I need is more sparse DMDA matrix… I am somewhat lost.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thank you very much and best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Alex Koshkarov.<o:p></o:p></span></p>
</div>
</body>
</html>