cntpre.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\artemis\cntpre.f
00002 !
00070                      SUBROUTINE CNTPRE
00071 !                    *****************
00072 !
00073      &(DAM,NPOIN,IPRECO,IPREC2)
00074 !
00075 !***********************************************************************
00076 ! ARTEMIS   V6P1                                   21/08/2010
00077 !***********************************************************************
00078 !
00079 !
00080 !
00081 !
00082 !
00083 !
00084 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00085 !| DAM            |-->| DIAGONALE OF THE MATRIX
00086 !| IPREC2         |<--| PRECONDITIONNING USED
00087 !| IPRECO         |-->| PRECONDITIONNING REQUIRED BY USER
00088 !| NPOIN          |-->| NUMBER OF POINTS
00089 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00090 !
00091       IMPLICIT NONE
00092       INTEGER LNG,LU
00093       COMMON/INFO/LNG,LU
00094 !
00095       INTEGER NPOIN,IPRECO,IPREC2,I
00096 !
00097       DOUBLE PRECISION DAM(NPOIN)
00098 !
00099 !-----------------------------------------------------------------------
00100 !
00101       IF (IPRECO.EQ.0) IPRECO = 1
00102       IPREC2 = IPRECO
00103 !
00104       IF (MOD(IPRECO,2).EQ.0.OR.MOD(IPRECO,3).EQ.0) THEN
00105 !
00106         DO I=1,NPOIN
00107           IF (DAM(I).LE.0.D0) THEN
00108             DO WHILE(MOD(IPREC2,2).EQ.0)
00109               IPREC2 = IPREC2/2
00110             ENDDO
00111             DO WHILE(MOD(IPREC2,3).EQ.0)
00112               IPREC2 = IPREC2/3
00113             ENDDO
00114             IF (LNG.EQ.1) WRITE(LU,100)
00115             IF (LNG.EQ.2) WRITE(LU,101)
00116 100     FORMAT(1X,
00117 'CNTPRE (ARTEMIS) : PRECONDITIONNEMENT DIAGONAL NON AP     &PLIQUE (UN ELEMENT DIAGONAL DE LA MATRICE EST NEGATIF OU NUL)')
00118 101     FORMAT(1X,
00119 'CNTPRE (ARTEMIS) : DIAGONAL SCALING NOT APPLIED (ONE     &COEFFICIENT OF THE MATRIX DIAGONAL IS NEGATIVE OR ZERO)')
00120             EXIT
00121           ENDIF
00122         ENDDO
00123 !
00124       ELSEIF (MOD(IPRECO,5).EQ.0) THEN
00125 !
00126         DO I=1,NPOIN
00127           IF (ABS(DAM(I)).LE.1.D-6) THEN
00128             DO WHILE(MOD(IPREC2,5).EQ.0)
00129               IPREC2 = IPREC2/5
00130             ENDDO
00131             IF (LNG.EQ.1) WRITE(LU,200)
00132             IF (LNG.EQ.2) WRITE(LU,201)
00133 200     FORMAT(1X,
00134 'CNTPRE (ARTEMIS) : PRECONDITIONNEMENT DIAGONAL NON AP     &PLIQUE (UN ELEMENT DIAGONAL DE LA MATRICE EST NUL)')
00135 201     FORMAT(1X,
00136 'CNTPRE (ARTEMIS) : DIAGONAL SCALING NOT APPLIED (ONE     &COEFFICIENT OF THE MATRIX DIAGONAL IS ZERO)')
00137             EXIT
00138           ENDIF
00139         ENDDO
00140 !
00141       ENDIF
00142 !
00143 !-----------------------------------------------------------------------
00144 !
00145       RETURN
00146       END

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