The TELEMAC-MASCARET system  trunk
sis_arret.f
Go to the documentation of this file.
1 ! **********************
2  SUBROUTINE sis_arret !
3 ! **********************
4 !
5  &(esm,emax,hn,varsor,npoin,mn,nres,fmtres,maxvar,at0,rc,
6  & texte,sorleo,sorimp,t1,t2)
7 !
8 !***********************************************************************
9 ! SISYPHE V6P1 21/07/2011
10 !***********************************************************************
11 !
12 !brief STOP TEST IN CASE EVOLUTION BECOMES TOO IMPORTANT.
13 !
14 !history E. PELTIER; C. LENORMANT; J.-M. HERVOUET
15 !+ 11/09/1995
16 !+ V5P1
17 !+
18 !
19 !history F. HUVELIN
20 !+ 05/01/2004
21 !+ V5P8
22 !+
23 !
24 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
25 !+ 13/07/2010
26 !+ V6P0
27 !+ Translation of French comments within the FORTRAN sources into
28 !+ English comments
29 !
30 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
31 !+ 21/08/2010
32 !+ V6P0
33 !+ Creation of DOXYGEN tags for automated documentation and
34 !+ cross-referencing of the FORTRAN sources
35 !
36 !history C.VILLARET (EDF-LNHE), P.TASSI (EDF-LNHE)
37 !+ 19/07/2011
38 !+ V6P1
39 !+ Name of variables
40 !+
41 !
42 !history Y AUDOUIN (LNHE)
43 !+ 25/05/2015
44 !+ V7P0
45 !+ Modification to comply with the hermes module
46 !
47 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 !| AT0 |-->|TIME
49 !| EMAX |-->|MAXIMUM BED EVOLUTION
50 !| ESM |-->|CUMULATED BED EVOLUTION
51 !| FMTRES |-->|FORMAT OF RESULT FILE
52 !| HN |-->| WATER DEPTH
53 !| MAXVAR |-->| MAXIMUM NUMBER OF VARIABLES
54 !| MN |-->| NUMBER OF TIME STEP
55 !| NPOIN |-->| NUMBER OF POINTS
56 !| NRES |-->| LOGICAL UNIT OF THE RESULTS FILE
57 !| RC |-->| CRITICAL EVOLUTION RATIO
58 !| SORIMP |-->| ARRAY OF LOGICAL SAYING IF VARIABLES MUST BE PUT
59 !| | | IN THE LISTING
60 !| SORLEO |-->| ARRAY OF LOGICAL SAYING IF VARIABLES MUST BE PUT
61 !| | | IN THE RESULTS FILE
62 !| T1 |<->| WORK BIEF_OBJ STRUCTURE
63 !| T2 |<->| WORK BIEF_OBJ STRUCTURE
64 !| TEXTE |-->| NAMES AND UNITS OF VARIABLES
65 !| VARSOR |-->| BLOCK WITH VARIABLES TO BE PRINTED OR COPIED
66 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 !
68  USE interface_sisyphe,ex_sis_arret => sis_arret
69  USE bief
71  IMPLICIT NONE
72 !
73 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
74 !
75  TYPE(bief_obj), INTENT(IN) :: ESM, EMAX, HN, VARSOR
76  INTEGER, INTENT(IN) :: NPOIN, MN, NRES, MAXVAR
77  DOUBLE PRECISION, INTENT(IN) :: AT0, RC
78  CHARACTER(LEN=32), INTENT(IN) :: TEXTE(maxvar)
79  CHARACTER(LEN=8), INTENT(IN) :: FMTRES
80  LOGICAL, INTENT(IN) :: SORLEO(*), SORIMP(*)
81  TYPE(bief_obj), INTENT(INOUT) :: T1, T2
82 !
83 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
84 !
85  INTEGER :: IMIN
86  DOUBLE PRECISION :: XMIN
87 !======================================================================!
88 !======================================================================!
89 ! PROGRAM !
90 !======================================================================!
91 !======================================================================!
92  ! ************************************ !
93  ! I - COMPUTES F ABSOLUTE VALUE !
94  ! ************************************ !
95  CALL os('X=ABS(Y)', x=t1, y=esm)
96  ! ************************************************** !
97  ! II - COMPUTES THE DIFFERENCE BETWEEN THE AUTHORISED! (_IMP_)
98  ! VALUE FOR DEPOSITION AND F ABSOLUTE VALUE !
99  ! ************************************************** !
100  CALL os('X=Y-Z ', x=t2, y=emax, z=t1)
101  ! ************************************************************** !
102  ! III - COMPUTES THE MINIMUM VALUE OF THIS DIFFERENCE (NPOIN) !
103  ! ************************************************************** !
104  CALL mini(xmin, imin, t2%R, npoin)
105  ! ************************************************************* !
106  ! IV - IF THE MINIMUM VALUE IS NEGATIVE, COMPUTATION IS STOPPED !
107  ! ************************************************************* !
108  IF (xmin < 0.d0) THEN
109  ! IV.1 - PRINTS THE VALUES
110  ! --------------------------
111  WRITE(lu,401) mn
112  WRITE(lu,*) ' '
113  WRITE(lu,403) imin
114  WRITE(lu,405) hn%R(imin)
115  WRITE(lu,407) rc
116  WRITE(lu,409) emax%R(imin)
117  WRITE(lu,411) esm%R(imin)
118  WRITE(lu,413) at0
119  WRITE(lu,*) ' '
120  WRITE(lu,*) 'LAST RESULT SAVED'
121 !
122  ! IV.2 - SAVES THE LAST RESULT
123  ! -----------------------------
124  CALL predes(1,at0,.true.,'TELEMAC2D ')
125  CALL bief_desimp(fmtres,varsor,npoin,nres,at0,
126  & 1,1,1,sorleo,sorimp,maxvar,texte,1,1)
127  CALL plante(1)
128  stop
129  ENDIF
130 !
131  !----------------------------------------------------------------!
132 401 FORMAT(1x,/,' TOO MUCH EVOLUTION AT COMPUTATION: ',1i6)
133 403 FORMAT(' NODE NUMBER : ',1i6)
134 405 FORMAT(' WATER DEPTH : ',g16.7)
135 407 FORMAT(' CRITICAL EVOLUTION RATIO : ',g16.7)
136 409 FORMAT(' MAXIMAL ALLOWED EVOLUTION : ',g16.7)
137 411 FORMAT(' COMPUTED CUMULATED EVOLUTION : ',g16.7)
138 413 FORMAT(' TIME : ',g16.7)
139  !----------------------------------------------------------------!
140 !======================================================================!
141 !======================================================================!
142  RETURN
143  END
subroutine sis_arret
Definition: sis_arret.f:4
subroutine mini(XMIN, IMIN, X, NPOIN)
Definition: mini.f:7
subroutine os(OP, X, Y, Z, C, IOPT, INFINI, ZERO)
Definition: os.f:7
subroutine bief_desimp(FORMAT_RES, VARSOR, N, NRES, AT, LT, LISPRD, LEOPRD, SORLEO, SORIMP, MAXVAR, TEXTE, PTINIG, PTINIL, MESH, IIMP, ILEO, COMPGRAPH)
Definition: bief_desimp.f:9
subroutine predes(LLT, AAT, YAGOUT, CODE)
Definition: predes.f:7
Definition: bief.f:3