On Sat, Feb 11, 2012 at 00:00, recrusader <[email protected]> wrote:
in http://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex43.c...
Why are two matrices set to MATAIJ? if I set MATAIJCUSP, is them changed?
1468: DMCreateMatrix<http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DMCreateMatrix.html#DMCreateMatrix> (da_Stokes,MATAIJ<http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MATAIJ.html#MATAIJ> ,&A);
1469: DMCreateMatrix <http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DMCreateMatrix.html#DMCreateMatrix>(da_Stokes,MATAIJ <http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MATAIJ.html#MATAIJ>,&B);
You have to follow the code down to where those matrices are used. 1478: AssembleA_Stokes(A,da_Stokes,da_prop,properties); 1479: AssembleA_PCStokes(B,da_Stokes,da_prop,properties); This uses a "block preconditioner", the B matrix is intentionally different from the A matrix in order to handle the saddle point.