OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
connectivity.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!|| build_connectivity ../engine/source/multifluid/connectivity.F
25!||--- called by ------------------------------------------------------
26!|| alemain ../engine/source/ale/alemain.F
27!||--- calls -----------------------------------------------------
28!|| arret ../engine/source/system/arret.F
29!||--- uses -----------------------------------------------------
30!|| ale_connectivity_mod ../common_source/modules/ale/ale_connectivity_mod.F
31!|| multi_fvm_mod ../common_source/modules/ale/multi_fvm_mod.F90
32!||====================================================================
33 SUBROUTINE build_connectivity(ITASK, MULTI_FVM, ALE_CONNECTIVITY, IPARG)
34C-----------------------------------------------
35C D e s c r i p t i o n
36C-----------------------------------------------
37C Builds array KVOIS that contains the number kface2 of
38C the face by which an element J is a neighbor of an
39C element I of tab IVOIS.
40C If I is an element and KFACE a face number, if J the neighbor
41C of I by face KFACE, that is to say J = IVOIS (KFACE, I)
42C then, KFACE2 is such that I = IVOIS (KFACE2, J)
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE multi_fvm_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55! NGROUP
56#include "com01_c.inc"
57! NUMELQ, NUMELS, NUMELTG
58#include "com04_c.inc"
59! NTHREAD
60#include "task_c.inc"
61! NPARG
62#include "param_c.inc"
63C-----------------------------------------------
64C D u m m y A r g u m e n t s
65C-----------------------------------------------
66 TYPE(multi_fvm_struct), INTENT(INOUT) :: MULTI_FVM
67 INTEGER, INTENT(IN) :: ITASK
68 INTEGER, INTENT(IN) :: IPARG(NPARG, *)
69 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECTIVITY
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER :: NB_FACE, KFACE, KFACE2, II, I, J, MATLAW
74 INTEGER :: ITY, NFT, NEL, NG, NUMEL_SPMD
75 LOGICAL :: IDBG
76 INTEGER :: IAD, IAD2, LGTH, LGTH2
77 nb_face = 0
78 numel_spmd = 0
79
80 DO ng = itask + 1, ngroup, nthread
81 matlaw = iparg(1, ng)
82 IF (matlaw == 151) THEN
83 nel = iparg(2, ng)
84 nft = iparg(3, ng)
85 ity = iparg(5, ng)
86 SELECT CASE (multi_fvm%SYM)
87 CASE (0)
88 nb_face = 6
89 numel_spmd = numels
90 CASE (1, 2)
91 IF (ity == 2) THEN
92C QUADS
93 nb_face = 4
94 numel_spmd = numelq
95 ELSEIF (ity == 7) THEN
96C TRIANGLES
97 nb_face = 3
98 numel_spmd = numeltg
99 ENDIF
100 CASE DEFAULT
101 CALL arret(2)
102 END SELECT
103 DO ii = 1, nel
104 i = ii + nft
105 iad = ale_connectivity%ee_connect%iad_connect(i)
106 lgth = ale_connectivity%ee_connect%iad_connect(i+1) -
107 . ale_connectivity%ee_connect%iad_connect(i)
108 DO kface = 1, lgth
109 j = ale_connectivity%ee_connect%connected(iad + kface - 1)
110 IF (j > 0 .AND. j <= numel_spmd) THEN
111 iad2 = ale_connectivity%ee_connect%iad_connect(j)
112 lgth2 = ale_connectivity%ee_connect%iad_connect(j+1) -
113 . ale_connectivity%ee_connect%iad_connect(j)
114 DO kface2 = 1, lgth2
115 IF (i == ale_connectivity%ee_connect%connected(iad2 + kface2 - 1)) THEN
116 EXIT
117 ENDIF
118 ENDDO
119 multi_fvm%FVM_CONNECTIVITY%KVOIS(nb_face * (i - 1) + kface) = kface2
120 ENDIF
121 ENDDO
122 ENDDO
123 ENDIF
124 ENDDO
125
126 idbg = .false.
127C Verification (debug only)
128 IF (idbg) THEN
129 DO ng = itask + 1, ngroup, nthread
130 matlaw = iparg(1, ng)
131 IF (matlaw == 151) THEN
132 nel = iparg(2, ng)
133 nft = iparg(3, ng)
134 ity = iparg(5, ng)
135 SELECT CASE (multi_fvm%SYM)
136 CASE (0)
137 nb_face = 6
138 numel_spmd = numels
139 CASE (1, 2)
140 IF (ity == 2) THEN
141C QUADS
142 nb_face = 4
143 numel_spmd = numelq
144 ELSEIF (ity == 7) THEN
145C TRIANGLES
146 nb_face = 3
147 numel_spmd = numeltg
148 ENDIF
149 CASE DEFAULT
150 CALL arret(2)
151 END SELECT
152 DO ii = 1, nel
153 i = ii + nft
154 iad = ale_connectivity%ee_connect%iad_connect(i)
155 lgth = ale_connectivity%ee_connect%iad_connect(i+1) -
156 . ale_connectivity%ee_connect%iad_connect(i)
157 DO kface = 1, lgth
158 j = ale_connectivity%ee_connect%connected(iad + kface - 1)
159 IF (j> 0 .AND. j <= numel_spmd) THEN
160 iad2 = ale_connectivity%ee_connect%iad_connect(j)
161 kface2 = multi_fvm%FVM_CONNECTIVITY%KVOIS(nb_face * (i - 1) + kface)
162 IF (ale_connectivity%ee_connect%connected(iad2 + kface2 - 1) /= i) THEN
163 print*, "OUPS"
164 ENDIF
165 ENDIF
166 ENDDO
167 ENDDO
168 ENDIF
169 ENDDO
170 ENDIF
171
172 END SUBROUTINE build_connectivity
subroutine build_connectivity(itask, multi_fvm, ale_connectivity, iparg)
subroutine arret(nn)
Definition arret.F:87