FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
fstr_rmerge_util.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 
10 #include "fstr_rmerge_util.h"
11 
12 #include <stdio.h>
13 #include <string.h>
14 #include <stdlib.h>
15 
16 #include "hecmw_util.h"
17 #include "hecmw_dist_free.h"
18 #include "hecmw_io_dist.h"
19 #include "hecmw_io_get_mesh.h"
20 #include "hecmw_etype.h"
21 
22 static FILE* Log_FP;
23 
27 void fstr_set_log_fp(FILE *log_fp) {
28  Log_FP = log_fp;
29 }
30 
34 void fstr_out_log(const char* fmt, ...) {
35  va_list arg;
36  va_start(arg, fmt);
37  vfprintf(Log_FP, fmt, arg);
38  va_end(arg);
39 }
40 
45 static int get_dist_fname(char* name_ID, char* fheader, size_t fheader_len,
46  int* fg_single, int* refine, int nrank, int irank) {
47  struct hecmw_ctrl_meshfiles* files;
48 
49  files = HECMW_ctrl_get_meshfiles_header_sub(name_ID, nrank, irank);
50  if (!files) return -1;
51 
52  if (files->n_mesh == 1) {
53  snprintf(fheader, fheader_len, "%s", files->meshfiles[0].filename);
54  if (files->meshfiles[0].type == HECMW_CTRL_FTYPE_HECMW_DIST) {
55  *fg_single = 0;
56  } else {
57  *fg_single = 1;
58  }
59  *refine = files->meshfiles[0].refine;
60  fstr_out_log("refine number is %d\n", *refine);
61  } else {
63  return -1;
64  }
65 
67  return 0;
68 }
69 
70 static int get_area_n(char* fheader) {
71  FILE* fp;
72  char buff[HECMW_FILENAME_LEN + 1];
73  int area = 0;
74 
75  while (1) {
76  snprintf(buff, sizeof(buff), "%s.%d", fheader, area);
77  fstr_out_log("try open : %s ... ", buff);
78  fp = fopen(buff, "r");
79  if (!fp) {
80  fstr_out_log("fail\n");
81  fstr_out_log("area number is %d\n", area);
82  return area;
83  } else {
84  fstr_out_log("success\n");
85  fclose(fp);
86  }
87  area++;
88  }
89 }
90 
96  int nrank,
97  int* area_number,
98  int* refine) {
99  int i;
100  int area_n;
101  int fg_single;
102  char fheader[HECMW_HEADER_LEN + 1];
103  char fname[HECMW_FILENAME_LEN + 1];
104  struct hecmwST_local_mesh** mesh;
105 
106  if (get_dist_fname(name_ID, fheader, sizeof(fheader), &fg_single, refine,
107  nrank, 0)) return NULL;
108 
109  if (fg_single) {
110  fstr_out_log("mesh file type is NOT HECMW_DIST.\n");
111  area_n = 1;
112  fstr_out_log("area number is %d\n", area_n);
113  mesh = HECMW_malloc(area_n * sizeof(struct hecmwST_local_mesh*));
114  mesh[0] = HECMW_get_mesh(name_ID);
115  if (!mesh[0]) return NULL;
116  } else {
117  fstr_out_log("mesh file type is HECMW_DIST.\n");
118  if (nrank == 0) {
119  area_n = get_area_n(fheader);
120  } else {
121  area_n = nrank;
122  }
123  if (area_n == 0) return NULL;
124  mesh = HECMW_malloc(area_n * sizeof(struct hecmwST_local_mesh*));
125  for (i = 0; i < area_n; i++) {
126  if (nrank == 0) {
127  snprintf(fname, sizeof(fname), "%s.%d", fheader, i);
128  } else {
129  get_dist_fname(name_ID, fheader, sizeof(fheader), &fg_single, refine,
130  nrank, i);
131  snprintf(fname, sizeof(fname), "%s.%d", fheader, i);
132  }
133  fstr_out_log("loading dist mesh from %s\n", fname);
134  mesh[i] = HECMW_get_dist_mesh(fname);
135  if (!mesh[i]) return NULL;
136  }
137  }
138  *area_number = area_n;
139 
140  return mesh;
141 }
142 
147 void fstr_free_mesh(struct hecmwST_local_mesh** mesh, int area_n) {
148  int i;
149 
150  if (!mesh) return;
151 
152  for (i = 0; i < area_n; i++) {
153  HECMW_dist_free(mesh[i]);
154  }
155  HECMW_free(mesh);
156  return;
157 }
158 
163 int fstr_get_step_n(char* name_ID, int nrank) {
164  FILE* fp;
165  int step, fg_text;
166  char* fheader;
167  char fname[HECMW_FILENAME_LEN + 1];
168 
169  if (nrank == 0) {
170  if ((fheader = HECMW_ctrl_get_result_fileheader(name_ID, 1, &fg_text)) ==
171  NULL)
172  return 0;
173  } else {
174  if ((fheader = HECMW_ctrl_get_result_fileheader_sub(name_ID, 1, nrank, 0,
175  &fg_text)) == NULL)
176  return 0;
177  }
178 
179  step = 1;
180  while (1) {
181  snprintf(fname, sizeof(fname), "%s.0.%d", fheader, step);
182  fstr_out_log("try open : %s ... ", fname);
183  fp = fopen(fname, "r");
184  if (!fp) {
185  fstr_out_log("fail\n");
186  fstr_out_log("step number is %d\n", step - 1);
187  return step - 1;
188  } else {
189  fstr_out_log("success\n");
190  fclose(fp);
191  }
192  step++;
193  }
194 }
195 
200 fstr_res_info** fstr_get_all_result(char* name_ID, int step, int area_n,
201  int refine, int nrank) {
202  char* fheader;
203  char fname[HECMW_FILENAME_LEN + 1];
204  fstr_res_info** res;
205  struct hecmwST_result_data* data;
206  int i, j, k, count, num, nnode, nelem, flag, fg_text;
207  int *node_gid, *elem_gid;
208  int refine_nnode = 0;
209 
210  if (nrank == 0) {
211  if ((fheader = HECMW_ctrl_get_result_fileheader(name_ID, step,
212  &fg_text)) == NULL)
213  return 0;
214  }
215 
216  res = HECMW_malloc(area_n * sizeof(fstr_res_info*));
217  if (!res) return NULL;
218 
219  for (i = 0; i < area_n; i++) {
220  res[i] = HECMW_malloc(sizeof(fstr_res_info));
221  if (!res[i]) return NULL;
222 
223  if (nrank != 0) {
225  name_ID, step, nrank, i, &fg_text)) == NULL)
226  return 0;
227  }
228  snprintf(fname, sizeof(fname), "%s.%d.%d", fheader, i, step);
230  if (!data) return NULL;
231  nnode = HECMW_result_get_nnode();
232  node_gid = HECMW_malloc(nnode * sizeof(int));
233  if (!node_gid) return NULL;
234  HECMW_result_get_nodeID(node_gid);
235  nelem = HECMW_result_get_nelem();
236  elem_gid = HECMW_malloc(nelem * sizeof(int));
237  if (!elem_gid) return NULL;
238  if (data->ne_component) HECMW_result_get_elemID(elem_gid);
239 
240  if (refine) {
241  res[i]->result = HECMW_malloc(sizeof(struct hecmwST_result_data));
242  if (!res[i]->result) return NULL;
243 
244  res[i]->result->ng_component = data->ng_component;
245  res[i]->result->ng_dof = HECMW_malloc(data->ng_component * sizeof(int));
246  if (!res[i]->result->ng_dof) return NULL;
247  res[i]->result->global_label =
248  HECMW_malloc(data->ng_component * sizeof(char*));
249  if (!res[i]->result->global_label) return NULL;
250  for (j = 0; j < data->ng_component; j++) {
251  res[i]->result->ng_dof[j] = data->ng_dof[j];
252  res[i]->result->global_label[j] = HECMW_strdup(data->global_label[j]);
253  if (!res[i]->result->global_label[j]) return NULL;
254  }
255 
256  res[i]->result->nn_component = data->nn_component;
257  res[i]->result->nn_dof = HECMW_malloc(data->nn_component * sizeof(int));
258  if (!res[i]->result->nn_dof) return NULL;
259  res[i]->result->node_label =
260  HECMW_malloc(data->nn_component * sizeof(char*));
261  if (!res[i]->result->node_label) return NULL;
262  num = 0;
263  for (j = 0; j < data->nn_component; j++) {
264  res[i]->result->nn_dof[j] = data->nn_dof[j];
265  res[i]->result->node_label[j] = HECMW_strdup(data->node_label[j]);
266  if (!res[i]->result->node_label[j]) return NULL;
267  num += data->nn_dof[j];
268  }
269 
270  count = 1;
271  flag = 0;
272  for (j = 1; j < nnode; j++) {
273  if (flag == refine) break;
274  count++;
275  if (node_gid[j] > 0 && node_gid[j - 1] < 0) flag++;
276  if (node_gid[j] < 0 && node_gid[j] > node_gid[j - 1]) flag++;
277  }
278  count--;
279  fstr_out_log("\narea:%d -- refined_nn_internal:%d", i, count);
280  refine_nnode += count;
281 
282  count = 0;
283  for (j = 0; j < nnode; j++)
284  if (node_gid[j] > 0) count++;
285  res[i]->nnode_gid = count;
286  res[i]->result->node_val_item =
287  HECMW_malloc(num * count * sizeof(double));
288  if (!res[i]->result->node_val_item) return NULL;
289  count = 0;
290  for (j = 0; j < nnode; j++) {
291  if (node_gid[j] > 0) {
292  for (k = 0; k < num; k++) {
293  res[i]->result->node_val_item[count++] =
294  data->node_val_item[num * j + k];
295  }
296  }
297  }
298 
299  res[i]->result->ne_component = data->ne_component;
300  res[i]->result->ne_dof = HECMW_malloc(data->ne_component * sizeof(int));
301  if (!res[i]->result->ne_dof) return NULL;
302  res[i]->result->elem_label =
303  HECMW_malloc(data->ne_component * sizeof(char*));
304  if (!res[i]->result->elem_label) return NULL;
305  num = 0;
306  for (j = 0; j < data->ne_component; j++) {
307  res[i]->result->ne_dof[j] = data->ne_dof[j];
308  res[i]->result->elem_label[j] = HECMW_strdup(data->elem_label[j]);
309  if (!res[i]->result->elem_label[j]) return NULL;
310  num += data->ne_dof[j];
311  }
312 
313  count = 0;
314  for (j = 0; j < nelem; j++)
315  if (elem_gid[j] > 0) count++;
316  fstr_out_log("\narea:%d -- ne_original from result:%d", i, count);
317  res[i]->nelem_gid = count;
318  res[i]->result->elem_val_item =
319  HECMW_malloc(num * count * sizeof(double));
320  if (!res[i]->result->elem_val_item) return NULL;
321  count = 0;
322  for (j = 0; j < nelem; j++) {
323  if (elem_gid[j] > 0) {
324  for (k = 0; k < num; k++) {
325  res[i]->result->elem_val_item[count++] =
326  data->elem_val_item[num * j + k];
327  }
328  }
329  }
330 
334 
335  res[i]->node_gid = HECMW_malloc(res[i]->nnode_gid * sizeof(int));
336  if (!res[i]->node_gid) return NULL;
337  count = 0;
338  for (j = 0; j < nnode; j++) {
339  if (node_gid[j] > 0) res[i]->node_gid[count++] = node_gid[j];
340  }
341  free(node_gid);
342 
343  res[i]->elem_gid = HECMW_malloc(res[i]->nelem_gid * sizeof(int));
344  if (!res[i]->elem_gid) return NULL;
345  count = 0;
346  for (j = 0; j < nelem; j++) {
347  if (elem_gid[j] > 0) res[i]->elem_gid[count++] = elem_gid[j];
348  }
349  free(elem_gid);
350  } else {
351  res[i]->result = data;
352  res[i]->nnode_gid = nnode;
353  res[i]->node_gid = node_gid;
354  res[i]->nelem_gid = nelem;
355  res[i]->elem_gid = elem_gid;
356  }
357  }
358 
359  if (refine) fstr_out_log("\ntotal refined_nn_internal:%d\n", refine_nnode);
360 
361  return res;
362 }
363 
369  int refine) {
370  int i, j, k, l_id, area;
371  int gitem, nitem, eitem, count, irec;
372  struct hecmwST_result_data* data;
373 
374  gitem = 0;
375  for (i = 0; i < res[0]->result->ng_component; i++)
376  gitem += res[0]->result->ng_dof[i];
377  nitem = 0;
378  for (i = 0; i < res[0]->result->nn_component; i++)
379  nitem += res[0]->result->nn_dof[i];
380  eitem = 0;
381  for (i = 0; i < res[0]->result->ne_component; i++)
382  eitem += res[0]->result->ne_dof[i];
383 
384  data = HECMW_malloc(sizeof(struct hecmwST_result_data));
385  if (!data) return NULL;
386  data->ng_dof = HECMW_malloc(res[0]->result->ng_component * sizeof(int));
387  if (!data->ng_dof) return NULL;
388  data->global_label = HECMW_malloc(res[0]->result->ng_component * sizeof(char*));
389  if (!data->global_label) return NULL;
390  data->global_val_item = HECMW_malloc(gitem * sizeof(double));
391  if (!data->global_val_item) return NULL;
392  data->nn_dof = HECMW_malloc(res[0]->result->nn_component * sizeof(int));
393  if (!data->nn_dof) return NULL;
394  data->node_label = HECMW_malloc(res[0]->result->nn_component * sizeof(char*));
395  if (!data->node_label) return NULL;
396  data->node_val_item = HECMW_malloc(nitem * glt->node_n * sizeof(double));
397  if (!data->node_val_item) return NULL;
398  data->ne_dof = HECMW_malloc(res[0]->result->ne_component * sizeof(int));
399  if (!data->ne_dof) return NULL;
400  data->elem_label = HECMW_malloc(res[0]->result->ne_component * sizeof(char*));
401  if (!data->elem_label) return NULL;
402  data->elem_val_item = HECMW_malloc(eitem * glt->elem_n * sizeof(double));
403  if (!data->elem_val_item) return NULL;
404 
405  data->ng_component = res[0]->result->ng_component;
406  for (i = 0; i < res[0]->result->ng_component; i++) {
407  data->ng_dof[i] = res[0]->result->ng_dof[i];
408  data->global_label[i] = HECMW_strdup(res[0]->result->global_label[i]);
409  if (!data->global_label[i]) return NULL;
410  }
411  for (i = 0; i < gitem; i++) {
412  data->global_val_item[i] = res[0]->result->global_val_item[i];
413  }
414  count = 0;
415  for (i = 0; i < glt->node_n; i++) {
416  l_id = glt->nrec[i].local;
417  area = glt->nrec[i].area;
418  irec = nitem * l_id;
419  for (j = 0; j < res[0]->result->nn_component; j++) {
420  for (k = 0; k < res[0]->result->nn_dof[j]; k++) {
421  data->node_val_item[count++] = res[area]->result->node_val_item[irec++];
422  }
423  }
424  }
425  data->nn_component = res[0]->result->nn_component;
426  for (i = 0; i < res[0]->result->nn_component; i++) {
427  data->nn_dof[i] = res[0]->result->nn_dof[i];
428  data->node_label[i] = HECMW_strdup(res[0]->result->node_label[i]);
429  if (!data->node_label[i]) return NULL;
430  }
431 
432  count = 0;
433  for (i = 0; i < glt->elem_n; i++) {
434  l_id = glt->erec[i].local;
435  area = glt->erec[i].area;
436  irec = eitem * l_id;
437  for (j = 0; j < res[0]->result->ne_component; j++) {
438  for (k = 0; k < res[0]->result->ne_dof[j]; k++) {
439  if (refine) {
440  data->elem_val_item[count++] = 0.0;
441  } else {
442  data->elem_val_item[count++] =
443  res[area]->result->elem_val_item[irec++];
444  }
445  }
446  }
447  }
448  data->ne_component = res[0]->result->ne_component;
449  for (i = 0; i < res[0]->result->ne_component; i++) {
450  data->ne_dof[i] = res[0]->result->ne_dof[i];
451  data->elem_label[i] = HECMW_strdup(res[0]->result->elem_label[i]);
452  if (!data->elem_label[i]) return NULL;
453  }
454 
455  return data;
456 }
457 
462 void fstr_free_result(fstr_res_info** res, int area_n) {
463  int i;
464 
465  if (!res) return;
466 
467  for (i = 0; i < area_n; i++) {
468  HECMW_result_free(res[i]->result);
469  HECMW_free(res[i]->node_gid);
470  HECMW_free(res[i]->elem_gid);
471  HECMW_free(res[i]);
472  }
473  HECMW_free(res);
474  return;
475 }
476 
481 static int cmp_global_glt(const fstr_gl_rec* g1, const fstr_gl_rec* g2) {
482  return (g1->global - g2->global);
483 }
484 
485 typedef int (*cmp_func)(const void*, const void*);
486 
487 fstr_glt* fstr_create_glt(struct hecmwST_local_mesh** mesh, int area_n) {
488  int i, j, k, eid, count;
489  int all_n, all_e;
490  int area_e;
491  fstr_gl_rec* nrec;
492  fstr_gl_rec* erec;
493  fstr_glt* glt;
494  int* area_etype_list;
495 
496  all_n = 0;
497  for (i = 0; i < area_n; i++) {
498  fstr_out_log("area:%d -- nn_internal:%d\n", i, mesh[i]->nn_internal);
499  all_n += mesh[i]->nn_internal;
500  }
501  fstr_out_log("total nn_internal:%d\n", all_n);
502 
503  nrec = HECMW_malloc(sizeof(fstr_gl_rec) * all_n);
504  if (!nrec) return NULL;
505 
506  count = 0;
507  for (i = 0; i < area_n; i++) {
508  for (j = 0; j < mesh[i]->nn_internal; j++) {
509  nrec[count].global = mesh[i]->global_node_ID[j];
510  nrec[count].local = j;
511  nrec[count].area = i;
512  count++;
513  }
514  }
515 
516  qsort(nrec, all_n, sizeof(fstr_gl_rec), (cmp_func)cmp_global_glt);
517 
518  all_e = 0;
519  for (i = 0; i < area_n; i++) {
520  area_e = 0;
521  area_etype_list = HECMW_malloc(sizeof(int) * mesh[i]->n_elem);
522  for (j = 0; j < mesh[i]->n_elem_type; j++) {
523  for (k = mesh[i]->elem_type_index[j]; k < mesh[i]->elem_type_index[j+1]; k++) {
524  area_etype_list[k] = mesh[i]->elem_type_item[j];
525  }
526  }
527 
528  for (j = 0; j < mesh[i]->ne_internal; j++) {
529  eid = mesh[i]->elem_internal_list[j] - 1;
530  if ( HECMW_is_etype_patch(area_etype_list[eid]) ) continue;
531  if ( HECMW_is_etype_link(area_etype_list[eid]) ) continue;
532  area_e++;
533  }
534 
535  HECMW_free(area_etype_list);
536  all_e += area_e;
537  fstr_out_log("area:%d -- ne_internal:%d\n", i, area_e);
538  }
539  fstr_out_log("total ne_internal:%d\n", all_e);
540 
541  erec = HECMW_malloc(sizeof(fstr_gl_rec) * all_e);
542  if (!erec) return NULL;
543 
544  count = 0;
545  for (i = 0; i < area_n; i++) {
546 
547  area_etype_list = HECMW_malloc(sizeof(int) * mesh[i]->n_elem);
548  for (j = 0; j < mesh[i]->n_elem_type; j++) {
549  for (k = mesh[i]->elem_type_index[j]; k < mesh[i]->elem_type_index[j+1]; k++) {
550  area_etype_list[k] = mesh[i]->elem_type_item[j];
551  }
552  }
553 
554  for (j = 0; j < mesh[i]->ne_internal; j++) {
555  eid = mesh[i]->elem_internal_list[j] - 1;
556  if ( HECMW_is_etype_patch(area_etype_list[eid]) ) continue;
557  if ( HECMW_is_etype_link(area_etype_list[eid]) ) continue;
558 
559  erec[count].global = mesh[i]->global_elem_ID[eid];
560  erec[count].local = eid;
561  erec[count].area = i;
562  count++;
563  }
564 
565  HECMW_free(area_etype_list);
566  }
567 
568  qsort(erec, all_e, sizeof(fstr_gl_rec), (cmp_func)cmp_global_glt);
569 
570  glt = HECMW_malloc(sizeof(fstr_glt));
571  if (!glt) return NULL;
572  glt->nrec = nrec;
573  glt->erec = erec;
574  glt->node_n = all_n;
575  glt->elem_n = all_e;
576 
577  return glt;
578 }
579 
585  if (!glt) return;
586 
587  HECMW_free(glt->nrec);
588  HECMW_free(glt->erec);
589  HECMW_free(glt);
590  return;
591 }
592 
598  struct hecmwST_local_mesh* mesh;
599  int i;
600 
601  mesh = HECMW_calloc(1, sizeof(struct hecmwST_local_mesh));
602  mesh->global_node_ID = HECMW_malloc(glt->node_n * sizeof(int));
603  mesh->global_elem_ID = HECMW_malloc(glt->elem_n * sizeof(int));
604 
605  for (i = 0; i < glt->node_n; i++) {
606  mesh->global_node_ID[i] = glt->nrec[i].global;
607  }
608  mesh->n_node = glt->node_n;
609 
610  for (i = 0; i < glt->elem_n; i++) {
611  mesh->global_elem_ID[i] = glt->erec[i].global;
612  }
613  mesh->n_elem = glt->elem_n;
614 
615  return mesh;
616 }
617 
623  if (!mesh) return;
624 
627  HECMW_free(mesh);
628  return;
629 }
struct hecmwST_local_mesh * fstr_create_glmesh(fstr_glt *glt)
Create a single region mesh.
struct hecmwST_local_mesh ** fstr_get_all_local_mesh(char *name_ID, int nrank, int *area_number, int *refine)
Read all distributed meshes.
void fstr_set_log_fp(FILE *log_fp)
Set file pointer for log output.
void fstr_free_glmesh(struct hecmwST_local_mesh *mesh)
Delete a single region mesh.
fstr_glt * fstr_create_glt(struct hecmwST_local_mesh **mesh, int area_n)
Create table for global ID, local ID and belonging area records fstr_glt.
void fstr_free_glt(fstr_glt *glt)
Delete fstr_glt.
fstr_res_info ** fstr_get_all_result(char *name_ID, int step, int area_n, int refine, int nrank)
Read all area data of step.
void fstr_out_log(const char *fmt,...)
Log output.
int fstr_get_step_n(char *name_ID, int nrank)
Check the number of steps (check for the existence of files)
struct hecmwST_result_data * fstr_all_result(fstr_glt *glt, fstr_res_info **res, int refine)
Combine data in all areas of the step.
void fstr_free_result(fstr_res_info **res, int area_n)
int(* cmp_func)(const void *, const void *)
void fstr_free_mesh(struct hecmwST_local_mesh **mesh, int area_n)
Delete mesh.
#define HECMW_FILENAME_LEN
Definition: hecmw_config.h:74
#define HECMW_HEADER_LEN
Definition: hecmw_config.h:70
void HECMW_ctrl_free_meshfiles(struct hecmw_ctrl_meshfiles *meshfiles)
struct hecmw_ctrl_meshfiles * HECMW_ctrl_get_meshfiles_header_sub(char *name_ID, int n_rank, int i_rank)
char * HECMW_ctrl_get_result_fileheader_sub(char *name_ID, int istep, int n_rank, int i_rank, int *fg_text)
char * HECMW_ctrl_get_result_fileheader(char *name_ID, int istep, int *fg_text)
#define HECMW_CTRL_FTYPE_HECMW_DIST
Definition: hecmw_control.h:14
void HECMW_dist_free(struct hecmwST_local_mesh *mesh)
struct hecmwST_local_mesh * mesh
Definition: hecmw_repart.h:71
int HECMW_is_etype_link(int etype)
Definition: hecmw_etype.c:1987
int HECMW_is_etype_patch(int etype)
Definition: hecmw_etype.c:2048
struct hecmwST_local_mesh * HECMW_get_dist_mesh(char *fname)
struct hecmwST_local_mesh * HECMW_get_mesh(char *name_ID)
#define NULL
#define HECMW_calloc(nmemb, size)
Definition: hecmw_malloc.h:21
#define HECMW_free(ptr)
Definition: hecmw_malloc.h:24
#define HECMW_strdup(s)
Definition: hecmw_malloc.h:23
#define HECMW_malloc(size)
Definition: hecmw_malloc.h:20
int * HECMW_result_get_nodeID(int *buff)
Definition: hecmw_result.c:229
int HECMW_result_get_nnode(void)
Definition: hecmw_result.c:215
void HECMW_result_free_nodeID(void)
Definition: hecmw_result.c:245
int HECMW_result_get_nelem(void)
Definition: hecmw_result.c:217
void HECMW_result_free(struct hecmwST_result_data *result)
Definition: hecmw_result.c:21
struct hecmwST_result_data * HECMW_result_read_by_fname(char *filename)
Definition: hecmw_result.c:180
int * HECMW_result_get_elemID(int *buff)
Definition: hecmw_result.c:237
void HECMW_result_free_elemID(void)
Definition: hecmw_result.c:250
CNFData data
Global ID, local ID and belonging area record.
Table for global ID, local ID and belonging area records.
fstr_gl_rec * nrec
fstr_gl_rec * erec
Utility for reading and processing results computed in parallel.
struct hecmwST_result_data * result
struct hecmw_ctrl_meshfile * meshfiles
Definition: hecmw_control.h:42
double * elem_val_item
Definition: hecmw_result.h:23
double * global_val_item
Definition: hecmw_result.h:21
double * node_val_item
Definition: hecmw_result.h:22