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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_cell_size_exchange_init (ircvfrom, isendto, ipari, nin, inter_struct, sort_comm)

Function/Subroutine Documentation

◆ spmd_cell_size_exchange_init()

subroutine spmd_cell_size_exchange_init ( integer, dimension(ninter+1,nspmd+1), intent(in) ircvfrom,
integer, dimension(ninter+1,nspmd+1), intent(in) isendto,
integer, dimension(npari,ninter), intent(in) ipari,
integer, intent(in) nin,
type(inter_struct_type), dimension(ninter), intent(inout) inter_struct,
type(sorting_comm_type), dimension(ninter), intent(inout) sort_comm )

Definition at line 32 of file spmd_cell_size_exchange_init.F.

33!$COMMENT
34! SPMD_CELL_SIZE_EXCHANGE_INIT description :
35! initialization of buffer size + allocation
36! SPMD_CELL_SIZE_EXCHANGE_INIT organization :
37!$ENDCOMMENT
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
43 USE tri7box
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "com01_c.inc"
52#include "com04_c.inc"
53#include "task_c.inc"
54#include "sms_c.inc"
55#include "param_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 INTEGER, INTENT(in) :: NIN
60 INTEGER, DIMENSION(NPARI,NINTER), INTENT(in) :: IPARI
61 INTEGER, DIMENSION(NINTER+1,NSPMD+1), INTENT(in) :: ISENDTO,IRCVFROM
62 TYPE(inter_struct_type), DIMENSION(NINTER), INTENT(inout) :: INTER_STRUCT ! structure for interface
63 TYPE(sorting_comm_type), DIMENSION(NINTER), INTENT(inout) :: SORT_COMM ! structure for interface sorting comm
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67#ifdef MPI
68
69 INTEGER :: P
70 INTEGER :: ISIZ,RSIZ
71 INTEGER :: NSN,NMN,IGAP,INTTH,INTFRIC,ITYP,ITIED
72 INTEGER :: IFQ,INACTI
73 INTEGER :: LOC_PROC
74! --------------------------------------------------------------------
75
76 loc_proc = ispmd + 1
77 sort_comm(nin)%RSIZ = 0
78 sort_comm(nin)%ISIZ = 0
79
80 igap = ipari(21,nin)
81 intth = ipari(47,nin)
82 intfric = ipari(72,nin)
83 ityp = ipari(7,nin)
84 itied = ipari(85,nin)
85 nmn = ipari(6,nin)
86 nsn = ipari(5,nin)
87 inacti = ipari(22,nin)
88 ifq =ipari(31,nin)
89
90 IF(inacti==5.OR.inacti==6.OR.inacti==7.OR.ifq>0.OR.itied/=0) THEN
91 IF(.NOT.ALLOCATED(inter_struct(nin)%NSNFIOLD) ) THEN
92 ALLOCATE(inter_struct(nin)%NSNFIOLD(nspmd))
93 inter_struct(nin)%NSNFIOLD(1:nspmd) = 0
94 ENDIF
95 DO p = 1, nspmd
96 inter_struct(nin)%NSNFIOLD(p) = nsnfi(nin)%P(p)
97 END DO
98 END IF
99 sort_comm(nin)%NBSEND_NB = 0
100 sort_comm(nin)%NBRECV_NB = 0
101
102 IF(ircvfrom(nin,loc_proc)/=0.OR.isendto(nin,loc_proc)/=0) THEN
103
104 IF(.NOT.ALLOCATED(sort_comm(nin)%REQUEST_NB_R)) THEN
105 ALLOCATE(sort_comm(nin)%REQUEST_NB_R(nspmd) )
106 ENDIF
107 IF(.NOT.ALLOCATED(sort_comm(nin)%REQUEST_NB_S)) THEN
108 ALLOCATE(sort_comm(nin)%REQUEST_NB_S(nspmd) )
109 ENDIF
110 IF(.NOT.ALLOCATED(sort_comm(nin)%NB)) THEN
111 ALLOCATE(sort_comm(nin)%NB(nspmd) )
112 sort_comm(nin)%NB(1:nspmd) = 0
113 ENDIF
114 IF(.NOT.ALLOCATED(sort_comm(nin)%INDEX_RCV)) THEN
115 ALLOCATE( sort_comm(nin)%INDEX_RCV(sort_comm(nin)%PROC_NUMBER) )
116 ENDIF
117
118 rsiz = 8
119 isiz = 6
120
121c specific cases
122c IGAP=1 or IGAP=2
123 IF(igap==1 .OR. igap==2)THEN
124 rsiz = rsiz + 1
125c IGAP=3
126 ELSEIF(igap==3)THEN
127 rsiz = rsiz + 2
128 ENDIF
129
130C thermic
131 IF(intth > 0 ) THEN
132 rsiz = rsiz + 2
133 isiz = isiz + 1
134 ENDIF
135C Friction
136 IF(intfric > 0 ) THEN
137 isiz = isiz + 1
138 ENDIF
139
140C -- IDTMINS==2
141 IF(idtmins == 2)THEN
142 isiz = isiz + 2
143C -- IDTMINS_INT /= 0
144 ELSEIF(idtmins_int/=0)THEN
145 isiz = isiz + 1
146 END IF
147
148 sort_comm(nin)%RSIZ = rsiz
149 sort_comm(nin)%ISIZ = isiz
150
151 IF(isendto(nin,loc_proc)>0) THEN
152 IF(.NOT.ALLOCATED(sort_comm(nin)%SEND_NB)) ALLOCATE(sort_comm(nin)%SEND_NB(nspmd))
153 ENDIF
154 IF(ircvfrom(nin,loc_proc)>0) THEN
155 IF(.NOT.ALLOCATED(sort_comm(nin)%RECV_NB)) ALLOCATE(sort_comm(nin)%RECV_NB(nspmd))
156 ENDIF
157 ENDIF
158#endif
159 RETURN
type(int_pointer), dimension(:), allocatable nsnfi
Definition tri7box.F:440