DACreate2d() and DAGetMatrix()

(Rebecca) Xuefei YUAN xy2102 at columbia.edu
Thu Feb 12 11:44:33 CST 2009


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


More information about the petsc-users mailing list