FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
fstr_rmerge_util.h
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 <stdio.h>
11 #include "hecmw_struct.h"
12 #include "hecmw_result.h"
13 
18 typedef struct {
19  int nnode_gid;
20  int nelem_gid;
21  int* node_gid;
22  int* elem_gid;
25 
30 typedef struct {
31  int global;
32  int local;
33  int area;
34 } fstr_gl_rec;
35 
40 typedef struct {
43  int node_n;
44  int elem_n;
45 } fstr_glt;
46 
50 void fstr_set_log_fp(FILE *log_fp);
51 
55 void fstr_out_log(const char* fmt, ...);
56 
60 struct hecmwST_local_mesh** fstr_get_all_local_mesh(char* name_ID, int nrank,
61  int* area_n, int* refine);
62 
66 void fstr_free_mesh(struct hecmwST_local_mesh** mesh, int area_n);
67 
71 int fstr_get_step_n(char* name_ID, int nrank);
72 
76 fstr_res_info** fstr_get_all_result(char* name_ID, int step, int area_n,
77  int refine, int nrank);
78 
83  int refine);
84 
88 void fstr_free_result(fstr_res_info** res, int area_n);
89 
93 fstr_glt* fstr_create_glt(struct hecmwST_local_mesh** mesh, int area_n);
94 
98 void fstr_free_glt(fstr_glt* glt);
99 
104 
108 void fstr_free_glmesh(struct hecmwST_local_mesh* mp);
fstr_gl_rec::area
int area
Definition: fstr_rmerge_util.h:33
hecmwST_result_data
Definition: hecmw_result.h:11
fstr_get_all_result
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.
Definition: fstr_rmerge_util.c:198
fstr_out_log
void fstr_out_log(const char *fmt,...)
Log output.
Definition: fstr_rmerge_util.c:34
fstr_set_log_fp
void fstr_set_log_fp(FILE *log_fp)
Set file pointer for log output.
Definition: fstr_rmerge_util.c:27
fstr_glt::nrec
fstr_gl_rec * nrec
Definition: fstr_rmerge_util.h:41
hecmw_result.h
hecmwST_local_mesh
Definition: hecmw_struct.h:139
fstr_glt::elem_n
int elem_n
Definition: fstr_rmerge_util.h:44
fstr_gl_rec
Global ID, local ID and belonging area record.
Definition: fstr_rmerge_util.h:30
fstr_get_step_n
int fstr_get_step_n(char *name_ID, int nrank)
Check the number of steps (check for the existence of files)
Definition: fstr_rmerge_util.c:161
fstr_glt::erec
fstr_gl_rec * erec
Definition: fstr_rmerge_util.h:42
fstr_res_info
Utility for reading and processing results computed in parallel.
Definition: fstr_rmerge_util.h:18
fstr_gl_rec::global
int global
Definition: fstr_rmerge_util.h:31
fstr_free_glt
void fstr_free_glt(fstr_glt *glt)
Delete fstr_glt.
Definition: fstr_rmerge_util.c:566
hecmw_struct.h
fstr_create_glmesh
struct hecmwST_local_mesh * fstr_create_glmesh(fstr_glt *glt)
Create a single region mesh.
Definition: fstr_rmerge_util.c:579
fstr_all_result
struct hecmwST_result_data * fstr_all_result(fstr_glt *glt, fstr_res_info **res, int refine)
Combine data in all areas of the step.
Definition: fstr_rmerge_util.c:363
fstr_res_info::node_gid
int * node_gid
Definition: fstr_rmerge_util.h:21
fstr_free_mesh
void fstr_free_mesh(struct hecmwST_local_mesh **mesh, int area_n)
Delete mesh.
Definition: fstr_rmerge_util.c:145
fstr_res_info::result
struct hecmwST_result_data * result
Definition: fstr_rmerge_util.h:23
fstr_free_result
void fstr_free_result(fstr_res_info **res, int area_n)
Definition: fstr_rmerge_util.c:444
fstr_res_info::nelem_gid
int nelem_gid
Definition: fstr_rmerge_util.h:20
fstr_glt
Table for global ID, local ID and belonging area records.
Definition: fstr_rmerge_util.h:40
fstr_get_all_local_mesh
struct hecmwST_local_mesh ** fstr_get_all_local_mesh(char *name_ID, int nrank, int *area_n, int *refine)
Read all distributed meshes.
Definition: fstr_rmerge_util.c:95
fstr_glt::node_n
int node_n
Definition: fstr_rmerge_util.h:43
fstr_gl_rec::local
int local
Definition: fstr_rmerge_util.h:32
fstr_res_info::nnode_gid
int nnode_gid
Definition: fstr_rmerge_util.h:19
fstr_res_info::elem_gid
int * elem_gid
Definition: fstr_rmerge_util.h:22
fstr_create_glt
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.
Definition: fstr_rmerge_util.c:469
fstr_free_glmesh
void fstr_free_glmesh(struct hecmwST_local_mesh *mp)
Delete a single region mesh.
Definition: fstr_rmerge_util.c:604