[petsc-users] On PCFIELDSPLIT and its implementation

Barry Smith bsmith at petsc.dev
Mon Nov 14 13:13:04 CST 2022


   Very sorry for wasting so much of your time. The PCFIELDSPLIT generally will not work with BAIJ matrices because the MatCreateSubMatrix() for BAIJ requires indexing by block in the matrix. Your code should work if you use MPIAIJ matrices.  Note you can still use MatSetValuesBlocked() with MPAIJ matrices.

  Barry


> On Nov 10, 2022, at 5:24 PM, Edoardo alinovi <edoardo.alinovi at gmail.com> wrote:
> 
> True, 
> 
> Maybe somebody merged it already? I have  attached my silly example. 
> 
> To compile:
> mpifort -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc -fdefault-real-8 -o test test.F90 -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include
> 
> Do you need the petsc code MAtt did? 
> <test.F90>



More information about the petsc-users mailing list