Você está na página 1de 8

C---------------------------------------------------------------------- BEM00010

SUBROUTINE ASSEMK(ZKG,ZKUG,ZKQG,NADR)
BEM00020
C---------------------------------------------------------------------- BEM00030
C0 ASSEMKF
ASSEMK
BEM00040
C1 PURPOSE
Assemble global Ku and Kq in the system matrix K for the BEM00050
C1
2D-BEM(N1: u imposed, N2 to N4: q imposed)
BEM00060
C2 CALL
CALL ASSEMK(ZKG,ZKUG,ZKQG,NADR)
BEM00070
C3 CALL ARG. NOM
= Discr. nb. of nodes
BEM00080
C3
NOMM
= Discr. max nb. of nodes
BEM00090
C3
N1
= Nb. of nodes of bound. 1
BEM00100
C3
ZKG(NOM,NOM)
= Global K system matrix
BEM00110
C3
ZKQG(NOM,NOM)
= Global Kq matrix
BEM00120
C3
ZKUG(NOM,NOM)
= Global Ku matrix
BEM00130
C3
ZKQL(NOM,NNODE)
= Local Kq matrix of element IE
BEM00140
C3
ZKUL(NOM,NNODE)
= Local Ku matrix of element IE
BEM00150
C3
NODE(NNODE)
= Nodes of element IE
BEM00160
C4 RET. ARG. ZKG
BEM00170
C9 94
S. GRILLI, Ocean Engng., Univ. of Rhode Island
BEM00180
CLASSEMK SUB. WHICH ASSEMBLES MATRIX Ku AND Kq INTO K FOR THE 2D-BEM
BEM00190
C-----------------------------------------------------------------------BEM00200
C
BEM00210
IMPLICIT REAL*8(A-H,O-Z)
BEM00220
C
BEM00230
INTEGER *2 NADR(NOM)
BEM00240
C
BEM00250
COMMON /MAILLE/ NOMM,IDUM,NOM,IDU(2),N1,IV(12)
BEM00260
C
BEM00270
DIMENSION ZKG(NOMM,NOM),ZKUG(NOMM,NOM),ZKQG(NOMM,NOM)
BEM00280
C
BEM00290
DO I=1,NOM
BEM00300
DO J=1,N1
BEM00310
L=NADR(J)
BEM00320
ZKG(I,L)=-ZKUG(I,J)
BEM00330
END DO
BEM00340
DO J=N1+1,NOM
BEM00350
L=NADR(J)
BEM00360
ZKG(I,L)= ZKQG(I,J)
BEM00370
END DO
BEM00380
END DO
BEM00390
C
BEM00400
RETURN
BEM00410
C
BEM00420
END
BEM00430
C---------------------------------------------------------------------- BEM00440
SUBROUTINE ASSEMP(PG,ZKUG,ZKQG,NADR,VN1,VN2,VN3,VN4)
BEM00450
C---------------------------------------------------------------------- BEM00460
C0 ASSEMPF
ASSEMP
BEM00470
C1 PURPOSE
Assemble the right hand side of the general system: Pg,
BEM00480
C1
depending of the type of B.C. on Boundaries 1 to 4
BEM00490
C1
(N1: u imposed, N2 to N4: q imposed)
BEM00500
C2 CALL
CALL ASSEMP(PG,ZKUG,ZKQG,NADR,VN1,VN2,VN3,VN4)
BEM00510
C3 CALL ARG. ZKQG(NOM,NOM)
= Global Kq matrix
BEM00520
C3
ZKUG(NOM,NOM)
= Global Ku matrix
BEM00530
C3
PG(NOM)
= Global system vector
BEM00540
C3
NADR(NOM)
= Addressing of nodes
BEM00550
C3
VN1(N1),VN2(N2)
= Boundary conditions on N1, N2
BEM00560
C3
VN3(N3),VN4(N3)
= Boundary conditions on N3, N4
BEM00570
C3
NOM,NOMM
= Discr. nb. of nodes and max nbs.
BEM00580
C3
N1,N2,N3,N4
= Nb. of nodes of bound. 1,2,3,4
BEM00590
C4 RET. ARG. PG
BEM00600
C9 94
S. GRILLI, Ocean Engng., Univ. of Rhode Island
BEM00610
CLASSEMP SUB. WHICH ASSEMBLE SYSTEM VECTOR FOR THE 2D-BEM
BEM00620
C-----------------------------------------------------------------------BEM00630
C
BEM00640
IMPLICIT REAL*8(A-H,O-Z)
BEM00650
C
BEM00660
INTEGER *2 NADR(NOM)
BEM00670
C
BEM00680
COMMON /MAILLE/ NOMM,NELMM,NOM,IDU(2),N1,N2,N3,N4,IV(9)
BEM00690
C
BEM00700
DIMENSION PG(NOM),ZKUG(NOMM,NOM),ZKQG(NOMM,NOM),VN1(N1),VN2(N2), BEM00710
.
VN3(N3),VN4(N4)
BEM00720
C
BEM00730
DATA ZERO/0.D0/
BEM00740
C
BEM00750
DO I=1,NOM
BEM00760

