OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
inter_sort.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!|| inter_sort ../engine/source/interfaces/generic/inter_sort.F
25!||--- called by ------------------------------------------------------
26!|| inttri ../engine/source/interfaces/intsort/inttri.F
27!||--- calls -----------------------------------------------------
28!|| int_startime ../engine/source/system/timer_interf.F
29!|| int_stoptime ../engine/source/system/timer_interf.F
30!|| inter_sort_07 ../engine/source/interfaces/int07/inter_sort_07.F
31!||--- uses -----------------------------------------------------
32!|| command_line_args_mod ../engine/share/modules/command_line_args.F
33!|| glob_therm_mod ../common_source/modules/mat_elem/glob_therm_mod.F90
34!|| h3d_mod ../engine/share/modules/h3d_mod.F
35!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
36!|| inter_sorting_mod ../engine/share/modules/inter_sorting_mod.F
37!|| inter_struct_mod ../engine/share/modules/inter_struct_mod.F
38!|| metric_mod ../common_source/modules/interfaces/metric_mod.F
39!|| multi_fvm_mod ../common_source/modules/ale/multi_fvm_mod.F90
40!|| sensor_mod ../common_source/modules/sensor_mod.F90
41!|| timer_mod ../engine/source/system/timer_mod.F90
42!||====================================================================
43 SUBROUTINE inter_sort( TIMERS,ITASK,NB_INTER_SORTED,LIST_INTER_SORTED,RETRI,IPARI,
44 1 NSENSOR,ISENDTO,IRECVFROM,INTBUF_TAB,X,ITAB,
45 2 RENUM,NSNFIOLD,MULTI_FVM,H3D_DATA,SENSOR_TAB,
46 3 INTER_STRUCT,SORT_COMM,RENUM_SIZ,GLOB_THERM )
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
168 END SUBROUTINE inter_sort
#define my_real
Definition cppsort.cpp:32
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)
Definition inter_sort.F:47
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 int_stoptime(this, event)
subroutine int_startime(this, event)