OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sensor_or.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_or ../engine/source/tools/sensor/sensor_or.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_or(NSENSOR,SENSOR_TAB,SENS)
31C-----------------------------------------------
32C ROUTINE DESCRIPTION :
33C ===================
34C OR sensor : IS1 || IS2
35C IS1 and IS2 are the sensors 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 IS2,STATUS_IS2
69
70 INTEGER ACTI
71C-----------------------------------------------
72 acti = 0
73c
74 is1 = sensor_tab(sens)%IPARAM(1)
75 status_is1 = sensor_tab(is1)%STATUS
76
77 is2 = sensor_tab(sens)%IPARAM(2)
78 status_is2 = sensor_tab(is2)%STATUS
79c
80 IF ( (status_is1 == 1 .OR. status_is2 == 1 ) .AND. sensor_tab(sens)%STATUS == 0 ) THEN ! Context change - AND goes ON
81 sensor_tab(sens)%STATUS = 1
82 sensor_tab(sens)%TSTART = tt
83 acti = 1
84 ENDIF
85
86 IF ( (status_is1 <= 0 .AND. status_is2 <= 0) .AND. sensor_tab(sens)%STATUS == 1 ) THEN ! Context change - AND goes OFF
87 sensor_tab(sens)%STATUS = 0
88 sensor_tab(sens)%TSTART = infinity
89 acti = 2
90 ENDIF
91
92 IF (acti == 1) THEN
93
94 IF (ispmd == 0) THEN
95 WRITE (istdo,1000) sensor_tab(sens)%SENS_ID,sensor_tab(sens)%TSTART
96 WRITE (iout ,1000) sensor_tab(sens)%SENS_ID,sensor_tab(sens)%TSTART
97 ENDIF
98
99 ELSE IF (acti == 2) THEN
100
101 IF (ispmd == 0) THEN
102 WRITE (istdo,1100) sensor_tab(sens)%SENS_ID,tt
103 WRITE (iout ,1100) sensor_tab(sens)%SENS_ID,tt
104 ENDIF
105
106 ENDIF
107c-----------------------------------------------------------------------
1081000 FORMAT(' SENSOR NUMBER ',i10,' ACTIVATED AT TIME ',1pe12.5)
1091100 FORMAT(' SENSOR NUMBER ',i10,' DEACTIVATED AT TIME ',1pe12.5)
110C-----------------------------------------------
111 END
112
113
subroutine sensor_or(nsensor, sensor_tab, sens)
Definition sensor_or.F:31