psol_rbgpre Subroutine

public subroutine psol_rbgpre(b, bd, ipbd)

Uses

  • proc~~psol_rbgpre~~UsesGraph proc~psol_rbgpre psol_rbgpre module~linpack linpack proc~psol_rbgpre->module~linpack module~daskr_kinds daskr_kinds module~linpack->module~daskr_kinds iso_fortran_env iso_fortran_env module~daskr_kinds->iso_fortran_env

This routine solves a linear system , using the LU factors of the diagonal blocks computed in jac_rbgpre and mesh parameters passed as module variables. The solution is carried out by dgesl from LINPACK.

Arguments

Type IntentOptional 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. 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.


Calls

proc~~psol_rbgpre~~CallsGraph proc~psol_rbgpre psol_rbgpre proc~dgesl dgesl proc~psol_rbgpre->proc~dgesl

Called by

proc~~psol_rbgpre~~CalledByGraph proc~psol_rbgpre psol_rbgpre proc~psol psol proc~psol->proc~psol_rbgpre

Source Code

   subroutine psol_rbgpre(b, bd, ipbd)
   !! This routine solves a linear system \(A_R x = b\), using the LU factors of the diagonal 
   !! blocks computed in [[jac_rbgpre]] 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, ig0, igm1, igx, igy, iip, jx, jy

      ib = 1
      do jy = 1, meshy
         igy = jigy(jy)
         ig0 = (igy - 1)*ngx
         do jx = 1, meshx
            igx = jigx(jx)
            igm1 = igx - 1 + ig0
            ibd = 1 + igm1*mpsq
            iip = 1 + igm1*mp
            call dgesl(bd(ibd), mp, mp, ipbd(iip), b(ib), 0)
            ib = ib + mp
         end do
      end do

   end subroutine psol_rbgpre