PG(I)=ZERO
DO J=1,N1
PG(I)=PG(I)-ZKQG(I,J)*VN1(J)
END DO
DO J=N1+1,N1+N2
PG(I)=PG(I)+ZKUG(I,J)*VN2(J-N1)
END DO
DO J=N1+N2+1,N1+N2+N3
PG(I)=PG(I)+ZKUG(I,J)*VN3(J-N1-N2)
END DO
DO J=N1+N2+N3+1,NOM
PG(I)=PG(I)+ZKUG(I,J)*VN4(J-N1-N2-N3)
END DO
END DO

BEM00770
BEM00780
BEM00790
BEM00800
BEM00810
BEM00820
BEM00830
BEM00840
BEM00850
BEM00860
BEM00870
BEM00880
BEM00890
BEM00900
C
BEM00910
RETURN
BEM00920
C
BEM00930
END
BEM00940
C---------------------------------------------------------------------- BEM00950
SUBROUTINE DBNOD(ZKG,PG,VN1,NADR,LXZI)
BEM00960
C---------------------------------------------------------------------- BEM00970
C0 DBNODF
DBNOD
BEM00980
C1 PURPOSE
Impose compatibility conditions to the double nodes in
BEM00990
C1
case of mixed boundary conditions (N2,N1 and N3,N1)
BEM01000
C2 CALL
CALL DBNOD(ZKG,PG,VN1,NADR,LXZI)
BEM01010
C3 CALL ARG. PG(NOM)
= General system vectors
BEM01020
C3
ZKG(NOM,NOM)
= General system matrix
BEM01030
C3
VN1(N1)
= Boundary conditions on N1
BEM01040
C3
LXZI(NOM)
= Addresses of possible double nodes BEM01050
C3
NOM
= Discr. nb. of nodes
BEM01060
C3
N1,N2,N3,N4
= Nb. of nodes of bound. 1,2,3,4
BEM01070
C4 RET. ARG. ZKG,PG
BEM01080
C9 94
S. GRILLI, Ocean Engng., Univ. of Rhode Island
BEM01090
CLDBNOD SUB. WHICH IMPOSE DOUBLE NODE COMPATIBILITY FOR THE 2D-BEM
BEM01100
C-----------------------------------------------------------------------BEM01110
C
BEM01120
IMPLICIT REAL*8(A-H,O-Z)
BEM01130
C
BEM01140
INTEGER *2 NADR(NOM)
BEM01150
C
BEM01160
COMMON /MAILLE/ NOMM,IDUM,NOM,IDU(2),N1,N2,N3,N4,IDK(9)
BEM01170
C
BEM01180
DIMENSION ZKG(NOMM,NOM),VN1(N1),PG(NOM),LXZI(NOM)
BEM01190
C
BEM01200
DATA ZERO/0.D0/
BEM01210
C
BEM01220
C.....Double node adresses
BEM01230
C
BEM01240
C
On N2,N3
BEM01250
C
BEM01260
NODER1=NADR(N1+N2)
BEM01270
NODER2=NADR(N1+N2+1)
BEM01280
C
BEM01290
C
On N4,N2,N3
BEM01300
C
BEM01310
NODEC1=NADR(N1+1)
BEM01320
NODEC2=NADR(N1+N2+N3)
BEM01330
NODEB1=LXZI(NODEC1)
BEM01340
NODEB2=LXZI(NODEC2)
BEM01350
C
BEM01360
C.....Compute relative maximum for double nodes
BEM01370
C
BEM01380
ZMAX=ZERO
BEM01390
C
BEM01400
DO I=1,NOM
BEM01410
IF(DABS(ZKG(I,I)).GT.ZMAX) ZMAX=DABS(ZKG(I,I))
BEM01420
END DO
BEM01430
C
BEM01440
DO I=1,NOM
BEM01450
ZKG(NODER1,I)=ZERO
BEM01460
ZKG(NODER2,I)=ZERO
BEM01470
ZKG(NODEB1,I)=ZERO
BEM01480
ZKG(NODEB2,I)=ZERO
BEM01490
END DO
BEM01500
C
BEM01510
C.....Imposing u(N2) and u(N3) equal to imposed u on N1 (double node)
BEM01520

