After factorizing a SuperLUMatrix luMat (See the factorization page for information on how to perform factorization), the parallel selected inversion can be computed.
The basic steps for selected inversion are:
A thin interface for the mpi grid strucutre in PSelInv. GridType should be consistent with the grid used by SuperLU.
PMatrix contains the main data structure and computational routines for parallel selected inversion.
Converts a compressed row format SuperLUMatrix into a PMatrix object, using the compressed column format used by PSelInv.
This routine creates the MPI_Communicators and communication pattern used later by both PreSelInv and SelInv routines. The supernodal elimination tree is exploited to add an additional level of parallelism between supernodes. ConstructCommunicationPattern_P2p is called by default.
PreSelInv prepares the structure in L and U so that SelInv only involves matrix-matrix multiplication.
SelInv preforms the actual parallel selected inversion. SelInv_P2p is called by default.
Converts the PMatrix back to the original DistSparseMatrix format.