The TELEMAC-MASCARET system  trunk
lump.f
Go to the documentation of this file.
1 ! ***************
2  SUBROUTINE lump
3 ! ***************
4 !
5  &(diag,a,mesh,xmul)
6 !
7 !***********************************************************************
8 ! BIEF V6P1 21/08/2010
9 !***********************************************************************
10 !
11 !brief SUMS UP THE TERMS OF MATRIX A, BY LINE.
12 !+
13 !+ MULTIPLIES THE RESULT BY XMUL.
14 !+
15 !+ TO DO SO SIMPLY DOES DIAG = A X (X VECTOR EQUAL TO XMUL).
16 !
17 !history J-M HERVOUET (LNH)
18 !+ 08/12/94
19 !+ V5P5
20 !+
21 !
22 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
23 !+ 13/07/2010
24 !+ V6P0
25 !+ Translation of French comments within the FORTRAN sources into
26 !+ English comments
27 !
28 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
29 !+ 21/08/2010
30 !+ V6P0
31 !+ Creation of DOXYGEN tags for automated documentation and
32 !+ cross-referencing of the FORTRAN sources
33 !
34 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 !| A |-->| MATRIX
36 !| DIAG |<--| RESULTING VECTOR
37 !| MESH |-->| MESH STRUCTURE
38 !| XMUL |-->| COEFFICIENT FOR MULTIPLICATION
39 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 !
41  USE bief, ex_lump => lump
42 !
44  IMPLICIT NONE
45 !
46 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
47 !
48  DOUBLE PRECISION, INTENT(IN) :: XMUL
49  TYPE(bief_obj), INTENT(IN) :: A
50  TYPE(bief_obj), INTENT(INOUT) :: DIAG
51  TYPE(bief_mesh), INTENT(INOUT) :: MESH
52 !
53 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
54 !
55  DOUBLE PRECISION C
56 !
57 !-----------------------------------------------------------------------
58 !
59  IF(a%ELMLIN.NE.a%ELMCOL) THEN
60  WRITE(lu,51)
61 51 FORMAT(1x,'LUMP (BIEF) : A IS NOT A SQUARE MATRIX')
62  CALL plante(1)
63  stop
64  ENDIF
65 !
66 !-----------------------------------------------------------------------
67 !
68  CALL cpstvc(a%D,diag)
69 !
70 !-----------------------------------------------------------------------
71 !
72 ! BUILDS A VECTOR THAT IS XMUL EVERYWHERE
73 !
74  CALL os( 'X=C ', x=diag , c=xmul )
75 !
76 ! DIAG IS THE PRODUCT OF A BY THIS VECTOR
77 ! DIAG HERE PLAYS THE ROLE OF X AND Y (CAN BE DONE)
78 !
79  CALL matvec('X=AY ',diag,a,diag,c,mesh,.true.)
80 !
81 !-----------------------------------------------------------------------
82 !
83  RETURN
84  END
subroutine cpstvc(X, Y)
Definition: cpstvc.f:7
subroutine os(OP, X, Y, Z, C, IOPT, INFINI, ZERO)
Definition: os.f:7
subroutine matvec(OP, X, A, Y, C, MESH, LEGO)
Definition: matvec.f:7
subroutine lump(DIAG, A, MESH, XMUL)
Definition: lump.f:7
Definition: bief.f:3