This routine solves a linear system , using the LU factors of the diagonal blocks computed in jac_rbdpre and mesh parameters passed as module variables. The solution is carried out by dgesl from LINPACK.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | b(*) |
Right-hand side vector on entry and solution vector on return. |
||
real(kind=rk), | intent(in) | :: | bd(*) |
LU factors of the diagonal blocks. |
||
integer, | intent(in) | :: | ipbd(*) |
Pivots for the LU factorizations. |
pure subroutine psol_rbdpre(b, bd, ipbd) !! This routine solves a linear system \(A_R x = b\), using the LU factors of the diagonal !! blocks computed in [[jac_rbdpre]] and mesh parameters passed as module variables. The !! solution is carried out by [[dgesl]] from LINPACK. use linpack, only: dgesl real(rk), intent(inout) :: b(*) !! Right-hand side vector on entry and solution vector on return. real(rk), intent(in) :: bd(*) !! LU factors of the diagonal blocks. `bd` corresponds to the segment `rwp` of `rwork`. integer, intent(in) :: ipbd(*) !! Pivots for the LU factorizations. `ipbd` corresponds to the segment `iwp` of `iwork`. integer :: ib, ibd, jx, jy ib = 1 ibd = 1 do jy = 1, meshy do jx = 1, meshx call dgesl(bd(ibd), mp, mp, ipbd(ib), b(ib), 0) ib = ib + mp ibd = ibd + mpsq end do end do end subroutine psol_rbdpre