FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_dlb_data_transfer.c
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 FrontISTR Commons
3  * This software is released under the MIT License, see LICENSE.txt
4  *****************************************************************************/
5 
6 #include "hecmw_repart.h"
7 extern struct hecmwST_local_mesh *mesh;
8 extern struct hecmwST_result_data *data;
9 extern struct hecmwST_local_mesh *new_mesh;
10 extern struct hecmwST_result_data *new_data;
11 
12 void dist_dlb_free_section(struct hecmwST_section *section) {
13  if (section == NULL) return;
14  if (section->sect_type != NULL) free(section->sect_type);
15  if (section->sect_opt != NULL) free(section->sect_opt);
16  if (section->sect_mat_ID_index != NULL) free(section->sect_mat_ID_index);
17  if (section->sect_mat_ID_item != NULL) free(section->sect_mat_ID_item);
18  if (section->sect_I_index != NULL) free(section->sect_I_index);
19  if (section->sect_I_item != NULL) free(section->sect_I_item);
20  if (section->sect_R_index != NULL) free(section->sect_R_index);
21  if (section->sect_R_item != NULL) free(section->sect_R_item);
22  return;
23 }
24 
25 void dist_dlb_free_material(struct hecmwST_material *material) {
26  int i;
27 
28  if (material == NULL) return;
29  if (material->mat_name != NULL) {
30  for (i = 0; i < material->n_mat; i++) {
31  free(material->mat_name[i]);
32  }
33  }
34  free(material->mat_name);
35  if (material->mat_item_index != NULL) free(material->mat_item_index);
36  if (material->mat_subitem_index != NULL) free(material->mat_subitem_index);
37  if (material->mat_table_index != NULL) free(material->mat_table_index);
38  if (material->mat_val != NULL) free(material->mat_val);
39  if (material->mat_temp != NULL) free(material->mat_temp);
40  return;
41 }
42 
43 void dist_dlb_free_mpc(struct hecmwST_mpc *mpc) {
44  if (mpc == NULL) return;
45  if (mpc->mpc_index != NULL) free(mpc->mpc_index);
46  if (mpc->mpc_item != NULL) free(mpc->mpc_item);
47  if (mpc->mpc_dof != NULL) free(mpc->mpc_dof);
48  if (mpc->mpc_val != NULL) free(mpc->mpc_val);
49 }
50 
52  int i;
53 
54  if (amp == NULL) return;
55  if (amp->amp_name != NULL) {
56  for (i = 0; i < amp->n_amp; i++) {
57  free(amp->amp_name[i]);
58  }
59  free(amp->amp_name);
60  }
61  if (amp->amp_type_definition != NULL) free(amp->amp_type_definition);
62  if (amp->amp_type_time != NULL) free(amp->amp_type_time);
63  if (amp->amp_type_value != NULL) free(amp->amp_type_value);
64  if (amp->amp_index != NULL) free(amp->amp_index);
65  if (amp->amp_val != NULL) free(amp->amp_val);
66  if (amp->amp_table != NULL) free(amp->amp_table);
67 }
68 
70  int i;
71 
72  if (grp == NULL) return;
73  if (grp->grp_name != NULL) {
74  for (i = 0; i < grp->n_grp; i++) {
75  free(grp->grp_name[i]);
76  }
77  free(grp->grp_name);
78  }
79  if (grp->grp_index != NULL) free(grp->grp_index);
80  if (grp->grp_item != NULL) free(grp->grp_item);
81  if (grp->bc_grp_ID != NULL) free(grp->bc_grp_ID);
82  if (grp->bc_grp_type != NULL) free(grp->bc_grp_type);
83  if (grp->bc_grp_index != NULL) free(grp->bc_grp_index);
84  if (grp->bc_grp_dof != NULL) free(grp->bc_grp_dof);
85  if (grp->bc_grp_val != NULL) free(grp->bc_grp_val);
86  return;
87 }
88 
90  int i;
91 
92  if (grp == NULL) return;
93  if (grp->grp_name != NULL) {
94  for (i = 0; i < grp->n_grp; i++) {
95  free(grp->grp_name[i]);
96  }
97  free(grp->grp_name);
98  }
99  if (grp->grp_index != NULL) free(grp->grp_index);
100  if (grp->grp_item != NULL) free(grp->grp_item);
101  if (grp->bc_grp_ID != NULL) free(grp->bc_grp_ID);
102  if (grp->bc_grp_type != NULL) free(grp->bc_grp_type);
103  if (grp->bc_grp_index != NULL) free(grp->bc_grp_index);
104  if (grp->bc_grp_val != NULL) free(grp->bc_grp_val);
105  return;
106 }
107 
109  int i;
110 
111  if (grp == NULL) return;
112  if (grp->grp_name != NULL) {
113  for (i = 0; i < grp->n_grp; i++) {
114  HECMW_free(grp->grp_name[i]);
115  }
116  free(grp->grp_name);
117  }
118  if (grp->grp_index != NULL) free(grp->grp_index);
119  if (grp->grp_item != NULL) free(grp->grp_item);
120  if (grp->bc_grp_ID != NULL) free(grp->bc_grp_ID);
121  if (grp->bc_grp_type != NULL) free(grp->bc_grp_type);
122  if (grp->bc_grp_index != NULL) free(grp->bc_grp_index);
123  if (grp->bc_grp_val != NULL) free(grp->bc_grp_val);
124  return;
125 }
126 
128  mesh = (struct hecmwST_local_mesh *)malloc(sizeof(struct hecmwST_local_mesh));
129  if (mesh == NULL) HECMW_dlb_memory_exit("mesh");
130  mesh->section =
131  (struct hecmwST_section *)malloc(sizeof(struct hecmwST_section));
132  mesh->material =
133  (struct hecmwST_material *)malloc(sizeof(struct hecmwST_material));
134  mesh->mpc = (struct hecmwST_mpc *)malloc(sizeof(struct hecmwST_mpc));
135  mesh->amp =
136  (struct hecmwST_amplitude *)malloc(sizeof(struct hecmwST_amplitude));
137  mesh->node_group =
138  (struct hecmwST_node_grp *)malloc(sizeof(struct hecmwST_node_grp));
139  mesh->elem_group =
140  (struct hecmwST_elem_grp *)malloc(sizeof(struct hecmwST_elem_grp));
141  mesh->surf_group =
142  (struct hecmwST_surf_grp *)malloc(sizeof(struct hecmwST_surf_grp));
144  return;
145 }
146 
149  return;
150 }
151 
154  return;
155 }
156 
158  int i;
159 
160  if (new_mesh == NULL) return;
161  if (new_mesh->files != NULL) {
162  for (i = 0; i < new_mesh->hecmw_n_file; i++) {
163  free(new_mesh->files[i]);
164  }
165  free(new_mesh->files);
166  }
168  free(new_mesh->node_ID);
170  if (new_mesh->node != NULL) free(new_mesh->node);
179  if (new_mesh->elem_ID != NULL) free(new_mesh->elem_ID);
181  if (new_mesh->elem_type != NULL) free(new_mesh->elem_type);
186  if (new_mesh->section_ID != NULL) free(new_mesh->section_ID);
193  if (new_mesh->neighbor_pe != NULL) free(new_mesh->neighbor_pe);
195  if (new_mesh->import_item != NULL) free(new_mesh->import_item);
197  if (new_mesh->import_item != NULL) free(new_mesh->export_item);
199  if (new_mesh->import_item != NULL) free(new_mesh->shared_item);
200 
206  if (new_mesh->adapt_type != NULL) free(new_mesh->adapt_type);
207  if (new_mesh->adapt_level != NULL) free(new_mesh->adapt_level);
211  if (new_mesh->section != NULL) {
213  free(new_mesh->section);
214  }
215 
216  if (new_mesh->material != NULL) {
218  free(new_mesh->material);
219  }
220  if (new_mesh->mpc != NULL) {
222  free(new_mesh->mpc);
223  }
224  if (new_mesh->amp != NULL) {
226  free(new_mesh->amp);
227  }
228  if (new_mesh->node_group != NULL) {
230  free(new_mesh->node_group);
231  }
232  if (new_mesh->elem_group != NULL) {
234  free(new_mesh->elem_group);
235  }
236  if (new_mesh->surf_group != NULL) {
238  free(new_mesh->surf_group);
239  }
240  free(new_mesh);
241 
243 
244  return;
245 }
246 
247 void test_mesh_() {
248  int mynode, pesize, i;
249  FILE *test_fp;
250  char test_file[128];
251 
252  HECMW_Comm_rank(mesh->HECMW_COMM, &mynode);
253  HECMW_Comm_size(mesh->HECMW_COMM, &pesize);
254  /* sprintf(test_file, "test1.%d", mynode);
255  test_fp=fopen(test_file, "w");
256  for(i=0;i<mesh->import_index[mesh->n_neighbor_pe];i++)
257  fprintf(test_fp, "%d\n", mesh->import_item[i]);
258  fprintf(test_fp, "export node*****\n");
259  for(i=0;i<mesh->export_index[mesh->n_neighbor_pe];i++)
260  fprintf(test_fp, "%d\n", mesh->export_item[i]);
261  fclose(test_fp);
262 
263  fprintf(stderr, "mesh: n_node=%d\n", mesh->n_node);
264  fprintf(stderr, "mesh: n_adapt=%d\n", mesh->n_adapt);
265  */
266 
267  return;
268 }
269 
271  data = HECMW_result_read_by_fname("result-in");
272  if (data == NULL) {
274  }
275  HECMW_DEBUG(("hecmw_get_restart OK"));
276  return;
277 }
278 
279 void set_label_name(int n_component, char *label_name_f, char **label_name) {
280  int i, j, k;
281  char str_tmp[128];
282  j = 0;
283  for (i = 0; i < n_component; i++) {
284  str_tmp[0] = '\0';
285  while (label_name_f[j] == ' ') j++;
286  k = 0;
287  while (label_name_f[j] != ' ') {
288  str_tmp[k] = label_name_f[j];
289  k++;
290  j++;
291  }
292 
293  str_tmp[k] = '\0';
294  strcpy(label_name[i], str_tmp);
295  }
296  return;
297 }
298 
299 void hecmw_set_result_node_(int *nn_component, int *nn_dof, char *node_label,
300  double *node_val_item) {
301  int i;
302  if (data == NULL) {
303  data = (struct hecmwST_result_data *)malloc(
304  sizeof(struct hecmwST_result_data));
305  if (data == NULL) HECMW_dlb_memory_exit("data");
306  data->nn_component = 0;
307  data->ne_component = 0;
308  }
310  data->nn_dof = nn_dof;
311  data->node_label = (char **)calloc(data->nn_component, sizeof(char *));
312  for (i = 0; i < data->nn_component; i++)
313  data->node_label[i] = (char *)calloc(128, sizeof(char));
316  return;
317 }
318 
321  return;
322 }
323 
326  return;
327 }
328 
330  double *elem_val_item) {
331  int i;
332  if (data == NULL) {
333  data = (struct hecmwST_result_data *)malloc(
334  sizeof(struct hecmwST_result_data));
335  if (data == NULL) HECMW_dlb_memory_exit("data");
336  data->nn_component = 0;
337  data->ne_component = 0;
338  }
340  data->ne_dof = ne_dof;
341  data->elem_label = (char **)calloc(data->ne_component, sizeof(char *));
342  for (i = 0; i < data->ne_component; i++)
343  data->elem_label[i] = (char *)calloc(128, sizeof(char));
346  return;
347 }
348 
349 /*
350 extern int l_node, l_elem;
351 extern int repart_comm;
352 
353 void hecmw_add_inf_(int *allNODTOTold, int *ICELTOTold, int *SOLVER_COMM)
354 {
355  l_node = *allNODTOTold*9+1;
356  l_elem = *ICELTOTold*9+1;
357  repart_comm = *SOLVER_COMM;
358  return;
359 }
360 
361 void hecmw_set_mesh_node_(int *n_node, int *n_internal, double *node, int
362 *node_id)
363 {
364  v.mesh=(struct local_mesh *)malloc(sizeof(struct local_mesh));
365  v.mesh->n_node=*n_node;
366  v.mesh->n_internal= *n_internal;
367  v.mesh->node = node;
368  v.mesh->node_id = node_id;
369 
370  return;
371 }
372 
373 void hecmw_set_mesh_element_(int *n_elem, int *ne_internal, int *elem_type,
374  int *index_elem, int *ptr_elem, int *elem_id,
375 int *ne_internal_list)
376 {
377  v.mesh->n_elem = *n_elem;
378  v.mesh->ne_internal = *ne_internal;
379  v.mesh->elem_type = elem_type;
380  v.mesh->index_elem = index_elem;
381  v.mesh->ptr_elem = ptr_elem;
382  v.mesh->elem_id = elem_id;
383  v.mesh->ne_internal_list = ne_internal_list;
384  return;
385 }
386 
387 void hecmw_set_mesh_pe_inf_(int *n_neighbor_pe, int *neighbor_pe, int
388 *import_index, int *import_node,
389  int *export_index, int *export_node)
390 {
391  v.mesh->n_neighbor_pe = *n_neighbor_pe;
392  v.mesh->neighbor_pe = neighbor_pe;
393  v.mesh->import_index = import_index;
394  v.mesh->import_node = import_node;
395  v.mesh->export_index = export_index;
396  v.mesh->export_node = export_node;
397  return;
398 }
399 
400 void hecmw_set_mesh_adaptation_(int *CoarseGridLevels, int *HOWmanyADAPTATIONs,
401  int *wheniwasrefined_node, int *wheniwasrefined_elem,
402  int *adaptation_parent_type, int *adaptation_type,
403  int *adaptation_level, int
404 *adaptation_parent,
405  int *adaptation_children, int *index_children)
406 {
407  v.mesh->coarsegridlevels = *CoarseGridLevels;
408  v.mesh->howmanyadaptions = *HOWmanyADAPTATIONs;
409  v.mesh->wheniwasrefined_node = wheniwasrefined_node;
410  v.mesh->wheniwasrefined_elem = wheniwasrefined_elem;
411  v.mesh->adaptation_parent_type = adaptation_parent_type;
412  v.mesh->adaptation_type = adaptation_type;
413  v.mesh->adaptation_level = adaptation_level;
414  v.mesh->adaptation_parent = adaptation_parent;
415  v.mesh->adaptation_children = adaptation_children;
416  v.mesh->index_children = index_children;
417  return;
418 }
419 
420 
421 void set_grp_name(int n_group, char *grp_name_f, char **grp_name)
422 {
423  int i,j, k;
424  char str_tmp[128];
425  j = 0;
426  for (i=0; i<n_group; i++) {
427  str_tmp[0] = '\0';
428  while (grp_name_f[j] == ' ')
429  j++;
430  k = 0;
431  while (grp_name_f[j] != ' ') {
432  str_tmp[k] = grp_name_f[j];
433  k++;
434  j++;
435  }
436 
437  str_tmp[k] = '\0';
438  strcpy(grp_name[i], str_tmp);
439  }
440  return;
441 }
442 
443 void hecmw_set_grp_info_node_(int *n_grp,int *grp_index, char *grp_name_f, int
444 *grp_node)
445 {
446  int i, j;
447 
448  v.grp=(struct grp_data *)malloc(sizeof(struct grp_data));
449  v.grp->node_grp.n_enum_grp=*n_grp;
450  v.grp->node_grp.enum_grp_index=grp_index;
451  v.grp->node_grp.enum_grp_name=(char **)calloc(*n_grp, sizeof(char *));
452  for(i=0;i<*n_grp;i++)
453  v.grp->node_grp.enum_grp_name[i]=(char *)calloc(128,
454 sizeof(char));
455  set_grp_name(*n_grp, grp_name_f, v.grp->node_grp.enum_grp_name);
456  v.grp->node_grp.enum_grp_node=grp_node;
457  return;
458 }
459 
460 void hecmw_set_grp_info_elem_(int *n_grp,int *grp_index, char *grp_name_f, int
461 *grp_node)
462 {
463  int i, j;
464 
465  v.grp->elem_grp.n_enum_grp=*n_grp;
466  v.grp->elem_grp.enum_grp_index=grp_index;
467  v.grp->elem_grp.enum_grp_name=(char **)calloc(*n_grp, sizeof(char *));
468  for(i=0;i<*n_grp;i++)
469  v.grp->elem_grp.enum_grp_name[i]=(char *)calloc(128,
470 sizeof(char));
471  set_grp_name(*n_grp, grp_name_f, v.grp->elem_grp.enum_grp_name);
472  v.grp->elem_grp.enum_grp_node=grp_node;
473  return;
474 }
475 
476 void hecmw_set_grp_info_surf_(int *n_grp,int *grp_index, char *grp_name_f, int
477 *grp_node)
478 {
479  int i, j;
480 
481  v.grp->n_surf_grp=*n_grp;
482  v.grp->surf_grp_index=grp_index;
483  v.grp->surf_grp_name=(char **)calloc(*n_grp, sizeof(char *));
484  for(i=0;i<*n_grp;i++)
485  v.grp->surf_grp_name[i]=(char *)calloc(128, sizeof(char));
486  set_grp_name(*n_grp, grp_name_f, v.grp->surf_grp_name);
487  v.grp->surf_grp_node=grp_node;
488  return;
489 }
490 
491 
492 void hecmw_set_data_(int *ivar, int *i_free, double *U, double *P, double
493 *VISCT, double *VISCL)
494 {
495  int i,j,k;
496  double u1, v1, w1;
497  int tmp_count;
498  fprintf(stderr, "It is ok here \n");
499  v.node=(struct node_elem_data *)malloc(sizeof(struct node_elem_data));
500  v.node->n_component=*ivar;
501  v.node->n_free=(int *)calloc(*ivar, sizeof(int));
502  for(i=0;i<*ivar;i++)
503  v.node->n_free[i]=i_free[i];
504  v.node->t_component=0;
505  for(i=0;i<v.node->n_component;i++)
506  v.node->t_component+=v.node->n_free[i];
507  v.node->data=(double
508 *)calloc(v.node->t_component*v.mesh->n_node,sizeof(double));
509  if(v.node->data==NULL) {
510  fprintf(stderr, "There is no enough memory for v.node->data\n");
511  exit(0);
512  }
513 
514 
515  for(j=0;j<5;j++) {
516  for(i=0;i<v.mesh->n_node;i++)
517  v.node->data[j*v.mesh->n_node+i]=U[j*v.mesh->n_node+i];
518  }
519 
520  for(i=0;i<v.mesh->n_node;i++)
521  v.node->data[5*v.mesh->n_node+i]=P[i];
522  for(i=0;i<v.mesh->n_node;i++)
523  v.node->data[6*v.mesh->n_node+i]=VISCT[i];
524  for(i=0;i<v.mesh->n_node;i++)
525  v.node->data[7*v.mesh->n_node+i]=VISCL[i];
526 
527 
528  return;
529 }
530 
531 void hecmw_num_c2f90_(int *n_node, int *n_internal,int *n_elem, int
532 *ne_internal, int *n_neighbor_pe, int *l_child,
533  int *l_ptr_elem, int *ivar)
534 {
535  *n_node=new_mesh->n_node;
536  *n_internal=new_mesh->n_internal;
537  *n_elem=new_mesh->n_elem;
538  *ne_internal=new_mesh->ne_internal;
539  *n_neighbor_pe=new_mesh->n_neighbor_pe;
540  *l_child=new_mesh->index_children[new_mesh->n_elem];
541  *l_ptr_elem=new_mesh->index_elem[new_mesh->n_elem];
542  *ivar=v.node->n_component;
543  return;
544 }
545 
546 void hecmw_mesh_node_c2f90_(double *node, int *node_id)
547 {
548  int i,j;
549  for(i=0;i<new_mesh->n_node*3;i++)
550  node[i]=new_mesh->node[i];
551  for(i=0;i<new_mesh->n_node*2;i++)
552  node_id[i]=new_mesh->node_id[i];
553  free(new_mesh->node);
554  free(new_mesh->node_id);
555 
556 
557  return;
558 }
559 
560 void hecmw_mesh_elem_c2f90_(int *elem_type, int *index_elem, int *ptr_elem,int
561 *elem_id, int *ne_internal_list)
562 {
563  int i,j;
564 
565  for(i=0;i<new_mesh->n_elem;i++)
566  elem_type[i]=new_mesh->elem_type[i];
567  for(i=0;i<new_mesh->n_elem+1;i++)
568  index_elem[i]=new_mesh->index_elem[i];
569  for(i=0;i<new_mesh->index_elem[new_mesh->n_elem];i++)
570  ptr_elem[i]=new_mesh->ptr_elem[i];
571  for(i=0;i<new_mesh->n_elem*2;i++)
572  elem_id[i]=new_mesh->elem_id[i];
573  for(i=0;i<new_mesh->n_elem;i++)
574  ne_internal_list[i]=new_mesh->ne_internal_list[i];
575  free(new_mesh->elem_type);
576  free(new_mesh->index_elem);
577  free(new_mesh->ptr_elem);
578  free(new_mesh->elem_id);
579  free(new_mesh->ne_internal_list);
580  return;
581 }
582 
583 void hecmw_mesh_index_c2f90_(int *neighbor_pe, int *import_index, int
584 *export_index)
585 {
586  int i,j;
587 
588  for(i=0;i<new_mesh->n_neighbor_pe;i++)
589  neighbor_pe[i]=new_mesh->neighbor_pe[i];
590  for(i=0;i<new_mesh->n_neighbor_pe+1;i++)
591  import_index[i]=new_mesh->import_index[i];
592  for(i=0;i<new_mesh->n_neighbor_pe+1;i++)
593  export_index[i]=new_mesh->export_index[i];
594  return;
595 }
596 
597 void hecmw_mesh_pe_c2f90_(int *import_node, int *export_node)
598 {
599  int i,j;
600 
601  for(i=0;i<new_mesh->import_index[new_mesh->n_neighbor_pe];i++)
602  import_node[i]=new_mesh->import_node[i];
603  for(i=0;i<new_mesh->export_index[new_mesh->n_neighbor_pe];i++)
604  export_node[i]=new_mesh->export_node[i];
605  free(new_mesh->neighbor_pe);
606  free(new_mesh->import_index);
607  free(new_mesh->export_index);
608  free(new_mesh->import_node);
609  free(new_mesh->export_node);
610 
611  return;
612 }
613 
614 
615 void hecmw_mesh_adapt_c2f90_(int *WhenIwasRefined_node, int
616 *WhenIwasRefined_elem,int *adaptation_parent_type,
617  int *adaptation_type, int *adaptation_level, int *adaptation_parent, int
618 *adaptation_children, int *index_children)
619 {
620  int i,j;
621 
622  for(i=0;i<new_mesh->n_node;i++)
623  WhenIwasRefined_node[i]=new_mesh->wheniwasrefined_node[i];
624  for(i=0;i<new_mesh->n_elem;i++) {
625  WhenIwasRefined_elem[i]=new_mesh->wheniwasrefined_elem[i];
626  adaptation_parent_type[i]=new_mesh->adaptation_parent_type[i];
627  adaptation_type[i]=new_mesh->adaptation_type[i];
628  adaptation_level[i]=new_mesh->adaptation_level[i];
629  }
630  for(i=0;i<new_mesh->n_elem*2;i++)
631  adaptation_parent[i]=new_mesh->adaptation_parent[i];
632  for(i=0;i<new_mesh->n_elem+1;i++)
633  index_children[i]=new_mesh->index_children[i];
634  for(i=0;i<new_mesh->index_children[new_mesh->n_elem]*2;i++)
635  adaptation_children[i]=new_mesh->adaptation_children[i];
636  free(new_mesh->wheniwasrefined_elem);
637  free(new_mesh->wheniwasrefined_node);
638  free(new_mesh->adaptation_parent_type);
639  free(new_mesh->adaptation_type);
640  free(new_mesh->adaptation_level);
641  free(new_mesh->adaptation_parent);
642  free(new_mesh->index_children);
643  free(new_mesh->adaptation_children);
644 
645  return;
646 }
647 
648 void hecmw_data_c2f90_(double *U, double *P, double *VISCT, double *VISCL)
649 {
650  int i;
651 
652  for(i=0;i<new_mesh->n_node*5;i++)
653  U[i]=new_node->data[i];
654  for(i=0;i<new_mesh->n_node;i++)
655  P[i]=new_node->data[i+5*new_mesh->n_node];
656  for(i=0;i<new_mesh->n_node;i++)
657  VISCT[i]=new_node->data[i+6*new_mesh->n_node];
658  for(i=0;i<new_mesh->n_node;i++)
659  VISCL[i]=new_node->data[i+7*new_mesh->n_node];
660  free(new_node->data);
661  free(new_node->n_free);
662 
663 
664 
665  return;
666 }
667 
668 
669 void hecmw_grp_index_node_c2f90_(int *enum_grp_index)
670 {
671  int i;
672  for(i=0;i<new_grp->node_grp.n_enum_grp+1;i++)
673  enum_grp_index[i]=new_grp->node_grp.enum_grp_index[i];
674  return;
675 }
676 
677 void hecmw_grp_node_node_c2f90_(int *enum_grp_node)
678 {
679  int i;
680  for(i=0;i<new_grp->node_grp.enum_grp_index[new_grp->node_grp.n_enum_grp];i++)
681  enum_grp_node[i]=new_grp->node_grp.enum_grp_node[i];
682 
683 
684  return;
685 }
686 
687 */
hecmwST_local_mesh::mpc
struct hecmwST_mpc * mpc
Definition: hecmw_struct.h:247
hecmwST_result_data
Definition: hecmw_result.h:11
hecmwST_local_mesh::global_node_ID
int * global_node_ID
Definition: hecmw_struct.h:168
hecmwST_local_mesh::section_ID
int * section_ID
Definition: hecmw_struct.h:197
hecmwST_mpc
Definition: hecmw_struct.h:48
hecmwST_local_mesh::hecmw_n_file
int hecmw_n_file
Definition: hecmw_struct.h:155
hecmwST_local_mesh::shared_index
int * shared_index
Definition: hecmw_struct.h:221
hecmwST_node_grp::bc_grp_dof
int * bc_grp_dof
Definition: hecmw_struct.h:88
hecmwST_amplitude::amp_val
double * amp_val
Definition: hecmw_struct.h:71
hecmwST_node_grp::n_grp
int n_grp
Definition: hecmw_struct.h:76
hecmwST_section::sect_R_index
int * sect_R_index
Definition: hecmw_struct.h:34
HECMW_dlb_memory_exit
void HECMW_dlb_memory_exit(char *var)
Definition: hecmw_dlb_mem_util.c:7
hecmwST_amplitude::amp_index
int * amp_index
Definition: hecmw_struct.h:70
new_mesh
struct hecmwST_local_mesh * new_mesh
Definition: hecmw_repart.h:72
hecmwST_surf_grp::bc_grp_ID
int * bc_grp_ID
Definition: hecmw_struct.h:113
hecmwST_elem_grp::bc_grp_index
int * bc_grp_index
Definition: hecmw_struct.h:102
hecmwST_local_mesh::elem_node_item
int * elem_node_item
Definition: hecmw_struct.h:196
hecmwST_amplitude::amp_table
double * amp_table
Definition: hecmw_struct.h:72
hecmwST_local_mesh::shared_item
int * shared_item
Definition: hecmw_struct.h:222
hecmwST_local_mesh::elem_mat_int_val
double * elem_mat_int_val
Definition: hecmw_struct.h:203
data
struct hecmwST_result_data * data
Definition: neu_reporter.cpp:18
hecmwST_local_mesh::elem_group
struct hecmwST_elem_grp * elem_group
Definition: hecmw_struct.h:250
hecmw_dlb_c2f_init_
void hecmw_dlb_c2f_init_()
Definition: hecmw_dlb_data_transfer.c:147
mesh
struct hecmwST_local_mesh * mesh
Definition: hecmw_repart.h:71
hecmwST_local_mesh::adapt_parent
int * adapt_parent
Definition: hecmw_struct.h:233
HECMW_comm_get_comm
HECMW_Comm HECMW_comm_get_comm(void)
Definition: hecmw_comm.c:699
dist_dlb_free_amplitude
void dist_dlb_free_amplitude(struct hecmwST_amplitude *amp)
Definition: hecmw_dlb_data_transfer.c:51
hecmwST_local_mesh::elem_mat_int_index
int * elem_mat_int_index
Definition: hecmw_struct.h:202
hecmwST_local_mesh::adapt_parent_type
int * adapt_parent_type
Definition: hecmw_struct.h:229
hecmwST_section::sect_I_index
int * sect_I_index
Definition: hecmw_struct.h:32
hecmwST_node_grp::bc_grp_val
double * bc_grp_val
Definition: hecmw_struct.h:89
hecmw_set_result_node_
void hecmw_set_result_node_(int *nn_component, int *nn_dof, char *node_label, double *node_val_item)
Definition: hecmw_dlb_data_transfer.c:299
hecmwST_local_mesh::elem_type_item
int * elem_type_item
Definition: hecmw_struct.h:194
HECMW_result_read_by_fname
struct hecmwST_result_data * HECMW_result_read_by_fname(char *filename)
Definition: hecmw_result.c:165
dist_dlb_free_mpc
void dist_dlb_free_mpc(struct hecmwST_mpc *mpc)
Definition: hecmw_dlb_data_transfer.c:43
hecmwST_local_mesh::node_ID
int * node_ID
Definition: hecmw_struct.h:167
hecmw_dlb_get_result_node_
hecmw_dlb_get_result_node_(double *node_val_item)
Definition: hecmw_dlb_data_transfer.c:319
hecmw_dlb_f2c_init_
void hecmw_dlb_f2c_init_()
Definition: hecmw_dlb_data_transfer.c:127
dist_dlb_free_egrp
void dist_dlb_free_egrp(struct hecmwST_elem_grp *grp)
Definition: hecmw_dlb_data_transfer.c:89
hecmwST_mpc::mpc_item
int * mpc_item
Definition: hecmw_struct.h:51
hecmwST_local_mesh
Definition: hecmw_struct.h:139
hecmwST_local_mesh::elem_ID
int * elem_ID
Definition: hecmw_struct.h:189
hecmwST_local_mesh::adapt_type
int * adapt_type
Definition: hecmw_struct.h:230
hecmwST_surf_grp::bc_grp_val
double * bc_grp_val
Definition: hecmw_struct.h:118
hecmwST_amplitude::amp_type_time
int * amp_type_time
Definition: hecmw_struct.h:64
hecmwST_amplitude::amp_type_value
int * amp_type_value
Definition: hecmw_struct.h:67
HECMW_dist_copy_c2f_init
int HECMW_dist_copy_c2f_init(struct hecmwST_local_mesh *local_mesh)
Definition: hecmw_dist_copy_c2f.c:2328
hecmwST_local_mesh::elem_type
int * elem_type
Definition: hecmw_struct.h:191
hecmwST_mpc::mpc_val
double * mpc_val
Definition: hecmw_struct.h:53
hecmw_repart.h
hecmwST_surf_grp::grp_index
int * grp_index
Definition: hecmw_struct.h:109
dist_dlb_free_sgrp
void dist_dlb_free_sgrp(struct hecmwST_surf_grp *grp)
Definition: hecmw_dlb_data_transfer.c:108
hecmwST_material::mat_subitem_index
int * mat_subitem_index
Definition: hecmw_struct.h:42
hecmwST_local_mesh::neighbor_pe
int * neighbor_pe
Definition: hecmw_struct.h:216
hecmw_dlb_c2f_finalize_
void hecmw_dlb_c2f_finalize_()
Definition: hecmw_dlb_data_transfer.c:157
hecmwST_local_mesh::export_item
int * export_item
Definition: hecmw_struct.h:220
hecmwST_local_mesh::node_dof_item
int * node_dof_item
Definition: hecmw_struct.h:175
hecmwST_mpc::mpc_dof
int * mpc_dof
Definition: hecmw_struct.h:52
hecmwST_local_mesh::export_index
int * export_index
Definition: hecmw_struct.h:219
hecmwST_elem_grp::bc_grp_val
double * bc_grp_val
Definition: hecmw_struct.h:103
hecmwST_material::mat_table_index
int * mat_table_index
Definition: hecmw_struct.h:43
hecmwST_local_mesh::import_item
int * import_item
Definition: hecmw_struct.h:218
hecmw_dist_get_result_c_
void hecmw_dist_get_result_c_()
Definition: hecmw_dlb_data_transfer.c:270
hecmwST_surf_grp::grp_item
int * grp_item
Definition: hecmw_struct.h:111
hecmwST_local_mesh::node_val_index
int * node_val_index
Definition: hecmw_struct.h:177
hecmwST_result_data::ne_component
int ne_component
Definition: hecmw_result.h:17
HECMW_dist_copy_f2c_finalize
int HECMW_dist_copy_f2c_finalize(void)
Definition: hecmw_dist_copy_f2c.c:2033
hecmwST_local_mesh::node
double * node
Definition: hecmw_struct.h:170
hecmwST_section::sect_opt
int * sect_opt
Definition: hecmw_struct.h:23
hecmwST_amplitude
Definition: hecmw_struct.h:57
hecmwST_elem_grp
Definition: hecmw_struct.h:92
hecmwST_local_mesh::when_i_was_refined_elem
int * when_i_was_refined_elem
Definition: hecmw_struct.h:228
hecmwST_local_mesh::node_dof_index
int * node_dof_index
Definition: hecmw_struct.h:174
hecmwST_section::sect_mat_ID_index
int * sect_mat_ID_index
Definition: hecmw_struct.h:30
hecmwST_amplitude::n_amp
int n_amp
Definition: hecmw_struct.h:58
HECMW_dist_copy_c2f_finalize
int HECMW_dist_copy_c2f_finalize(void)
Definition: hecmw_dist_copy_c2f.c:2333
hecmwST_local_mesh::material
struct hecmwST_material * material
Definition: hecmw_struct.h:246
hecmwST_local_mesh::node_val_item
double * node_val_item
Definition: hecmw_struct.h:178
hecmwST_local_mesh::elem_mat_ID_index
int * elem_mat_ID_index
Definition: hecmw_struct.h:198
hecmwST_material::mat_temp
double * mat_temp
Definition: hecmw_struct.h:45
hecmwST_surf_grp::n_grp
int n_grp
Definition: hecmw_struct.h:107
hecmwST_local_mesh::amp
struct hecmwST_amplitude * amp
Definition: hecmw_struct.h:248
hecmwST_surf_grp::bc_grp_index
int * bc_grp_index
Definition: hecmw_struct.h:117
hecmwST_local_mesh::node_internal_list
int * node_internal_list
Definition: hecmw_struct.h:165
set_label_name
void set_label_name(int n_component, char *label_name_f, char **label_name)
Definition: hecmw_dlb_data_transfer.c:279
hecmwST_local_mesh::elem_val_index
int * elem_val_index
Definition: hecmw_struct.h:204
hecmwST_local_mesh::adapt_level
int * adapt_level
Definition: hecmw_struct.h:231
hecmwST_local_mesh::elem_node_index
int * elem_node_index
Definition: hecmw_struct.h:195
hecmwST_section::sect_type
int * sect_type
Definition: hecmw_struct.h:17
new_data
struct hecmwST_result_data * new_data
Definition: hecmw_repart.h:76
hecmw_dlb_get_result_elem_
hecmw_dlb_get_result_elem_(double *elem_val_item)
Definition: hecmw_dlb_data_transfer.c:324
hecmw_set_result_elem_
void hecmw_set_result_elem_(int *ne_component, int *ne_dof, char *elem_label, double *elem_val_item)
Definition: hecmw_dlb_data_transfer.c:329
hecmwST_section
Definition: hecmw_struct.h:11
hecmwST_result_data::node_val_item
double * node_val_item
Definition: hecmw_result.h:25
hecmwST_elem_grp::grp_item
int * grp_item
Definition: hecmw_struct.h:96
hecmwST_node_grp::grp_index
int * grp_index
Definition: hecmw_struct.h:78
hecmwST_elem_grp::grp_name
char ** grp_name
Definition: hecmw_struct.h:94
hecmwST_section::sect_I_item
int * sect_I_item
Definition: hecmw_struct.h:33
hecmwST_local_mesh::elem_type_index
int * elem_type_index
Definition: hecmw_struct.h:193
hecmwST_result_data::nn_dof
int * nn_dof
Definition: hecmw_result.h:19
dist_dlb_free_section
void dist_dlb_free_section(struct hecmwST_section *section)
Definition: hecmw_dlb_data_transfer.c:12
hecmwST_result_data::nn_component
int nn_component
Definition: hecmw_result.h:16
hecmwST_result_data::elem_label
char ** elem_label
Definition: hecmw_result.h:23
hecmwST_node_grp::grp_item
int * grp_item
Definition: hecmw_struct.h:79
hecmwST_local_mesh::elem_val_item
double * elem_val_item
Definition: hecmw_struct.h:205
hecmwST_amplitude::amp_name
char ** amp_name
Definition: hecmw_struct.h:59
hecmwST_section::sect_mat_ID_item
int * sect_mat_ID_item
Definition: hecmw_struct.h:31
hecmwST_material::n_mat
int n_mat
Definition: hecmw_struct.h:36
hecmw_dlb_f2c_finalize_
void hecmw_dlb_f2c_finalize_()
Definition: hecmw_dlb_data_transfer.c:152
HECMW_DEBUG
#define HECMW_DEBUG(args)
Definition: hecmw_util.h:39
test_mesh_
void test_mesh_()
Definition: hecmw_dlb_data_transfer.c:247
hecmwST_node_grp
Definition: hecmw_struct.h:75
hecmwST_local_mesh::elem_mat_ID_item
int * elem_mat_ID_item
Definition: hecmw_struct.h:199
hecmwST_node_grp::bc_grp_ID
int * bc_grp_ID
Definition: hecmw_struct.h:82
hecmwST_node_grp::bc_grp_type
int * bc_grp_type
Definition: hecmw_struct.h:84
hecmwST_local_mesh::when_i_was_refined_node
int * when_i_was_refined_node
Definition: hecmw_struct.h:227
hecmwST_material::mat_name
char ** mat_name
Definition: hecmw_struct.h:40
hecmwST_elem_grp::bc_grp_ID
int * bc_grp_ID
Definition: hecmw_struct.h:99
hecmwST_local_mesh::node_init_val_item
double * node_init_val_item
Definition: hecmw_struct.h:181
hecmwST_surf_grp
Definition: hecmw_struct.h:106
hecmwST_material::mat_item_index
int * mat_item_index
Definition: hecmw_struct.h:41
HECMW_Comm_rank
int HECMW_Comm_rank(HECMW_Comm comm, int *rank)
Definition: hecmw_comm.c:18
hecmwST_result_data::node_label
char ** node_label
Definition: hecmw_result.h:22
hecmwST_local_mesh::import_index
int * import_index
Definition: hecmw_struct.h:217
hecmwST_result_data::elem_val_item
double * elem_val_item
Definition: hecmw_result.h:26
HECMW_Comm_size
int HECMW_Comm_size(HECMW_Comm comm, int *size)
Definition: hecmw_comm.c:37
dist_dlb_free_ngrp
void dist_dlb_free_ngrp(struct hecmwST_node_grp *grp)
Definition: hecmw_dlb_data_transfer.c:69
hecmwST_local_mesh::files
char ** files
Definition: hecmw_struct.h:156
hecmwST_elem_grp::n_grp
int n_grp
Definition: hecmw_struct.h:93
HECMW_dist_copy_f2c_init
int HECMW_dist_copy_f2c_init(struct hecmwST_local_mesh *local_mesh)
Definition: hecmw_dist_copy_f2c.c:2007
hecmwST_material::mat_val
double * mat_val
Definition: hecmw_struct.h:44
hecmwST_local_mesh::section
struct hecmwST_section * section
Definition: hecmw_struct.h:245
hecmwST_elem_grp::grp_index
int * grp_index
Definition: hecmw_struct.h:95
hecmwST_node_grp::grp_name
char ** grp_name
Definition: hecmw_struct.h:77
hecmwST_node_grp::bc_grp_index
int * bc_grp_index
Definition: hecmw_struct.h:87
NULL
#define NULL
Definition: hecmw_io_nastran.c:30
HECMW_free
#define HECMW_free(ptr)
Definition: hecmw_malloc.h:24
hecmwST_elem_grp::bc_grp_type
int * bc_grp_type
Definition: hecmw_struct.h:101
hecmwST_local_mesh::adapt_children_item
int * adapt_children_item
Definition: hecmw_struct.h:235
hecmwST_material
Definition: hecmw_struct.h:35
hecmwST_section::sect_R_item
double * sect_R_item
Definition: hecmw_struct.h:35
dist_dlb_free_material
void dist_dlb_free_material(struct hecmwST_material *material)
Definition: hecmw_dlb_data_transfer.c:25
hecmwST_mpc::mpc_index
int * mpc_index
Definition: hecmw_struct.h:50
hecmwST_surf_grp::grp_name
char ** grp_name
Definition: hecmw_struct.h:108
hecmwST_local_mesh::global_elem_ID
int * global_elem_ID
Definition: hecmw_struct.h:190
hecmwST_local_mesh::surf_group
struct hecmwST_surf_grp * surf_group
Definition: hecmw_struct.h:251
hecmwST_local_mesh::node_group
struct hecmwST_node_grp * node_group
Definition: hecmw_struct.h:249
hecmwST_local_mesh::node_init_val_index
int * node_init_val_index
Definition: hecmw_struct.h:180
HECMW_abort
void HECMW_abort(HECMW_Comm comm)
Definition: hecmw_util.c:88
hecmwST_local_mesh::HECMW_COMM
HECMW_Comm HECMW_COMM
Definition: hecmw_struct.h:209
hecmwST_surf_grp::bc_grp_type
int * bc_grp_type
Definition: hecmw_struct.h:115
hecmwST_amplitude::amp_type_definition
int * amp_type_definition
Definition: hecmw_struct.h:61
hecmwST_result_data::ne_dof
int * ne_dof
Definition: hecmw_result.h:20
hecmwST_local_mesh::elem_internal_list
int * elem_internal_list
Definition: hecmw_struct.h:187