Télécharger mulmav.eso
Retour à la liste
mulmav
C MULMAV SOURCE CHAT 05/01/13 01:55:26 5004
SUBROUTINE MULMAV(C1,
C2,C3,C4,V,X,N,ICHLI,NLBLI,NBLI
) IMPLICIT INTEGER(I-N)
IMPLICIT REAL*8(A-H,O-Z)
C
C =====================================================================
C SOUS-PROGRAMME FORTRAN APPELE PAR ELFRES
C CALCUL DE X ET F EN FONCTION DE V1 ET V2 EN RESOLVANT:
C
C ( A1 A2 ) (X1) (V1)
C ( ) ( ) = ( )
C ( A3 A4 ) (X2) (V2)
C
C AVEC C1 MATRICE BANDE A1
C
C -1
C C2 MATRICE BANDE A2
C -1 -1 -1
C C4 MATRICE (A3-A4*A2 *A1) *A4*A2
C -1 -1
C C3 MATRICE (A3-A4*A2 *A1)
C
C NLBLI : TABLEAU POUR L' UTILISATION DES MATRICES BANDES
C
C ICHLI : SI NUL V2 EST NUL (PAS DE CHARGEMENT SUR LA LIAISON)
C
C CREATION : 04/08/87
C PROGRAMMEUR : GUILBAUD
C =====================================================================
C
DIMENSION C1(*),
C2(*),C3
(N,
1),C4
(N,
1),V
(*),X
(*),NLBLI
(2,
1),A
(6),
*B(6)
C -1 -1 -1
C 1 - X1=-(A3-A4*A2 *A1) *A4*A2 V1
C
DO 20 I=1,N
BB=0.D0
DO 10 J=1,N
BB=BB+C4(I,J)*V(J)
10 CONTINUE
X(I)=-BB
20 CONTINUE
C WRITE(IOIMP,*)' X1 ',X1
C WRITE(IOIMP,1000)(X(I),I=1,N)
C -1 -1
C 2 - X1=X1-(A3-A4*A2 *A1) *V2
C
IF(ICHLI.NE.0) THEN
C WRITE(IOIMP,*)' CHARGEMENT '
DO 40 I=1,N
BB=X(I)
DO 30 J=1,N
BB=BB+C3(I,J)*V(J+N)
30 CONTINUE
X(I)=BB
40 CONTINUE
C WRITE(IOIMP,1000)(X(I),I=1,N)
ENDIF
C -1
C 3 - X2=A2 *(V1-A1*X1)
C
NA=0
NB=0
DO 50 NBL =1,NBLI
ND1=N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