g3glkk
C G3GLKK SOURCE CHAT 06/03/29 21:22:23 5360 C C > ITRNOE,NBNMAX,iarr) C ********************************************************************** C OBJET G3GLKK : COLLAGE D'UNE ARETE D'UNE GRILLE 3D C C ARETE (K2,K10,K8 OU K7) POUR LE RACCORD DE LA FACE (K4,K7,K12,K8) C A LA FACE (K2,K6,K10,K5) C C EN ENTREE : C IARETE : NUMERO DE L'ARETE DU BLOC (2,10,8 OU 7) C KARETE : NOMBRE DE COUCHE D'ELEMENTS A DETRUIRE C NBLIG,NBCOL,NBRAN : DEFINITION DE LA GRILLE C ITRNOE : MAILLAGE A MODIFIER C NBNMAX : NOMBRE MAXIMUM DE NOEUDS PAR MAILLE C C EN SORTIE : C ITRNOE : MAILLAGE MODIFIE. C LES ELEMENTS DETRUITS ONT TOUS LEURS NOEUDS A 0 C C ********************************************************************** IMPLICIT INTEGER(I-N) INTEGER IARETE,KARETE,NBLIG,NBCOL,NBRAN,NBNMAX INTEGER ITRNOE(*),iarr C INTEGER I,I0,J,J0,K,K0,L,IE,P1,P2,P3,P4 C GOTO( 1,5,1,1,1,1,200,300,1,400 ) IARETE 1 iarr = 0 GOTO 999 C ========= C --- ARETE K2 --- C ========= 5 I = NBCOL - KARETE C PRINT *,'=====ARETE ',IARETE,' =====' C PRINT *,'---INF---' DO 15 K=1,KARETE DO 10 J=1,NBLIG IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL C P1 = (NBCOL+2-K) + (J-1)*(NBCOL+1)+ (K-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 + (NBCOL+1) P3 = P1 - 1 + (NBLIG+1)*(NBCOL+1) P4 = P1 - 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+2),ITRNOE((IE-1)*NBNMAX+3), C > ITRNOE((IE-1)*NBNMAX+6),ITRNOE((IE-1)*NBNMAX+7) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+2) = P1 ITRNOE((IE-1)*NBNMAX+3) = P2 ITRNOE((IE-1)*NBNMAX+6) = P3 ITRNOE((IE-1)*NBNMAX+7) = P4 10 CONTINUE 15 CONTINUE K = KARETE +1 C PRINT *,'---SUP---' DO 40 I=NBCOL-KARETE+1,NBCOL DO 30 J=1,NBLIG IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL C C P1 = (NBCOL+1-KARETE+I) + (J-1)*(NBCOL+1)+ C > (K-I+1)*(NBLIG+1)*(NBCOL+1) P1 = I + (J-1)*(NBCOL+1)+(NBCOL-I+1)*(NBLIG+1)*(NBCOL+1) P2 = P1+1 - (NBLIG+1)*(NBCOL+1) P3 = P1+1 + (NBCOL+1) - (NBLIG+1)*(NBCOL+1) P4 = P1 + (NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+1),ITRNOE((IE-1)*NBNMAX+2), C > ITRNOE((IE-1)*NBNMAX+3),ITRNOE((IE-1)*NBNMAX+4) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+1) = P1 ITRNOE((IE-1)*NBNMAX+2) = P2 ITRNOE((IE-1)*NBNMAX+3) = P3 ITRNOE((IE-1)*NBNMAX+4) = P4 30 CONTINUE 40 CONTINUE C C --- DESTRUCTION --- C DO 80 K=1,KARETE DO 70 I=(NBCOL-KARETE+1),NBCOL DO 60 J=1,NBLIG IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL DO 50 L=1,NBNMAX ITRNOE((IE-1)*NBNMAX+L) = 0 50 CONTINUE 60 CONTINUE 70 CONTINUE 80 CONTINUE GOTO 999 C ========= C --- ARETE K7 --- C ========= C ... 200 I = KARETE+1 C PRINT *,'=====ARETE ',IARETE,' =====' C PRINT *,'---DROIT---' J0 = NBLIG-KARETE DO 215 K=1,NBRAN DO 210 J=1,KARETE IE = I + (J+J0-1)*NBCOL + (K-1)*NBLIG*NBCOL C P1 = KARETE+2-J +(J+J0-1)*(NBCOL+1) +(K-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 - 1 + (NBCOL+1) P3 = P1 + (NBLIG+1)*(NBCOL+1) P4 = P1 - 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+1),ITRNOE((IE-1)*NBNMAX+4), C > ITRNOE((IE-1)*NBNMAX+5),ITRNOE((IE-1)*NBNMAX+8) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+1) = P1 ITRNOE((IE-1)*NBNMAX+4) = P2 ITRNOE((IE-1)*NBNMAX+5) = P3 ITRNOE((IE-1)*NBNMAX+8) = P4 210 CONTINUE 215 CONTINUE J = NBLIG - KARETE C PRINT *,'---GAUCH---' DO 240 I=1,KARETE DO 230 K=1,NBRAN IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL C P1 = I + (NBLIG-I+1)*(NBCOL+1) + (K-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 + 1 - (NBCOL+1) P3 = P1 + (NBLIG+1)*(NBCOL+1) P4 = P1 + 1 - (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+4),ITRNOE((IE-1)*NBNMAX+3), C > ITRNOE((IE-1)*NBNMAX+8),ITRNOE((IE-1)*NBNMAX+7) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+4) = P1 ITRNOE((IE-1)*NBNMAX+3) = P2 ITRNOE((IE-1)*NBNMAX+8) = P3 ITRNOE((IE-1)*NBNMAX+7) = P4 230 CONTINUE 240 CONTINUE C C --- DESTRUCTION --- C DO 280 K=1,NBRAN DO 270 I=1,KARETE DO 260 J=NBLIG-KARETE+1,NBLIG IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL DO 250 L=1,NBNMAX ITRNOE((IE-1)*NBNMAX+L) = 0 250 CONTINUE 260 CONTINUE 270 CONTINUE 280 CONTINUE GOTO 999 C C ========= C --- ARETE K8 --- C ========= C ... 300 I = KARETE+1 C PRINT *,'=====ARETE ',IARETE,' =====' C PRINT *,'---DROIT---' DO 315 K=1,NBRAN DO 310 J=1,KARETE IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL C P1 = J + (J-1)*(NBCOL+1) + (K-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 + 1 + (NBCOL+1) P3 = P1 + (NBLIG+1)*(NBCOL+1) P4 = P1 + 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+1),ITRNOE((IE-1)*NBNMAX+4), C > ITRNOE((IE-1)*NBNMAX+5),ITRNOE((IE-1)*NBNMAX+8) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+1) = P1 ITRNOE((IE-1)*NBNMAX+4) = P2 ITRNOE((IE-1)*NBNMAX+5) = P3 ITRNOE((IE-1)*NBNMAX+8) = P4 310 CONTINUE 315 CONTINUE J = KARETE + 1 C PRINT *,'---GAUCH---' DO 340 I=1,KARETE DO 330 K=1,NBRAN IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL C P1 = I + (I-1)*(NBCOL+1) + (K-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 + 1 + (NBCOL+1) P3 = P1 + (NBLIG+1)*(NBCOL+1) P4 = P1 + 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+1),ITRNOE((IE-1)*NBNMAX+2), C > ITRNOE((IE-1)*NBNMAX+5),ITRNOE((IE-1)*NBNMAX+6) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+1) = P1 ITRNOE((IE-1)*NBNMAX+2) = P2 ITRNOE((IE-1)*NBNMAX+5) = P3 ITRNOE((IE-1)*NBNMAX+6) = P4 330 CONTINUE 340 CONTINUE C C --- DESTRUCTION --- C DO 380 K=1,NBRAN DO 370 I=1,KARETE DO 360 J=1,KARETE IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL DO 350 L=1,NBNMAX ITRNOE((IE-1)*NBNMAX+L) = 0 350 CONTINUE 360 CONTINUE 370 CONTINUE 380 CONTINUE GOTO 999 C C ========== C --- ARETE K10 --- C ========== C ... 400 I = NBCOL - KARETE C PRINT *,'=====ARETE ',IARETE,' =====' C PRINT *,'---SUP---' K0 = NBRAN-KARETE DO 415 K=1,KARETE DO 410 J=1,NBLIG IE = I + (J-1)*NBCOL + (K+K0-1)*NBLIG*NBCOL C P1 = (NBCOL-KARETE+K) + (J-1)*(NBCOL+1)+ > (K+K0-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 + (NBCOL+1) P3 = P1 + 1 + (NBLIG+1)*(NBCOL+1) P4 = P1 + 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C P1 = (NBCOL+2-K) + (J-1)*(NBCOL+1)+ (K-1)*(NBLIG+1)*(NBCOL+1) C P2 = P1 + (NBCOL+1) C P3 = P1 - 1 + (NBLIG+1)*(NBCOL+1) C P4 = P1 - 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+2),ITRNOE((IE-1)*NBNMAX+3), C > ITRNOE((IE-1)*NBNMAX+6),ITRNOE((IE-1)*NBNMAX+7) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+2) = P1 ITRNOE((IE-1)*NBNMAX+3) = P2 ITRNOE((IE-1)*NBNMAX+6) = P3 ITRNOE((IE-1)*NBNMAX+7) = P4 410 CONTINUE 415 CONTINUE K = NBRAN - KARETE C PRINT *,'---INF---' I0 = NBCOL-KARETE DO 440 I=1,KARETE DO 430 J=1,NBLIG IE = I+I0 + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL C P1 = I+I0 + (J-1)*(NBCOL+1)+(K+I-1)*(NBLIG+1)*(NBCOL+1) P2 = P1 + (NBCOL+1) P3 = P1 + 1 + (NBLIG+1)*(NBCOL+1) P4 = P1 + 1 + (NBCOL+1) + (NBLIG+1)*(NBCOL+1) C C P1 = I + (J-1)*(NBCOL+1)+(NBCOL-I+1)*(NBLIG+1)*(NBCOL+1) C P2 = P1+1 - (NBLIG+1)*(NBCOL+1) C P3 = P1+1 + (NBCOL+1) - (NBLIG+1)*(NBCOL+1) C P4 = P1 + (NBCOL+1) C C PRINT *,'IE =',IE,' ANCIEN POINTS = ' C PRINT *,ITRNOE((IE-1)*NBNMAX+5),ITRNOE((IE-1)*NBNMAX+8), C > ITRNOE((IE-1)*NBNMAX+6),ITRNOE((IE-1)*NBNMAX+7) C PRINT *,' NOUVEAUX POINTS = ',P1,P2,P3,P4 C ITRNOE((IE-1)*NBNMAX+5) = P1 ITRNOE((IE-1)*NBNMAX+8) = P2 ITRNOE((IE-1)*NBNMAX+6) = P3 ITRNOE((IE-1)*NBNMAX+7) = P4 430 CONTINUE 440 CONTINUE C C --- DESTRUCTION --- C DO 480 K=(NBRAN-KARETE+1),NBRAN DO 470 I=(NBCOL-KARETE+1),NBCOL DO 460 J=1,NBLIG IE = I + (J-1)*NBCOL + (K-1)*NBLIG*NBCOL DO 450 L=1,NBNMAX ITRNOE((IE-1)*NBNMAX+L) = 0 450 CONTINUE 460 CONTINUE 470 CONTINUE 480 CONTINUE GOTO 999 C C 999 END
© Cast3M 2003 - Tous droits réservés.
Mentions légales