On Mon, Jul 17, 2023 at 2:22 PM Barry Smith <bsm...@petsc.dev> wrote:
> > > 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 <petsc-users@mcs.anl.gov> wrote: > > Hello, > > I would like to perform the following operation > > [P^T A P] x’ = P^T f > > If P is thin, you might want to consider making a MatLRC and passing that to a Krylov method, probably with a small precondition matrix (like P^T diag(A) P). Thanks, Matt > 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 > karthikeyan.chockalin...@stfc.ac.uk > > <image001.png> > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>