OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sensor_time.F File Reference
#include "implicit_f.inc"
#include "units_c.inc"
#include "comlock.inc"
#include "task_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine sensor_time (sensor, time, timestep)

Function/Subroutine Documentation

◆ sensor_time()

subroutine sensor_time ( type (sensor_str_), intent(inout) sensor,
intent(in) time,
intent(in) timestep )

Definition at line 32 of file sensor_time.F.

33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE sensor_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "units_c.inc"
45#include "comlock.inc"
46#include "task_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 my_real ,INTENT(IN) :: time,timestep
51 TYPE (SENSOR_STR_) ,INTENT(INOUT) :: SENSOR
52C----------------------------------------------------------
53C Local Variables
54C----------------------------------------------------------
55 INTEGER :: NSENS
56 my_real :: tdelay,tstop,infinity
57 DOUBLE PRECISION :: TDELAY_DP,TSTOP_DP,NEXT_CYCLE
58 parameter(infinity = 1.0e20)
59C=======================================================================
60 nsens = sensor%SENS_ID
61 tdelay = sensor%TDELAY
62 tstop = sensor%VALUE
63 next_cycle = time + timestep
64 tdelay_dp = tdelay
65 tstop_dp = tstop
66c
67 IF (next_cycle >= tdelay_dp .AND. sensor%STATUS == 0) THEN
68 sensor%STATUS = 1
69 sensor%TSTART = tdelay
70 IF (ispmd == 0) THEN
71#include "lockon.inc"
72 WRITE (iout ,1000) sensor%SENS_ID,tdelay
73 WRITE (istdo,1000) sensor%SENS_ID,tdelay
74#include "lockoff.inc"
75 ENDIF
76 ELSE IF (next_cycle >= tstop_dp .AND. sensor%STATUS == 1) THEN
77 sensor%STATUS = 0
78 sensor%TSTART = infinity
79 sensor%TDELAY = infinity
80 IF (ispmd == 0) THEN
81#include "lockon.inc"
82 WRITE (iout ,2000) sensor%SENS_ID,tstop
83 WRITE (istdo,2000) sensor%SENS_ID,tstop
84#include "lockoff.inc"
85 ENDIF
86 ENDIF
87c-----------------------------------------------------------------------
881000 FORMAT(' SENSOR (TIME) NUMBER ',i10,' ACTIVATED AT TIME ',1pe12.5)
892000 FORMAT(' SENSOR (TIME) NUMBER ',i10,' DESACTIVATED AT TIME ',1pe12.5)
90c-----------
91 RETURN
#define my_real
Definition cppsort.cpp:32