mld2p4-2:

mlprec/mld_cmlprec_aply.f90
 mlprec/mld_dmlprec_aply.f90
 mlprec/mld_smlprec_aply.f90
 mlprec/mld_zmlprec_aply.f90

Fix description of algorithms.
stopcriterion
Salvatore Filippone 14 years ago
parent e3d7a95d53
commit f986cf585e

@ -173,9 +173,7 @@
! !
! Additive multilevel ! Additive multilevel
! !
! This is additive both within the levels and among levels. ! For details on the additive multilevel Schwarz preconditioner, see
!
! For details on the additive multilevel Schwarz preconditioner see the
! Algorithm 3.1.1 in the book: ! Algorithm 3.1.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
@ -185,130 +183,127 @@
! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding ! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding
! restriction operator from level ilev-1 to level ilev). ! restriction operator from level ilev-1 to level ilev).
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Call recursively itself ! a. Call recursively itself
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*y(1)
! !
! !
! !
! Hybrid multiplicative, pre-smoothing only ! Hybrid multiplicative---pre-smoothing
! !
! The preconditioner M is hybrid in the sense that it is multiplicative through the ! The preconditioner M is hybrid in the sense that it is multiplicative through the
! levels and additive inside a level. ! levels and additive inside a level.
! !
! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz ! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.1 in the book: ! preconditioner, see Algorithm 3.2.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev >1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev).
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer y(ilev+1) to the current level:
! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! c. Transfer Y(ilev+1) to the current level. ! 4. if ilev == 1 Transfer the inner y to the external:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! Yext = beta*Yext + alpha*y(1)
!
! 4. if ilev == 1 Transfer the inner Y to the external
! Yext = beta*Yext + alpha*Y(1)
!
! !
! !
! Hybrid multiplicative, post-smoothing only
! !
! Hybrid multiplicative, post-smoothing variant
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. If ilev < nlev ! 2. If ilev < nlev
!
! a. Call recursively itself passing ! a. Call recursively itself passing
! r(ilev) for transfer to the next level ! x(ilev) for transfer to the next level
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = P(ilev+1)*y(ilev+1)
! ! c. Compute the residual:
! c. Compute the residual ! x(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! d. Apply the base preconditioner to the residual at the current level:
!
! 3. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*x(ilev)
! ! Else
! Apply the base preconditioner to the residual at the current level:
! ! The sum over the subdomains is carried out in the
! ! application of K(ilev)
! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner Y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !
! !
! Hybrid multiplicative, pre- and post-smoothing (two-side) variant ! Hybrid multiplicative, pre- and post-smoothing (two-side) variant
! !
!
! For details on the symmetrized hybrid multiplicative multilevel Schwarz ! For details on the symmetrized hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.2 of the book: ! preconditioner, see Algorithm 3.2.2 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! ! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer Y(ilev+1) to the current level. ! c. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! ! d. Compute the residual:
! d. Compute the residual ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! e. Apply the base preconditioner at the current level to the residual:
!
! 4. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev)
!
! !
! 5. if ilev == 1 Transfer the inner Y to the external ! 5. if ilev == 1 Transfer the inner Y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !

@ -173,7 +173,7 @@
! Additive multilevel ! Additive multilevel
! This is additive both within the levels and among levels. ! This is additive both within the levels and among levels.
! !
! For details on the additive multilevel Schwarz preconditioner see the ! For details on the additive multilevel Schwarz preconditioner, see
! Algorithm 3.1.1 in the book: ! Algorithm 3.1.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
@ -183,23 +183,23 @@
! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding ! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding
! restriction operator from level ilev-1 to level ilev). ! restriction operator from level ilev-1 to level ilev).
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Call recursively itself ! a. Call recursively itself
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*y(1)
! !
! !
! !
@ -209,109 +209,104 @@
! levels and additive inside a level. ! levels and additive inside a level.
! !
! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz ! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.1 in the book: ! preconditioner, see Algorithm 3.2.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev >1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev).
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer y(ilev+1) to the current level:
! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! c. Transfer Y(ilev+1) to the current level. ! 4. if ilev == 1 Transfer the inner y to the external:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! Yext = beta*Yext + alpha*y(1)
!
! 4. if ilev == 1 Transfer the inner Y to the external
! Yext = beta*Yext + alpha*Y(1)
! !
! !
! !
! Hybrid multiplicative, post-smoothing variant ! Hybrid multiplicative, post-smoothing variant
! !
! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! x(ilev) = PT(ilev)*x(ilev-1)
!
! 1. If ilev >1 Transfer X(ilev-1) to the current level.
! X(ilev) = PT(ilev)*X(ilev-1)
! !
! 2. If ilev < nlev ! 2. If ilev < nlev
!
! a. Call recursively itself passing ! a. Call recursively itself passing
! r(ilev) for transfer to the next level ! x(ilev) for transfer to the next level
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = P(ilev+1)*y(ilev+1)
! ! c. Compute the residual:
! c. Compute the residual ! x(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! d. Apply the base preconditioner to the residual at the current level:
!
! 3. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*x(ilev)
! ! Else
! Apply the base preconditioner to the residual at the current level:
! ! The sum over the subdomains is carried out in the
! ! application of K(ilev)
! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner Y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !
! !
! Hybrid multiplicative, pre- and post-smoothing (two-side) variant ! Hybrid multiplicative, pre- and post-smoothing (two-side) variant
! !
!
! For details on the symmetrized hybrid multiplicative multilevel Schwarz ! For details on the symmetrized hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.2 of the book: ! preconditioner, see Algorithm 3.2.2 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! ! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer Y(ilev+1) to the current level. ! c. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! ! d. Compute the residual:
! d. Compute the residual ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! e. Apply the base preconditioner at the current level to the residual:
!
! 4. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev)
! !
! ! 5. if ilev == 1 Transfer the inner Y to the external:
! 5. if ilev == 1 Transfer the inner Y to the external
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !
!
subroutine mld_dmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) subroutine mld_dmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
use psb_base_mod use psb_base_mod

