OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
find_newknot.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!|| find_newknot ../starter/source/elements/ige3d/find_newknot.F
25!||--- called by ------------------------------------------------------
26!|| prerafig3d ../starter/source/elements/ige3d/prerafig3d.F
27!||====================================================================
28 SUBROUTINE find_newknot(IEL,KXIG3D,KNOT,DIR,IAD_KNOT,
29 . NKNOT1,NKNOT2,NKNOT3,IDCUT,NEWKNOT)
30C----------------------------------------------------------------------
31C ROUTINE QUI RENVOIE EN FONCTION DU NUMERO DE LA COUPE D'ELEMENT
32C A REALISER LE KNOT CORRESPONDANT A INSERER
33C----------------------------------------------------------------------
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C C o m m o n B l o c k s
40C-----------------------------------------------
41#include "param_c.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER KXIG3D(NIXIG3D,*)
46 INTEGER IEL,DIR,IDCUT,IAD_KNOT,NKNOT1,NKNOT2,NKNOT3
47 my_real knot(*),newknot
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER IDNBCUT,IDKNOT1,IDKNOT2
52 INTEGER OFFSET_KNOT
53C=======================================================================
54C----------------------------------------------------------
55C ELEMENT ISO GEOMETRIQUE
56C-----------------------------------------------
57C KXIG3D(6,*) : index of 1st knot in the Xknot vector corresponding to the element
58C KXIG3D(7,*) : index of 1st knot in the Yknot vector corresponding to the element
59C KXIG3D(8,*) : index of 1st knot in the Zknot vector corresponding to the element
60C KXIG3D(9,*) : index of 2nd knot in the Xknot vector corresponding to the element
61C KXIG3D(10,*) : index of 2nd knot in the Yknot vector corresponding to the element
62C KXIG3D(11,*) : index of 2nd knot in the Zknot vector corresponding to the element
63C KXIG3D(12,*) : number of element's cuts needed in the X direction
64C KXIG3D(13,*) : number of element's cuts needed in the Y direction
65C KXIG3D(14,*) : number of element's cuts needed in the Z direction
66C=======================================================================
67C----------------------------------------------------------------------
68C INITIALISATION DES VARIABLES EN FONCTION DE LA DIRECTION DE COUPE
69C----------------------------------------------------------------------
70C
71 IF(dir==1) THEN
72 idnbcut=12
73 idknot1=6 ! index of 1st knot in the Xknot vector corresponding to the element
74 idknot2=9 ! index of 2nd knot in the Xknot vector corresponding to the element
75 offset_knot = iad_knot
76 ELSEIF(dir==2) THEN
77 idnbcut=13
78 idknot1=7 ! index of 1st knot in the Yknot vector corresponding to the element
79 idknot2=10 ! index of 1st knot in the Yknot vector corresponding to the element
80 offset_knot = iad_knot + nknot1
81 ELSEIF(dir==3) THEN
82 idnbcut=14
83 idknot1=8 ! index of 1st knot in the Zknot vector corresponding to the element
84 idknot2=11 ! index of 1st knot in the Zknot vector corresponding to the element
85 offset_knot = iad_knot + nknot1 + nknot2
86 ENDIF
87C
88C----------------------------------------------------------------------
89C NE PERMET QUE LES COUPES PAR 2,4,8... (DES COUPES PAIRES), ET
90C BORNE LE NOMBRE MAXIMAL DE COUPE PAR 8
91C----------------------------------------------------------------------
92C
93 SELECT CASE (idcut)
94 CASE(1) ! COUPE AU MILIEU DE L'ELEMENT (1/2)
95
96 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
97 + (knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/2
98
99 CASE(2) ! COUPE AU PREMIER FOURTH DE L'ELEMENT (1/4)
100
101 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
102 + 1*(knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/4
103
104 CASE(3) ! COUPE AU DERNIER FOURTH DE L'ELEMENT (3/4)
105
106 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
107 + 3*(knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/4
108
109 CASE(4) ! COUPE AU PREMIER HUITIEME DE L'ELEMENT (1/8)
110
111 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
112 + 1*(knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/8
113
114 CASE(5) ! COUPE AU TROISIEME HUITIEME DE L'ELEMENT (3/8)
115
116 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
117 + 3*(knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/8
118
119 CASE(6) ! COUPE AU CINQUIEME HUITIEME DE L'ELEMENT (5/8)
120
121 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
122 + 5*(knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/8
123
124 CASE(7) ! COUPE AU DERNIER HUITIEME DE L'ELEMENT (7/8)
125
126 newknot=knot(offset_knot+kxig3d(idknot1,iel))+
127 + 7*(knot(offset_knot+kxig3d(idknot2,iel))-knot(offset_knot+kxig3d(idknot1,iel)))/8
128
129 END SELECT
130C
131 RETURN
132 END
133C
134C
135!||====================================================================
136!|| find_neighbourknot ../starter/source/elements/ige3d/find_newknot.F
137!||====================================================================
138 SUBROUTINE find_neighbourknot(IDNEIGHBOUR,KXIG3D,TAB_OLDIDCUT,IDNBCUT,DIR,IDCUT_VOISIN)
139C-----------------------------------------------
140C I m p l i c i t T y p e s
141C-----------------------------------------------
142#include "implicit_f.inc"
143C-----------------------------------------------
144C C o m m o n B l o c k s
145C-----------------------------------------------
146#include "param_c.inc"
147C-----------------------------------------------
148C D u m m y A r g u m e n t s
149C-----------------------------------------------
150 INTEGER KXIG3D(NIXIG3D,*),TAB_OLDIDCUT(3,*)
151 INTEGER IDNEIGHBOUR,IDNBCUT,IDCUT_VOISIN,DIR
152C=======================================================================
153C----------------------------------------------------------
154C ELEMENT ISO GEOMETRIQUE
155C-----------------------------------------------
156C KXIG3D(6,*) : index of 1st knot in the Xknot vector corresponding to the element
157C KXIG3D(7,*) : index of 1st knot in the Yknot vector corresponding to the element
158C KXIG3D(8,*) : index of 1st knot in the Zknot vector corresponding to the element
159C KXIG3D(9,*) : index of 2nd knot in the Xknot vector corresponding to the element
160C KXIG3D(10,*) : index of 2nd knot in the Yknot vector corresponding to the element
161C KXIG3D(11,*) : index of 2nd knot in the Zknot vector corresponding to the element
162C KXIG3D(12,*) : number of element's cuts needed in the X direction
163C KXIG3D(13,*) : number of element's cuts needed in the Y direction
164C KXIG3D(14,*) : number of element's cuts needed in the Z direction
165C=======================================================================
166C
167
168cc LES ID VOISINS NE CORRESPONDENT PAS AU INITIAL CUT
169
170 IF(kxig3d(idnbcut,idneighbour)==1) THEN
171 idcut_voisin = 0
172 ELSE
173 idcut_voisin = tab_oldidcut(dir,idneighbour)-kxig3d(idnbcut,idneighbour)+1
174 ENDIF
175C
176C
177 RETURN
178 END
#define my_real
Definition cppsort.cpp:32
subroutine find_neighbourknot(idneighbour, kxig3d, tab_oldidcut, idnbcut, dir, idcut_voisin)
subroutine find_newknot(iel, kxig3d, knot, dir, iad_knot, nknot1, nknot2, nknot3, idcut, newknot)