OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inter_sort.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "param_c.inc"
#include "task_c.inc"
#include "timeri_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine inter_sort (timers, itask, nb_inter_sorted, list_inter_sorted, retri, ipari, nsensor, isendto, irecvfrom, intbuf_tab, x, itab, renum, nsnfiold, multi_fvm, h3d_data, sensor_tab, inter_struct, sort_comm, renum_siz, glob_therm)

Function/Subroutine Documentation

◆ inter_sort()

subroutine inter_sort ( type(timer_), intent(inout) timers,
integer, intent(in) itask,
integer, intent(in) nb_inter_sorted,
integer, dimension(nb_inter_sorted), intent(in) list_inter_sorted,
integer, intent(inout) retri,
integer, dimension(npari,ninter), intent(inout) ipari,
integer, intent(in) nsensor,
integer, dimension(ninter+1,nspmd+1), intent(in) isendto,
integer, dimension(ninter+1,nspmd+1), intent(in) irecvfrom,
type(intbuf_struct_), dimension(ninter), intent(inout) intbuf_tab,
target x,
integer, dimension(numnod), intent(in) itab,
integer, dimension(renum_siz), intent(inout) renum,
integer, dimension(nspmd), intent(inout) nsnfiold,
type(multi_fvm_struct), intent(inout), target multi_fvm,
type(h3d_database) h3d_data,
type (sensor_str_), dimension(nsensor) sensor_tab,
type(inter_struct_type), dimension(ninter), intent(inout) inter_struct,
type(sorting_comm_type), dimension(ninter), intent(inout) sort_comm,
integer, intent(in) renum_siz,
type (glob_therm_), intent(in) glob_therm )

Definition at line 43 of file inter_sort.F.