@ -171,10 +171,9 @@
! !
! !
! Additive multilevel ! Additive multilevel
!
! This is additive both within the levels and among levels. ! This is additive both within the levels and among levels.
! !
! For details on the additive multilevel Schwarz preconditioner see the ! For details on the additive multilevel Schwarz preconditioner, see
! Algorithm 3.1.1 in the book: ! Algorithm 3.1.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
@ -184,135 +183,130 @@
! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding ! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding
! restriction operator from level ilev-1 to level ilev). ! restriction operator from level ilev-1 to level ilev).
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Call recursively itself ! a. Call recursively itself
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*y(1)
! !
! !
! !
! Hybrid multiplicative, pre-smoothing only ! Hybrid multiplicative---pre-smoothing
! !
! The preconditioner M is hybrid in the sense that it is multiplicative through the ! The preconditioner M is hybrid in the sense that it is multiplicative through the
! levels and additive inside a level. ! levels and additive inside a level.
! !
! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz ! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.1 in the book: ! preconditioner, see Algorithm 3.2.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev >1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev).
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer y(ilev+1) to the current level:
! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! c. Transfer Y(ilev+1) to the current level. ! 4. if ilev == 1 Transfer the inner y to the external:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! Yext = beta*Yext + alpha*y(1)
!
! 4. if ilev == 1 Transfer the inner Y to the external
! Yext = beta*Yext + alpha*Y(1)
! !
! !
! !
! Hybrid multiplicative, post-smoothing variant ! Hybrid multiplicative, post-smoothing variant
! !
! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! x(ilev) = PT(ilev)*x(ilev-1)
!
! 1. If ilev >1 Transfer X(ilev-1) to the current level.
! X(ilev) = PT(ilev)*X(ilev-1)
! !
! 2. If ilev < nlev ! 2. If ilev < nlev
!
! a. Call recursively itself passing ! a. Call recursively itself passing
! r(ilev) for transfer to the next level ! x(ilev) for transfer to the next level
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = P(ilev+1)*y(ilev+1)
! ! c. Compute the residual:
! c. Compute the residual ! x(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! d. Apply the base preconditioner to the residual at the current level:
!
! 3. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*x(ilev)
! ! Else
! Apply the base preconditioner to the residual at the current level:
! ! The sum over the subdomains is carried out in the
! ! application of K(ilev)
! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner Y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !
! !
! Hybrid multiplicative, pre- and post-smoothing (two-side) variant ! Hybrid multiplicative, pre- and post-smoothing (two-side) variant
! !
!
! For details on the symmetrized hybrid multiplicative multilevel Schwarz ! For details on the symmetrized hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.2 of the book: ! preconditioner, see Algorithm 3.2.2 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! ! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer Y(ilev+1) to the current level. ! c. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! ! d. Compute the residual:
! d. Compute the residual ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! e. Apply the base preconditioner at the current level to the residual:
!
! 4. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev)
! !
! ! 5. if ilev == 1 Transfer the inner Y to the external:
! 5. if ilev == 1 Transfer the inner Y to the external
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !
!
subroutine mld_smlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) subroutine mld_smlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
use psb_base_mod use psb_base_mod

