OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
fill_clause_node_box.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine fill_clause_node_box (ibox, x, skew, set_title, keyset, boxlist, boxlist_size, boxnds, sz_boxnds)
recursive subroutine node_box (ib, ibox, x, skew, set_title, keyset, boxnds, sz_boxnds)

Function/Subroutine Documentation

◆ fill_clause_node_box()

subroutine fill_clause_node_box ( type (box_), dimension(nbbox) ibox,
x,
skew,
character(len=nchartitle) set_title,
character(len=ncharfield) keyset,
integer, dimension(*) boxlist,
integer boxlist_size,
integer, dimension(*) boxnds,
integer sz_boxnds )

Definition at line 34 of file fill_clause_node_box.F.

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
#define my_real
Definition cppsort.cpp:32
recursive subroutine node_box(ib, ibox, x, skew, set_title, keyset, boxnds, sz_boxnds)
integer, parameter nchartitle
integer, parameter ncharfield
integer, parameter set_add
add operator
Definition set_mod.F:47
subroutine set_merge_simple(set_entity, nb_set_entity, clause_entity, nb_clause_entity, result, nb_result, clause_operator)

◆ node_box()

recursive subroutine node_box ( integer ib,
type (box_), dimension(nbbox) ibox,
x,
skew,
character(len=nchartitle) set_title,
character(len=ncharfield) keyset,
integer, dimension(*) boxnds,
integer sz_boxnds )

Definition at line 116 of file fill_clause_node_box.F.

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
integer, parameter set_delete
delete operator
Definition set_mod.F:48
subroutine simple_node_box(ibox, x, skew, ib, nd_array, nd_size)