https://petsc.org/release/manualpages/Mat/MatPtAP/  also note that PETSc has 
a large infrastructure for efficient ways to compute various matrix-matrix 
operations with a variety of algorithms that can be all accessed by starting 
with https://petsc.org/release/manualpages/Mat/MatProductCreate/


> On Jul 17, 2023, at 1:13 PM, Karthikeyan Chockalingam - STFC UKRI via 
> petsc-users <[email protected]> wrote:
> 
> Hello,
>  
> I would like to perform the following operation
>  
> [P^T A P] x’ = P^T f
>  
> Where P is a rectangular matrix and A is a square matrix.  All the matrixes 
> are constructed using MPIAIJ.
>  
> Should I be concerned about the parallel partitioning of the matrix P and A?
>  
> Or can I just go ahead and use MatMatMult to compute [P^T A P]?
>  
> Is there any in-built functionality to perform this operation?
>  
> Kind regards,
> Karthik.
>  
>  
>  
>  
>  
>  
>  
> -- 
> Dr. Karthik Chockalingam
> High-Performance Software Engineer
> Hartree Centre | Science and Technology Facilities Council
> [email protected] 
> <mailto:[email protected]>
>   
>  <image001.png>

Reply via email to