BEM01530
BEM01540
BEM01550
C
BEM01560
PG(NODER1)=VN1(1)*ZMAX
BEM01570
PG(NODER2)=VN1(N1)*ZMAX
BEM01580
C
BEM01590
C.....Imposing that u is similar (but unknown) on N2,N4 and N3,N4
BEM01600
C
BEM01610
ZKG(NODEB1,NODEC1)=-ZMAX
BEM01620
ZKG(NODEB2,NODEC2)=-ZMAX
BEM01630
ZKG(NODEB1,NODEB1)= ZMAX
BEM01640
ZKG(NODEB2,NODEB2)= ZMAX
BEM01650
C
BEM01660
PG(NODEB1)=ZERO
BEM01670
PG(NODEB2)=ZERO
BEM01680
C
BEM01690
RETURN
BEM01700
C
BEM01710
END
BEM01720
C---------------------------------------------------------------------- BEM01730
SUBROUTINE CONDNO(A,BWORK,CWORK,VWORK,IWORK,ICOND,RCOND)
BEM01740
C---------------------------------------------------------------------- BEM01750
C0 CONDNOF
CONDNO
BEM01760
C1 PURPOSE
Compute the condition number k(2) in the L2 sense of a
BEM01770
C1
matrix A(NOM,NOM)
BEM01780
C2 CALL
CALL CONDNO(A,BWORK,CWORK,VWORK,IWORK,ICOND,RCOND)
BEM01790
C3 CALL ARG. NOM
= Discr. nb. of nodes
BEM01800
C3
NOMM
= Discr. max nb. of nodes
BEM01810
C3
A(NOM,NOM)
= Matrix whose cond. nb. is computed BEM01820
C3
BWORK(NOM,NOM)
= Working matrix (A*AT: symetric)
BEM01830
C3
CWORK(NOM,NOM)
= Working matrix
BEM01840
C3
VWORK(3*NOM)
= Working vector
BEM01850
C3
IWORK(NOM)
= Working vector
BEM01860
C3
ICOND
= Compute condition number k(2) (1)
BEM01870
C3
SMALL
= Switch comput. of max or min eigvl. BEM01880
C3
EIGMAX(1)
= Largest eigenvalue of Aij
BEM01890
C3
EIGMin(1)
= Smallest eigenvalue of Aij
BEM01900
C4 RET. ARG. RCOND
= Condition number k(2)
BEM01910
C6 INT.CALL ERRORS
BEM01920
CE ERRORS
01= The system condition number is negative
BEM01930
C9 94
S. GRILLI, Ocean Engng., Univ. of Rhode Island
BEM01940
CLCONDNO SUB. WHICH COMPUTES THE COND. NB. OF A MATRIX FOR THE 2D-BEM
BEM01950
C-----------------------------------------------------------------------BEM01960
C
BEM01970
IMPLICIT REAL*8(A-H,O-Z)
BEM01980
C
BEM01990
LOGICAL SMALL
BEM02000
COMPLEX *16 EIGMAX,EIGMIN
BEM02010
CHARACTER *8 TEXTE
BEM02020
C
BEM02030
COMMON /MAILLE/ NOMM,IDUM,NOM,IDU(15)
BEM02040
C
BEM02050
DIMENSION A(NOMM,NOM),BWORK(NOMM,NOM),CWORK(NOMM,NOM),EIGMAX(1), BEM02060
.
EIGMIN(1),VWORK(3*NOM),IWORK(NOM)
BEM02070
C
BEM02080
EXTERNAL DE2ASF
BEM02090
C
BEM02100
DATA ZERO/0.D0/,TEXTE/'CONDNO01'/
BEM02110
C
BEM02120
C.....Calculation of condition number for matrix A
BEM02130
C
BEM02140
IF(ICOND.EQ.1) THEN
BEM02150
C
BEM02160
DO I = 1, NOM
BEM02170
DO J = 1, NOM
BEM02180
SUM = ZERO
BEM02190
C
BEM02200
DO K = 1, NOM
BEM02210
SUM = SUM + A(I,K)*A(J,K)
BEM02220
END DO
BEM02230
C
BEM02240
BWORK(I,J) = SUM
BEM02250
END DO
BEM02260
END DO
BEM02270
C
BEM02280
ZKG(NODER1,NODER1)=ZMAX
ZKG(NODER2,NODER2)=ZMAX

