solve.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\utils\bief\solve.f
00002 !
00149                      SUBROUTINE SOLVE
00150 !                    ****************
00151 !
00152      &(X, A,B,TB,CFG,INFOGR,MESH,AUX)
00153 !
00154 !***********************************************************************
00155 ! BIEF   V6P2                                   21/08/2010
00156 !***********************************************************************
00157 !
00158 !
00159 !
00160 !
00161 !
00162 !
00163 !
00164 !
00165 !
00166 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00167 !| A              |-->| MATRIX OF THE SYSTEM (OR BLOCK OF MATRICES)
00168 !| AUX            |-->| MATRIX FOR PRECONDITIONING.
00169 !| B              |-->| RIGHT-HAND SIDE OF THE SYSTEM
00170 !| CFG            |-->| STRUCTURE OF SOLVER CONFIGURATION
00171 !|                |   | CFG%KRYLOV IS USED ONLY IF CFG%SLV = 7 (GMRES)
00172 !| INFOGR         |-->| IF YES, PRINT A LOG.
00173 !| MESH           |-->| MESH STRUCTURE.
00174 !| TB             |-->| BLOCK OF VECTORS WITh AT LEAST
00175 !|                |   | MAX(7,2+2*CFG%KRYLOV)*S VECTORS, S IS 1
00176 !|                |   | IF A IS A MATRIX, 2 IF A BLOCK OF 4 MATRICES
00177 !|                |   | AND 3 IF A BLOCK OF 9.
00178 !| X              |<->| INITIAL VALUE, THEN SOLUTION
00179 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00180 !
00181       USE BIEF, EX_SOLVE => SOLVE
00182 !
00183       IMPLICIT NONE
00184       INTEGER LNG,LU
00185       COMMON/INFO/LNG,LU
00186 !
00187 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00188 !
00189       TYPE(SLVCFG), INTENT(INOUT) :: CFG
00190 !
00191 !     STRUCTURES OF VECTORS OR BLOCKS OF VECTORS
00192 !
00193       TYPE(BIEF_OBJ), TARGET, INTENT(INOUT) :: X,B
00194       TYPE(BIEF_OBJ), INTENT(INOUT)         :: TB
00195 !
00196 !     STRUCTURES OF MATRIX OR BLOCK OF MATRICES
00197 !
00198       TYPE(BIEF_OBJ), INTENT(INOUT) :: A,AUX
00199 !
00200       LOGICAL, INTENT(IN) :: INFOGR
00201 !
00202 !     MESH STRUCTURE
00203 !
00204       TYPE(BIEF_MESH), INTENT(INOUT) :: MESH
00205 !
00206 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00207 !
00208       INTEGER PRESTO,IG,LV,S,NBL,I
00209       INTEGER IT1,IT2,IT3,IT4,IT5,IT6,IT7,IBL1,IBL2,K,IAD,ITB,ITBB
00210 !
00211       DOUBLE PRECISION C
00212 !
00213       LOGICAL DIADON,PREXSM
00214       INTEGER NPOIN_TOT
00215       EXTERNAL P_IMAX
00216       INTEGER  P_IMAX
00217 !
00218       INTRINSIC MAX
00219 !
00220 !-----------------------------------------------------------------------
00221 !
00222 !     STRUCTURES OF BLOCKS OF WORKING ARRAYS
00223 !
00224       TYPE(BIEF_OBJ)          :: TBB
00225       TYPE(BIEF_OBJ), TARGET  :: BB,BX
00226       TYPE(BIEF_OBJ), POINTER :: PB,PX
00227 !
00228 !-----------------------------------------------------------------------
00229 !
00230       LOGICAL FIRST
00231       DATA FIRST/.TRUE./
00232 !
00233       SAVE TBB,BB,BX
00234 !-----------------------------------------------------------------------
00235 !
00236 !  ALLOCATES THE BLOCK OF BLOCKS TBB AND THE BLOCKS IN TBB
00237 !
00238       IF(FIRST) THEN
00239         CALL ALLBLO(TBB,'TBB   ')
00240         CALL ALLBLO(BB ,'BB    ')
00241         CALL ALLBLO(BX ,'BX    ')
00242         FIRST=.FALSE.
00243       ENDIF
00244       NBL = 7
00245       IF(CFG%SLV.EQ.7) NBL = MAX(NBL,4+2*CFG%KRYLOV)
00246       IF(NBL.GT.TBB%N) THEN
00247         TBB%N=0
00248         CALL ALLBLO_IN_BLOCK(TBB,NBL,'BL    ')
00249       ENDIF
00250 !
00251 !-----------------------------------------------------------------------
00252 !
00253       LV = MESH%LV
00254 !
00255 !-----------------------------------------------------------------------
00256 !
00257 !  VARIOUS TYPES OF SOLVED SYSTEMS S = 0 : NORMAL MATRIX
00258 !                                  S = 1 : 1 MATRICE IN A BLOCK
00259 !                                  S = 2 : 4 MATRICES IN A BLOCK
00260 !                                  S = 3 : 9 MATRICES IN A BLOCK
00261 !
00262       IF(A%TYPE.EQ.3) THEN
00263         S = 0
00264         BB%N = 0
00265         BX%N = 0
00266         CALL ADDBLO(BB,B)
00267         CALL ADDBLO(BX,X)
00268         PX => BX
00269         PB => BB
00270       ELSEIF(A%TYPE.EQ.4) THEN
00271         IF(A%N.EQ.1) THEN
00272           S = 1
00273         ELSEIF(A%N.EQ.4) THEN
00274           S = 2
00275         ELSEIF(A%N.EQ.9) THEN
00276           S = 3
00277         ENDIF
00278         PX => X
00279         PB => B
00280       ENDIF
00281 !
00282 !----------------
00283 !  DIRECT SOLVERS
00284 !  ---> YSMP
00285 !----------------
00286 !
00287       IF(CFG%SLV.EQ.8) THEN
00288 !
00289         IF(NCSIZE.GT.1) THEN
00290           IF(LNG.EQ.1) WRITE(LU,2018)
00291           IF(LNG.EQ.2) WRITE(LU,2019)
00292 2018      FORMAT(1X,'UTILISER LE SOLVEUR DIRECT PARALLEL MUMPS,',/,1X,
00293      &              'SOLVEUR = 9',///)
00294 2019      FORMAT(1X,'USE THE PARALLEL DIRECT SOLVER MUMPS,',/,1X,
00295      &              'SOLVER = 9',///)
00296           CALL PLANTE(1)
00297           STOP
00298         ENDIF
00299 !
00300         IF(S.EQ.0) THEN
00301           IF(A%TYPEXT.NE.'S'.AND.A%TYPEXT.NE.'Q') THEN
00302             IF(LNG.EQ.1) THEN
00303               WRITE(LU,*) 'SOLVE (BIEF) : TERMES EXTRA-DIAGONAUX'
00304               WRITE(LU,*) '               DE TYPE ',A%TYPEXT
00305               WRITE(LU,*) '               NON TRAITE'
00306             ENDIF
00307             IF(LNG.EQ.2) THEN
00308               WRITE(LU,*) 'SOLVE (BIEF): OFF-DIAGONAL TERMS'
00309               WRITE(LU,*) '              OF TYPE ',A%TYPEXT
00310               WRITE(LU,*) '              NOT IMPLEMENTED'
00311             ENDIF
00312             CALL PLANTE(1)
00313             STOP
00314           ENDIF
00315           CALL SD_SOLVE_1(A%D%DIM1,MESH%NSEG,MESH%GLOSEG%I,
00316      &                    MESH%GLOSEG%DIM1,
00317      &                    A%D%R,A%X%R,X%R,B%R,INFOGR,A%TYPEXT)
00318         ELSEIF(S.EQ.1) THEN
00319           IF(A%ADR(1)%P%TYPEXT.NE.'S'.AND.A%ADR(1)%P%TYPEXT.NE.'Q') THEN
00320             IF(LNG.EQ.1) THEN
00321              WRITE(LU,*) 'SOLVE (BIEF) : SOLVEUR DIRECT POUR LES'
00322              WRITE(LU,*) '               SYSTEMES SYMETRIQUES SEULEMENT'
00323             ENDIF
00324             IF(LNG.EQ.2) THEN
00325              WRITE(LU,*) 'SOLVE (BIEF): DIRECT SOLVER FOR SYMMETRIC'
00326              WRITE(LU,*) '              SYSTEMS ONLY'
00327             ENDIF
00328             CALL PLANTE(1)
00329             STOP
00330           ENDIF
00331           CALL SD_SOLVE_1(A%ADR(1)%P%D%DIM1,MESH%NSEG,MESH%GLOSEG%I,
00332      &                    MESH%GLOSEG%DIM1,
00333      &                    A%ADR(1)%P%D%R,A%ADR(1)%P%X%R,X%ADR(1)%P%R,
00334      &                    B%ADR(1)%P%R,INFOGR,A%ADR(1)%P%TYPEXT)
00335         ELSEIF(S.EQ.2) THEN
00336           CALL SD_SOLVE_4(MESH%NPOIN,MESH%NSEG,MESH%GLOSEG%I,
00337      &                    A%ADR(1)%P%D%R,A%ADR(2)%P%D%R,
00338      &                    A%ADR(3)%P%D%R,A%ADR(4)%P%D%R,
00339      &                    A%ADR(1)%P%X%R,A%ADR(2)%P%X%R,
00340      &                    A%ADR(3)%P%X%R,A%ADR(4)%P%X%R,
00341      &                    X%ADR(1)%P%R,X%ADR(2)%P%R,
00342      &                    B%ADR(1)%P%R,B%ADR(2)%P%R,INFOGR,
00343      &                    A%ADR(1)%P%TYPEXT,A%ADR(2)%P%TYPEXT,
00344      &                    A%ADR(3)%P%TYPEXT,A%ADR(4)%P%TYPEXT)
00345 !       ELSEIF(S.EQ.3) THEN
00346         ELSE
00347           IF(LNG.EQ.1) WRITE(LU,301) S
00348           IF(LNG.EQ.2) WRITE(LU,401) S
00349 301       FORMAT(1X,'SOLVE (BIEF) : S=',1I6,' CAS NON PREVU')
00350 401       FORMAT(1X,'SOLVE (BIEF): S=',1I6,' CASE NOT IMPLEMENTED')
00351           CALL PLANTE(1)
00352           STOP
00353         ENDIF
00354         RETURN
00355 !
00356       ELSEIF(CFG%SLV.EQ.9) THEN
00357 !
00358 !----------------
00359 !  DIRECT SOLVERS
00360 !  ---> MUMPS
00361 !----------------
00362 !
00363         IF(NCSIZE.LT.1) THEN
00364           IF(LNG.EQ.1) WRITE(LU,3018)
00365           IF(LNG.EQ.2) WRITE(LU,3019)
00366 3018      FORMAT(1X,'MUMPS NON DISPONIBLE POUR DES TESTS SEQUENTIELS',
00367      &         /,1X,'UTILISER LE SOLVEUR SEQUENTIEL (SOLVEUR =8)',///)
00368 3019      FORMAT(1X,'MUMPS ARE NOT AVAILABLE FOR SEQUENTIAL RUNS,',/,1X,
00369      &         'USE SEQUENITAL DIRECT SOLVER (SOLVER = 8) ',///)
00370           CALL PLANTE(1)
00371           STOP
00372         ENDIF
00373 !
00374 !       COMPUTING THE NUMBER OF POINTS IN THE MESH BEFORE PARTITIONING
00375 !
00376         IF(NCSIZE.GT.1) THEN
00377           NPOIN_TOT=0
00378           DO I=1,MESH%NPOIN
00379             NPOIN_TOT=MAX(MESH%KNOLG%I(I),NPOIN_TOT)
00380           ENDDO
00381           NPOIN_TOT=P_IMAX(NPOIN_TOT)
00382         ELSE
00383           NPOIN_TOT=MESH%NPOIN
00384         ENDIF
00385 !
00386         IF(S.EQ.0) THEN
00387           IF(LNG.EQ.1) WRITE(LU,302) S
00388           IF(LNG.EQ.2) WRITE(LU,402) S
00389 302       FORMAT(1X,'SOLVE (BIEF) : S=',1I6,1X,
00390      &              'CAS NON ENCORE PREVU POUR MUMPS')
00391 402       FORMAT(1X,'SOLVE (BIEF): S=',1I6,1X,
00392      &              'CASE NOT YET MPLEMENTED FOR MUMPS')
00393           CALL PLANTE(1)
00394           STOP
00395         ELSEIF(S.EQ.1) THEN
00396           IF(LNG.EQ.1) WRITE(LU,3011) S
00397           IF(LNG.EQ.2) WRITE(LU,4011) S
00398  3011     FORMAT(1X,'SOLVE (BIEF) : S=',1I6,
00399 ' CAS NON ENCORE PREVU     &           POUR MUMPS')
00400  4011     FORMAT(1X,'SOLVE (BIEF): S=',1I6,
00401 ' CASE NOT YET     &           IMPLEMENTED FOR MUMPS')
00402           CALL PLANTE(1)
00403           STOP
00404         ELSEIF(S.EQ.2) THEN
00405           CALL PRE4_MUMPS(MESH%NPOIN,MESH%NSEG,MESH%GLOSEG%I,
00406      &                    A%ADR(1)%P%D%R,A%ADR(2)%P%D%R,
00407      &                    A%ADR(3)%P%D%R,A%ADR(4)%P%D%R,
00408      &                    A%ADR(1)%P%X%R,A%ADR(2)%P%X%R,
00409      &                    A%ADR(3)%P%X%R,A%ADR(4)%P%X%R,
00410      &                    X%ADR(1)%P%R,X%ADR(2)%P%R,
00411      &                    B%ADR(1)%P%R,B%ADR(2)%P%R,INFOGR,
00412      &                    A%ADR(1)%P%TYPEXT,MESH%KNOLG%I,
00413      &                    NPOIN_TOT,IPID)
00414         ELSE
00415           IF(LNG.EQ.1) WRITE(LU,301) S
00416           IF(LNG.EQ.2) WRITE(LU,401) S
00417           CALL PLANTE(1)
00418           STOP
00419         ENDIF
00420         RETURN
00421 !
00422       ENDIF
00423 !
00424 !-----------------------------------------------------------------------
00425 !
00426       PRESTO = CFG%PRECON
00427       IF(CFG%PRECON.EQ.0) CFG%PRECON = 1
00428 !
00429 !-----------------------------------------------------------------------
00430 !
00431 !  MANAGES WORKING ARRAYS : ITB --> NEXT AVAILABLE VECTOR
00432 !
00433 !  ITB  --> NEXT AVAILABLE VECTOR IN TB
00434 !  ITBB --> NEXT AVAIALBLE BLOCK  IN TBB
00435 !
00436       ITB  = 1
00437       ITBB = 1
00438 !
00439 !  ALLOCATES TWO WORKING BLOCKS WITH, EITHER A VECTOR,
00440 !  OR A BLOCK OF VECTORS (CASE WHERE S IS 0).
00441 !  THESE TWO BLOCKS ARE COMMON TO ALL THE METHODS.
00442 !
00443 !     FOR THE PRECONDITIONING MATRICES
00444       IF(3*(CFG%PRECON/3).EQ.CFG%PRECON) THEN
00445 !       BLOCK DIAGONAL PRECONDITIONING : S**2 DIAGONALS
00446         CALL SOLAUX(IT1, TB,TBB,ITB,ITBB,S**2)
00447       ELSE
00448 !       OTHER : S DIAGONALS
00449         CALL SOLAUX(IT1, TB,TBB,ITB,ITBB,S)
00450       ENDIF
00451 !
00452       CALL SOLAUX(IT2, TB,TBB,ITB,ITBB,S)
00453 !
00454       IF(CFG%SLV.EQ.7) THEN
00455 !       SPECIAL GMRES : ARRAYS DEPENDING ON THE SIZE OF KRYLOV
00456 !                       TBB(IBL1) : BLOCK OF CFG%KRYLOV VECTORS
00457 !                       OR BLOCK OF CFG%KRYLOV BLOCKS OF S VECTORS
00458 !                       TBB(IBL2) : IDEM
00459 !
00460         IBL1=ITBB
00461         ITBB = ITBB + 1
00462         IBL2=ITBB
00463         ITBB = ITBB + 1
00464         TBB%ADR(IBL1)%P%N=0
00465         TBB%ADR(IBL2)%P%N=0
00466         DO K=1,CFG%KRYLOV
00467           CALL SOLAUX(IAD, TB,TBB,ITB,ITBB,S)
00468           CALL ADDBLO(TBB%ADR(IBL1)%P,TBB%ADR(IAD)%P)
00469           CALL SOLAUX(IAD, TB,TBB,ITB,ITBB,S)
00470           CALL ADDBLO(TBB%ADR(IBL2)%P,TBB%ADR(IAD)%P)
00471         ENDDO ! K
00472 !       AVOIDS A WARNING FROM THE INTEL COMPILER
00473         IT3=-1
00474         IT4=-1
00475         IT5=-1
00476         IT6=-1
00477         IT7=-1
00478       ELSE
00479 !       OTHER METHODS (COULD SOMETIMES NOT ALLOCATE IT6 OR IT7)
00480         CALL SOLAUX(IT3, TB,TBB,ITB,ITBB,S)
00481         CALL SOLAUX(IT4, TB,TBB,ITB,ITBB,S)
00482         CALL SOLAUX(IT5, TB,TBB,ITB,ITBB,S)
00483         CALL SOLAUX(IT6, TB,TBB,ITB,ITBB,S)
00484         CALL SOLAUX(IT7, TB,TBB,ITB,ITBB,S)
00485 !       AVOIDS A WARNING FROM THE CRAY COMPILER
00486         IBL1=1
00487         IBL2=1
00488 !
00489       ENDIF
00490 !
00491 !     CROUT'S PRECONDITIONING : REQUIRES A PRELIMINARY PRECONDITIONING
00492 !     THAT SETS DIAGONALS TO 1.
00493 !     THE GRADIENT WILL BE DISTINGUISHED FROM THE RESIDUE (POINTER IG)
00494 !
00495       IF(  7*(CFG%PRECON/ 7).EQ.CFG%PRECON.OR.
00496      &    11*(CFG%PRECON/11).EQ.CFG%PRECON.OR.
00497      &    13*(CFG%PRECON/13).EQ.CFG%PRECON.OR.
00498      &    17*(CFG%PRECON/17).EQ.CFG%PRECON     ) THEN
00499         IG=IT6
00500         IF(2*(CFG%PRECON/2).NE.CFG%PRECON.AND.
00501      &     3*(CFG%PRECON/3).NE.CFG%PRECON) THEN
00502 !         SELECTS DIAGONAL
00503           CFG%PRECON=2*CFG%PRECON
00504         ENDIF
00505       ELSE
00506 !       NOTE IT5 =-1 IF CFG%SLV.EQ.7 BUT IN THIS CASE IG IS USELESS
00507         IG=IT5
00508       ENDIF
00509 !
00510 !  END OF: MANAGES THE WORKING ARRAYS
00511 !
00512 !-----------------------------------------------------------------------
00513 !                               -1/2      -1/2  1/2        -1/2
00514 !  DIAGONAL PRECONDITIONINGS : D     A  D      D     X  = D      B
00515 !
00516       DIADON = .FALSE.
00517       PREXSM = .TRUE.
00518 !
00519       IF(3*(CFG%PRECON/3).EQ.CFG%PRECON.AND.(S.EQ.2.OR.S.EQ.3)) THEN
00520 !       DIAGONAL PRECONDITIONING WITH THE CONDENSED MATRIX (4 OR 9 MATRICES)
00521         CALL PREBDT(X,A,B,TBB%ADR(IT1)%P,MESH,PREXSM,DIADON,S)
00522 !       DOES NOT MOFIFY D11, D22, D33 WHEN PRECDT IS CALLED
00523         DIADON = .TRUE.
00524       ENDIF
00525 !
00526       IF(2*(CFG%PRECON/2).EQ.CFG%PRECON.OR.
00527      &   3*(CFG%PRECON/3).EQ.CFG%PRECON.OR.
00528      &   5*(CFG%PRECON/5).EQ.CFG%PRECON) THEN
00529         CALL PRECDT(X,A,B,TBB%ADR(IT1)%P,MESH,
00530      &              CFG%PRECON,PREXSM,DIADON,S)
00531       ENDIF
00532 !
00533 !-----------------------------------------------------------------------
00534 !
00535 !  BUILDS THE PRECONDITIONING MATRICES:
00536 !
00537       IF(7*(CFG%PRECON/7).EQ.CFG%PRECON) THEN
00538         CALL DCPLDU(AUX,A,MESH,.TRUE.,LV)
00539       ELSEIF(11*(CFG%PRECON/11).EQ.CFG%PRECON) THEN
00540         CALL GSEBE(AUX,A,MESH)
00541       ELSEIF(13*(CFG%PRECON/13).EQ.CFG%PRECON) THEN
00542 !       DOES NOTHING, AUX IS SUPPLIED BY THE SUBROUTINE CALLING
00543       ELSEIF(17*(CFG%PRECON/17).EQ.CFG%PRECON) THEN
00544         IF(CFG%SLV.NE.1.AND.CFG%SLV.NE.2) THEN
00545           WRITE(LU,*) 'PRECONDITIONING 17'
00546           WRITE(LU,*) 'NOT IMPLEMENTED FOR SOLVER ',CFG%SLV
00547           CALL PLANTE(1)
00548           STOP
00549         ENDIF
00550         IF(AUX%TYPE.NE.3) THEN
00551           WRITE(LU,*) 'PRECONDITIONING 17'
00552           WRITE(LU,*) 'NOT IMPLEMENTED FOR BLOCKS OF MATRICES'
00553           CALL PLANTE(1)
00554           STOP
00555         ENDIF
00556 !
00557         IF(AUX%STO.EQ.1) THEN
00558           CALL PREVEREBE(AUX%X%R,A%D%R,A%X%R,A%TYPDIA,A%TYPEXT,
00559      &                   MESH%IKLE%I,MESH%NPOIN,MESH%NELEM,
00560      &                   MESH%NELMAX,MESH,MESH%TYPELM)
00561         ELSE
00562           CALL PREVERSEG(AUX%X%R,A%D%R,A%X%R,A%TYPDIA,A%TYPEXT,
00563      &                   MESH%NPOIN,MESH,MESH%NSEG,MESH%TYPELM)
00564         ENDIF
00565 !
00566       ENDIF
00567 !
00568 !-----------------------------------------------------------------------
00569 !
00570 !  PARALLEL MODE: SECOND MEMBER
00571 !
00572       IF(NCSIZE.GT.1) THEN
00573         CALL PARCOM(B,2,MESH)
00574       ENDIF
00575 !
00576 !-----------------------------------------------------------------------
00577 !
00578 !  SOLVES THE LINEAR SYSTEM:
00579 !
00580       IF(CFG%SLV.EQ.1) THEN
00581 !
00582 !       CONJUGATE GRADIENT
00583 !
00584         CALL GRACJG(PX, A,PB, MESH,
00585      &              TBB%ADR(IT2)%P,TBB%ADR(IT3)%P,
00586      &              TBB%ADR(IT5)%P,TBB%ADR(IG)%P,
00587      &              CFG,INFOGR,AUX)
00588 !
00589       ELSEIF(CFG%SLV.EQ.2) THEN
00590 !
00591 !       CONJUGATE RESIDUAL
00592 !
00593         CALL RESCJG(PX, A,PB, MESH,
00594      &              TBB%ADR(IT2)%P,TBB%ADR(IT3)%P,
00595      &              TBB%ADR(IT4)%P,TBB%ADR(IT5)%P,
00596      &              TBB%ADR(IG)%P,
00597      &              CFG,INFOGR,AUX)
00598 !
00599       ELSEIF(CFG%SLV.EQ.3) THEN
00600 !
00601 !       NORMAL EQUATION
00602 !
00603         CALL EQUNOR(PX, A,PB, MESH,
00604      &              TBB%ADR(IT2)%P,TBB%ADR(IT3)%P,
00605      &              TBB%ADR(IT4)%P,TBB%ADR(IT5)%P,
00606      &              TBB%ADR(IG)%P,
00607      &              CFG,INFOGR,AUX)
00608 !
00609       ELSEIF(CFG%SLV.EQ.4) THEN
00610 !
00611 !       MINIMUM ERROR
00612 !
00613         CALL ERRMIN(PX, A,PB, MESH,
00614      &              TBB%ADR(IT2)%P,TBB%ADR(IT3)%P,TBB%ADR(IT5)%P,
00615      &              TBB%ADR(IG)%P,
00616      &              CFG,INFOGR,AUX)
00617 !
00618       ELSEIF(CFG%SLV.EQ.5) THEN
00619 !
00620 !       SQUARED CONJUGATE GRADIENT
00621 !
00622         CALL CGSQUA(PX, A,PB, MESH,
00623      &              TBB%ADR(IT2)%P,TBB%ADR(IT3)%P,TBB%ADR(IT4)%P,
00624      &              TBB%ADR(IT5)%P,TBB%ADR(IT6)%P,TBB%ADR(IT7)%P,
00625      &              CFG,INFOGR)
00626 !
00627       ELSEIF(CFG%SLV.EQ.6) THEN
00628 !
00629 !       CGSTAB
00630 !
00631         CALL CGSTAB(PX, A,PB, MESH,
00632      &              TBB%ADR(IT2)%P,TBB%ADR(IT3)%P,TBB%ADR(IT4)%P,
00633      &              TBB%ADR(IT5)%P,TBB%ADR(IT6)%P,TBB%ADR(IT7)%P,
00634      &              CFG,INFOGR,AUX)
00635 !
00636       ELSEIF(CFG%SLV.EQ.7) THEN
00637 !
00638 !       GENERALISED MINIMUM RESIDUAL
00639 !
00640         CALL GMRES(PX, A,PB,MESH,
00641      &             TBB%ADR(IT2)%P,TBB%ADR(IBL1)%P,TBB%ADR(IBL2)%P,
00642      &             CFG,INFOGR,AUX)
00643 !
00644 !
00645       ELSE
00646 !
00647         IF (LNG.EQ.1) WRITE(LU,300) CFG%SLV
00648         IF (LNG.EQ.2) WRITE(LU,400) CFG%SLV
00649 300     FORMAT(1X,'SOLVE (BIEF) :',1I6,' METHODE NON PREVUE :')
00650 400     FORMAT(1X,'SOLVE (BIEF) :',1I6,' METHOD NOT AVAILABLE :')
00651         CALL PLANTE(1)
00652         STOP
00653 !
00654       ENDIF
00655 !
00656 !-----------------------------------------------------------------------
00657 !
00658 !  INVERSES THE CHANGE IN VARIABLE IF PRECONDITIONING
00659 !                                                DIAGONAL
00660 !                                                DIAGONAL-BLOCK
00661 !
00662       IF(2*(CFG%PRECON/2).EQ.CFG%PRECON.OR.
00663      &   3*(CFG%PRECON/3).EQ.CFG%PRECON.OR.
00664      &   5*(CFG%PRECON/5).EQ.CFG%PRECON    ) THEN
00665         CALL OS( 'X=XY    ' , PX , TBB%ADR(IT1)%P , PX , C )
00666       ENDIF
00667 !
00668       IF(3*(CFG%PRECON/3).EQ.CFG%PRECON.AND.(S.EQ.2.OR.S.EQ.3)) THEN
00669         CALL UM1X(X,TBB%ADR(IT1)%P,S)
00670       ENDIF
00671 !
00672 !-----------------------------------------------------------------------
00673 !
00674       CFG%PRECON = PRESTO
00675 !
00676 !-----------------------------------------------------------------------
00677 !
00678       RETURN
00679       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0