OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sensor_not.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| sensor_not ../engine/source/tools/sensor/sensor_not.F
25!||--- called by ------------------------------------------------------
26!|| sensor_logical ../engine/source/tools/sensor/sensor_logical.F
27!||--- uses -----------------------------------------------------
28!|| sensor_mod ../common_source/modules/sensor_mod.F90
29!||====================================================================
30 SUBROUTINE sensor_not(NSENSOR,SENSOR_TAB,SENS)
31C-----------------------------------------------
32C ROUTINE DESCRIPTION :
33C ===================
34C NOT sensor : ! IS1
35C IS1 is the sensor given as definition
36C------------------------------------------------------
37C DUMMY ARGUMENTS DESCRIPTION:
38C ===================
39C
40C NAME DESCRIPTION
41C
42C SENSOR_TAB Sensor Structure
43C SENS SENSOR ID to treat
44C-----------------------------------------------
45C M o d u l e s
46C-----------------------------------------------
47 USE sensor_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "com04_c.inc"
56#include "com08_c.inc"
57#include "units_c.inc"
58#include "task_c.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 INTEGER, INTENT(IN) :: NSENSOR,SENS
63 TYPE (SENSOR_STR_), INTENT(INOUT) ,DIMENSION(NSENSOR) :: SENSOR_TAB
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER IS1,STATUS_IS1
68 INTEGER ACTI
69 my_real tstart, infinity
70C-----------------------------------------------
71 infinity = ep20
72 acti = 0
73c
74 is1 = sensor_tab(sens)%IPARAM(1)
75 status_is1 = sensor_tab(is1)%STATUS
76c
77
78 IF ( status_is1 <= 0 .AND. sensor_tab(sens)%STATUS == 0 ) THEN ! Context change - NOT goes ON
79 sensor_tab(sens)%STATUS = 1
80 sensor_tab(sens)%TSTART = tt
81 acti = 1
82 ENDIF
83
84 IF ( status_is1 == 1 .AND. sensor_tab(sens)%STATUS == 1 ) THEN ! Context change - NOT goes OFF
85 sensor_tab(sens)%STATUS = 0
86 sensor_tab(sens)%TSTART = infinity
87 acti = 2
88 ENDIF
89
90 IF (acti == 1) THEN
91
92 IF (ispmd == 0) THEN
93 WRITE (istdo,1000) sensor_tab(sens)%SENS_ID,sensor_tab(sens)%TSTART
94 WRITE (iout ,1000) sensor_tab(sens)%SENS_ID,sensor_tab(sens)%TSTART
95 ENDIF
96
97 ELSE IF (acti == 2) THEN
98
99 IF (ispmd == 0) THEN
100 WRITE (istdo,1100) sensor_tab(sens)%SENS_ID,tt
101 WRITE (iout ,1100) sensor_tab(sens)%SENS_ID,tt
102 ENDIF
103
104 ENDIF
105c-----------------------------------------------------------------------
1061000 FORMAT(' SENSOR NUMBER ',i10,' ACTIVATED AT TIME ',1pe12.5)
1071100 FORMAT(' SENSOR NUMBER ',i10,' DEACTIVATED AT TIME ',1pe12.5)
108C-----------------------------------------------
109 END
110
111
#define my_real
Definition cppsort.cpp:32
subroutine sensor_not(nsensor, sensor_tab, sens)
Definition sensor_not.F:31