C
C

Call of IMSL routine D2EASF

BEM02290
BEM02300
N
=NOM
BEM02310
NMAX=NOMM
BEM02320
C
BEM02330
SMALL=.FALSE.
BEM02340
C
BEM02350
CALL DE2ASF(N,1,BWORK,NMAX,SMALL,EIGMAX,CWORK,VWORK,IWORK)
BEM02360
C
----------BEM02370
C
BEM02380
SMALL=.TRUE.
BEM02390
C
BEM02400
CALL DE2ASF(N,1,BWORK,NMAX,SMALL,EIGMIN,CWORK,VWORK,IWORK)
BEM02410
C
----------BEM02420
C
BEM02430
ARG = EIGMAX(1)/EIGMIN(1)
BEM02440
C
BEM02450
IF(ARG.GT.ZERO) THEN
BEM02460
RCOND = DSQRT(ARG)
BEM02470
ELSE
BEM02480
CALL ERRORS(TEXTE)
BEM02490
C
----------BEM02500
END IF
BEM02510
C
BEM02520
END IF
BEM02530
C
BEM02540
RETURN
BEM02550
C
BEM02560
END
BEM02570
C-------------------------------------------------------------------BEM02580
SUBROUTINE SOLVE(A,B,IFLAG)
BEM02590
C-------------------------------------------------------------------BEM02600
C0 SOLVEF
SOLVE
BEM02610
C1 PURPOSE
Compute the solution Xj of linear system Aij * Xj = Bi
BEM02620
C1
by the Kaletsky method (general full nonsym. matrix)
BEM02630
C2 CALL
CALL SOLVE(A,B,IFLAG)
BEM02640
C3 CALL ARG. A(NOM,NOM)
= system matrix
BEM02650
C3
B(NOM)
= system load vector
BEM02660
C3
IFLAG
= matrix elimination or not (1/2)
BEM02670
C4 RET. ARG. B(NOM)
BEM02680
C6 INT.CALL ERRORS
BEM02690
CE ERRORS
01= Singular matrix(first diag. component)
BEM02700
CE
02= Singular matrix(one encountered diagonal comp.)
BEM02710
C9 94
S. GRILLI, Ocean Engng., UIniv. of Rhode Island
BEM02720
CLSOLVE SUB. COMPUTES SOLUTION OF LINEAR SYSTEM FOR THE 2D-BEM
BEM02730
C-----------------------------------------------------------------------BEM02740
C
BEM02750
IMPLICIT REAL*8(A-H,O-Z)
BEM02760
C
BEM02770
CHARACTER *8 TEXTE1,TEXTE2
BEM02780
C
BEM02790
DIMENSION A(NOMM,NOM),B(NOM)
BEM02800
C
BEM02810
COMMON /MAILLE/ NOMM,IDUM,NOM,IDU(15)
BEM02820
C
BEM02830
DATA ZERO/0.D0/,EPS/1.D-10/,TEXTE1/'SOLVE 01'/,TEXTE2/'SOLVE 02'/ BEM02840
C
BEM02850
IF(IFLAG.EQ.1) THEN
BEM02860
C
BEM02870
C........Matrix elimination
BEM02880
C
BEM02890
SP=A(1,1)
BEM02900
IF(DABS(SP).LT.EPS) THEN
BEM02910
CALL ERRORS(TEXTE1)
BEM02920
C
----------BEM02930
END IF
DO J=2,NOM
BEM02940
A(1,J)=A(1,J)/SP
BEM02950
END DO
BEM02960
NM=NOM-1
BEM02970
DO J=2,NM
BEM02980
JP=J+1
BEM02990
JM=J-1
BEM03000
DO I=J,NOM
BEM03010
S=ZERO
BEM03020
DO K=1,JM
BEM03030

