Changeset d69332b


Ignore:
Timestamp:
12/14/10 12:10:00 (2 years ago)
Author:
Oleg Batrashev <ogbash@…>
Branches:
master, external, fix-prolong, refactor, refactor-subsolvers
Children:
87d2b17
Parents:
13bb187
git-author:
Oleg Batrashev <ogbash@…> (12/14/10 12:10:00)
git-committer:
Oleg Batrashev <ogbash@…> (12/14/10 12:10:00)
Message:

Do a restriction every iteration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/solvers/pcg.F90

    r13bb187 rd69332b  
    474474      endif 
    475475 
    476       if (sctls%levels>1) then 
    477         ol=max(sctls%overlap,sctls%smoothers) 
    478         if (isFirstIter.and..not.cdat%active) then ! 1 processor case 
    479           if (sctls%smoothers==-1) then 
    480             allocate(tmpsol2(A%nrows)) 
    481             tmpsol2=0.0_rk 
    482             call exact_sparse_multismoother(tmpsol2,A,rhs) 
    483             call SpMtx_Ax(crhs,Restrict,tmpsol2,dozero=.true.) ! restriction 
     476      ol=max(sctls%overlap,sctls%smoothers) 
     477      if (sctls%levels>1.and..not.cdat%active) then ! 1 processor case 
     478        if (sctls%smoothers==-1) then 
     479          allocate(tmpsol2(A%nrows)) 
     480          tmpsol2=0.0_rk 
     481          call exact_sparse_multismoother(tmpsol2,A,rhs) 
     482          call SpMtx_Ax(crhs,Restrict,tmpsol2,dozero=.true.) ! restriction 
     483        else 
     484          if (sctls%method>1.and.sctls%method/=5) then ! multiplicative Schwarz 
     485            call SpMtx_Ax(crhs,Restrict,res,dozero=.true.) ! restriction 
    484486          else 
    485             if (sctls%method>1.and.sctls%method/=5) then ! multiplicative Schwarz 
    486               call SpMtx_Ax(crhs,Restrict,res,dozero=.true.) ! restriction 
    487             else 
    488               call SpMtx_Ax(crhs,Restrict,rhs,dozero=.true.) ! restriction 
    489             endif 
     487            call SpMtx_Ax(crhs,Restrict,rhs,dozero=.true.) ! restriction 
    490488          endif 
    491489        endif 
     
    525523             val=CoarseMtx_%val) 
    526524        if (bugtrack)write(stream,*) "(f) Coarse SOL is:",csol 
     525        CoarseMtx_%indi=CoarseMtx_%indi+1 
     526        CoarseMtx_%indj=CoarseMtx_%indj+1 
    527527 
    528528        if (cdat_vec%active) then 
Note: See TracChangeset for help on using the changeset viewer.