Hello All,

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):

MatCreateSNESMF(snes,&J);
DMCreateMatrix(da,&P);
SNESSetJacobian(snes,J,P,form_P,env);

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.

Thank you very much and best regards,
Alex Koshkarov.

Reply via email to