S=S+A(I,K)*A(K,J)
END DO
A(I,J)=A(I,J)-S
END DO
IF(DABS(A(J,J)).LE.EPS) CALL ERRORS(TEXTE2)
----------DO I=JP,NOM
R=ZERO
DO K=1,JM
R=R+A(J,K)*A(K,I)
END DO
A(J,I)=(A(J,I)-R)/A(J,J)
END DO
END DO
Q=ZERO
DO K=1,NM
Q=Q+A(NOM,K)*A(K,NOM)
END DO
A(NOM,NOM)=A(NOM,NOM)-Q
END IF

BEM03040
BEM03050
BEM03060
BEM03070
BEM03080
BEM03090
BEM03100
BEM03110
BEM03120
BEM03130
BEM03140
BEM03150
BEM03160
BEM03170
BEM03180
BEM03190
BEM03200
BEM03210
BEM03220

C
BEM03230
C.....Load vector back substitution
BEM03240
C
BEM03250
B(1)=B(1)/A(1,1)
BEM03260
DO K=2,NOM
BEM03270
KM=K-1
BEM03280
S=ZERO
BEM03290
DO KK=1,KM
BEM03300
S=S+A(K,KK)*B(KK)
BEM03310
END DO
BEM03320
B(K)=(B(K)-S)/A(K,K)
BEM03330
END DO
BEM03340
DO K=1,NM
BEM03350
I=NOM-K
BEM03360
R=ZERO
BEM03370
DO KK=1,K
BEM03380
MM=I+KK
BEM03390
R=R+A(I,MM)*B(MM)
BEM03400
END DO
BEM03410
B(I)=B(I)-R
BEM03420
END DO
BEM03430
C
RETURN
BEM03440
C
END
BEM03450
C---------------------------------------------------------------------- BEM03460
SUBROUTINE SORT(PG,PU,PQ,VN1,VN2,VN3,VN4,NADR)
BEM03470
C---------------------------------------------------------------------- BEM03480
C0 SORTF
SORT
BEM03490
C1 PURPOSE
Sort the unknowns after solving regarding their type
BEM03500
C2 CALL
CALL SORT(PG,PU,PG,VN1,VN2,VN3,VN4,NADR)
BEM03510
C3 CALL ARG. PG(NOM)
= General system vectors (results)
BEM03520
C3
VN1(N1),VN2(N2)
= Boundary conditions on N1, N2
BEM03530
C3
VN3(N3),VN4(N3)
= Boundary conditions on N3, N4
BEM03540
C3
NOM
= Discr. nb. of nodes
BEM03550
C3
N1,N2,N3,N4
= Nb. of nodes of bound. 1,2,3,4
BEM03560
C4 RET. ARG. PU(NOM)
= Nodal u over the boundary
BEM03570
C4
PQ(NOM)
= Nodal q over the boundary
BEM03580
C9 94
S. GRILLI, Ocean Engng., Univ. of Rhode Island
BEM03590
CLSORT SUB. WHICH SORTS RESULTS OF THE 2D-BEM
BEM03600
C-----------------------------------------------------------------------BEM03610
C
BEM03620
IMPLICIT REAL*8(A-H,O-Z)
BEM03630
C
BEM03640
INTEGER *2 NADR(NOM)
BEM03650
C
BEM03660
COMMON /MAILLE/ NOMM,IDUM,NOM,IDU(2),N1,N2,N3,N4,IV(9)
BEM03670
C
BEM03680
DIMENSION PG(NOM),PU(NOM),PQ(NOM),VN1(N1),VN2(N2),VN3(N3),VN4(N4) BEM03690
C
BEM03700
DO I=1,N1
BEM03710
L=NADR(I)
BEM03720
PU(L)=VN1(I)
BEM03730
PQ(L)=PG(L)
BEM03740
END DO
BEM03750
C
BEM03760

