Hi,

I use the following set of codes to create the jacobian matrix,  
however, the dimensions of jacobian becomes 3 (dim=3) although I use  
DACreate2d to create this da. I wanna know where is wrong?

ierr = DMMGCreate(comm, 1, &appCtx, &dmmg);CHKERRQ(ierr);
ierr = DACreate2d(comm,DA_XPERIODIC,DA_STENCIL_STAR, -5, -5,  
PETSC_DECIDE, PETSC_DECIDE, 4, 2, 0, 0, &da);CHKERRQ(ierr);
ierr = DMMGSetDM(dmmg, (DM)da);CHKERRQ(ierr);
ierr = DAGetMatrix(DMMGGetDA(dmmg), MATAIJ, &jacobian);CHKERRQ(ierr);

Thanks very much!

Rebecca

Reply via email to