The TELEMAC-MASCARET system  trunk
initab.f
Go to the documentation of this file.
1 ! *****************
2  SUBROUTINE initab
3 ! *****************
4 !
5  &(ibor1,ifabor1,nelem2_dim,part)
6 !
7 !***********************************************************************
8 ! TOMAWAC V7P0 20/06/2011
9 !***********************************************************************
10 !
11 !brief INITIALISES USEFUL ARRAYS.
12 !
13 !history F.MARCOS (LNH)
14 !+ 23/05/96
15 !+ V1P2
16 !+
17 !
18 !history DC
19 !+
20 !+
21 !+ ADDED ARG NPOIN2 TO DIMENSION THE ARRAYS
22 !
23 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
24 !+ 13/07/2010
25 !+ V6P0
26 !+ Translation of French comments within the FORTRAN sources into
27 !+ English comments
28 !
29 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
30 !+ 21/08/2010
31 !+ V6P0
32 !+ Creation of DOXYGEN tags for automated documentation and
33 !+ cross-referencing of the FORTRAN sources
34 !
35 !history G.MATTAROLO (EDF)
36 !+ 05/2011
37 !+ V6P1
38 !+ Modification for direct coupling with TELEMAC
39 !+ Initialisation of the variabel BETA
40 !
41 !history G.MATTAROLO (EDF - LNHE)
42 !+ 20/06/2011
43 !+ V6P1
44 !+ Translation of French names of the variables in argument
45 !
46 !history J-M HERVOUET (EDF - LNHE)
47 !+ 07/12/2012
48 !+ V6P3
49 !+ Optimisation.
50 !
51 !history J-M HERVOUET (EDF - LNHE)
52 !+ 08/01/2014
53 !+ V7P0
54 !+ CALL PARCOM suppressed by using new argument ASSPAR in VECTOR
55 !
56 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 !| IBOR1 |<--| WORK TABLE
58 !| IFABOR1 |-->| ELEMENTS BEHIND THE EDGES OF A TRIANGLE
59 !| | | IF NEGATIVE OR ZERO, THE EDGE IS A LIQUID,
60 !| | | SOLID OR PERIODIC BOUNDARY
61 !| NELEM2_DIM |---| NUMBER OF ELEMENTS IN 2D
62 !| PART |-->| FLAG FOR DIRECT COUPLING WITH TELEMAC
63 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64 !
65  USE bief
68 !
69  USE interface_tomawac, ex_initab => initab
70  IMPLICIT NONE
71 !
72 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
73 !
74  INTEGER, INTENT(IN) :: PART,NELEM2_DIM
75  INTEGER, INTENT(IN) :: IFABOR1(nelem2_dim,3)
76  INTEGER, INTENT(INOUT) :: IBOR1(nelem2_dim,7)
77 !
78 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
79 !
80  INTEGER IDIRE,IPOIN,IELEM2,IFREQ
81  DOUBLE PRECISION AUXI
82 !
83 !-----------------------------------------------------------------------
84 !
85  DO idire = 1, ndire
86  costet(idire) = cos(teta(idire))
87  sintet(idire) = sin(teta(idire))
88  ENDDO
89 !
90  auxi=(raisf-1.d0)/2.d0
91  dfreq(1)=auxi*freq(1)
92  dfreq(nf)=auxi*freq(nf-1)
93  DO ifreq = 2,nf-1
94  dfreq(ifreq) = auxi*(freq(ifreq)+freq(ifreq-1))
95  DO ipoin=1,npoin2
96  b(ipoin+(ifreq-1)*npoin2)=0.d0
97  ENDDO
98  ENDDO
99 !
100  IF(sphe) THEN
101  DO ipoin=1,npoin2
102  cosf(ipoin)=cos(y(ipoin)*degrad)
103  tgf(ipoin)=tan(y(ipoin)*degrad)
104  ENDDO
105  ENDIF
106 !
107  DO ielem2=1,nelem2
108  ibor1(ielem2,1)=ifabor1(ielem2,1)
109  ibor1(ielem2,2)=ifabor1(ielem2,2)
110  ibor1(ielem2,3)=ifabor1(ielem2,3)
111  ibor1(ielem2,4)=1
112  ibor1(ielem2,5)=1
113  ibor1(ielem2,6)=1
114  ibor1(ielem2,7)=1
115  ENDDO
116 !
117 ! INITIALISES THE VARIABLE BETA
118 !
119  DO ipoin=1,npoin2
120  betabr(ipoin)=0.d0
121  ENDDO
122 !
123 ! INITIALISES THE GRADIENTS OF DEPTH, U AND V
124 !
125 !
126 ! INVERSE OF INTEGRAL OF TEST FUNCTIONS
127 !
128  IF(.NOT.proinf.OR.couran.OR.part.EQ.wac_cpl_init) THEN
129  CALL vector(st0,'=','MASBAS ',ielm2,1.d0,mesh%X,
130  & st1,st1,st1,st1,st1,mesh,.false.,st1,
131  & asspar=.true.)
132  CALL ov('X=1/Y ', x=st0%R, y=st0%R, dim1=npoin2)
133  ENDIF
134 !
135 ! NOW PROJECTED GRADIENTS DIVIDED BY INTEGRALS OF TEST FUNCTIONS
136 !
137  IF(.NOT.proinf) THEN
138  CALL vector(sdzx,'=','GRADF X',ielm2,1.d0,sdepth,
139  & st0,st0,st0,st0,st0,mesh,.false.,st0,
140  & asspar=.true.)
141  CALL vector(sdzy,'=','GRADF Y',ielm2,1.d0,sdepth,
142  & st0,st0,st0,st0,st0,mesh,.false.,st0,
143  & asspar=.true.)
144  CALL ov('X=XY ', x=sdzx%R, y=st0%R, dim1=npoin2)
145  CALL ov('X=XY ', x=sdzy%R, y=st0%R, dim1=npoin2)
146  ENDIF
147 !
148  IF(couran.OR.part.EQ.wac_cpl_init) THEN
149  CALL vector(sdux,'=','GRADF X',ielm2,1.d0,suc,
150  & st0,st0,st0,st0,st0,mesh,.false.,st0,asspar=.true.)
151  CALL vector(sdvx,'=','GRADF X',ielm2,1.d0,svc,
152  & st0,st0,st0,st0,st0,mesh,.false.,st0,asspar=.true.)
153  CALL vector(sduy,'=','GRADF Y',ielm2,1.d0,suc,
154  & st0,st0,st0,st0,st0,mesh,.false.,st0,asspar=.true.)
155  CALL vector(sdvy,'=','GRADF Y',ielm2,1.d0,svc,
156  & st0,st0,st0,st0,st0,mesh,.false.,st0,asspar=.true.)
157  CALL ov('X=XY ', x=sdux%R, y=st0%R, dim1=npoin2)
158  CALL ov('X=XY ', x=sdvx%R, y=st0%R, dim1=npoin2)
159  CALL ov('X=XY ', x=sduy%R, y=st0%R, dim1=npoin2)
160  CALL ov('X=XY ', x=sdvy%R, y=st0%R, dim1=npoin2)
161  ENDIF
162 !
163 !-----------------------------------------------------------------------
164 !
165  RETURN
166  END
double precision, dimension(:), pointer sintet
subroutine ov(OP, X, Y, Z, C, DIM1)
Definition: ov.f:7
double precision, dimension(:), pointer freq
type(bief_obj), target sdux
type(bief_obj), target sdvy
type(bief_obj), target svc
type(bief_obj), target sdzx
double precision, dimension(:), pointer teta
double precision, dimension(:), pointer y
type(bief_obj), target suc
double precision, dimension(:), pointer dfreq
subroutine initab(IBOR1, IFABOR1, NELEM2_DIM, PART)
Definition: initab.f:7
double precision, dimension(:), pointer tgf
integer, parameter wac_cpl_init
double precision, dimension(:), pointer b
type(bief_obj), target st0
type(bief_obj), target sduy
type(bief_obj), target st1
subroutine vector(VEC, OP, FORMUL, IELM1, XMUL, F, G, H, U, V, W, MESH, MSK, MASKEL, LEGO, ASSPAR)
Definition: vector.f:7
type(bief_obj), target sdzy
type(bief_obj), target sdvx
double precision, dimension(:), pointer betabr
double precision, dimension(:), pointer costet
double precision, dimension(:), pointer cosf
type(bief_obj), target sdepth
double precision, dimension(:), pointer x
type(bief_mesh), target mesh
Definition: bief.f:3