@ -170,12 +170,10 @@
! level 1 is the finest level and A(1) is the matrix A. ! level 1 is the finest level and A(1) is the matrix A.
! !
! !
!
! Additive multilevel ! Additive multilevel
!
! This is additive both within the levels and among levels. ! This is additive both within the levels and among levels.
! !
! For details on the additive multilevel Schwarz preconditioner see the ! For details on the additive multilevel Schwarz preconditioner, see
! Algorithm 3.1.1 in the book: ! Algorithm 3.1.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
@ -185,130 +183,127 @@
! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding ! ilev-1, while PT(ilev) denotes its transpose, i.e. the corresponding
! restriction operator from level ilev-1 to level ilev). ! restriction operator from level ilev-1 to level ilev).
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Call recursively itself ! a. Call recursively itself
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*y(1)
! !
! !
! !
! Hybrid multiplicative, pre-smoothing only ! Hybrid multiplicative---pre-smoothing
! !
! The preconditioner M is hybrid in the sense that it is multiplicative through the ! The preconditioner M is hybrid in the sense that it is multiplicative through the
! levels and additive inside a level. ! levels and additive inside a level.
! !
! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz ! For details on the pre-smoothed hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.1 in the book: ! preconditioner, see Algorithm 3.2.1 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev >1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev).
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer y(ilev+1) to the current level:
! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! !
! c. Transfer Y(ilev+1) to the current level. ! 4. if ilev == 1 Transfer the inner y to the external:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! Yext = beta*Yext + alpha*y(1)
!
! 4. if ilev == 1 Transfer the inner Y to the external
! Yext = beta*Yext + alpha*Y(1)
!
! !
! !
! Hybrid multiplicative, post-smoothing only
! !
! Hybrid multiplicative, post-smoothing variant
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. If ilev < nlev ! 2. If ilev < nlev
!
! a. Call recursively itself passing ! a. Call recursively itself passing
! r(ilev) for transfer to the next level ! x(ilev) for transfer to the next level
! b. Transfer Y(ilev+1) to the current level. ! b. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = P(ilev+1)*y(ilev+1)
! ! c. Compute the residual:
! c. Compute the residual ! x(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! d. Apply the base preconditioner to the residual at the current level:
!
! 3. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*x(ilev)
! ! Else
! Apply the base preconditioner to the residual at the current level:
! ! The sum over the subdomains is carried out in the
! ! application of K(ilev)
! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 4. if ilev == 1 Transfer the inner Y to the external ! 4. if ilev == 1 Transfer the inner Y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !
! !
! Hybrid multiplicative, pre- and post-smoothing (two-side) variant ! Hybrid multiplicative, pre- and post-smoothing (two-side) variant
! !
!
! For details on the symmetrized hybrid multiplicative multilevel Schwarz ! For details on the symmetrized hybrid multiplicative multilevel Schwarz
! preconditioner, see the Algorithm 3.2.2 of the book: ! preconditioner, see Algorithm 3.2.2 in the book:
! B.F. Smith, P.E. Bjorstad & W.D. Gropp, ! B.F. Smith, P.E. Bjorstad & W.D. Gropp,
! Domain decomposition: parallel multilevel methods for elliptic partial ! Domain decomposition: parallel multilevel methods for elliptic partial
! differential equations, Cambridge University Press, 1996. ! differential equations, Cambridge University Press, 1996.
! !
! !
! 0. Transfer the outer vector Xest to X(1) (inner X at level 1). ! 0. Transfer the outer vector Xest to x(1) (inner X at level 1)
! !
! 1. If ilev >1 Transfer X(ilev-1) to the current level. ! 1. If ilev > 1 Transfer x(ilev-1) to the current level:
! X(ilev) = PT(ilev)*X(ilev-1) ! x(ilev) = PT(ilev)*x(ilev-1)
! !
! 2. Apply the base preconditioner at the current level. ! 2. Apply the base preconditioner at the current level:
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = (K(ilev)^(-1))*X(ilev) ! y(ilev) = (K(ilev)^(-1))*x(ilev)
! !
! 3. If ilev < nlevel ! 3. If ilev < nlevel
! a. Compute the residula ! a. Compute the residual:
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! b. Call recursively itself passing ! b. Call recursively itself passing
! r(ilev) for transfer to the next level ! r(ilev) for transfer to the next level
! ! (r(ilev) matches x(ilev-1) in step 1)
! c. Transfer Y(ilev+1) to the current level. ! c. Transfer y(ilev+1) to the current level:
! Y(ilev) = Y(ilev) + P(ilev+1)*Y(ilev+1) ! y(ilev) = y(ilev) + P(ilev+1)*y(ilev+1)
! ! d. Compute the residual:
! d. Compute the residual ! r(ilev) = x(ilev) - A(ilev)*y(ilev)
! r(ilev) = y(ilev) - A(ilev)*x(ilev) ! e. Apply the base preconditioner at the current level to the residual:
!
! 4. Apply the base preconditioner at the current level to the residual
! ! The sum over the subdomains is carried out in the ! ! The sum over the subdomains is carried out in the
! ! application of K(ilev). ! ! application of K(ilev)
! Y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev) ! y(ilev) = y(ilev) + (K(ilev)^(-1))*r(ilev)
!
! !
! 5. if ilev == 1 Transfer the inner Y to the external ! 5. if ilev == 1 Transfer the inner Y to the external:
! Yext = beta*Yext + alpha*Y(1) ! Yext = beta*Yext + alpha*Y(1)
! !
! !

Loading…
Cancel
Save