extr50
C EXTR50 SOURCE CHAT 05/01/12 23:52:38 5004 ********************************************************************** * * Extraction de la borne inf. ou sup. d'un objet NUAGE selon * les donnees du nom d'une composante reelle et de sa valeur * * INTEGER (E) IPOINT pointeur sur un objet NUAGE * LOGICAL (E) BORNINF logique valant vrai si l'on veut la * borne inf. du nuage * FLOTTANT (E) XVAL valeur de la composante reelle pour * laquelle on desire le n-uplet inferieur * ou superieur * INTEGER (E) IPOSI Position informatique de la composante * reelle du nuage * *********************************************************************** IMPLICIT INTEGER(I-N) -INC SMNUAGE REAL*8 XVAL,XVAL1,XVAL2,XVAL3 INTEGER IPOINT,IPOSI,IPO2,IPOSI3,IDIM2 LOGICAL BORNINF,BORNSUP CHARACTER*8 TYPR BORNSUP = .NOT.BORNINF MNUAG1 = IPOINT SEGACT MNUAG1 IDIM1 = MNUAG1.NUANOM(/2) TYPR = MNUAG1.NUATYP(IPOSI) IF (TYPR.NE.'FLOTTANT') THEN SEGDES MNUAG1 *- Le nom de la composante ne correspond pas a des variables reelles - RETURN ENDIF NUAVF1 = MNUAG1.NUAPOI(IPOSI) SEGACT NUAVF1 IDIM2 = NUAVF1.NUAFLO(/1) XVAL1 = NUAVF1.NUAFLO(1) IPOSI3 = 0 IF (XVAL1.LE.XVAL.AND.BORNINF) THEN IPOSI3 = 1 XVAL3 = XVAL1 ENDIF IF (XVAL1.GE.XVAL.AND.BORNSUP) THEN IPOSI3 = 1 XVAL3 = XVAL1 ENDIF IF (IDIM2.GT.1) THEN DO 11 I=2,IDIM2 XVAL2 = NUAVF1.NUAFLO(I) IF (BORNINF) THEN IF (IPOSI3.NE.0) THEN IF ((XVAL2.GT.XVAL1).AND.(XVAL2.LE.XVAL)) THEN XVAL3 = XVAL2 IPOSI3 = I ENDIF ELSE IF (XVAL2.LE.XVAL) THEN XVAL3 = XVAL2 IPOSI3 = I ENDIF ENDIF ELSE IF (IPOSI3.NE.0) THEN IF ((XVAL2.LT.XVAL1).AND.(XVAL2.GE.XVAL)) THEN XVAL3 = XVAL2 IPOSI3 = I ENDIF ELSE IF (XVAL2.GE.XVAL) THEN XVAL3 = XVAL2 IPOSI3 = I ENDIF ENDIF ENDIF 11 CONTINUE ENDIF SEGDES NUAVF1 *----- La borne inf. ou sup. du NUAGE n'existe pas ---------------- IF (IPOSI3.EQ.0) THEN SEGDES MNUAG1 RETURN ENDIF NVAR = IDIM1 NBCOUP = 1 SEGINI MNUAGE IPO2 = MNUAGE DO 10 I=1,IDIM1 NUANOM(I)=MNUAG1.NUANOM(I) NUATYP(I)=MNUAG1.NUATYP(I) IF (NUATYP(I).EQ.'INTEGER ') THEN SEGINI NUAVIN NUAPOI(I) = NUAVIN NUAVI1 = MNUAG1.NUAPOI(I) SEGACT NUAVI1 NUAINT(1) = NUAVI1.NUAINT(IPOSI3) SEGDES NUAVI1 SEGDES NUAVIN ELSE IF (NUATYP(I).EQ.'FLOTTANT') THEN SEGINI NUAVFL NUAPOI(I) = NUAVFL NUAVF1 = MNUAG1.NUAPOI(I) SEGACT NUAVF1 NUAFLO(1) = NUAVF1.NUAFLO(IPOSI3) SEGDES NUAVF1 SEGDES NUAVFL ELSE IF (NUATYP(I).EQ.'MOT ') THEN SEGINI NUAVMO NUAPOI(I) = NUAVMO NUAVM1 = MNUAG1.NUAPOI(I) SEGACT NUAVM1 NUAMOT(1) = NUAVM1.NUAMOT(IPOSI3) SEGDES NUAVM1 SEGDES NUAVMO ELSE IF (NUATYP(I).EQ.'LOGIQUE ') THEN SEGINI NUAVLO NUAPOI(I) = NUAVLO NUAVL1 = MNUAG1.NUAPOI(I) SEGACT NUAVL1 NUALOG(1) = NUAVL1.NUALOG(IPOSI3) SEGDES NUAVL1 SEGDES NUAVLO ELSE SEGINI NUAVIN NUAPOI(I) = NUAVIN NUAVI1 = MNUAG1.NUAPOI(I) SEGACT NUAVI1 NUAINT(1) = NUAVI1.NUAINT(IPOSI3) SEGDES NUAVI1 SEGDES NUAVIN END IF 10 CONTINUE SEGDES MNUAGE SEGDES MNUAG1 RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales