# [petsc-users] Parallel dense solve with submatrices

Barry Smith bsmith at mcs.anl.gov
Sat Aug 26 17:54:18 CDT 2017

```  Toon,

We don't have any such way of doing this. Note that sparse factorization packages store the "factors" in specialized data structures that are unlikely to be acessable to perform such operations as you describe below.

I think what you want to do is an over optimization not worth the coding effort.

Barry

> On Aug 25, 2017, at 5:01 AM, Toon Weyens <weyenst at gmail.com> wrote:
>
> Dear all,
>
> For a Bounday Element Method problem I require the solution of a system of linear equations with multiple right-hand sides. Though this is a dense system, I still want to do it via Petsc. Would the best way to do this be through something such as
>
> -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps  ?
>
> Furthermore, I refine my grid in a regular way, which leads to a new system of equations of size 2N x 2N where N is the original number of unknowns before refining it. The upper-left matrix A_11 in this new system is identical to the unrefined matrix (multiplied by 0.5). The other three blocks A_12, A_21 and A_22 are new:
>
>        A_11 A_12
>        A_21 A_22
>
> The question is now whether knowledge about the unrefined matrix A_11 can be used to speed up calculation of the refined system?
>
> I was thinking, for example, about using the LU decomposition of A_11 to calculate the LU decomposition of the entire matrix A using the well-known formula's
>
> L_21 U_11 = A_21
> L_11 U_12 = A_12
> L_22 U_22 = A_22 - L_21 U_12
>
> where L_21 and U_12 are full matrices, L_11, L_22 are lower triangular matrices and U_11, U_22 are upper triangular.
>
> Is there any way to do this in Petsc?
>
> Or is there a better thing I can do?
>
> Thanks very much in advance!
>
> Regards.
>
> Dr. Toon Weyens
> ITER Organization

```