[petsc-dev] MatMatMult

Pierre Jolivet Pierre.Jolivet at enseeiht.fr
Tue Jun 6 09:51:29 CDT 2017

I'm implementing MatMatMult for A of type MPIBAIJ, B and C of type 
1) I copied around some code for the case where A is of type MPIAIJ. 
Any reason why communications and computations are not overlapped in the 
MatMatMult implementation? 
2) I'm having trouble when scall == MAT_REUSE_MATRIX. Here, 
it looks that the numeric part of the MatMatMult (which is called when 
scall == MAT_REUSE_MATRIX) is hardwired to this routine 
Thus, at runtime, this call fails 
because it is trying to cast a matrix to Mat_MPIAIJ instead of 
Mat_MPIBAIJ. Any chance you could let me know how to dispatch the call 
(*(*C)->ops->matmultnumeric) to the proper implementation (depending on 
the type of A)?

Thanks in advance for your help,

More information about the petsc-dev mailing list