OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
analyse_node.h File Reference

Go to the source code of this file.

Functions

void analyse_node_scan (int *itab)
void analyse_node_set (int nod_id, int type)

Function Documentation

◆ analyse_node_scan()

void analyse_node_scan ( int * itab)

Definition at line 50 of file analyse_node.c.

51{
52 int i;
53 int nbshell, nbvolu, nbtruss, nbbeam, nbspring, nbrbm, nbrbs, nbmass, nb2n, nbused;
54 int nbstruct, nb2nds, nbrb, nbelt, nball;
55 int node_flying=0;
56 int node_rbm_struct=0;
57 int node_mass_elt=0;
58 int node_mass_flying=0;
59 int node_truss_elt=0;
60 int node_beam_elt=0;
61 int node_spring_elt=0;
62 int node_rbs_elt=0;
63
64 for(i=0; i<NB_NODE; i++)
65 {
66 /* Shell */
67 nbshell = (TAB_NODE[i] >> 0) & 0x1;
68
69 /* Volu */
70 nbvolu = (TAB_NODE[i] >> 1) & 0x1;
71
72 /* Truss */
73 nbtruss = (TAB_NODE[i] >> 2) & 0x3;
74
75 /* Beam */
76 nbbeam = (TAB_NODE[i] >> 4) & 0x3;
77
78 /* Spring */
79 nbspring = (TAB_NODE[i] >> 6) & 0x3;
80
81 /* RigidBody_Master */
82 nbrbm = (TAB_NODE[i] >> 8) & 0x1;
83
84 /* RigidBody_Slave */
85 nbrbs = (TAB_NODE[i] >> 9) & 0x1;
86
87 /* Mass */
88 nbmass = (TAB_NODE[i] >> 10) & 0x1;
89
90 /* 2N */
91 nb2n = (TAB_NODE[i] >> 11) & 0x3;
92
93 /* Used */
94 nbused = (TAB_NODE[i] >> 13) & 0x1;
95
96 nbstruct = nbshell + nbvolu;
97 nb2nds = nbtruss + nbbeam + nb2n;
98 nbrb = nbrbm + nbrbs;
99 nbelt = nbstruct + nb2nds + nbspring + nbrb;
100 nball = nbelt + nbmass + nbused;
101
102 if (nball == 0)
103 {
104 analyse_stack_int(tab_id[i]);
105 analyse_call_error(AN_WARNING, 447, ANINFO_BLIND_2);
106
107 node_flying++;
108 }
109
110 if ((nbrbm == 1) && ((nbstruct + nb2nds + nbspring + nbrbs) != 0))
111 {
112 analyse_stack_int(tab_id[i]);
113 analyse_call_error(AN_WARNING, 448, ANINFO_BLIND_2);
114
115 node_rbm_struct++;
116 }
117
118 if ((nbmass == 1) && (nbelt == 0))
119 {
120 analyse_stack_int(tab_id[i]);
121 analyse_call_error(AN_INFO, 449, ANINFO_BLIND_2);
122
123 node_mass_elt++;
124 }
125
126 if ((nbmass == 1) && (nball == 1))
127 {
128 analyse_stack_int(tab_id[i]);
129 analyse_call_error(AN_WARNING, 450, ANINFO_BLIND_2);
130
131 node_mass_flying++;
132 }
133
134 if ((nbtruss == 1) && (nbelt == 1))
135 {
136 analyse_stack_int(tab_id[i]);
137 analyse_call_error(AN_WARNING, 451, ANINFO_BLIND_2);
138
139 node_truss_elt++;
140 }
141
142 if ((nbbeam == 1) && (nbelt == 1))
143 {
144 analyse_stack_int(tab_id[i]);
145 analyse_call_error(AN_WARNING, 452, ANINFO_BLIND_2);
146
147 node_beam_elt++;
148 }
149
150 if ((nbspring == 1) && (nbelt == 1))
151 {
152 analyse_stack_int(tab_id[i]);
153 analyse_call_error(AN_WARNING, 453, ANINFO_BLIND_2);
154
155 node_spring_elt++;
156 }
157
158 if ((nbrbs == 1) && (nbelt == 1))
159 {
160 analyse_stack_int(tab_id[i]);
161 if ( nbmass == 1)
162 {
163 analyse_call_error(AN_WARNING, 455, ANINFO_BLIND_2);
164 }
165 else
166 {
167 analyse_call_error(AN_WARNING, 454, ANINFO_BLIND_2);
168 }
169
170 node_rbs_elt++;
171 }
172
173 }
174
175 analyse_stack_int(node_flying);
177
178 analyse_stack_int(node_rbm_struct);
180
181 analyse_stack_int(node_mass_elt);
183
184 analyse_stack_int(node_mass_flying);
186
187 analyse_stack_int(node_truss_elt);
189
190 analyse_stack_int(node_beam_elt);
192
193 analyse_stack_int(node_spring_elt);
195
196 analyse_stack_int(node_rbs_elt);
198
199}
void analyse_stack_int(int i)
Definition analyse.c:334
void analyse_call_check(int id)
Definition analyse.c:802
void analyse_call_error(int type, int id, int mode)
Definition analyse.c:580
static int NB_NODE
static int * TAB_NODE

◆ analyse_node_set()

void analyse_node_set ( int nod_id,
int type )

Definition at line 224 of file analyse_node.c.

225{
226 /*
227 WARNING : START OF TAB IN FORTRAN AND C IS SHIFTED BY 1 :
228 nod_id = 1, is the first elt in model, this means tab_node[0]
229 */
230 nod_id = nod_id - 1;
231
232 switch(type)
233 {
234 case CHECK_SHELL:
235 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x1;
236 break;
237
238 case CHECK_VOLU:
239 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x2;
240 break;
241
242 case CHECK_TRUSS:
243 if(TAB_NODE[nod_id]&0x4)
244 {
245 if(!(TAB_NODE[nod_id]&0x8))
246 {
247 TAB_NODE[nod_id] = TAB_NODE[nod_id] & ~0x4;
248 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x8;
249 }
250 }
251 else
252 {
253 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x4;
254 }
255 break;
256
257 case CHECK_BEAM:
258 if(TAB_NODE[nod_id]&0x10)
259 {
260 if(!(TAB_NODE[nod_id]&0x20))
261 {
262 TAB_NODE[nod_id] = TAB_NODE[nod_id] & ~0x10;
263 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x20;
264 }
265 }
266 else
267 {
268 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x10;
269 }
270 break;
271
272 case CHECK_SPRING:
273 if(TAB_NODE[nod_id]&0x40)
274 {
275 if(!(TAB_NODE[nod_id]&0x80))
276 {
277 TAB_NODE[nod_id] = TAB_NODE[nod_id] & ~0x40;
278 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x80;
279 }
280 }
281 else
282 {
283 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x40;
284 }
285 break;
286
287
288 case CHECK_RB_M:
289 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x100;
290 break;
291
292 case CHECK_RB_S:
293 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x200;
294 break;
295
296 case CHECK_MASS:
297 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x400;
298 break;
299
300 case CHECK_2N:
301 if(TAB_NODE[nod_id]&0x800)
302 {
303 if(!(TAB_NODE[nod_id]&0x1000))
304 {
305 TAB_NODE[nod_id] = TAB_NODE[nod_id] & ~0x800;
306 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x1000;
307 }
308 }
309 else
310 {
311 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x800;
312 }
313 break;
314
315 case CHECK_USED:
316 TAB_NODE[nod_id] = TAB_NODE[nod_id] | 0x2000;
317 break;
318 }
319}