47!$COMMENT
48! INTER_SORT description
49! sort computation
50! INTER_SORT organization :
51! loop over the interfaces and sort computation
52!$ENDCOMMENT
53C-----------------------------------------------
54C M o d u l e s
55C-----------------------------------------------
57 USE multi_fvm_mod
58 USE h3d_mod
59 USE metric_mod
60 USE intbufdef_mod
63 USE sensor_mod
64 USE glob_therm_mod
65 USE timer_mod
66C-----------------------------------------------
67C I m p l i c i t T y p e s
68C-----------------------------------------------
69#include "implicit_f.inc"
70C-----------------------------------------------
71C C o m m o n B l o c k s
72C-----------------------------------------------
73#include "com01_c.inc"
74#include "com04_c.inc"
75#include "com08_c.inc"
76#include "param_c.inc"
77#include "task_c.inc"
78#include "timeri_c.inc"
79C-----------------------------------------------
80C D u m m y A r g u m e n t s
81C-----------------------------------------------
82 TYPE(TIMER_), INTENT(inout) :: TIMERS
83 INTEGER, INTENT(in) :: ITASK ! omp thread ID
84 INTEGER, INTENT(in) :: NB_INTER_SORTED ! number of interfaces that need to be sorted
85 INTEGER, INTENT(in) :: NSENSOR
86 INTEGER, DIMENSION(NB_INTER_SORTED), INTENT(in) :: LIST_INTER_SORTED ! list of interfaces that need to be sorted
87 INTEGER, INTENT(inout) :: RETRI
88 INTEGER, DIMENSION(NPARI,NINTER), INTENT(inout) :: IPARI ! interface data
89 INTEGER, DIMENSION(NINTER+1,NSPMD+1), INTENT(in) :: ISENDTO,IRECVFROM
90 TYPE(INTBUF_STRUCT_),DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB ! interface data
91 my_real, DIMENSION(3,NUMNOD), INTENT(in), TARGET :: x ! position
92 INTEGER, DIMENSION(NUMNOD), INTENT(in) :: ITAB
93 INTEGER, INTENT(in) :: RENUM_SIZ ! size of RENUM
94 INTEGER, DIMENSION(RENUM_SIZ), INTENT(inout) :: RENUM
95 INTEGER, DIMENSION(NSPMD), INTENT(inout) :: NSNFIOLD
96 TYPE(MULTI_FVM_STRUCT), INTENT(INOUT), TARGET :: MULTI_FVM
97 TYPE(H3D_DATABASE) :: H3D_DATA
98 TYPE(inter_struct_type), DIMENSION(NINTER), INTENT(inout) :: INTER_STRUCT ! structure for interface
99 TYPE(sorting_comm_type), DIMENSION(NINTER), INTENT(inout) :: SORT_COMM ! structure for interface sorting comm
100 TYPE (SENSOR_STR_) ,DIMENSION(NSENSOR) :: SENSOR_TAB
101 type (glob_therm_) ,INTENT(IN) :: GLOB_THERM
102C-----------------------------------------------
103C L o c a l V a r i a b l e s
104C-----------------------------------------------
105 INTEGER :: KK,N,ESHIFT
106 INTEGER :: NTY,INACTI,ISENS
107 INTEGER :: NRTM_T
108 LOGICAL :: TYPE18
109 my_real :: ts
110! ----------------------------------------
111
112 DO kk=1,nb_inter_sorted
113 n = list_inter_sorted(kk)
114 nty = ipari(7,n)
115 inacti = ipari(22,n)
116 type18=.false.
117 IF(nty==7.AND.inacti==7)type18=.true.
118
119 ! ---------------------------
120 ! timer of current interface N : start
121 IF( imonm > 0 .AND. itask ==0 ) THEN
122 intbuf_tab(n)%METRIC%NOINT = ipari(15,n)
123 intbuf_tab(n)%METRIC%NCONT = ipari(18,n)
124 intbuf_tab(n)%METRIC%MULTIMP = ipari(23,n)
125 intbuf_tab(n)%METRIC%NSNR = max(intbuf_tab(n)%METRIC%NSNR , ipari(24,n))
126 intbuf_tab(n)%METRIC%NSN = ipari(5,n)
127 CALL int_startime(intbuf_tab(n)%METRIC,i_main_tri)
128 ENDIF
129 ! ---------------------------
130
131 isens = 0
132 IF(nty == 7.OR.nty == 11.OR.nty == 24.OR.nty == 25) isens = ipari(64,n)
133 ! ---------------------------
134 ! interface activated by a a sensor
135 IF (isens > 0) THEN
136 ts = sensor_tab(isens)%TSTART
137 ELSE
138 ts = tt
139 ENDIF
140
141 ! -----------------------------------------------------
142 ! type 7
143 IF((nty==7.AND.tt>=ts).AND.(.NOT.type18))THEN
144 IF(got_preview == 1) THEN
145 nrtm_t = ipari(4,n)
146 eshift = 0
147 ELSE
148 nrtm_t = ipari(4,n)/nthread
149 eshift = itask*nrtm_t
150 IF(itask==nthread-1)nrtm_t=ipari(4,n)-(nthread-1)*nrtm_t
151 ENDIF
152 CALL inter_sort_07( timers,ipari,x,n,itask,isendto,
153 1 irecvfrom,retri,itab,nrtm_t,renum,renum_siz,
154 2 nsnfiold,eshift,multi_fvm,intbuf_tab(n),h3d_data,
155 3 inter_struct,sort_comm,glob_therm%INTHEAT, glob_therm%IDT_THERM, glob_therm%NODADT_THERM)
156 ENDIF
157 ! -----------------------------------------------------
158
159 ! ---------------------------
160 ! timer of current interface N : end
161 IF(imonm > 0) THEN
162 IF(itask==0) CALL int_stoptime(intbuf_tab(n)%METRIC,i_main_tri)
163 ENDIF
164 ! ---------------------------
165 ENDDO
166
167 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine inter_sort_07(timers, ipari, x, nin, itask, isendto, ircvfrom, retri, itab, nrtm_t, renum, renum_siz, nsnfiold, eshift, multi_fvm, intbuf_tab, h3d_data, inter_struct, sort_comm, intheat, idt_therm, nodadt_therm)
#define max(a, b)
Definition macros.h:21
integer, parameter i_main_tri
Definition metric_mod.F:54
subroutine renum_siz(ipari, rnum_siz)
Definition renum_siz.F:29
subroutine int_stoptime(this, event)
subroutine int_startime(this, event)