ADflow  v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
killSignals.f90
Go to the documentation of this file.
1 module killsignals
2 !
3 ! This module contains the variables used to handle the
4 ! kill signals from the user. The user can send two signals that
5 ! can be processed by the code, namely kill -USR1 and kill -USR2.
6 ! The former signal will cause the program to dump a solution
7 ! File after the current iteration, the latter will dump a
8 ! solution file and the computation will be stopped. The
9 ! definition of iteration is different for steady and unsteady.
10 ! For steady it means after the current multigrid iteration, for
11 ! unsteady after the current time step.
12 ! The handling can be switched off at compile time using the
13 ! compiler flag -DUSE_NO_SIGNALS.
14 !
15  use constants, only: inttype
16  implicit none
17  save
18 
19  ! Definition of some constants for the signalling. As in the
20  ! reduce functions a maximum is determined, it is important that
21  ! noSignal is less than signalWrite and signalWriteQuit.
22 
23  integer(kind=intType), parameter :: nosignal = 0
24  integer(kind=intType), parameter :: signalwrite = 1
25  integer(kind=intType), parameter :: signalwritequit = 2
26 
27  ! localSignal: Signal stored on this processor.
28  ! globalSignal: Maximum of the local signals.
29 
30  integer(kind=intType) :: localsignal, globalsignal
31 
32  ! fromPython: was this instance of the solver called from python
33  logical :: frompython
34 
35  ! routineFailed: was terminate called from a routine?
36  logical :: routinefailed
37  logical :: fatalfail
38 
39  logical :: adjointfailed
40 
41 end module killsignals
integer(kind=inttype), parameter signalwrite
Definition: killSignals.f90:24
integer(kind=inttype) localsignal
Definition: killSignals.f90:30
integer(kind=inttype), parameter signalwritequit
Definition: killSignals.f90:25
integer(kind=inttype), parameter nosignal
Definition: killSignals.f90:23
logical frompython
Definition: killSignals.f90:33
logical routinefailed
Definition: killSignals.f90:36
integer(kind=inttype) globalsignal
Definition: killSignals.f90:30
logical adjointfailed
Definition: killSignals.f90:39
logical fatalfail
Definition: killSignals.f90:37