DO I=N1+1,NOM
L=NADR(I)
PU(L)=PG(L)
END DO

BEM03770
BEM03780
BEM03790
BEM03800
C
BEM03810
DO I=N1+1,N1+N2
BEM03820
L=NADR(I)
BEM03830
PQ(L)=VN2(I-N1)
BEM03840
END DO
BEM03850
C
BEM03860
DO I=N1+N2+1,N1+N2+N3
BEM03870
L=NADR(I)
BEM03880
PQ(L)=VN3(I-N1-N2)
BEM03890
END DO
BEM03900
C
BEM03910
DO I=N1+N2+N3+1,NOM
BEM03920
L=NADR(I)
BEM03930
PQ(L)=VN4(I-N1-N2-N3)
BEM03940
END DO
BEM03950
C
BEM03960
RETURN
BEM03970
C
BEM03980
END
BEM03990
C------------------------------------------------------------------BEM04000
SUBROUTINE OUTPUT(PU,PQ,X,Z,MDELEM,ICOND,RCOND)
BEM04010
C-------------------------------------------------------------------BEM04020
C0 OUTPUTF
OUTPUT
BEM04030
C1 PURPOSE
Postprocess and print the results (u,q) at N
BEM04040
C2 CALL
CALL OUTPUT(PG,PU,PQ,X,Z,VN1,VN2,VN3,VN4,N1,N2,N3,N4)
BEM04050
C3 CALL ARG. X(NOM),Z(NOM)
= Coordinates of discretization nodes BEM04060
C3
MDELEM(NP+4,NELEM) = Elements data(Nodes,NNODE,NINTR,
BEM04070
C3
NINTS,NSIDE)
BEM04080
C3
PU(NOM)
= u values on the discretization nodesBEM04090
C3
PQ(NOM)
= q values on the discretization nodesBEM04100
C3
NOM,NELEM
= Discr. nb. of nodes and elements
BEM04110
C3
N1,N2,N3,N4
= Nb. of nodes of bound. 1,2,3,4
BEM04120
C3
IO6,NSAVE
= Output and save file numbers
BEM04130
C3
ICOND
= Compute condition number k(2) (1)
BEM04140
C3
RCOND
= Condition number k(2)
BEM04150
C4 RET. ARG. DISCH(4)
= Discharges at the 1,2,3,4 boundariesBEM04160
C4
CONTER
= Error to the zero flux contin. cond.BEM04170
C9 94
S. GRILLI, Ocean Engng., Univ. of Rhode Island
BEM04180
CLOUTPUT SUB. WHICH POSPROCESS AND PRINT RESULTS OF THE 2D-BEM
BEM04190
C-----------------------------------------------------------------------BEM04200
C
BEM04210
IMPLICIT REAL*8 (A-H,O-Z)
BEM04220
C
BEM04230
PARAMETER (NNODMP=4)
BEM04240
C
BEM04250
COMMON /MAILLE/ IDU(2),NOM,NELEM,IDV,N1,N2,N3,N4,IDW(5),ISAVE,
BEM04260
.
IO5,IO6,NSAVE
BEM04270
COMMON /DELEM/ IDK(3*NNODMP),NNODE,NINTR,IDL(2)
BEM04280
COMMON /FUNCTN/ FI(NNODMP),DFI(NNODMP),D2FI(NNODMP),XIP,ZIP,
BEM04290
.
DUMY(2),WEIGHT,DS,IP
BEM04300
C
BEM04310
DIMENSION PU(NOM),PQ(NOM),X(NOM),Z(NOM),MDELEM(NNODMP+4,NELEM),
BEM04320
.
DISCH(4)
BEM04330
C
BEM04340
DATA ZERO/0.D0/,CISI/54.D0/,EPS/1.D-06/
BEM04350
C
BEM04360
C.....Print results
BEM04370
C
BEM04380
WRITE (IO6,2000)
BEM04390
C
BEM04400
SA=CISI
BEM04410
IS=54
BEM04420
C
BEM04430
DO I=1,NOM
BEM04440
WRITE (IO6,2010) I,X(I),Z(I),PU(I),PQ(I)
BEM04450
IF((DFLOAT(I+9)/SA-DFLOAT((I+9)/IS)).LT.EPS) THEN
BEM04460
WRITE(IO6,2020)
BEM04470
END IF
BEM04480
END DO
BEM04490
C
BEM04500
C.....Postprocessings
BEM04510
C
BEM04520

