OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
fill_clause_node_box.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!|| fill_clause_node_box ../starter/source/model/sets/fill_clause_node_box.F
25!||--- called by ------------------------------------------------------
26!|| create_node_box ../starter/source/model/sets/create_node_box.F
27!||--- calls -----------------------------------------------------
28!|| node_box ../starter/source/model/sets/fill_clause_node_box.F
29!|| set_merge_simple ../starter/source/model/sets/set_merge_simple.f
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!|| set_mod ../starter/share/modules1/set_mod.F
33!||====================================================================
34 SUBROUTINE fill_clause_node_box( IBOX ,X ,SKEW ,SET_TITLE ,KEYSET,
35 * BOXLIST, BOXLIST_SIZE,
36 * BOXNDS, SZ_BOXNDS )
37
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
42 USE message_mod
44 USE set_mod , ONLY : set_add
45C-----------------------------------------------
46C I m p l i c i t T y p e s
47C-----------------------------------------------
48#include "implicit_f.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com04_c.inc"
53#include "param_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 TYPE (BOX_), DIMENSION(NBBOX) :: IBOX
58
59 INTEGER BOXNDS(*),BOXLIST(*)
60 INTEGER SZ_BOXNDS, BOXLIST_SIZE
61
62 my_real x(3,*),skew(lskew,*)
63
64 CHARACTER(LEN=NCHARFIELD) :: KEYSET
65 CHARACTER(LEN=NCHARTITLE) :: SET_TITLE
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER I,B_NDS_SIZE,NB_RESULT,
70 . ID,IB,NB_BOX_OF_BOX,J,CLAUSE_OPERATOR
71 LOGICAL BOOL
72 INTEGER, DIMENSION(:) , ALLOCATABLE :: B_NDS,RESULT
73C-----------------------------------------------
74 ALLOCATE(b_nds(numnod))
75 ALLOCATE(result(numnod))
76
77!
78 ! Tag nodes from boxes
79 ! ---------------------
80 clause_operator = set_add
81 sz_boxnds = 0
82 DO i=1,boxlist_size
83 ib = boxlist(i)
84 b_nds_size = 0
85
86 CALL node_box( ib ,
87 * ibox ,x ,skew ,set_title ,keyset,
88 * b_nds, b_nds_size)
89
90
91 CALL set_merge_simple( boxnds, sz_boxnds ,
92 * b_nds, b_nds_size ,
93 * result, nb_result ,
94 * clause_operator)
95
96 boxnds(1:nb_result) = result(1:nb_result)
97 sz_boxnds = nb_result
98 ENDDO ! DO I=1,BOXLIST_SIZE
99
100C-------
101 RETURN
102 END
103
104
105!||====================================================================
106!|| node_box ../starter/source/model/sets/fill_clause_node_box.f
107!||--- called by ------------------------------------------------------
108!|| fill_clause_node_box ../starter/source/model/sets/fill_clause_node_box.F
109!||--- calls -----------------------------------------------------
110!|| set_merge_simple ../starter/source/model/sets/set_merge_simple.F
111!|| simple_node_box ../starter/source/model/sets/simple_node_box.f
112!||--- uses -----------------------------------------------------
113!|| message_mod ../starter/share/message_module/message_mod.F
114!|| set_mod ../starter/share/modules1/set_mod.F
115!||====================================================================
116 RECURSIVE SUBROUTINE node_box( IB ,
117 * IBOX ,X ,SKEW ,SET_TITLE ,KEYSET,
118 * BOXNDS, SZ_BOXNDS )
119C-----------------------------------------------
120C ROUTINE DESCRIPTION :
121C ===================
122C Recursive routine - Go through tree and fill the Node Box array
123C
124C------------------------------------------------------------------
125C DUMMY ARGUMENTS DESCRIPTION:
126C ===================
127C
128C NAME DESCRIPTION
129C
130C IB Recursive indice / Current Box to treat
131C IBOX IBOX Structure
132C SKEW Skew Structure
133C SET_TITLE Title for Error message
134C KEYSET KEYSET for Error message
135C BOXNDS merged node array
136C SZ_BOXNDS number of stacked nodes in BOXNDS
137C============================================================================
138C-----------------------------------------------
139C M o d u l e s
140C-----------------------------------------------
141 USE optiondef_mod
142 USE message_mod
144 USE set_mod , ONLY : set_add,set_delete
145C-----------------------------------------------
146C I m p l i c i t T y p e s
147C-----------------------------------------------
148#include "implicit_f.inc"
149C-----------------------------------------------
150C C o m m o n B l o c k s
151C-----------------------------------------------
152#include "com04_c.inc"
153#include "param_c.inc"
154C-----------------------------------------------
155C D u m m y A r g u m e n t s
156C-----------------------------------------------
157 TYPE (box_) , DIMENSION(NBBOX) :: ibox
158
159 INTEGER boxnds(*)
160 INTEGER ib,sz_boxnds
161
162 my_real
163 . x(3,*),skew(lskew,*)
164
165 CHARACTER(LEN=NCHARFIELD) :: keyset
166 CHARACTER(LEN=NCHARTITLE)::set_title
167C-----------------------------------------------
168C L o c a l V a r i a b l e s
169C-----------------------------------------------
170 INTEGER i,b_nds_size,nb_result,
171 . nb_box_of_box,j,new_box,clause_operator
172 LOGICAL bool
173 INTEGER, DIMENSION(:) , ALLOCATABLE :: b_nds,result
174
175C-----------------------------------------------
176
177
178 nb_box_of_box = ibox(ib)%NBOXBOX
179
180 IF ( nb_box_of_box == 0 ) THEN
181
182 ! Fill SIMPLE Boxes
183 ! ---------------------
184 sz_boxnds = 0
185 CALL simple_node_box(ibox, x, skew, ib,
186 * boxnds, sz_boxnds)
187
188 ELSE
189 ALLOCATE(b_nds(numnod))
190 ALLOCATE(result(numnod))
191
192
193 DO i=1,nb_box_of_box
194
195 j = ibox(ib)%IBOXBOX(i) ! could be negative
196 new_box = abs(j)
197
198 b_nds_size=0
199
200 CALL node_box ( new_box ,
201 * ibox ,x ,skew ,set_title ,keyset,
202 * b_nds, b_nds_size )
203
204 IF (j < 0)THEN
205 clause_operator = set_delete
206 ELSE
207 clause_operator = set_add
208 ENDIF
209
210 CALL set_merge_simple( boxnds, sz_boxnds ,
211 * b_nds, b_nds_size ,
212 * result, nb_result ,
213 * clause_operator)
214
215 boxnds(1:nb_result) = result(1:nb_result)
216 sz_boxnds = nb_result
217 ENDDO
218
219 ENDIF
220
221C-------
222 RETURN
223 END
224
225
226
227
228
229
230
#define my_real
Definition cppsort.cpp:32
recursive subroutine node_box(ib, ibox, x, skew, set_title, keyset, boxnds, sz_boxnds)
subroutine fill_clause_node_box(ibox, x, skew, set_title, keyset, boxlist, boxlist_size, boxnds, sz_boxnds)
integer, parameter nchartitle
integer, parameter ncharfield
integer, parameter set_add
add operator
Definition set_mod.F:47
integer, parameter set_delete
delete operator
Definition set_mod.F:48
subroutine set_merge_simple(set_entity, nb_set_entity, clause_entity, nb_clause_entity, result, nb_result, clause_operator)
subroutine simple_node_box(ibox, x, skew, ib, nd_array, nd_size)
program starter
Definition starter.F:39