OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
fill_clause_rbody_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_rbody_box (ibox, x, skew, set_title, keyset, boxlist, boxlist_size, boxnds, sz_boxnds, rby_msn)
recursive subroutine rbody_box (ib, ibox, x, skew, set_title, keyset, boxnds, sz_boxnds, rby_msn)

Function/Subroutine Documentation

◆ fill_clause_rbody_box()

subroutine fill_clause_rbody_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,
integer, dimension(2,nrbody), intent(in) rby_msn )

Definition at line 34 of file fill_clause_rbody_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 INTEGER, INTENT(IN), DIMENSION(2,NRBODY) :: RBY_MSN
62
63 my_real x(3,*),skew(lskew,*)
64
65 CHARACTER(LEN=NCHARFIELD):: KEYSET
66 CHARACTER(LEN=NCHARTITLE):: SET_TITLE
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER I,B_NDS_SIZE,NB_RESULT,
71 . ID,IB,NB_BOX_OF_BOX,J,CLAUSE_OPERATOR
72 LOGICAL BOOL
73 INTEGER, DIMENSION(:) , ALLOCATABLE :: B_NDS,RESULT
74C-----------------------------------------------
75 ALLOCATE(b_nds(nrbody))
76 ALLOCATE(result(nrbody))
77
78!
79 ! Tag nodes from boxes
80 ! ---------------------
81 clause_operator = set_add
82 sz_boxnds = 0
83 DO i=1,boxlist_size
84 ib = boxlist(i)
85 b_nds_size = 0
86
87 CALL rbody_box( ib ,
88 * ibox ,x ,skew ,set_title ,keyset,
89 * b_nds, b_nds_size,rby_msn)
90
91
92 CALL set_merge_simple( boxnds, sz_boxnds ,
93 * b_nds, b_nds_size ,
94 * result, nb_result ,
95 * clause_operator)
96
97 boxnds(1:nb_result) = result(1:nb_result)
98 sz_boxnds = nb_result
99 ENDDO ! DO I=1,BOXLIST_SIZE
100
101C-------
102 RETURN
#define my_real
Definition cppsort.cpp:32
recursive subroutine rbody_box(ib, ibox, x, skew, set_title, keyset, boxnds, sz_boxnds, rby_msn)
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)

◆ rbody_box()

recursive subroutine rbody_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,
integer, dimension(2,nrbody), intent(in) rby_msn )

Definition at line 117 of file fill_clause_rbody_box.F.

120C-----------------------------------------------
121C ROUTINE DESCRIPTION :
122C ===================
123C Recursive routine - Go through tree and fill the Node Box array
124C
125C------------------------------------------------------------------
126C DUMMY ARGUMENTS DESCRIPTION:
127C ===================
128C
129C NAME DESCRIPTION
130C
131C IB Recursive indice / Current Box to treat
132C IBOX IBOX Structure
133C SKEW Skew Structure
134C SET_TITLE Title for Error message
135C KEYSET KEYSET for Error message
136C BOXNDS merged node array
137C SZ_BOXNDS number of stacked nodes in BOXNDS
138C============================================================================
139C-----------------------------------------------
140C M o d u l e s
141C-----------------------------------------------
142 USE optiondef_mod
143 USE message_mod
145 USE set_mod , ONLY : set_add,set_delete
146C-----------------------------------------------
147C I m p l i c i t T y p e s
148C-----------------------------------------------
149#include "implicit_f.inc"
150C-----------------------------------------------
151C C o m m o n B l o c k s
152C-----------------------------------------------
153#include "com04_c.inc"
154#include "param_c.inc"
155C-----------------------------------------------
156C D u m m y A r g u m e n t s
157C-----------------------------------------------
158 TYPE (BOX_) , DIMENSION(NBBOX) :: IBOX
159 INTEGER, INTENT(IN), DIMENSION(2,NRBODY) :: RBY_MSN
160
161 INTEGER BOXNDS(*)
162 INTEGER IB,SZ_BOXNDS
163
164 my_real
165 . x(3,*),skew(lskew,*)
166
167 CHARACTER(LEN=NCHARFIELD) :: KEYSET
168 CHARACTER(LEN=NCHARTITLE)::SET_TITLE
169C-----------------------------------------------
170C L o c a l V a r i a b l e s
171C-----------------------------------------------
172 INTEGER I,B_NDS_SIZE,NB_RESULT,
173 . NB_BOX_OF_BOX,J,NEW_BOX,CLAUSE_OPERATOR
174 LOGICAL BOOL
175 INTEGER, DIMENSION(:) , ALLOCATABLE :: B_NDS,RESULT
176
177C-----------------------------------------------
178
179
180 nb_box_of_box = ibox(ib)%NBOXBOX
181
182 IF ( nb_box_of_box == 0 ) THEN
183
184 ! Fill SIMPLE Boxes
185 ! ---------------------
186 sz_boxnds = 0
187 CALL simple_rbody_box(ibox, x, skew, ib,
188 * boxnds, sz_boxnds,rby_msn)
189
190 ELSE
191 ALLOCATE(b_nds(nrbody))
192 ALLOCATE(result(nrbody))
193
194
195 DO i=1,nb_box_of_box
196
197 j = ibox(ib)%IBOXBOX(i) ! could be negative
198 new_box = abs(j)
199
200 b_nds_size=0
201
202 CALL rbody_box ( new_box ,
203 * ibox ,x ,skew ,set_title ,keyset,
204 * b_nds, b_nds_size ,rby_msn)
205
206 IF (j < 0)THEN
207 clause_operator = set_delete
208 ELSE
209 clause_operator = set_add
210 ENDIF
211
212 CALL set_merge_simple( boxnds, sz_boxnds ,
213 * b_nds, b_nds_size ,
214 * result, nb_result ,
215 * clause_operator)
216
217 boxnds(1:nb_result) = result(1:nb_result)
218 sz_boxnds = nb_result
219 ENDDO
220
221 ENDIF
222
223C-------
224 RETURN
integer, parameter set_delete
delete operator
Definition set_mod.F:48
subroutine simple_rbody_box(ibox, x, skew, ib, nd_array, nd_size, rby_msn)