Changeset 609702e


Ignore:
Timestamp:
12/16/10 15:13:01 (2 years ago)
Author:
Oleg Batrashev <ogbash@…>
Branches:
master, external, fix-prolong, refactor, refactor-subsolvers
Children:
d3bc35f
Parents:
41c5343
git-author:
Oleg Batrashev <ogbash@…> (12/16/10 15:13:01)
git-committer:
Oleg Batrashev <ogbash@…> (12/16/10 15:13:01)
Message:

Extract multisolve call for multiplicative Schwarz, so that we do not mess with it during refactoring.

Location:
src/solvers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/solvers/pcg.F90

    r82697a3 r609702e  
    269269               A_interf_=A_interf_, & 
    270270               refactor=refactor_) !fine solves  
     271 
    271272    if (sctls%method>1) then ! For multiplicative Schwarz method...: 
    272        refactor_=.false. 
    273        call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
    274                   A_interf_=A_interf_, & 
    275                   refactor=refactor_) !fine solves  
    276     endif 
     273      if (numprocs>1) call DOUG_abort('multiplicative Schwarz only for numprocs==1 so far',-1) 
     274      call multiplicative_sparse_multisolve(sol,A,M,rhs,res,A_interf_,refactor=refactor_) 
     275      refactor_=.false. 
     276      call multiplicative_sparse_multisolve(sol,A,M,rhs,res,A_interf_,refactor=refactor_) !fine solves  
     277    endif 
     278 
    277279  end subroutine preconditioner_1level 
    278280 
     
    387389 
    388390      ! first level prec 
    389       if (sctls%input_type==DCTL_INPUT_TYPE_ELEMENTAL.or.numprocs>1) then 
    390         call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
     391      if (sctls%method>1) then 
     392        if (numprocs>1) call DOUG_abort('multiplicative Schwarz only for numprocs==1 so far',-1) 
     393        if (sctls%input_type==DCTL_INPUT_TYPE_ELEMENTAL.or.numprocs>1) then 
     394          call multiplicative_sparse_multisolve(sol,A,M,rhs,res,A_interf_,refactor=refactor_) 
     395        else 
     396          call multiplicative_sparse_multisolve(sol,A,M,rhs,res,A_interf_,CoarseMtx_,refactor_,Restrict) 
     397        end if 
     398      else  
     399        if (sctls%input_type==DCTL_INPUT_TYPE_ELEMENTAL.or.numprocs>1) then 
     400          call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
    391401                        A_interf_=A_interf_, & 
    392402                        refactor=refactor_) !fine solves  
    393       else 
    394         call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
     403        else 
     404          call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
    395405                        A_interf_=A_interf_,AC=CoarseMtx_, & 
    396406                        refactor=refactor_,Restrict=Restrict) !fine solves  
     407        end if 
    397408      endif 
    398409 
     
    485496      if (sctls%method>1) then ! For multiplicative Schwarz method...: 
    486497        refactor_=.false. 
     498        if (numprocs>1) call DOUG_abort('multiplicative Schwarz only for numprocs==1 so far',-1) 
     499 
    487500        if (sctls%input_type==DCTL_INPUT_TYPE_ELEMENTAL) then 
    488             call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
     501            call multiplicative_sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
    489502                          A_interf_=A_interf_, & 
    490503                          refactor=refactor_) !fine solves  
    491504        else 
    492             call sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
     505            call multiplicative_sparse_multisolve(sol=sol,A=A,M=M,rhs=rhs,res=res, & 
    493506                          A_interf_=A_interf_,AC=CoarseMtx_, & 
    494507                          refactor=refactor_,Restrict=Restrict) !fine solves  
  • src/solvers/subsolvers.F90

    r41c5343 r609702e  
    181181    integer :: sd 
    182182 
    183     if (sctls%method>1) then 
    184       if (numprocs>1) then 
    185         call DOUG_abort('multiplicative Schwarz only for numprocs==1 so far',-1) 
    186       endif 
    187       call multiplicative_sparse_multisolve(sol,A,M,rhs,res,A_interf_,AC,refactor,Restrict) 
    188       return 
    189     endif 
    190183    if (present(refactor)) then 
    191184      if (refactor) then 
Note: See TracChangeset for help on using the changeset viewer.