What did you profile to determine that expanding indices is significant? matsetvaluesblocked4_ was made specially for PETSc-FUN3D with BAIJ matrices.
I take it you can't use BAIJ because you use GAMG? Mark Adams <mfad...@lbl.gov> writes: > Is there a Mat AIJSeq method For MatSetValuesBlocked, > like matsetvaluesblocked4_ that is not hardwired for bs=4?