Changeset 5ae8d36
- Timestamp:
- 12/14/10 21:16:51 (2 years ago)
- Branches:
- master, external, fix-prolong, refactor, refactor-subsolvers
- Children:
- 82697a3
- Parents:
- 87d2b17
- git-author:
- Oleg Batrashev <ogbash@…> (12/14/10 21:16:51)
- git-committer:
- Oleg Batrashev <ogbash@…> (12/14/10 21:16:51)
- File:
-
- 1 edited
-
src/solvers/pcg.F90 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/solvers/pcg.F90
r87d2b17 r5ae8d36 416 416 isFirstIter = .false. 417 417 if (present(refactor_)) isFirstIter = refactor_ 418 ol=max(sctls%overlap,sctls%smoothers) 419 418 420 if (sctls%method==0) then 419 421 sol=rhs … … 547 549 endif 548 550 549 if (.not.(cdat_vec%active)) then 550 if (sctls%smoothers==-1) then 551 tmpsol2=0.0_rk 552 call exact_sparse_multismoother(tmpsol2,A,rhs) 553 call SpMtx_Ax(crhs,Restrict,tmpsol2,dozero=.true.) ! restriction 554 else 555 call SpMtx_Ax(crhs,Restrict,rhs,dozero=.true.) ! restriction 556 endif 551 if (sctls%method==1) then 552 !call Print_Glob_Vect(sol,M,'sol===',chk_endind=M%ninner) 553 sol(1:A%nrows)=sol(1:A%nrows)+tmpsol(1:A%nrows) 554 elseif (sctls%method==3) then ! fully multiplicative Schwarz 555 sol(1:A%nrows)=sol(1:A%nrows)+tmpsol(1:A%nrows) 556 ! calculate the residual: 557 call SpMtx_Ax(res,A,sol,dozero=.true.) ! 558 res=rhs-res 559 elseif (sctls%method==2.and.ol>0) then ! fully multiplicative Schwarz 560 sol(1:A%nrows)=tmpsol(1:A%nrows) 561 ! calculate the residual: 562 call SpMtx_Ax(res,A,sol,dozero=.true.) ! 563 res=rhs-res 557 564 endif 558 565 endif !} 559 566 560 ol=max(sctls%overlap,sctls%smoothers)561 if (sctls%method==1) then562 !call Print_Glob_Vect(sol,M,'sol===',chk_endind=M%ninner)563 sol(1:A%nrows)=sol(1:A%nrows)+tmpsol(1:A%nrows)564 elseif (sctls%method==3) then ! fully multiplicative Schwarz565 sol(1:A%nrows)=sol(1:A%nrows)+tmpsol(1:A%nrows)566 ! calculate the residual:567 call SpMtx_Ax(res,A,sol,dozero=.true.) !568 res=rhs-res569 elseif (sctls%method==2.and.ol>0) then ! fully multiplicative Schwarz570 sol(1:A%nrows)=tmpsol(1:A%nrows)571 ! calculate the residual:572 call SpMtx_Ax(res,A,sol,dozero=.true.) !573 res=rhs-res574 endif575 567 if (sctls%method>1) then ! For multiplicative Schwarz method...: 576 568 refactor_=.false.
Note: See TracChangeset
for help on using the changeset viewer.
