The TELEMAC-MASCARET system  trunk
bief_def.f
Go to the documentation of this file.
1 ! ***************
2  MODULE bief_def
3 ! ***************
4 !
5 !
6 !***********************************************************************
7 ! BIEF
8 !***********************************************************************
9 !
10 !brief DEFINITION OF THE BIEF STRUCTURES
11 !+
12 !
13 !history J-M HERVOUET (EDF LAB, LNHE)
14 !+ 09/05/2014
15 !+ V7P0
16 !+ Integer I8 buffers added in the mesh structure.
17 !history R.NHEILI (Univerte de Perpignan, DALI)
18 !+ 24/02/2016
19 !+ V7P3
20 !+ ADD E (ROUNDING ERROR) IN THE VECTOR STRUCTURE
21 !+ ADD BUF_SEND_ERR AND BUF_RECV_ERR
22 !
23 !history J-M HERVOUET (EDF LAB, LNHE)
24 !+ 22/03/2016
25 !+ V7P2
26 !+ Adding component STOXEBE for the storage option of off-diagonal
27 !+ terms of EBE matrices.
28 !
29 !history N.DURAND (HRW)
30 !+ January 2019
31 !+ V8P0
32 !+ TYPE SPECTRUM (used in ARTEMIS) migrated to BIEF_DEF
33 !
34 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 !
38 !
39  IMPLICIT NONE
40 !
41 !=======================================================================
42 !
43 ! COMMON VALUES FOR PARALLEL MODE
44 !
45 ! NPTIR: NUMBER OF INTERFACE POINTS OF THE SUB-DOMAIN
46 ! IPID: PROCESSOR NUMBER
47 ! NCSIZE: NUMBER OF PROCESSORS
48  INTEGER,TARGET::nptir
49  INTEGER ipid,ncsize,nhalo
50 !
51 ! MAXIMUM GEOMETRICAL MULTIPLICITY OF A NODE
52  INTEGER, PARAMETER :: nbmaxnshare = 10
53 ! FOR A DOMAIN, MAXIMUM NUMBER OF DOMAIN NEIGHBOURS/2
54 ! BE CAREFUL: VARIABLE USED IN PARTEL.F TOO
55  INTEGER, PARAMETER :: nbmaxdshare = 80
56 !
57 !=======================================================================
58 !
59 ! STRUCTURE OF POINTER TO A BIEF_OBJ, TO HAVE ARRAYS OF POINTERS
60 ! IN THE BIEF_OBJ STRUCTURE FOR BLOCKS
61 !
62 ! BIEF RELEASE 6.0
63 !
64 !=======================================================================
65 !
66 ! THIS IS NECESSARY IN FORTRAN 90 TO HAVE ARRAYS OF POINTERS
67 ! LIKE THE COMPONENT ADR BELOW, WHICH ENABLES TO BUILD BLOCKS
68 ! WHICH ARE ARRAYS OF POINTERS TO BIEF_OBJ STRUCTURES
69 !
71  TYPE(bief_obj), POINTER :: p => null()
72  END TYPE pointer_to_bief_obj
73 !
74 !=======================================================================
75 !
76 ! STRUCTURE OF VECTOR, MATRIX OR BLOCK IN A SINGLE OBJECT : BIEF_OBJ
77 !
78 !=======================================================================
79 !
80  TYPE bief_obj
81 !
82 !-----------------------------------------------------------------------
83 !
84 ! HEADER COMMON TO ALL OBJECTS
85 !
86 ! KEY : ALWAYS 123456 TO CHECK MEMORY OVERWRITING
87  INTEGER key
88 !
89 ! TYPE: 2: VECTOR, 3: MATRIX, 4: BLOCK
90  INTEGER type
91 !
92 ! Contains the name of its father (i.e the bloc that created it)
93 ! If father is XXXXXX the bief_obj was created on its own
94  CHARACTER(LEN=6) father
95 !
96 ! NAME: FORTRAN NAME OF OBJECT IN 6 CHARACTERS
97  CHARACTER(LEN=6) name
98 !
99 !-----------------------------------------------------------------------
100 !
101 ! FOR VECTORS
102 !
103 !
104 ! NAT: NATURE (1:DOUBLE PRECISION 2:INTEGER)
105  INTEGER nat
106 !
107 ! ELM: TYPE OF ELEMENT
108  INTEGER elm
109 !
110 ! DIM1: FIRST DIMENSION OF VECTOR
111  INTEGER dim1
112 !
113 ! MAXDIM1: MAXIMUM SIZE PER DIMENSION
114  INTEGER maxdim1
115 !
116 ! DIM2: SECOND DIMENSION OF VECTOR
117  INTEGER dim2
118 !
119 ! MAXDIM2: MAXIMUM SECOND DIMENSION OF VECTOR
120  INTEGER maxdim2
121 !
122 ! DIMDISC: TYPE OF ELEMENT IF VECTOR IS DISCONTINUOUS AT
123 ! THE BORDER BETWEEN ELEMENTS, OR 0 IF NOT
124  INTEGER dimdisc
125 !
126 ! STATUS:
127 ! 0: ANY ARRAY
128 ! 1: VECTOR DEFINED ON A MESH, NO CHANGE OF DISCRETISATION
129 ! 2: VECTOR DEFINED ON A MESH, CHANGE OF DISCRETISATION ALLOWED
130  INTEGER status
131 !
132 ! TYPR: TYPE OF VECTOR OF REALS
133 ! '0' : NIL '1' : EQUAL TO 1 'Q' : NO SPECIFIC PROPERTY
134  CHARACTER(LEN=1) typr
135 !
136 ! TYPI: TYPE OF VECTOR OF INTEGERS
137 ! '0' : NIL '1' : EQUAL TO 1 'Q' : NO SPECIFIC PROPERTY
138  CHARACTER(LEN=1) typi
139 !
140 ! POINTER TO DOUBLE PRECISION 1-DIMENSION ARRAY
141 ! DATA ARE STORED HERE FOR A DOUBLE PRECISION VECTOR
142  DOUBLE PRECISION, POINTER,DIMENSION(:)::r => null()
143 
144 ! POINTER TO DOUBLE PRECISION 1-DIMENSION ARRAY
145 ! DATA ARE STORED HERE FOR A DOUBLE PRECISION VECTOR
146  DOUBLE PRECISION, POINTER,DIMENSION(:)::e => null()
147 !
148 ! POINTER TO INTEGER 1-DIMENSION ARRAY
149 ! DATA ARE STORED HERE FOR AN INTEGER VECTOR
150  INTEGER, POINTER,DIMENSION(:)::i => null()
151 !
152 !-----------------------------------------------------------------------
153 !
154 ! FOR MATRICES
155 !
156 ! STO: TYPE OF STORAGE 1: CLASSICAL EBE 3: EDGE-BASED STORAGE
157  INTEGER sto
158 !
159 ! STOX: ORDER OF STORAGE OF OFF-DIAGONAL TERMS
160 ! FOR EBE: 1=(NELMAX,NDP) 2=(NDP,NELMAX)
161  INTEGER stox
162 !
163 ! ELMLIN: TYPE OF ELEMENT OF ROW
164  INTEGER elmlin
165 !
166 ! ELMCOL: TYPE OF ELEMENT OF COLUMN
167  INTEGER elmcol
168 !
169 ! TYPDIA: TYPE OF DIAGONAL
170 ! '0' : NIL 'I' : IDENTITY 'Q' : NO SPECIFIC PROPERTY
171  CHARACTER(LEN=1) typdia
172 !
173 ! TYPEXT: TYPE OF EXTRA-DIAGONAL TERMS
174 ! '0' : NIL 'S' : SYMMETRY 'Q' : NO SPECIFIC PROPERTY
175  CHARACTER(LEN=1) typext
176 !
177 ! POINTER TO A BIEF_OBJ FOR DIAGONAL
178  TYPE(bief_obj), POINTER :: d => null()
179 !
180 ! POINTER TO A BIEF_OBJ FOR EXTRA-DIAGONAL TERMS
181  TYPE(bief_obj), POINTER :: x => null()
182 !
183 ! PRO: TYPE OF MATRIX-VECTOR PRODUCT
184  INTEGER pro
185 !
186 !-----------------------------------------------------------------------
187 !
188 ! FOR BLOCKS
189 !
190 ! BLOCKS ARE IN FACT ARRAYS OF POINTERS TO BIEF_OBJ STRUCTURES
191 ! ADR(I)%P WILL BE THE I-TH BIEF_OBJ OBJECT
192 !
193 ! N: NUMBER OF OBJECTS IN THE BLOCK
194  INTEGER n
195 ! MAXBLOCK: MAXIMUM NUMBER OF OBJECTS IN THE BLOCK
196  INTEGER maxblock
197 ! ADR: ARRAY OF POINTERS TO OBJECTS (WILL BE OF SIZE MAXBLOCK)
198  TYPE(pointer_to_bief_obj), POINTER :: adr(:) => null()
199 !
200 !-----------------------------------------------------------------------
201 !
202  END TYPE bief_obj
203 !
204 !
205 !=======================================================================
206 !
207 ! STRUCTURE OF MESH : BIEF_MESH
208 !
209 !=======================================================================
210 !
212 !
213 ! 1) A HEADER
214 !
215 ! NAME: NAME OF MESH IN 6 CHARACTERS
216  CHARACTER(LEN=6) name
217 !
218 ! 2) A SERIES OF INTEGER VALUES (DECLARED AS POINTERS TO ENABLE
219 ! ALIASES)
220 !
221 ! NELEM: NUMBER OF ELEMENTS IN MESH
222  INTEGER, POINTER :: nelem
223 !
224 ! NELMAX: MAXIMUM NUMBER OF ELEMENTS ENVISAGED
225  INTEGER, POINTER :: nelmax
226 !
227 ! NPTFR: NUMBER OF 1D BOUNDARY NODES, EVEN IN 3D
228  INTEGER, POINTER :: nptfr
229 !
230 ! NPTFRX: NUMBER OF 1D BOUNDARY NODES, EVEN IN 3D
231  INTEGER, POINTER :: nptfrx
232 !
233 ! NELEB: NUMBER OF BOUNDARY ELEMENTS (SEGMENTS IN 2D)
234 ! IN 3D WITH PRISMS:
235 ! NUMBER OF LATERAL BOUNDARY ELEMENTS FOR SIGMA MESH
236  INTEGER, POINTER :: neleb
237 !
238 ! NELEBX: MAXIMUM NELEB
239  INTEGER, POINTER :: nelebx
240 !
241 ! NSEG: NUMBER OF SEGMENTS IN THE MESH
242  INTEGER, POINTER :: nseg
243 !
244 ! NSEGBOR: NUMBER OF BORDER SEGMENTS IN THE MESH
245  INTEGER, POINTER :: nsegbor
246 !
247 ! DIM1: DIMENSION OF DOMAIN (2 OR 3)
248  INTEGER, POINTER :: dim1
249 !
250 ! TYPELM: TYPE OF ELEMENT (10 FOR TRIANGLES, 40 FOR PRISMS)
251  INTEGER, POINTER :: typelm
252 !
253 ! TYPELM: TYPE OF ELEMENT (10 FOR TRIANGLES, 40 FOR PRISMS)
254  INTEGER, POINTER :: typelmbnd
255 !
256 ! NPOIN: NUMBER OF VERTICES (OR LINEAR NODES) IN THE MESH
257  INTEGER, POINTER :: npoin
258 !
259 ! NPMAX: MAXIMUM NUMBER OF VERTICES IN THE MESH
260  INTEGER, POINTER :: npmax
261 !
262 ! MXPTVS: MAXIMUM NUMBER OF POINTS ADJACENT TO 1 POINT
263  INTEGER, POINTER :: mxptvs
264 !
265 ! MXELVS: MAXIMUM NUMBER OF ELEMENTS ADJACENT TO 1 POINT
266  INTEGER, POINTER :: mxelvs
267 !
268 ! LV: MAXIMUM VECTOR LENGTH ALLOWED ON VECTOR COMPUTERS,
269 ! DUE TO ELEMENT NUMBERING
270  INTEGER, POINTER :: lv
271 !
272 ! NDS: NUMBERS OF NODES, ELEMENTS, SEGMENTS, OF DIFFERENT
273 ! TYPES OF DISCRETISATION
274  INTEGER, POINTER :: nds(:,:) => null()
275 
276 ! X,Y ORIGIN
277  INTEGER, POINTER :: x_orig, y_orig
278 !
279 !
280 ! 3) A SERIES OF BIEF_OBJ TO STORE INTEGER ARRAYS
281 !
282 ! IKLE: CONNECTIVITY TABLE IKLE(NELMAX,NDP) AND KLEI(NDP,NELMAX)
283  TYPE(bief_obj), POINTER :: ikle => null(), klei => null()
284 !
285 ! IFABOR: TABLE GIVING ELEMENTS BEHIND FACES OF A TRIANGLE
286  TYPE(bief_obj), POINTER :: ifabor => null()
287 !
288 ! NELBOR: ELEMENTS OF THE BOUNDARY
289  TYPE(bief_obj), POINTER :: nelbor => null()
290 !
291 ! NULONE: LOCAL NUMBER OF BOUNDARY POINTS FOR BOUNDARY ELEMENTS
292  TYPE(bief_obj), POINTER :: nulone => null()
293 !
294 ! KP1BOR: POINTS FOLLOWING AND PRECEDING A BOUNDARY POINT
295  TYPE(bief_obj), POINTER :: kp1bor => null()
296 !
297 ! NBOR: GLOBAL NUMBER OF BOUNDARY POINTS
298  TYPE(bief_obj), POINTER :: nbor => null()
299 !
300 ! IKLBOR: CONNECTIVITY TABLE FOR BOUNDARY POINTS
301  TYPE(bief_obj), POINTER :: iklbor => null()
302 !
303 ! IFANUM: FOR STORAGE 2, NUMBER OF SEGMENT IN ADJACENT ELEMENT
304 ! OF A TRIANGLE
305  TYPE(bief_obj), POINTER :: ifanum => null()
306 !
307 ! IKLEM1: ADRESSES OF NEIGHBOURS OF POINTS FOR FRONTAL
308 ! MATRIX-VECTOR PRODUCT
309  TYPE(bief_obj), POINTER :: iklem1 => null()
310 !
311 ! LIMVOI: FOR FRONTAL MATRIX-VECTOR PRODUCT, ADDRESSES OF POINTS
312 ! WITH A GIVEN NUMBER OF NEIGHBOURS
313  TYPE(bief_obj), POINTER :: limvoi => null()
314 !
315 ! NUBO: FOR FINITE VOLUMES, GLOBAL NUMBERS OF VERTICES OF SEGMENTS
316  TYPE(bief_obj), POINTER :: nubo => null()
317 !
318 ! FOR SEGMENT-BASED STORAGE
319 !
320 ! GLOSEG: GLOBAL NUMBERS OF VERTICES OF SEGMENTS
321  TYPE(bief_obj), POINTER :: gloseg => null()
322 ! ELTSEG: SEGMENTS FORMING AN ELEMENT
323  TYPE(bief_obj), POINTER :: eltseg => null()
324 ! ORISEG: ORIENTATION OF SEGMENTS FORMING AN ELEMENT 1:ANTI 2:CLOCKWISE
325  TYPE(bief_obj), POINTER :: oriseg => null()
326 
327 ! FOR UNSTRUCTURED 3D (IELM = 31 SO FAR)
328 ! GLOSEGBOR: GLOBAL NUMBERS OF VERTICES OF SEGMENTS
329  TYPE(bief_obj), POINTER :: glosegbor => null()
330 ! ELTSEGBOR: SEGMENTS FORMING AN ELEMENT
331  TYPE(bief_obj), POINTER :: eltsegbor => null()
332 ! ORISEGBOR: ORIENTATION OF SEGMENTS FORMING AN ELEMENT 1:ANTI 2:CLOCKWISE
333  TYPE(bief_obj), POINTER :: orisegbor => null()
334 !
335 ! FOR THE METHOD OF CHARACTERISTICS
336 !
337 ! ELTCAR: STARTING ELEMENT FOR TREATING A POINT
338 ! IF 0, IT IS IN ANOTHER SUBDOMAIN
339 !
340  TYPE(bief_obj), POINTER :: eltcar => null()
341 !
342 ! SERIES OF ARRAYS FOR PARALLEL MODE
343 ! HERE GLOBAL MEANS NUMBER IN THE WHOLE DOMAIN
344 ! LOCAL MEANS NUMBER IN THE SUB-DOMAIN
345 !
346 ! KNOLG: GIVES THE INITIAL GLOBAL NUMBER OF A LOCAL POINT
347  TYPE(bief_obj), POINTER :: knolg => null()
348 ! NACHB: NUMBERS OF PROCESSORS CONTAINING A GIVEN POINT
349  TYPE(bief_obj), POINTER :: nachb => null()
350 ! ISEG: GLOBAL NUMBER OF FOLLOWING OR PRECEDING POINT IN THE BOUNDARY
351 ! IF IT IS IN ANOTHER SUB-DOMAIN.
352  TYPE(bief_obj), POINTER :: iseg => null()
353 ! ADDRESSES IN ARRAYS SENT BETWEEN PROCESSORS
354  TYPE(bief_obj), POINTER :: indpu => null()
355 !
356 ! DIMENSION NHP(NBMAXNSHARE,NPTIR)
357 ! NHP(IZH,IR) IS THE GLOBAL NUMBER IN THE SUB-DOMAIN OF A POINT
358 ! WHOSE NUMBER IS IR IN THE INTERFACE WITH THE IZ-TH HIGHER RANK PROCESSOR
359  TYPE(bief_obj), POINTER :: nhp => null()
360 ! NHM IS LIKE NHP, BUT WITH LOWER RANK PROCESSORS
361  TYPE(bief_obj), POINTER :: nhm => null()
362 !
363 ! FOR FINITE VOLUMES AND KINETIC SCHEMES
364  TYPE(bief_obj), POINTER :: jmi => null()
365 ! ELEMENTAL HALO NEIGHBOURHOOD DESCRIPTION IN PARALLEL
366 ! IFAPAR(6,NELEM2)
367 ! IFAPAR(1:3,IELEM): PROCESSOR NUMBERS BEHIND THE 3 ELEMENT EDGES
368 ! NUMBER FROM 0 TO NCSIZE-1
369 ! IFAPAR(4:6,IELEM): -LOCAL- ELEMENT NUMBERS BEHIND THE 3 EDGES
370 ! IN THE NUMBERING OF PARTITIONS THEY BELONG TO
371  TYPE(bief_obj), POINTER :: ifapar => null()
372 !
373 ! 4) A SERIES OF BIEF_OBJ TO STORE REAL ARRAYS
374 !
375 ! XEL: COORDINATES X PER ELEMENT
376  TYPE(bief_obj), POINTER :: xel => null()
377 !
378 ! YEL: COORDINATES Y PER ELEMENT
379  TYPE(bief_obj), POINTER :: yel => null()
380 !
381 ! ZEL: COORDINATES Z PER ELEMENT
382  TYPE(bief_obj), POINTER :: zel => null()
383 !
384 ! SURFAC: AREAS OF ELEMENTS (IN 2D)
385  TYPE(bief_obj), POINTER :: surfac => null()
386 !
387 ! SURDET: 1/DET OF ISOPARAMETRIC TRANSFORMATION
388  TYPE(bief_obj), POINTER :: surdet => null()
389 !
390 ! LGSEG: LENGTH OF 2D BOUNDARY SEGMENTS
391  TYPE(bief_obj), POINTER :: lgseg => null()
392 !
393 ! XSGBOR: NORMAL X TO 1D BOUNDARY SEGMENTS
394  TYPE(bief_obj), POINTER :: xsgbor => null()
395 !
396 ! YSGBOR: NORMAL Y TO 1D BOUNDARY SEGMENTS
397  TYPE(bief_obj), POINTER :: ysgbor => null()
398 !
399 ! ZSGBOR: NORMAL Z TO 1D BOUNDARY SEGMENTS
400  TYPE(bief_obj), POINTER :: zsgbor => null()
401 !
402 ! XNEBOR: NORMAL X TO 1D BOUNDARY POINTS
403  TYPE(bief_obj), POINTER :: xnebor => null()
404 !
405 ! YNEBOR: NORMAL Y TO 1D BOUNDARY POINTS
406  TYPE(bief_obj), POINTER :: ynebor => null()
407 !
408 ! ZNEBOR: NORMAL Z TO 1D BOUNDARY POINTS
409  TYPE(bief_obj), POINTER :: znebor => null()
410 !
411 ! X: COORDINATES OF POINTS
412  TYPE(bief_obj), POINTER :: x => null()
413 !
414 ! Y: COORDINATES OF POINTS
415  TYPE(bief_obj), POINTER :: y => null()
416 !
417 ! Z: COORDINATES OF POINTS
418  TYPE(bief_obj), POINTER :: z => null()
419 !
420 ! COSLAT: LATITUDE COSINE
421  TYPE(bief_obj), POINTER :: coslat => null()
422 !
423 ! SINLAT: LATITUDE SINE
424  TYPE(bief_obj), POINTER :: sinlat => null()
425 !
426 ! DISBOR: DISTANCE TO 1D BOUNDARIES
427  TYPE(bief_obj), POINTER :: disbor => null()
428 !
429 ! M: WORKING MATRIX
430  TYPE(bief_obj), POINTER :: m => null()
431 !
432 ! MSEG: WORKING MATRIX FOR SEGMENT-BASED STORAGE
433  TYPE(bief_obj), POINTER :: mseg => null()
434 !
435 ! W: WORKING ARRAY FOR A NON-ASSEMBLED VECTOR
436  TYPE(bief_obj), POINTER :: w => null()
437 !
438 ! WI8: WORKING ARRAY FOR A NON-ASSEMBLED VECTOR STORED IN INTEGERS
439  INTEGER(KIND=K8), POINTER :: wi8(:) => null()
440 !
441 ! T: WORKING ARRAY FOR AN ASSEMBLED VECTOR
442  TYPE(bief_obj), POINTER :: t => null()
443 !
444 ! TI8: WORKING ARRAY FOR AN ASSEMBLED VECTOR STORED IN INTEGERS
445  INTEGER(KIND=K8), POINTER :: ti8(:) => null()
446 !
447 ! VNOIN: FOR FINITE VOLUMES
448  TYPE(bief_obj), POINTER :: vnoin => null()
449 !
450 ! XSEG: X COORDINATE OF FOLLOWING OR PRECEDING POINT IN THE BOUNDARY
451 ! IF IT IS IN ANOTHER SUB-DOMAIN
452  TYPE(bief_obj), POINTER :: xseg => null()
453 !
454 ! YSEG: Y COORDINATE OF FOLLOWING OR PRECEDING POINT IN THE BOUNDARY
455 ! IF IT IS IN ANOTHER SUB-DOMAIN
456  TYPE(bief_obj), POINTER :: yseg => null()
457 !
458 ! IFAC: MULTIPLICATION FACTOR FOR POINTS IN THE BOUNDARY FOR
459 ! DOT PRODUCT. FAC=1 ON 1 SUBDOMAIN AND 0 FOR OTHERS
460  TYPE(bief_obj), POINTER :: ifac => null()
461 !
462 ! FOR PARALLEL MODE AND NON BLOCKING COMMUNICATION (SEE PARINI.F)
463 !
464 ! NUMBER OF PROCESSORS WITH POINTS IN COMMON WITH THE SUB-DOMAIN
465  INTEGER , POINTER :: nb_neighb
466 ! FOR ANY NEIGHBOURING PROCESSOR, NUMBER OF POINTS
467 ! SHARED WITH IT
468  TYPE(bief_obj), POINTER :: nb_neighb_pt
469 ! RANK OF PROCESSORS WITH WHICH TO COMMUNICATE FOR POINTS
470  TYPE(bief_obj), POINTER :: list_send
471 ! NH_COM(DIM1NHCOM,NB_NEIGHB)
472 ! WHERE DIM1NHCOM IS THE MAXIMUM NUMBER OF POINTS SHARED
473 ! WITH ANOTHER PROCESSOR (OR SLIGHTLY MORE FOR 16 BYTES ALIGNMENT)
474 ! NH_COM(I,J) IS THE GLOBAL NUMBER IN THE SUB-DOMAIN OF I-TH
475 ! POINT SHARED WITH J-TH NEIGHBOURING PROCESSOR
476  TYPE(bief_obj), POINTER :: nh_com
477 !
478 ! NUMBER OF NEIGHBOURING PROCESSORS WITH EDGES
479 ! IN COMMON WITH THE SUB-DOMAIN
480  INTEGER , POINTER :: nb_neighb_seg
481 ! FOR ANY NEIGHBOURING PROCESSOR, NUMBER OF EDGES
482 ! SHARED WITH IT
483  TYPE(bief_obj), POINTER :: nb_neighb_pt_seg
484 ! RANK OF PROCESSORS WITH WHICH TO COMMUNICATE FOR EDGES
485  TYPE(bief_obj), POINTER :: list_send_seg
486 ! LIKE NH_COM BUT FOR EDGES
487  TYPE(bief_obj), POINTER :: nh_com_seg
488 !
489 ! WILL BE USED AS BUFFER BY MPI IN PARALLEL
490 !
491  TYPE(bief_obj), POINTER :: buf_send
492  TYPE(bief_obj), POINTER :: buf_recv
493  TYPE(bief_obj), POINTER :: buf_send_err
494  TYPE(bief_obj), POINTER :: buf_recv_err
495  INTEGER(KIND=K8), POINTER :: buf_sendi8(:)
496  INTEGER(KIND=K8), POINTER :: buf_recvi8(:)
497 !
498 ! FOR FINITE VOLUMES AND KINETIC SCHEMES
499 !
500  TYPE(bief_obj), POINTER :: cmi,dpx,dpy
501  TYPE(bief_obj), POINTER :: dthaut,airst
502 !
503 ! CENTER OF MASS OF ELEMENTS NEIGHBORING AN EDGE
504 !
505  TYPE(bief_obj), POINTER :: coordg
506 !
507  END TYPE bief_mesh
508 !
509 !=======================================================================
510 !
511 ! STRUCTURE OF SOLVER CONFIGURATION
512 !
513 !=======================================================================
514 !
515  TYPE slvcfg
516 !
517 ! SLV: CHOICE OF SOLVER
518  INTEGER slv
519 !
520 ! NITMAX: MAXIMUM NUMBER OF ITERATIONS
521  INTEGER nitmax
522 !
523 ! PRECON: TYPE OF PRECONDITIONING
524  INTEGER precon
525 !
526 ! KRYLOV: DIMENSION OF KRYLOV SPACE FOR GMRES SOLVER
527  INTEGER krylov
528 !
529 ! EPS: ACCURACY
530  DOUBLE PRECISION eps
531 !
532 ! ZERO: TO CHECK DIVISIONS BY ZERO
533  DOUBLE PRECISION zero
534 !
535 ! OK: IF PRECISION EPS HAS BEEN REACHED
536  LOGICAL ok
537 !
538 ! NIT: NUMBER OF ITERATIONS IF PRECISION REACHED
539  INTEGER nit
540 !
541  END TYPE slvcfg
542 !
543 !=======================================================================
544 !
545 ! STRUCTURE OF FILE
546 !
547 !=======================================================================
548 !
550 !
551 ! LU: LOGICAL UNIT TO OPEN THE FILE
552  INTEGER lu
553 !
554 ! NAME: NAME OF FILE
555  CHARACTER(LEN=PATH_LEN) name
556 !
557 ! TELNAME: NAME OF FILE IN TEMPORARY DIRECTORY
558  CHARACTER(LEN=6) telname
559 !
560 ! FMT: FORMAT (SERAFIN, MED, ETC.)
561  CHARACTER(LEN=8) fmt
562 !
563 ! ACTION: READ, WRITE OR READWRITE
564  CHARACTER(LEN=9) action
565 !
566 ! BINASC: ASC FOR ASCII OR BIN FOR BINARY
567  CHARACTER(LEN=3) binasc
568 !
569 ! TYPE: KIND OF FILE
570  CHARACTER(LEN=12) type
571 !
572  END TYPE bief_file
573 !
574 !=======================================================================
575 !
576 ! STRUCTURE OF CONTROL SECTION
577 !
578 ! ADDED BY JACEK JANKOWSKI, BAW KARLSRUHE,
579 ! USED BY TELEMAC-2D AND SISYPHE
580 !
581 !=======================================================================
582 !
584  INTEGER :: npair(2)
585  DOUBLE PRECISION :: xybeg(2), xyend(2)
586  CHARACTER(LEN=24) :: descr
587  INTEGER :: nseg
588  INTEGER, POINTER :: liste(:,:)
589  END TYPE chain_type
590 !
591 !=======================================================================
592 !
593 ! STRUCTURES FOR OIL SPILLS
594 !
595 !=======================================================================
596 !
597  TYPE compo
598  DOUBLE PRECISION::sol
599  DOUBLE PRECISION::mass
600  DOUBLE PRECISION::tb
601  END TYPE compo
602 
603  TYPE oil_part
604  INTEGER::state
605  INTEGER::eltoil,etaoil
606  INTEGER::tpsech
607  INTEGER::id
608  INTEGER::cls
609  DOUBLE PRECISION::xoil,yoil,zoil
610  DOUBLE PRECISION::mass0
611  DOUBLE PRECISION::mass
612  DOUBLE PRECISION::mass_evap,mass_diss
613  DOUBLE PRECISION::surface,shzoil
614  DOUBLE PRECISION,DIMENSION(3)::shpoil
615  TYPE(compo),DIMENSION(:),ALLOCATABLE::compo
616  TYPE(compo),DIMENSION(:),ALLOCATABLE::hap
617  END TYPE oil_part
618 !
619 !=======================================================================
620 !
621 ! STRUCTURE OF WEIRS : WEIRS
622 !
623 !=======================================================================
624 !
626  INTEGER :: num_glo
627  INTEGER :: n_1a_1, n_1a_2
628  INTEGER :: n_1b_1, n_1b_2
629  INTEGER :: n_2a_1, n_2a_2
630  INTEGER :: n_2b_1, n_2b_2
631  INTEGER :: nb_neigh
632  INTEGER :: deb, fin
633  INTEGER :: ip1, ip2 ! 2 integer parameters
634  INTEGER :: rupt ! To mark the breaches
635  INTEGER, DIMENSION(NBMAXNSHARE) :: list_neigh
636  DOUBLE PRECISION :: z1, z2
637  DOUBLE PRECISION :: width
638  DOUBLE PRECISION :: q, q0
639  DOUBLE PRECISION :: qw, qw0
640  DOUBLE PRECISION :: rp1, rp2 ! 2 reals parameters
641  END TYPE weir_element
642 !
644  INTEGER :: num_neigh
645  INTEGER :: nb_elem
646  INTEGER, DIMENSION(:), ALLOCATABLE :: list_elem
647  END TYPE weir_element_proc
648 !
650  INTEGER :: num_glo
651  INTEGER :: nb_neigh
652  INTEGER, DIMENSION(NBMAXNSHARE) :: list_neigh
653  INTEGER, DIMENSION(NBMAXNSHARE) :: num_loc
654  DOUBLE PRECISION :: qn, zfn, hn
655  DOUBLE PRECISION :: qw, hw, tw, dw
656  DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: trac, trac0
657  END TYPE weir_nodes
658 !
660  INTEGER :: num_neigh
661  INTEGER :: nb_nodes
662  INTEGER, DIMENSION(:), ALLOCATABLE :: list_nodes
663  INTEGER, DIMENSION(:), ALLOCATABLE :: num_glo
664  INTEGER, DIMENSION(:), ALLOCATABLE :: num_loc
665  END TYPE weir_nodes_proc
666 !
667 !=======================================================================
668 !
669 ! SPECTRUM STRUCTURE (USED IN ARTEMIS)
670 !
671 !=======================================================================
672 !
673 ! THIS IS NECESSARY IN FORTRAN 90 TO HAVE ARRAYS OF POINTERS
674 ! LIKE THE COMPONENT ADR BELOW, WHICH ENABLES TO BUILD BLOCKS
675 ! WHICH ARE ARRAYS OF POINTERS TO MATRICES
676 !
678  DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: souter => null()
679  END TYPE pointer_to_spec
680 !
681 !brief SPECTRUM STRUCTURE
682 !
683  TYPE spectrum
684 !
685 !-----------------------------------------------------------------------
686 !
687 ! HEADER COMMON TO ALL OBJECTS
688 !
689 !brief NAME OF SPECTRUM IN 6 CHARACTERS
690 ! nom du spectre
691  CHARACTER(LEN=6) :: name
692 !
693 !brief DIRECTIONAL COMPONENT
694 ! direction
695  DOUBLE PRECISION, POINTER, DIMENSION(:) :: dir => null()
696 !
697 !brief FREQUENCY COMPONENT
698 ! frequence
699  DOUBLE PRECISION, POINTER, DIMENSION(:) :: fre => null()
700 !
701 !brief GLOBAL NODE NUMBER OF OUTER MODEL POINTS
702 ! numero global des noeuds du modele d entree
703  INTEGER, POINTER, DIMENSION(:) :: nouter => null()
704 !
705 !brief COORDINATES OF POINTS IN THE OUTER MODEL AREA
706 ! coordonnees des noeuds du modele d entree
707  DOUBLE PRECISION, POINTER, DIMENSION(:) :: xouter => null()
708 !
709 !brief COORDINATES OF POINTS IN THE OUTER MODEL AREA
710 ! coordonnees des noeuds du modele d entree
711  DOUBLE PRECISION, POINTER, DIMENSION(:) :: youter => null()
712 !
713 !-----------------------------------------------------------------------
714 !
715 ! BLOCKS ARE IN FACT ARRAYS OF POINTERS TO SPECTRUM STRUCTURES
716 ! ADR(I) WILL BE THE I-TH SPECTRUM OBJECT
717 !
718 ! N: NUMBER OF OBJECTS IN THE BLOCK
719  INTEGER :: n
720 ! ADR: ARRAY OF POINTERS TO MATRICES CONTAINING THE
721 ! SPECTRUM COMPONENTS
722  TYPE(pointer_to_spec), POINTER, DIMENSION(:) :: adr => null()
723 !
724  END TYPE spectrum
725 !
726  TYPE(spectrum) :: s_tom
727 !
728 !=======================================================================
729 !
730 ! STRUCTURES FOR API COUPLING
731  TYPE api_cpl
732  INTEGER::nsis_cfd
733  LOGICAL::sisyphe_cfd,constflow
734  LOGICAL::charr,susp
735  END TYPE api_cpl
736 
737  SAVE
738 
739  END MODULE bief_def
integer, target nptir
Definition: bief_def.f:48
integer ncsize
Definition: bief_def.f:49
integer nhalo
Definition: bief_def.f:49
integer ipid
Definition: bief_def.f:49
type(spectrum) s_tom
Definition: bief_def.f:726
integer, parameter nbmaxnshare
Definition: bief_def.f:52
double precision function q(I)
Definition: q.f:7
integer, parameter nbmaxdshare
Definition: bief_def.f:55