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

Go to the source code of this file.

Functions/Subroutines

subroutine i25gap3 (itask, nrtm, irect, gap_nm, gap_m, nmn, msr, gapn_m, gapmax_m, gapscale, msegtyp, thknod, gapmsav, maxdgap_g)

Function/Subroutine Documentation

◆ i25gap3()

subroutine i25gap3 ( integer itask,
integer nrtm,
integer, dimension(4,*) irect,
gap_nm,
gap_m,
integer nmn,
integer, dimension(*) msr,
gapn_m,
gapmax_m,
gapscale,
integer, dimension(*) msegtyp,
thknod,
gapmsav,
maxdgap_g )

Definition at line 30 of file i25gap3.F.

36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40#include "comlock.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com04_c.inc"
45#include "task_c.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER NRTM,IRECT(4,*),
50 . MSR(*),NMN,MSEGTYP(*),ITASK
51C REAL
53 . gap_nm(4,*),gap_m(*), gapmsav(*), thknod(numnod),
54 . gapn_m(*),gapmax_m, gapscale, maxdgap_g
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER I,J,K,IW,I1,I2,I3,MG,M,IP,IGTYP,
59 . NMNF,NMNL,NRTMF,NRTML,IERROR
60 my_real,
61 . DIMENSION(:), ALLOCATABLE :: wa
62 my_real maxdgap_l
63 SAVE wa
64C-----------------------------------------------
65C S o u r c e L i n e s
66C-----------------------------------------------
67 ALLOCATE(wa(numnod),stat=ierror)
68 nmnf = 1 + itask*nmn / nthread
69 nmnl = (itask+1)*nmn / nthread
70 nrtmf = 1 + itask * nrtm / nthread
71 nrtml = (itask+1) * nrtm / nthread
72 maxdgap_l = -ep30
73C------------------------------------
74C GAP_S = Secnds nodes gap [NSN]
75C GAPN_M = gap for each node on main [NMN]
76C GAP_NM = gap of each node on each main segment [4*NRTM]
77C GAP_M = for each main segment, max of gap of its connected nodes [NRTM]
78
79#include "vectorize.inc"
80 DO i=nmnf,nmnl
81 m = msr(i)
82 wa(m)=half*gapscale*thknod(m)
83 END DO
84C
85 CALL my_barrier
86C
87!$OMP SINGLE
88#include "vectorize.inc"
89 DO i=1,nrtm
90 IF (msegtyp(i)==0) THEN
91 DO j=1,4
92 m=irect(j,i)
93 wa(m) = zero
94 END DO
95 END IF
96 END DO
97!$OMP END SINGLE
98C
99#include "vectorize.inc"
100 DO i=nmnf,nmnl
101 m = msr(i)
102 wa(m) = min(wa(m),gapmax_m)
103 gapn_m(i) = wa(m)
104 END DO
105C
106 CALL my_barrier
107C
108#include "vectorize.inc"
109 DO i=nrtmf,nrtml
110 gap_m(i) = zero
111 DO j=1,4
112 m=irect(j,i)
113 gap_nm(j,i)=wa(m)
114 gap_m(i) = max(gap_m(i),wa(m))
115 END DO
116 END DO
117C
118#include "vectorize.inc"
119C calculate the maximum change in the gap, to be used in sorting criteria
120 DO i=nrtmf,nrtml
121 maxdgap_l = max(maxdgap_l,gap_m(i)-gapmsav(i))
122 END DO
123C
124 CALL my_barrier
125C
126#include "lockon.inc"
127C obtain the max dgap for all
128 maxdgap_g = max(maxdgap_l,maxdgap_g)
129#include "lockoff.inc"
130
131 RETURN
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine my_barrier
Definition machine.F:31