1 /*
2 copyright (c) 1998 dennis roddeman
3 email: dennis.roddeman@feat.nl
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation
17 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA
18 */
19
20 #include "tochnog.h"
21
print_gid_5(long int task)22 long int print_gid_5( long int task )
23
24 {
25 long int inol=0, inod=0, element=0, max_node=0, max_element=0, name=0,
26 element_group=0, length=0, idim=0, jdim=0, ipuknwn=0, iuknwn=0,
27 icalcul=0, nval=0, ready=0, indx=0, eigen_analysis=0, neigen=0,
28 isoparametric_name=0, length_post_calcul_scal_vec_mat=0,
29 load_type=0, data_type=0, data_loc=0, desc_comp=0,
30 n=0, swit=0, ldum=0, nnol=0, type=0, ieigen=0,
31 mesh_elements=0, bound_elements=0, bound_nodes=0,
32 intersection=0, itmp=0, itendon=0, ntendon=0,
33 nmesh=0, nbound=0, first_time_gid=0,
34 print_deformation=0, element_empty=-NO, icontrol=0,
35 control_print_gid_mesh=0, idum[1],
36 *dof_amount=NULL, *dof_label=NULL, *dof_type=NULL,
37 *post_calcul_scal_vec_mat=NULL, *dof_scal_vec_mat=NULL,
38 *nodes=NULL, *el=NULL;
39 double time_current=0., control_print_gid_time=0.,
40 step_val=0., tmp=0., ddum[1], coord[MDIM],
41 coord_start_refined[MDIM],
42 *element_tendon_intersections=NULL, *control_eigen_values=NULL,
43 *node_eigen=NULL, *node_dof=NULL,
44 *node_dof_calcul=NULL;
45 char str[MCHAR], descr_menu[MCHAR], filename[MCHAR],
46 filename_with_number[MCHAR], outname[MCHAR];
47
48 if ( ndim==1 ) return 1;
49
50 swit = set_swit(-1,-1,"print_gid_5");
51 if ( swit ) pri( "In routine PRINT_GID_5" );
52
53 if ( task!=-YES && task!=-SEPARATE ) {
54 pri( "Error detected in gid 5 printing." );
55 pri( "Gid 5 printing doesn't understand ", task );
56 exit_tn_on_error();
57 }
58
59 dof_amount = get_new_int(MUKNWN);
60 dof_label = get_new_int(MUKNWN);
61 dof_type = get_new_int(MUKNWN);
62 dof_scal_vec_mat = get_new_int(MUKNWN);
63 post_calcul_scal_vec_mat = get_new_int(DATA_ITEM_SIZE);
64 nodes = get_new_int(MAXIMUM_NODE);
65 el = get_new_int(MAXIMUM_NODE+1);
66 element_tendon_intersections = get_new_dbl(DATA_ITEM_SIZE);
67 control_eigen_values = get_new_dbl(DATA_ITEM_SIZE);
68
69 db( ICONTROL, 0, &icontrol, ddum, ldum, VERSION_NORMAL, GET_IF_EXISTS );
70 db( TIME_CURRENT, 0, idum, &time_current, ldum, VERSION_NORMAL, GET_IF_EXISTS );
71 if ( db( CONTROL_PRINT_GID_TIME, 0, idum, &control_print_gid_time,
72 ldum, VERSION_NORMAL, GET_IF_EXISTS ) ) {
73 if ( time_current<=control_print_gid_time && task!=-SEPARATE ) return 1;
74 }
75 else {
76 first_time_gid = 1;
77 }
78 length = 1;
79 db( CONTROL_PRINT_GID_TIME, 0, idum, &time_current, length, VERSION_NORMAL, PUT );
80
81 db_copy( NODE_RHSIDE, NODE_RHSIDE_PRINT, VERSION_NORMAL );
82 db_version_copy( VERSION_NORMAL, VERSION_PRINT );
83 renumbering( VERSION_PRINT, NO, 1, 1, idum, idum );
84
85 db_highest_index( NODE, max_node, VERSION_PRINT );
86 if ( max_node<0 ) return 1;
87 db_highest_index( ELEMENT, max_element, VERSION_PRINT );
88 if ( max_element<0 ) return 1;
89
90 if ( db( CONTROL_EIGEN_VALUES, 0, idum, control_eigen_values,
91 neigen, VERSION_NORMAL, GET_IF_EXISTS ) ) eigen_analysis = 1;
92 else {
93 eigen_analysis = 0;
94 neigen = 1;
95 }
96
97 strcpy( filename_with_number, data_file_base );
98 if ( task==-SEPARATE ) {
99 db( CONTROL_PRINT_GID_MESH, 0, &control_print_gid_mesh, ddum,
100 length, VERSION_NORMAL, GET_IF_EXISTS );
101 if ( control_print_gid_mesh<10 )
102 strcat( filename_with_number, "00" );
103 else if ( control_print_gid_mesh<100 )
104 strcat( filename_with_number, "0" );
105 long_to_a( control_print_gid_mesh, str );
106 strcat( filename_with_number, str );
107 control_print_gid_mesh++; length=1;
108 db( CONTROL_PRINT_GID_MESH, 0, &control_print_gid_mesh, ddum,
109 length, VERSION_NORMAL, PUT );
110 }
111
112 strcpy( filename, filename_with_number );
113 if ( ndim==2 )
114 strcat( filename, "5.flavia.dat" );
115 else
116 strcat( filename, "5.flavia.msh" );
117 if ( first_time_gid || task==-SEPARATE ) {
118 ofstream outmesh( filename );
119 outmesh.close();
120 }
121 ofstream outmesh( filename, ios::app );
122 outmesh.precision(TN_PRECISION);
123
124 strcpy( filename, filename_with_number );
125 strcat( filename, "5.flavia.res" );
126 if ( first_time_gid || task==-SEPARATE ) {
127 ofstream outres( filename );
128 outres.close();
129 }
130 ofstream outres( filename, ios::app );
131 outres.precision(TN_PRECISION);
132 outres.setf(ios::showpoint);
133
134 // determine the type of the isoparametric elements in the mesh
135 for ( element=1; element<=max_element; element++ ) {
136 if ( db_active_index( ELEMENT, element, VERSION_PRINT ) ) {
137 db( ELEMENT, element, el, ddum, length, VERSION_PRINT, GET );
138 name = el[0];
139 if ( name==-TRIA3 ) itmp = 3;
140 else if ( name==-TRIA6 ) itmp = 6;
141 else if ( name==-QUAD4 ) itmp = 4;
142 else if ( name==-QUAD9 ) itmp = 9;
143 else if ( name==-TET4 ) itmp = 3;
144 else if ( name==-TET10 ) itmp = 3;
145 else if ( name==-HEX8 ) itmp = 1;
146 else if ( name==-HEX27 ) itmp = 1;
147 else itmp = -1;
148 if ( itmp>0 ) {
149 type = itmp;
150 isoparametric_name = name;
151 }
152 }
153 }
154
155 // determine the number of elements
156 mesh_elements = bound_elements = 0;
157 bound_nodes = max_node;
158 for ( element=1; element<=max_element; element++ ) {
159 if ( db_active_index( ELEMENT, element, VERSION_PRINT ) ) {
160 db( ELEMENT, element, el, ddum, length, VERSION_PRINT, GET );
161 name = el[0];
162 element_empty=-NO;
163 db( ELEMENT_EMPTY, element, &element_empty, ddum,
164 ldum, VERSION_PRINT, GET_IF_EXISTS );
165 if ( element_empty==-NO || element_empty==-FRONT ) {
166 if ( name==isoparametric_name ) mesh_elements++;
167 if ( name==-TRUSS || name==-BEAM ) bound_elements++;
168 if ( db_active_index( ELEMENT_TENDON_NUMBER, element, VERSION_PRINT ) ) {
169 ntendon = db_len( ELEMENT_TENDON_NUMBER, element, VERSION_PRINT );
170 bound_elements += ntendon;
171 bound_nodes += ntendon * 2;
172 }
173 }
174 }
175 }
176
177 if ( bound_elements )
178 strcpy( filename, "lines.bon" );
179 else
180 strcpy( filename, "tn.tmp" );
181 if ( first_time_gid ) {
182 ofstream outbound( filename );
183 outbound.close();
184 }
185 ofstream outbound( filename, ios::app );
186
187 // free initial lines for mesh file
188 outmesh << " \n";
189 outmesh << " \n";
190 outmesh << " \n";
191 outmesh << " \n";
192 outmesh << " \n";
193 outmesh << "n_mesh_element n_mesh_points n_element_type:\n";
194 outmesh << mesh_elements << " " << max_node << " " << type << "\n";
195
196 // free initial lines for boundary file
197 if ( bound_elements ) {
198 outbound << " \n";
199 outbound << " \n";
200 outbound << " \n";
201 outbound << " \n";
202 outbound << " \n";
203 outbound << "n_bound_element n_bound_points n_element_type:\n";
204 outbound << bound_elements << " " << bound_nodes << " 11" << "\n";
205 }
206
207 outmesh << "Coordinates:\n";
208 if ( bound_elements ) outbound << "Coordinates:\n";
209 for ( inod=1; inod<=max_node; inod++ ) {
210 if ( db_active_index( NODE_START_REFINED, inod, VERSION_PRINT ) ) {
211 outmesh << inod << " ";
212 if ( bound_elements ) outbound << inod << " ";
213 db( NODE_START_REFINED, inod, idum, coord_start_refined, ldum, VERSION_PRINT, GET );
214 for ( idim=0; idim<ndim; idim++ ) {
215 outmesh << coord_start_refined[idim] << " ";
216 if ( bound_elements ) outbound << coord_start_refined[idim] << " ";
217 }
218 outmesh << "\n";
219 if ( bound_elements ) outbound << "\n";
220 }
221 }
222 // tendon coordinates
223 for ( element=1; element<=max_element; element++ ) {
224 if ( db_active_index( ELEMENT, element, VERSION_PRINT ) ) {
225 db( ELEMENT, element, el, ddum, length, VERSION_PRINT, GET );
226 if ( db_active_index( ELEMENT_TENDON_NUMBER, element, VERSION_PRINT ) ) {
227 ntendon = db_len( ELEMENT_TENDON_NUMBER, element, VERSION_PRINT );
228 ldum =ntendon * 2 * ndim;
229 db( ELEMENT_TENDON_INTERSECTIONS, element, idum,
230 element_tendon_intersections, ldum, VERSION_PRINT, GET_AND_CHECK );
231 for ( itendon=0; itendon<ntendon; itendon++ ) {
232 for ( intersection=0; intersection<2; intersection++ ) {
233 outbound << inod << " ";
234 for ( idim=0; idim<ndim; idim++ ) {
235 outbound <<
236 element_tendon_intersections[itendon*2*ndim+intersection*ndim+idim] << " ";
237 }
238 outbound << "\n";
239 inod++;
240 }
241 }
242 }
243 }
244 }
245
246 // connectivity
247 nmesh = nbound = 0;
248 outmesh << "Connectivities:\n";
249 if ( bound_elements ) outbound << "Connectivities:\n";
250 for ( element=1; element<=max_element; element++ ) {
251 if ( db_active_index( ELEMENT, element, VERSION_PRINT ) ) {
252 if ( db_active_index( ELEMENT_GROUP, element, VERSION_PRINT ) )
253 db( ELEMENT_GROUP, element, &element_group, ddum, ldum, VERSION_PRINT, GET );
254 else
255 element_group = 0;
256 element_empty = -NO;
257 db( ELEMENT_EMPTY, element, &element_empty, ddum,
258 ldum, VERSION_PRINT, GET_IF_EXISTS );
259 if ( element_empty==-NO || element_empty==-FRONT ) {
260 db( ELEMENT, element, el, ddum, length, VERSION_PRINT, GET );
261 name = el[0];
262 nnol = length - 1; array_move( &el[1], nodes, nnol );
263 if ( name==-TRIA3 ) {
264 nmesh++;
265 outmesh << nmesh << " ";
266 outmesh << nodes[0] << " " << nodes[1] << " " << nodes[2] << " ";
267 outmesh << element_group << "\n";
268 }
269 else if ( name==-TRIA6 ) {
270 nmesh++;
271 outmesh << nmesh << " ";
272 outmesh << nodes[0] << " " << nodes[1] << " " << nodes[2] << " " <<
273 nodes[4] << " " << nodes[5] << " " << nodes[3] << " ";
274 outmesh << element_group << "\n";
275 }
276 else if ( name==-QUAD4 ) {
277 nmesh++;
278 outmesh << nmesh << " ";
279 outmesh << nodes[0] << " " << nodes[1] << " " << nodes[3] << " " << nodes[2] << " ";
280 outmesh << element_group << "\n";
281 }
282 else if ( name==-QUAD9 ) {
283 nmesh++;
284 outmesh << nmesh << " ";
285 outmesh << nodes[0] << " " << nodes[1] << " " << nodes[2] << " " <<
286 nodes[5] << " " << nodes[8] << " " << nodes[7] << " " <<
287 nodes[6] << " " << nodes[3] << " " << nodes[4] << " ";
288 outmesh << element_group << "\n";
289 }
290 else if ( name==-TET4 ) {
291 nmesh++;
292 outmesh << nmesh << " ";
293 outmesh << nodes[0] << " " << nodes[1] << " " << nodes[2] << " " << nodes[3] << " ";
294 outmesh << element_group << "\n";
295 }
296 else if ( name==-TET10 ) {
297 nmesh++;
298 outmesh << nmesh << " ";
299 outmesh << nodes[0] << " " << nodes[2] << " " << nodes[5] << " " << nodes[9] << " ";
300 outmesh << element_group << "\n";
301 }
302 else if ( name==-HEX8 ) {
303 nmesh++;
304 outmesh << nmesh << " ";
305 outmesh << nodes[0] << " " << nodes[1] << " " << nodes[3] << " " << nodes[2] << " " <<
306 nodes[4] << " " << nodes[5] << " " << nodes[7] << " " << nodes[6] << " ";
307 outmesh << element_group << "\n";
308 }
309 else if ( name==-HEX27 ) {
310 nmesh++;
311 outmesh << nmesh << " ";
312 outmesh << nodes[0] << " " << nodes[2] << " " << nodes[8] << " " << nodes[6] << " " <<
313 nodes[18] << " " << nodes[20] << " " << nodes[26] << " " << nodes[24] << " ";
314 outmesh << element_group << "\n";
315 }
316 else if ( name==-TRUSS ) {
317 nbound++;
318 outbound << nbound << " ";
319 outbound << nodes[0] << " " << nodes[1] << " ";
320 outbound << element_group << "\n";
321 }
322 else if ( name==-BEAM ) {
323 nbound++;
324 outbound << nbound << " ";
325 outbound << nodes[0] << " " << nodes[1] << " ";
326 outbound << element_group << "\n";
327 }
328 }
329 }
330 }
331 // tendon connectivity
332 inod = max_node;
333 for ( element=1; element<=max_element; element++ ) {
334 if ( db_active_index( ELEMENT, element, VERSION_PRINT ) ) {
335 db( ELEMENT, element, el, ddum, length, VERSION_PRINT, GET );
336 if ( db_active_index( ELEMENT_TENDON_NUMBER, element, VERSION_PRINT ) ) {
337 ntendon = db_len( ELEMENT_TENDON_NUMBER, element, VERSION_PRINT );
338 for ( itendon=0; itendon<ntendon; itendon++ ) {
339 nbound++;
340 outbound << nbound << " ";
341 for ( inol=0; inol<2; inol++ ) {
342 inod++;
343 outbound << inod << " ";
344 }
345 outbound << "100" << "\n";
346 }
347 }
348 }
349 }
350
351 // results
352 load_type = 1;
353 data_loc = 1;
354 for ( ieigen=0; ieigen<neigen; ieigen++ ) {
355 if ( eigen_analysis ) step_val = ieigen;
356 else step_val = time_current;
357
358 if ( npuknwn>0 ) {
359
360 db( DOF_LABEL, 0, dof_label, ddum, ldum, VERSION_NORMAL, GET );
361 db( DOF_TYPE, 0, dof_type, ddum, ldum, VERSION_NORMAL, GET );
362 db( DOF_AMOUNT, 0, dof_amount, ddum, ldum, VERSION_NORMAL, GET );
363 db( DOF_SCAL_VEC_MAT, 0, dof_scal_vec_mat, ddum, ldum, VERSION_NORMAL, GET );
364
365 // write scalars, vectors and tensors for primary unknowns
366 ipuknwn = 0; ready = 0;
367 while ( !ready ) {
368 iuknwn = ipuknwn*nder;
369 if ( print_deformation ) {
370 nval = ndim;
371 data_type = 2;
372 desc_comp = 1;
373 strcpy( descr_menu, "mesh_deform" );
374 outres << descr_menu << " " << load_type << " " << step_val;
375 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
376 for ( idim=0; idim<ndim; idim++ ) {
377 if ( idim==0 )
378 outres << "mesh_deform-x" << "\n";
379 else if ( idim==1 )
380 outres << "mesh_deform-y" << "\n";
381 else {
382 assert( idim==2 );
383 outres << "mesh_deform-z" << "\n";
384 }
385 }
386 }
387 else if ( dof_scal_vec_mat[iuknwn]==-SCALAR ) {
388 nval = 1;
389 data_type = 1;
390 desc_comp = 1;
391 strcpy( descr_menu, db_name(dof_label[iuknwn]) );
392 string_shorten( descr_menu, 15 );
393 outres << descr_menu << " " << load_type << " " << step_val;
394 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
395 }
396 else if ( dof_scal_vec_mat[iuknwn]==-VECTOR ) {
397 nval = dof_amount[iuknwn];
398 data_type = 2;
399 desc_comp = 1;
400 if ( dof_type[iuknwn]==-MATERI_VELOCITY_INTEGRATED )
401 strcpy( descr_menu, "materi_velint" );
402 else
403 strcpy( descr_menu, db_name(dof_type[iuknwn]) );
404 string_shorten( descr_menu, 15 );
405 outres << descr_menu << " " << load_type << " " << step_val;
406 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
407 for ( idim=0; idim<nval; idim++ ) {
408 indx = iuknwn + idim*nder;
409 outres << db_name(dof_label[indx]) << "\n";
410 }
411 }
412 else {
413 assert( dof_scal_vec_mat[iuknwn]==-MATRIX );
414 nval = 6;
415 data_type = 3;
416 desc_comp = 1;
417 strcpy( descr_menu, db_name(dof_type[iuknwn]) );
418 string_shorten( descr_menu, 15 );
419 outres << descr_menu << " " << load_type << " " << step_val;
420 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
421 for ( idim=0; idim<MDIM; idim++ ) {
422 for ( jdim=idim; jdim<MDIM; jdim++ ) {
423 indx = iuknwn + stress_indx(idim,jdim)*nder;
424 outres << db_name(dof_label[indx]) << "\n";
425 }
426 }
427 }
428 for ( inod=1; inod<=max_node; inod++ ) {
429 outres << inod << " ";
430 if ( eigen_analysis )
431 node_eigen = db_dbl( NODE_EIGEN, inod, VERSION_PRINT );
432 else
433 node_dof = db_dbl( NODE_DOF, inod, VERSION_PRINT );
434 if ( print_deformation ) {
435 db( NODE, inod, idum,
436 coord, ldum, VERSION_PRINT, GET );
437 db( NODE_START_REFINED, inod, idum,
438 coord_start_refined, ldum, VERSION_PRINT, GET );
439 for ( idim=0; idim<ndim; idim++ ) {
440 if ( materi_displacement )
441 tmp = coord[idim] + node_dof[dis_indx+idim*nder];
442 else
443 tmp = coord[idim];
444 outres << tmp-coord_start_refined[idim] << " ";
445 }
446 }
447 else if ( dof_scal_vec_mat[iuknwn]==-SCALAR ) {
448 if ( eigen_analysis )
449 tmp = node_eigen[ieigen*nuknwn+iuknwn];
450 else
451 tmp = node_dof[iuknwn];
452 outres << tmp;
453 }
454 else if ( dof_scal_vec_mat[iuknwn]==-VECTOR ) {
455 n = dof_amount[iuknwn];
456 for ( idim=0; idim<n; idim++ ) {
457 indx = iuknwn+idim*nder;
458 if ( eigen_analysis )
459 tmp = node_eigen[ieigen*nuknwn+indx];
460 else
461 tmp = node_dof[indx];
462 outres << tmp << " ";
463 }
464 }
465 else {
466 assert( dof_scal_vec_mat[iuknwn]==-MATRIX );
467 for ( idim=0; idim<MDIM; idim++ ) {
468 for ( jdim=idim; jdim<MDIM; jdim++ ) {
469 indx = iuknwn + stress_indx(idim,jdim)*nder;
470 if ( eigen_analysis )
471 tmp = node_eigen[ieigen*nuknwn+indx];
472 else
473 tmp = node_dof[indx];
474 outres << tmp << " ";
475 }
476 }
477 }
478 outres << "\n";
479 }
480 ipuknwn += nval;
481 if ( ipuknwn>=npuknwn ) {
482 if ( materi_velocity && !print_deformation ) {
483 print_deformation = 1;
484 }
485 else
486 ready = 1;
487 }
488 }
489
490 if ( !eigen_analysis && db_active_index( POST_CALCUL, 0, VERSION_NORMAL ) ) {
491
492 db( POST_CALCUL_SCAL_VEC_MAT, 0, post_calcul_scal_vec_mat,
493 ddum, length_post_calcul_scal_vec_mat, VERSION_NORMAL, GET );
494
495 // write scalars, vectors and tensors for calculated data
496 icalcul = idim = ready = 0;
497 while ( !ready ) {
498 strcpy( outname, post_calcul_names_without_extension[icalcul] );
499 if ( post_calcul_scal_vec_mat[icalcul]==-SCALAR ) {
500 nval = 1;
501 data_type = 1;
502 desc_comp = 0;
503 strcpy( descr_menu, outname );
504 string_shorten( descr_menu, 15 );
505 outres << descr_menu << " " << load_type << " " << step_val;
506 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
507 }
508 else if ( post_calcul_scal_vec_mat[icalcul]==-VECTOR ) {
509 nval = MDIM;
510 data_type = 2;
511 desc_comp = 1;
512 strcpy( descr_menu, outname );
513 string_shorten( descr_menu, 15 );
514 outres << descr_menu << " " << load_type << " " << step_val;
515 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
516 for ( idim=0; idim<MDIM; idim++ ) {
517 outres << post_calcul_names[icalcul+idim] << "\n";
518 }
519 }
520 else {
521 assert( post_calcul_scal_vec_mat[icalcul]==-MATRIX );
522 nval = 6;
523 data_type = 3;
524 desc_comp = 1;
525 strcpy( descr_menu, outname );
526 string_shorten( descr_menu, 15 );
527 outres << descr_menu << " " << load_type << " " << step_val;
528 outres << " " << data_type << " " << data_loc << " " << desc_comp << "\n";
529 for ( idim=0; idim<MDIM; idim++ ) {
530 for ( jdim=idim; jdim<MDIM; jdim++ ) {
531 indx = icalcul + stress_indx(idim,jdim)*nder;
532 outres << post_calcul_names[icalcul+indx] << "\n";
533 }
534 }
535 }
536 for ( inod=1; inod<=max_node; inod++ ) {
537 outres << inod << " ";
538 node_dof_calcul = db_dbl( NODE_DOF_CALCUL, inod, VERSION_PRINT );
539 if ( post_calcul_scal_vec_mat[icalcul]==-SCALAR ) {
540 tmp = node_dof_calcul[icalcul];
541 outres << tmp;
542 }
543 else if ( post_calcul_scal_vec_mat[icalcul]==-VECTOR ) {
544 for ( idim=0; idim<MDIM; idim++ ) {
545 indx = icalcul+idim;
546 tmp = node_dof_calcul[indx];
547 outres << tmp << " ";
548 }
549 }
550 else {
551 assert( post_calcul_scal_vec_mat[icalcul]==-MATRIX );
552 for ( idim=0; idim<MDIM; idim++ ) {
553 for ( jdim=idim; jdim<MDIM; jdim++ ) {
554 indx = icalcul + stress_indx(idim,jdim)*nder;
555 tmp = node_dof_calcul[indx];
556 outres << tmp << " ";
557 }
558 }
559 }
560 outres << "\n";
561 }
562 icalcul += nval;
563 ready = (icalcul>=length_post_calcul_scal_vec_mat);
564 }
565
566 }
567
568 }
569
570 }
571
572 delete[] dof_amount;
573 delete[] dof_label;
574 delete[] dof_type;
575 delete[] post_calcul_scal_vec_mat;
576 delete[] dof_scal_vec_mat;
577 delete[] nodes;
578 delete[] el;
579 delete[] element_tendon_intersections;
580 delete[] control_eigen_values;
581
582 outmesh.close();
583 outbound.close();
584 outres.close();
585 db_version_delete( VERSION_PRINT );
586
587 if ( swit ) pri( "Out routine PRINT_GID_5" );
588
589 return 1;
590 }
591
592