OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
init_i25_edge.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!|| init_i25_edge ../engine/source/interfaces/int25/init_i25_edge.F
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- uses -----------------------------------------------------
28!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
29!||====================================================================
30 SUBROUTINE init_i25_edge(NLEDGE,NINTER,NPARI,IPARI,INTBUF_TAB)
31!$COMMENT
32! INIT_I25_EDGE description :
33! for interface type 25, find the solid edge & non-main edge
34!
35! init_i25_edge organization :
36! loop over the interface
37! * if NiN is an interface type 25 with edge to edge --> find the solid edge
38!$ENDCOMMENT
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE intbufdef_mod
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "i25edge_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER, INTENT(in) :: NLEDGE !< dim of ledge array
55 INTEGER, INTENT(in) :: NINTER !< number of interface
56 INTEGER, INTENT(in) :: NPARI !< dim of IPARI array
57 INTEGER, DIMENSION(NPARI,NINTER), INTENT(in) :: IPARI !< interface data
58 TYPE(intbuf_struct_), DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB !< interface data
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER :: I,J
63 INTEGER :: INTERFACE_TYPE
64 INTEGER :: SOL_EDGE,SH_EDGE,IEDGE,NEDGE
65 INTEGER, DIMENSION(:), ALLOCATABLE :: TMP_ARRAY
66C-----------------------------------------------
67
68 ! ------------------------
69 ! loop over the interface
70 DO i=1,ninter
71 intbuf_tab(i)%NUMBER_EDGE_TYPE1 = 0
72 intbuf_tab(i)%NUMBER_EDGE_TYPE1_0 = 0
73 interface_type = ipari(7,i)
74 iedge = ipari(58,i)
75 ! -----------------
76 ! check if the interface is a type 25 with edge to edge
77 IF(interface_type==25.AND.iedge/=0) THEN
78 nedge = ipari(68,i)
79 ALLOCATE (tmp_array(nedge) )
80 ! ----------
81 ! loop over the edge to find the edge solid
82 DO j=1,nedge
83 IF(intbuf_tab(i)%LEDGE((j-1)*nledge+ledge_type)==1) THEN
84 intbuf_tab(i)%NUMBER_EDGE_TYPE1 = intbuf_tab(i)%NUMBER_EDGE_TYPE1 + 1
85 tmp_array(intbuf_tab(i)%NUMBER_EDGE_TYPE1) = j
86 ENDIF
87 ENDDO
88 ALLOCATE( intbuf_tab(i)%EDGE_TYPE1(intbuf_tab(i)%NUMBER_EDGE_TYPE1) )
89 intbuf_tab(i)%EDGE_TYPE1(1:intbuf_tab(i)%NUMBER_EDGE_TYPE1) = tmp_array(1:intbuf_tab(i)%NUMBER_EDGE_TYPE1)
90 ! ----------
91
92 ! ----------
93 ! loop over the edge to find the edge solid & the edge S
94 sol_edge = iedge/10 ! solids
95 sh_edge = iedge-10*sol_edge ! shells
96 DO j=1,nedge
97 IF(intbuf_tab(i)%LEDGE((j-1)*nledge+ledge_type)>=0.AND.
98 . (intbuf_tab(i)%LEDGE((j-1)*nledge+ledge_type)==1.OR.sh_edge==0) ) THEN
99 intbuf_tab(i)%NUMBER_EDGE_TYPE1_0 = intbuf_tab(i)%NUMBER_EDGE_TYPE1_0 + 1
100 tmp_array(intbuf_tab(i)%NUMBER_EDGE_TYPE1_0) = j
101 ENDIF
102 ENDDO
103 ALLOCATE( intbuf_tab(i)%EDGE_TYPE1_0(intbuf_tab(i)%NUMBER_EDGE_TYPE1_0) )
104 intbuf_tab(i)%EDGE_TYPE1_0(1:intbuf_tab(i)%NUMBER_EDGE_TYPE1_0) = tmp_array(1:intbuf_tab(i)%NUMBER_EDGE_TYPE1_0)
105 ! ----------
106
107 DEALLOCATE( tmp_array )
108 ELSE
109 ALLOCATE( intbuf_tab(i)%EDGE_TYPE1(intbuf_tab(i)%NUMBER_EDGE_TYPE1) )
110 ALLOCATE( intbuf_tab(i)%EDGE_TYPE1_0(intbuf_tab(i)%NUMBER_EDGE_TYPE1_0) )
111 ENDIF
112 ! -----------------
113 ENDDO
114 ! ------------------------
115
116 RETURN
117 END SUBROUTINE init_i25_edge
118
subroutine init_i25_edge(nledge, ninter, npari, ipari, intbuf_tab)