OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
comput_mesh_neighbour.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!|| comput_mesh_neighbour ../starter/source/elements/ige3d/comput_mesh_neighbour.F
25!||--- called by ------------------------------------------------------
26!|| prerafig3d ../starter/source/elements/ige3d/prerafig3d.F
27!||====================================================================
28 SUBROUTINE comput_mesh_neighbour(DIR,DIR2,IPID,IPID2,ID_MESHSURF,
29 . TAB_COINKNOT,L_TAB_COINKNOT,
30 . TAB_COINKNOT_TEST,L_TAB_COINKNOT_TEST,
31 . KNOT_INSERE,KNOT_INSERE2,
32 . TAB_MESHSURFCUT,L_TAB_MESHSURFCUT,
33 . TAB_MESHSURFCUT2,L_TAB_MESHSURFCUT2,FLAG)
34C----------------------------------------------------------
35C routine that will test and count the meshsurfs that
36C intersect with the meshsurfsurf being processed
37C NB : MESHSURF = SURFACE DE COUPE D'ELEMENTS DEFINISSANT
38C one refinement in one direction
39C----------------------------------------------------------
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER TAB_MESHSURFCUT(*),TAB_MESHSURFCUT2(*)
48 INTEGER DIR,DIR2,IPID,IPID2,L_TAB_MESHSURFCUT,L_TAB_MESHSURFCUT2,
49 . L_TAB_COINKNOT,L_TAB_COINKNOT_TEST,ID_MESHSURF,FLAG
50 my_real TAB_COINKNOT(2,L_TAB_COINKNOT),
51 . TAB_COINKNOT_TEST(2,L_TAB_COINKNOT_TEST),
52 . knot_insere,knot_insere2
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56 INTEGER DIRTANG1, DIRTANG2
57 my_real COINENGLOB(2,2), COINENGLOB_TEST(2,2)
58C=======================================================================
59C
60C in the parametric space
61C
62C RAFFINEMENT X : RAFFINEMENT Y : RAFFINEMENT Z :
63C
64C Z X Y
65C | | |
66C |_ _ Y |_ _ Z |_ _ X
67C / / /
68C X Y Z
69C
70C=======================================================================
71C |
72C C1 ___________c2_ _ _ _ _p1 |
73C | | / |
74C | | | C1 ___________C2
75C | | / | | |_ _ _ _P1 _ _ _ _ P2
76C |____________|_ _ _ _ _ _ P2 | | | / /
77C C4 C3 / | | |
78C C2 / | |____________| / /
79C /| | C4 C3
80C / | / | / /
81C / | |
82C / | / | / /
83C C1/ |C3 | C2__________ C3
84C | / | / /
85C | / | / /
86C | / <= TESTEE | / / <= TESTEE
87C |/ | /___________/
88C C4 | C1 C4
89C |
90C=======================================================================
91C----------------------------------------------------------------------
92C TRAITEMENT SIMPLE QUI PERMET D'ECARTER LES MESHSURF D'AUTRES PATCHS
93C or the parallel meshsurf
94C----------------------------------------------------------------------
95c
96 IF(ipid2/=ipid) RETURN ! not the same patches
97 IF(dir2==dir) RETURN ! Parallel Messiturf
98c
99C----------------------------------------------------------------------
100C construction of bounding boxes for the meshsurfs
101C PERMET DE SAVOIR SI IL Y A POTENTIELLEMENT INTERSECTION
102C (IL Y A ONE TEST SUR LES FONCTIONS EN AVAL,
103C LA CERTITUDE D'INTERSECTION N'EST PAS NECESSAIRE)
104C----------------------------------------------------------------------
105c
106 IF(dir==1) THEN
107 dirtang1 = 2
108 dirtang2 = 3
109 ELSEIF(dir==2) THEN
110 dirtang1 = 3
111 dirtang2 = 1
112 ELSEIF(dir==3) THEN
113 dirtang1 = 1
114 dirtang2 = 2
115 ENDIF
116c
117 coinenglob(1,1) = minval(tab_coinknot(1,1:(l_tab_coinknot)))
118 coinenglob(2,1) = minval(tab_coinknot(2,1:(l_tab_coinknot)))
119 coinenglob(1,2) = maxval(tab_coinknot(1,1:(l_tab_coinknot)))
120 coinenglob(2,2) = maxval(tab_coinknot(2,1:(l_tab_coinknot)))
121c
122 coinenglob_test(1,1) = minval(tab_coinknot_test(1,1:(l_tab_coinknot_test)))
123 coinenglob_test(2,1) = minval(tab_coinknot_test(2,1:(l_tab_coinknot_test)))
124 coinenglob_test(1,2) = maxval(tab_coinknot_test(1,1:(l_tab_coinknot_test)))
125 coinenglob_test(2,2) = maxval(tab_coinknot_test(2,1:(l_tab_coinknot_test)))
126c
127C----------------------------------------------------------------------
128C comparison of the intervals of the bounding boxes and the inserted knots,
129C PUIS VERIFICATION SUR LA TROISIEME DIRECTION COMPLEMENTAIRE AUX TWO DIRECTIONS
130C of the inserted knots from the superposition of the meshsurfs
131C TEST QUI EXCLUE : PLUS SIMPLE
132C----------------------------------------------------------------------
133c
134 IF(dir2==dirtang1) THEN
135 IF(knot_insere2<coinenglob(1,1).OR.knot_insere2>coinenglob(1,2)) RETURN
136 IF(knot_insere<coinenglob_test(2,1).OR.knot_insere>coinenglob_test(2,2)) RETURN
137 IF(coinenglob_test(1,2)<coinenglob(2,1)) RETURN
138 IF(coinenglob_test(1,1)>coinenglob(2,2)) RETURN
139 ELSEIF(dir2==dirtang2) THEN
140 IF(knot_insere2<coinenglob(2,1).OR.knot_insere2>coinenglob(2,2)) RETURN
141 IF(knot_insere<coinenglob_test(1,1).OR.knot_insere>coinenglob_test(1,2)) RETURN
142 IF(coinenglob_test(2,2)<coinenglob(1,1)) RETURN
143 IF(coinenglob_test(2,1)>coinenglob(1,2)) RETURN
144 ENDIF
145c
146C----------------------------------------------------------------------
147C SI ON ARRIVE LA, IL Y A ONE CROISEMENT PROBABLE
148C----------------------------------------------------------------------
149c
150 l_tab_meshsurfcut = l_tab_meshsurfcut + 1
151 IF(flag==1) THEN
152 tab_meshsurfcut(l_tab_meshsurfcut) = id_meshsurf
153 ENDIF
154c
155C----------------------------------------------------------------------
156C we can take this meshsurf and all the meshsurfs it intersects
157C (TESTONS SANS POUR L'INSTANT CAR ON TESTE TOUTES LES MESHSURFS
158C anyway, with respect to the meshsurf we are on
159C----------------------------------------------------------------------
160c
161c DO I=1,L_TAB_MESHSURFCUT2
162c IF(FLAG==0) THEN
163c L_TAB_MESHSURFCUT = L_TAB_MESHSURFCUT + 1
164c ENDIF
165c IF(FLAG==1) THEN
166c IOUT=0
167c DO J=1,L_TAB_MESHSURFCUT
168c IF(TAB_MESHSURFCUT(J)==TAB_MESHSURFCUT2(I)) IOUT=1
169c ENDDO
170c IF(IOUT==0) THEN
171c L_TAB_MESHSURFCUT = L_TAB_MESHSURFCUT + 1
172c TAB_MESHSURFCUT(L_TAB_MESHSURFCUT) = TAB_MESHSURFCUT2(I)
173c ENDIF
174c ENDIF
175c ENDDO
176c
177C----------------------------------------------------------------------
178c
179 RETURN
180 END
181c
subroutine comput_mesh_neighbour(dir, dir2, ipid, ipid2, id_meshsurf, tab_coinknot, l_tab_coinknot, tab_coinknot_test, l_tab_coinknot_test, knot_insere, knot_insere2, tab_meshsurfcut, l_tab_meshsurfcut, tab_meshsurfcut2, l_tab_meshsurfcut2, flag)