IF(ISAVE.EQ.1) THEN

BEM04530
BEM04540
REWIND NSAVE
BEM04550
C
BEM04560
C
Compute discharges on 1,2,3,4 boundaries
BEM04570
C
BEM04580
DO K=1,4
BEM04590
DISCH(K)=ZERO
BEM04600
END DO
BEM04610
C
BEM04620
DO IE=1,NELEM
BEM04630
NNODE=MDELEM(NNODMP+1,IE)
BEM04640
NINTR=MDELEM(NNODMP+2,IE)
BEM04650
NSIDE=MDELEM(NNODMP+4,IE)
BEM04660
C
BEM04670
DO IP=1,NINTR
BEM04680
C
BEM04690
C
Read saved data for IE,IP
BEM04700
C
BEM04710
READ(NSAVE) ETA,XIP,ZIP,(FI(I),DFI(I),D2FI(I),I=1,NNODE) BEM04720
.
,DS,WEIGHT
BEM04730
C
BEM04740
DO I=1,NNODE
BEM04750
L=MDELEM(I,IE)
BEM04760
DISCH(NSIDE)=DISCH(NSIDE)+FI(I)*PQ(L)*DS*WEIGHT
BEM04770
END DO
BEM04780
END DO
BEM04790
END DO
BEM04800
C
BEM04810
CONTER=ZERO
BEM04820
C
BEM04830
DO I=1,4
BEM04840
CONTER=CONTER+DISCH(I)
BEM04850
END DO
BEM04860
C
BEM04870
C
Print discharges
BEM04880
C
BEM04890
WRITE(IO6,2030)(DISCH(I),I=1,4),CONTER
BEM04900
C
BEM04910
END IF
BEM04920
C
BEM04930
C
Write condition number
BEM04940
C
BEM04950
IF (ICOND.EQ.1) THEN
BEM04960
WRITE (IO6,2040) RCOND
BEM04970
C
BEM04980
END IF
BEM04990
C
BEM05000
RETURN
BEM05010
C
BEM05020
2000 FORMAT (1H1,T10,'PROBLEM RESULTS'/
BEM05030
.
1H ,T10,'==============='//
BEM05040
.
1H ,'Node
x-coord. z.coord.
u(x,z) ',
BEM05050
.
'
q(x,z)'/
BEM05060
.
1H ,'----------- ------------- ',
BEM05070
.
'
------'//)
BEM05080
2010 FORMAT (1H ,I5,5X,2F10.3,4X,2(D15.9,2X))
BEM05090
2020 FORMAT (1H1)
BEM05100
2030 FORMAT (1H1,T10,'FLUX AT BOUNDARIES'/
BEM05110
.
1H ,T10,'=================='//
BEM05120
.
1H ,T5,'Boundary 1
:',D15.9/
BEM05130
.
1H0,T5,'Boundary 2
:',D15.9/
BEM05140
.
1H0,T5,'Boundary 3
:',D15.9/
BEM05150
.
1H0,T5,'Boundary 4
:',D15.9//
BEM05160
.
1H0,T5,'Total flux
:',D15.9)
BEM05170
2040 FORMAT (1H0,T5,'Condition number = ',F10.2///)
BEM05180
C
BEM05190
END
BEM05200
C---------------------------------------------------------------------SUBROUTINE DE2ASF(N,M,BWORK,NMAX,SMALL,EIGEN,CWORK,VWORK,IWORK)
BEM02410
C---------------------------------------------------------------------C
BEM02750
IMPLICIT REAL*8(A-H,O-Z)
BEM02760
C
BEM02770
LOGICAL SMALL
BEM02000
COMPLEX *16 EIGEN(1)
C

C
COMMON /MAILLE/ NOMM,IDUM,NOM,IDU(15)
C
.

DIMENSION BWORK(NOMM,NOM),CWORK(NOMM,NOM),
VWORK(3*NOM),IWORK(NOM)

C
DATA ONE/1.D0/
C
EIGEN(1)=ONE
C
RETURN
C

BEM02030
BEM02040
BEM02050
BEM02060
BEM02070
BEM02080