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. However, 
that does not necessarily distribute Vec according to the grid information, DM. 
I'm thinking of doing something like:

ierr = DMDAGetInfo(da,0,&mx,&my,0,0,0,0,0,0,0,0,0,0);CHKERRQ(ierr);

ierr = DMDAGetCorners(da,&xs,&ys,NULL,&xm,&ym,NULL);


and then define the Vec according to (xs,ys,xm,ym). But I'm not sure what 
exactly should I do. 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?

Reply via email to