FrontISTR  5.9.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->export_item != NULL) free(new_mesh->export_item);
199  if (new_mesh->shared_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  /* snprintf(test_file, sizeof(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  size_t label_len) {
281  int i, j, k;
282  char str_tmp[128];
283  j = 0;
284  for (i = 0; i < n_component; i++) {
285  str_tmp[0] = '\0';
286  while (label_name_f[j] == ' ') j++;
287  k = 0;
288  while (label_name_f[j] != ' ') {
289  str_tmp[k] = label_name_f[j];
290  k++;
291  j++;
292  }
293 
294  str_tmp[k] = '\0';
295  snprintf(label_name[i], label_len, "%s", str_tmp);
296  }
297  return;
298 }
299 
300 void hecmw_set_result_node_(int *nn_component, int *nn_dof, char *node_label,
301  double *node_val_item) {
302  int i;
303  if (data == NULL) {
304  data = (struct hecmwST_result_data *)malloc(
305  sizeof(struct hecmwST_result_data));
306  if (data == NULL) HECMW_dlb_memory_exit("data");
307  data->nn_component = 0;
308  data->ne_component = 0;
309  }
311  data->nn_dof = nn_dof;
312  data->node_label = (char **)calloc(data->nn_component, sizeof(char *));
313  for (i = 0; i < data->nn_component; i++)
314  data->node_label[i] = (char *)calloc(128, sizeof(char));
317  return;
318 }
319 
322  return;
323 }
324 
327  return;
328 }
329 
331  double *elem_val_item) {
332  int i;
333  if (data == NULL) {
334  data = (struct hecmwST_result_data *)malloc(
335  sizeof(struct hecmwST_result_data));
336  if (data == NULL) HECMW_dlb_memory_exit("data");
337  data->nn_component = 0;
338  data->ne_component = 0;
339  }
341  data->ne_dof = ne_dof;
342  data->elem_label = (char **)calloc(data->ne_component, sizeof(char *));
343  for (i = 0; i < data->ne_component; i++)
344  data->elem_label[i] = (char *)calloc(128, sizeof(char));
347  return;
348 }
349 
350 /*
351 extern int l_node, l_elem;
352 extern int repart_comm;
353 
354 void hecmw_add_inf_(int *allNODTOTold, int *ICELTOTold, int *SOLVER_COMM)
355 {
356  l_node = *allNODTOTold*9+1;
357  l_elem = *ICELTOTold*9+1;
358  repart_comm = *SOLVER_COMM;
359  return;
360 }
361 
362 void hecmw_set_mesh_node_(int *n_node, int *n_internal, double *node, int
363 *node_id)
364 {
365  v.mesh=(struct local_mesh *)malloc(sizeof(struct local_mesh));
366  v.mesh->n_node=*n_node;
367  v.mesh->n_internal= *n_internal;
368  v.mesh->node = node;
369  v.mesh->node_id = node_id;
370 
371  return;
372 }
373 
374 void hecmw_set_mesh_element_(int *n_elem, int *ne_internal, int *elem_type,
375  int *index_elem, int *ptr_elem, int *elem_id,
376 int *ne_internal_list)
377 {
378  v.mesh->n_elem = *n_elem;
379  v.mesh->ne_internal = *ne_internal;
380  v.mesh->elem_type = elem_type;
381  v.mesh->index_elem = index_elem;
382  v.mesh->ptr_elem = ptr_elem;
383  v.mesh->elem_id = elem_id;
384  v.mesh->ne_internal_list = ne_internal_list;
385  return;
386 }
387 
388 void hecmw_set_mesh_pe_inf_(int *n_neighbor_pe, int *neighbor_pe, int
389 *import_index, int *import_node,
390  int *export_index, int *export_node)
391 {
392  v.mesh->n_neighbor_pe = *n_neighbor_pe;
393  v.mesh->neighbor_pe = neighbor_pe;
394  v.mesh->import_index = import_index;
395  v.mesh->import_node = import_node;
396  v.mesh->export_index = export_index;
397  v.mesh->export_node = export_node;
398  return;
399 }
400 
401 void hecmw_set_mesh_adaptation_(int *CoarseGridLevels, int *HOWmanyADAPTATIONs,
402  int *wheniwasrefined_node, int *wheniwasrefined_elem,
403  int *adaptation_parent_type, int *adaptation_type,
404  int *adaptation_level, int
405 *adaptation_parent,
406  int *adaptation_children, int *index_children)
407 {
408  v.mesh->coarsegridlevels = *CoarseGridLevels;
409  v.mesh->howmanyadaptions = *HOWmanyADAPTATIONs;
410  v.mesh->wheniwasrefined_node = wheniwasrefined_node;
411  v.mesh->wheniwasrefined_elem = wheniwasrefined_elem;
412  v.mesh->adaptation_parent_type = adaptation_parent_type;
413  v.mesh->adaptation_type = adaptation_type;
414  v.mesh->adaptation_level = adaptation_level;
415  v.mesh->adaptation_parent = adaptation_parent;
416  v.mesh->adaptation_children = adaptation_children;
417  v.mesh->index_children = index_children;
418  return;
419 }
420 
421 
422 void set_grp_name(int n_group, char *grp_name_f, char **grp_name,
423  size_t grp_name_len)
424 {
425  int i,j, k;
426  char str_tmp[128];
427  j = 0;
428  for (i=0; i<n_group; i++) {
429  str_tmp[0] = '\0';
430  while (grp_name_f[j] == ' ')
431  j++;
432  k = 0;
433  while (grp_name_f[j] != ' ') {
434  str_tmp[k] = grp_name_f[j];
435  k++;
436  j++;
437  }
438 
439  str_tmp[k] = '\0';
440  snprintf(grp_name[i], grp_name_len, "%s", str_tmp);
441  }
442  return;
443 }
444 
445 void hecmw_set_grp_info_node_(int *n_grp,int *grp_index, char *grp_name_f, int
446 *grp_node)
447 {
448  int i, j;
449 
450  v.grp=(struct grp_data *)malloc(sizeof(struct grp_data));
451  v.grp->node_grp.n_enum_grp=*n_grp;
452  v.grp->node_grp.enum_grp_index=grp_index;
453  v.grp->node_grp.enum_grp_name=(char **)calloc(*n_grp, sizeof(char *));
454  for(i=0;i<*n_grp;i++)
455  v.grp->node_grp.enum_grp_name[i]=(char *)calloc(128,
456 sizeof(char));
457  set_grp_name(*n_grp, grp_name_f, v.grp->node_grp.enum_grp_name, 128);
458  v.grp->node_grp.enum_grp_node=grp_node;
459  return;
460 }
461 
462 void hecmw_set_grp_info_elem_(int *n_grp,int *grp_index, char *grp_name_f, int
463 *grp_node)
464 {
465  int i, j;
466 
467  v.grp->elem_grp.n_enum_grp=*n_grp;
468  v.grp->elem_grp.enum_grp_index=grp_index;
469  v.grp->elem_grp.enum_grp_name=(char **)calloc(*n_grp, sizeof(char *));
470  for(i=0;i<*n_grp;i++)
471  v.grp->elem_grp.enum_grp_name[i]=(char *)calloc(128,
472 sizeof(char));
473  set_grp_name(*n_grp, grp_name_f, v.grp->elem_grp.enum_grp_name, 128);
474  v.grp->elem_grp.enum_grp_node=grp_node;
475  return;
476 }
477 
478 void hecmw_set_grp_info_surf_(int *n_grp,int *grp_index, char *grp_name_f, int
479 *grp_node)
480 {
481  int i, j;
482 
483  v.grp->n_surf_grp=*n_grp;
484  v.grp->surf_grp_index=grp_index;
485  v.grp->surf_grp_name=(char **)calloc(*n_grp, sizeof(char *));
486  for(i=0;i<*n_grp;i++)
487  v.grp->surf_grp_name[i]=(char *)calloc(128, sizeof(char));
488  set_grp_name(*n_grp, grp_name_f, v.grp->surf_grp_name, 128);
489  v.grp->surf_grp_node=grp_node;
490  return;
491 }
492 
493 
494 void hecmw_set_data_(int *ivar, int *i_free, double *U, double *P, double
495 *VISCT, double *VISCL)
496 {
497  int i,j,k;
498  double u1, v1, w1;
499  int tmp_count;
500  fprintf(stderr, "It is ok here \n");
501  v.node=(struct node_elem_data *)malloc(sizeof(struct node_elem_data));
502  v.node->n_component=*ivar;
503  v.node->n_free=(int *)calloc(*ivar, sizeof(int));
504  for(i=0;i<*ivar;i++)
505  v.node->n_free[i]=i_free[i];
506  v.node->t_component=0;
507  for(i=0;i<v.node->n_component;i++)
508  v.node->t_component+=v.node->n_free[i];
509  v.node->data=(double
510 *)calloc(v.node->t_component*v.mesh->n_node,sizeof(double));
511  if(v.node->data==NULL) {
512  fprintf(stderr, "There is no enough memory for v.node->data\n");
513  exit(EXIT_FAILURE);
514  }
515 
516 
517  for(j=0;j<5;j++) {
518  for(i=0;i<v.mesh->n_node;i++)
519  v.node->data[j*v.mesh->n_node+i]=U[j*v.mesh->n_node+i];
520  }
521 
522  for(i=0;i<v.mesh->n_node;i++)
523  v.node->data[5*v.mesh->n_node+i]=P[i];
524  for(i=0;i<v.mesh->n_node;i++)
525  v.node->data[6*v.mesh->n_node+i]=VISCT[i];
526  for(i=0;i<v.mesh->n_node;i++)
527  v.node->data[7*v.mesh->n_node+i]=VISCL[i];
528 
529 
530  return;
531 }
532 
533 void hecmw_num_c2f90_(int *n_node, int *n_internal,int *n_elem, int
534 *ne_internal, int *n_neighbor_pe, int *l_child,
535  int *l_ptr_elem, int *ivar)
536 {
537  *n_node=new_mesh->n_node;
538  *n_internal=new_mesh->n_internal;
539  *n_elem=new_mesh->n_elem;
540  *ne_internal=new_mesh->ne_internal;
541  *n_neighbor_pe=new_mesh->n_neighbor_pe;
542  *l_child=new_mesh->index_children[new_mesh->n_elem];
543  *l_ptr_elem=new_mesh->index_elem[new_mesh->n_elem];
544  *ivar=v.node->n_component;
545  return;
546 }
547 
548 void hecmw_mesh_node_c2f90_(double *node, int *node_id)
549 {
550  int i,j;
551  for(i=0;i<new_mesh->n_node*3;i++)
552  node[i]=new_mesh->node[i];
553  for(i=0;i<new_mesh->n_node*2;i++)
554  node_id[i]=new_mesh->node_id[i];
555  free(new_mesh->node);
556  free(new_mesh->node_id);
557 
558 
559  return;
560 }
561 
562 void hecmw_mesh_elem_c2f90_(int *elem_type, int *index_elem, int *ptr_elem,int
563 *elem_id, int *ne_internal_list)
564 {
565  int i,j;
566 
567  for(i=0;i<new_mesh->n_elem;i++)
568  elem_type[i]=new_mesh->elem_type[i];
569  for(i=0;i<new_mesh->n_elem+1;i++)
570  index_elem[i]=new_mesh->index_elem[i];
571  for(i=0;i<new_mesh->index_elem[new_mesh->n_elem];i++)
572  ptr_elem[i]=new_mesh->ptr_elem[i];
573  for(i=0;i<new_mesh->n_elem*2;i++)
574  elem_id[i]=new_mesh->elem_id[i];
575  for(i=0;i<new_mesh->n_elem;i++)
576  ne_internal_list[i]=new_mesh->ne_internal_list[i];
577  free(new_mesh->elem_type);
578  free(new_mesh->index_elem);
579  free(new_mesh->ptr_elem);
580  free(new_mesh->elem_id);
581  free(new_mesh->ne_internal_list);
582  return;
583 }
584 
585 void hecmw_mesh_index_c2f90_(int *neighbor_pe, int *import_index, int
586 *export_index)
587 {
588  int i,j;
589 
590  for(i=0;i<new_mesh->n_neighbor_pe;i++)
591  neighbor_pe[i]=new_mesh->neighbor_pe[i];
592  for(i=0;i<new_mesh->n_neighbor_pe+1;i++)
593  import_index[i]=new_mesh->import_index[i];
594  for(i=0;i<new_mesh->n_neighbor_pe+1;i++)
595  export_index[i]=new_mesh->export_index[i];
596  return;
597 }
598 
599 void hecmw_mesh_pe_c2f90_(int *import_node, int *export_node)
600 {
601  int i,j;
602 
603  for(i=0;i<new_mesh->import_index[new_mesh->n_neighbor_pe];i++)
604  import_node[i]=new_mesh->import_node[i];
605  for(i=0;i<new_mesh->export_index[new_mesh->n_neighbor_pe];i++)
606  export_node[i]=new_mesh->export_node[i];
607  free(new_mesh->neighbor_pe);
608  free(new_mesh->import_index);
609  free(new_mesh->export_index);
610  free(new_mesh->import_node);
611  free(new_mesh->export_node);
612 
613  return;
614 }
615 
616 
617 void hecmw_mesh_adapt_c2f90_(int *WhenIwasRefined_node, int
618 *WhenIwasRefined_elem,int *adaptation_parent_type,
619  int *adaptation_type, int *adaptation_level, int *adaptation_parent, int
620 *adaptation_children, int *index_children)
621 {
622  int i,j;
623 
624  for(i=0;i<new_mesh->n_node;i++)
625  WhenIwasRefined_node[i]=new_mesh->wheniwasrefined_node[i];
626  for(i=0;i<new_mesh->n_elem;i++) {
627  WhenIwasRefined_elem[i]=new_mesh->wheniwasrefined_elem[i];
628  adaptation_parent_type[i]=new_mesh->adaptation_parent_type[i];
629  adaptation_type[i]=new_mesh->adaptation_type[i];
630  adaptation_level[i]=new_mesh->adaptation_level[i];
631  }
632  for(i=0;i<new_mesh->n_elem*2;i++)
633  adaptation_parent[i]=new_mesh->adaptation_parent[i];
634  for(i=0;i<new_mesh->n_elem+1;i++)
635  index_children[i]=new_mesh->index_children[i];
636  for(i=0;i<new_mesh->index_children[new_mesh->n_elem]*2;i++)
637  adaptation_children[i]=new_mesh->adaptation_children[i];
638  free(new_mesh->wheniwasrefined_elem);
639  free(new_mesh->wheniwasrefined_node);
640  free(new_mesh->adaptation_parent_type);
641  free(new_mesh->adaptation_type);
642  free(new_mesh->adaptation_level);
643  free(new_mesh->adaptation_parent);
644  free(new_mesh->index_children);
645  free(new_mesh->adaptation_children);
646 
647  return;
648 }
649 
650 void hecmw_data_c2f90_(double *U, double *P, double *VISCT, double *VISCL)
651 {
652  int i;
653 
654  for(i=0;i<new_mesh->n_node*5;i++)
655  U[i]=new_node->data[i];
656  for(i=0;i<new_mesh->n_node;i++)
657  P[i]=new_node->data[i+5*new_mesh->n_node];
658  for(i=0;i<new_mesh->n_node;i++)
659  VISCT[i]=new_node->data[i+6*new_mesh->n_node];
660  for(i=0;i<new_mesh->n_node;i++)
661  VISCL[i]=new_node->data[i+7*new_mesh->n_node];
662  free(new_node->data);
663  free(new_node->n_free);
664 
665 
666 
667  return;
668 }
669 
670 
671 void hecmw_grp_index_node_c2f90_(int *enum_grp_index)
672 {
673  int i;
674  for(i=0;i<new_grp->node_grp.n_enum_grp+1;i++)
675  enum_grp_index[i]=new_grp->node_grp.enum_grp_index[i];
676  return;
677 }
678 
679 void hecmw_grp_node_node_c2f90_(int *enum_grp_node)
680 {
681  int i;
682  for(i=0;i<new_grp->node_grp.enum_grp_index[new_grp->node_grp.n_enum_grp];i++)
683  enum_grp_node[i]=new_grp->node_grp.enum_grp_node[i];
684 
685 
686  return;
687 }
688 
689 */
int HECMW_Comm_rank(HECMW_Comm comm, int *rank)
Definition: hecmw_comm.c:18
HECMW_Comm HECMW_comm_get_comm(void)
Definition: hecmw_comm.c:751
int HECMW_Comm_size(HECMW_Comm comm, int *size)
Definition: hecmw_comm.c:37
int HECMW_dist_copy_c2f_init(struct hecmwST_local_mesh *local_mesh)
int HECMW_dist_copy_c2f_finalize(void)
int HECMW_dist_copy_f2c_init(struct hecmwST_local_mesh *local_mesh)
int HECMW_dist_copy_f2c_finalize(void)
struct hecmwST_result_data * new_data
Definition: hecmw_repart.h:76
void hecmw_set_result_elem_(int *ne_component, int *ne_dof, char *elem_label, double *elem_val_item)
void dist_dlb_free_sgrp(struct hecmwST_surf_grp *grp)
void hecmw_dlb_c2f_init_()
void dist_dlb_free_section(struct hecmwST_section *section)
void hecmw_set_result_node_(int *nn_component, int *nn_dof, char *node_label, double *node_val_item)
void dist_dlb_free_mpc(struct hecmwST_mpc *mpc)
void test_mesh_()
void hecmw_dlb_f2c_init_()
hecmw_dlb_get_result_elem_(double *elem_val_item)
struct hecmwST_local_mesh * new_mesh
Definition: hecmw_repart.h:72
void hecmw_dlb_c2f_finalize_()
void dist_dlb_free_material(struct hecmwST_material *material)
hecmw_dlb_get_result_node_(double *node_val_item)
void dist_dlb_free_ngrp(struct hecmwST_node_grp *grp)
void hecmw_dist_get_result_c_()
void dist_dlb_free_amplitude(struct hecmwST_amplitude *amp)
void hecmw_dlb_f2c_finalize_()
struct hecmwST_local_mesh * mesh
Definition: hecmw_repart.h:71
void set_label_name(int n_component, char *label_name_f, char **label_name, size_t label_len)
struct hecmwST_result_data * data
void dist_dlb_free_egrp(struct hecmwST_elem_grp *grp)
void HECMW_dlb_memory_exit(char *var)
#define NULL
#define HECMW_free(ptr)
Definition: hecmw_malloc.h:24
struct hecmwST_result_data * HECMW_result_read_by_fname(char *filename)
Definition: hecmw_result.c:180
void HECMW_abort(HECMW_Comm comm)
Definition: hecmw_util.c:88
#define HECMW_DEBUG(args)
Definition: hecmw_util.h:39
int * amp_type_definition
Definition: hecmw_struct.h:61
double * amp_table
Definition: hecmw_struct.h:72
double * bc_grp_val
Definition: hecmw_struct.h:103
struct hecmwST_section * section
Definition: hecmw_struct.h:245
double * elem_val_item
Definition: hecmw_struct.h:205
double * elem_mat_int_val
Definition: hecmw_struct.h:203
struct hecmwST_amplitude * amp
Definition: hecmw_struct.h:248
struct hecmwST_material * material
Definition: hecmw_struct.h:246
double * node_val_item
Definition: hecmw_struct.h:178
struct hecmwST_mpc * mpc
Definition: hecmw_struct.h:247
struct hecmwST_node_grp * node_group
Definition: hecmw_struct.h:249
double * node_init_val_item
Definition: hecmw_struct.h:181
struct hecmwST_surf_grp * surf_group
Definition: hecmw_struct.h:251
long long * elem_node_index
Definition: hecmw_struct.h:195
HECMW_Comm HECMW_COMM
Definition: hecmw_struct.h:209
struct hecmwST_elem_grp * elem_group
Definition: hecmw_struct.h:250
int * when_i_was_refined_node
Definition: hecmw_struct.h:227
int * when_i_was_refined_elem
Definition: hecmw_struct.h:228
int * mat_subitem_index
Definition: hecmw_struct.h:42
double * mat_val
Definition: hecmw_struct.h:44
double * mat_temp
Definition: hecmw_struct.h:45
int * mpc_dof
Definition: hecmw_struct.h:52
double * mpc_val
Definition: hecmw_struct.h:53
int * mpc_index
Definition: hecmw_struct.h:50
int * mpc_item
Definition: hecmw_struct.h:51
double * bc_grp_val
Definition: hecmw_struct.h:89
double * elem_val_item
Definition: hecmw_result.h:23
double * node_val_item
Definition: hecmw_result.h:22
double * sect_R_item
Definition: hecmw_struct.h:32
int * sect_mat_ID_index
Definition: hecmw_struct.h:27
int * sect_mat_ID_item
Definition: hecmw_struct.h:28
double * bc_grp_val
Definition: hecmw_struct.h:118