FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_repart.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 
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <math.h>
9 #include <string.h>
10 #include <memory.h>
11 #include "hecmw_struct.h"
12 #include "hecmw_util.h"
13 #include "hecmw_io.h"
14 #include "parmetislib.h"
15 #include "hecmw_dlb_comm_util.h"
16 #include "mpi.h"
17 #define MASTER_PE 0
18 
19 #define PI 3.1415926
20 #define HEX_N_NODE 8
21 #define HEX_N_FACE 6
22 #define HEX_NODE_INDEX 255 /* 2^8 */
23 #define HEX_FACE_INDEX 63 /* 2^6 */
24 
25 #define MAX_LINE_LEN 256
26 
27 #define NUM_CONTROL_PARAS 9
28 
29 typedef struct _tmp_grp_inf {
31  int *item;
32 } Tmp_grp_inf;
33 
34 typedef struct _control_para_struct {
37  float *balance_rate;
39  float itr_rate;
40  int wgtflag;
41  /* 0----- no weights (vwgt and adjwgt are both NULL
42  1 ---- Weights on the edges only (vwgt is NULL)
43  2 ----- Weights on the vertices only (adjwgt is NULL)
44  3 ----- Weights on both the vertices and edges)
45  */
46  char vwgt_filename[128];
47  char adjwgt_filename[128];
48  float *machine_wgt;
49  char output_filename[128];
50 } Control_para;
51 
52 typedef struct _result_partition_struct {
53  int edgecut;
54  int t_node;
55  int *part;
56 } Result_part;
57 
61 };
62 typedef struct _adj_find_struct Adj_find;
63 
65  int node_num; /* local_id in current PE */
66  int local_id; /* local_id in import PE */
68 };
73 void HECMW_dlb_print_exit(char *str_msg);
74 void HECMW_dlb_memory_exit(char *str_msg);
hecmwST_result_data
Definition: hecmw_result.h:11
HECMW_dlb_memory_exit
void HECMW_dlb_memory_exit(char *str_msg)
Definition: hecmw_dlb_mem_util.c:7
_control_para_struct::num_repartition
int num_repartition
Definition: hecmw_repart.h:38
_adj_find_struct
Definition: hecmw_repart.h:58
_control_para_struct::adjwgt_filename
char adjwgt_filename[128]
Definition: hecmw_repart.h:47
_control_para_struct::num_criteria
int num_criteria
Definition: hecmw_repart.h:36
hecmwST_local_mesh
Definition: hecmw_struct.h:139
_tmp_grp_inf
Definition: hecmw_repart.h:29
_tmp_grp_inf::item
int * item
Definition: hecmw_repart.h:31
_control_para_struct::output_filename
char output_filename[128]
Definition: hecmw_repart.h:49
Result_part
struct _result_partition_struct Result_part
_control_para_struct
Definition: hecmw_repart.h:34
Control_para
struct _control_para_struct Control_para
hecmw_struct.h
_control_para_struct::adaptive_repartition
char adaptive_repartition[4]
Definition: hecmw_repart.h:35
hecmw_io.h
new_data
struct hecmwST_result_data * new_data
Definition: hecmw_repart.h:76
HECMW_dlb_print_exit
void HECMW_dlb_print_exit(char *str_msg)
Definition: hecmw_dlb_mem_util.c:16
data
struct hecmwST_result_data * data
Definition: hecmw_repart.h:75
_result_partition_struct::edgecut
int edgecut
Definition: hecmw_repart.h:53
hecmw_dlb_comm_util.h
_result_partition_struct
Definition: hecmw_repart.h:52
repart_comm
int repart_comm
Definition: hecmw_repart.h:70
_adj_find_struct::next_vertex
struct _adj_find_struct * next_vertex
Definition: hecmw_repart.h:60
new_mesh
struct hecmwST_local_mesh * new_mesh
Definition: hecmw_repart.h:72
_tmp_grp_inf::num_of_item
int num_of_item
Definition: hecmw_repart.h:30
mesh
struct hecmwST_local_mesh * mesh
Definition: hecmw_repart.h:71
_control_para_struct::itr_rate
float itr_rate
Definition: hecmw_repart.h:39
_control_para_struct::balance_rate
float * balance_rate
Definition: hecmw_repart.h:37
Tmp_grp_inf
struct _tmp_grp_inf Tmp_grp_inf
_control_para_struct::vwgt_filename
char vwgt_filename[128]
Definition: hecmw_repart.h:46
_control_para_struct::wgtflag
int wgtflag
Definition: hecmw_repart.h:40
_control_para_struct::machine_wgt
float * machine_wgt
Definition: hecmw_repart.h:48
hecmw_util.h
_result_partition_struct::part
int * part
Definition: hecmw_repart.h:55
_result_partition_struct::t_node
int t_node
Definition: hecmw_repart.h:54
_adj_find_struct::vertex_num
int vertex_num
Definition: hecmw_repart.h:59