Lines Matching refs:mesh

20 static int init_struct_global(struct hecmwST_local_mesh *mesh) {  in init_struct_global()  argument
21 HECMW_assert(mesh); in init_struct_global()
23 memset(mesh->gridfile, 0, sizeof(mesh->gridfile)); in init_struct_global()
24 mesh->hecmw_n_file = 0; in init_struct_global()
25 mesh->files = NULL; in init_struct_global()
26 memset(mesh->header, 0, sizeof(mesh->header)); in init_struct_global()
28 mesh->hecmw_flag_adapt = 0; in init_struct_global()
29 mesh->hecmw_flag_initcon = 0; in init_struct_global()
30 mesh->hecmw_flag_parttype = 0; in init_struct_global()
31 mesh->hecmw_flag_partdepth = 0; in init_struct_global()
32 mesh->hecmw_flag_version = 0; in init_struct_global()
33 mesh->hecmw_flag_partcontact = 0; in init_struct_global()
35 mesh->zero_temp = 0.0; in init_struct_global()
43 static int init_struct_node(struct hecmwST_local_mesh *mesh) { in init_struct_node() argument
44 HECMW_assert(mesh); in init_struct_node()
46 mesh->n_node = 0; in init_struct_node()
47 mesh->n_node_gross = 0; in init_struct_node()
48 mesh->nn_middle = 0; in init_struct_node()
49 mesh->nn_internal = 0; in init_struct_node()
50 mesh->node_internal_list = NULL; in init_struct_node()
52 mesh->node = NULL; in init_struct_node()
53 mesh->node_ID = NULL; in init_struct_node()
54 mesh->global_node_ID = NULL; in init_struct_node()
56 mesh->n_dof = 0; in init_struct_node()
57 mesh->n_dof_grp = 0; in init_struct_node()
58 mesh->n_dof_tot = 0; in init_struct_node()
59 mesh->node_dof_index = NULL; in init_struct_node()
60 mesh->node_dof_item = NULL; in init_struct_node()
62 mesh->node_val_index = NULL; in init_struct_node()
63 mesh->node_val_item = NULL; in init_struct_node()
65 mesh->node_init_val_index = NULL; in init_struct_node()
66 mesh->node_init_val_item = NULL; in init_struct_node()
74 static int init_struct_elem(struct hecmwST_local_mesh *mesh) { in init_struct_elem() argument
75 HECMW_assert(mesh); in init_struct_elem()
77 mesh->n_elem = 0; in init_struct_elem()
78 mesh->n_elem_gross = 0; in init_struct_elem()
79 mesh->ne_internal = 0; in init_struct_elem()
80 mesh->elem_internal_list = NULL; in init_struct_elem()
82 mesh->elem_ID = NULL; in init_struct_elem()
83 mesh->global_elem_ID = NULL; in init_struct_elem()
85 mesh->n_elem_type = 0; in init_struct_elem()
86 mesh->elem_type = NULL; in init_struct_elem()
87 mesh->elem_type_index = NULL; in init_struct_elem()
88 mesh->elem_type_item = NULL; in init_struct_elem()
90 mesh->elem_node_index = NULL; in init_struct_elem()
91 mesh->elem_node_item = NULL; in init_struct_elem()
93 mesh->section_ID = NULL; in init_struct_elem()
95 mesh->n_elem_mat_ID = 0; in init_struct_elem()
96 mesh->elem_mat_ID_index = NULL; in init_struct_elem()
97 mesh->elem_mat_ID_item = NULL; in init_struct_elem()
99 mesh->elem_mat_int_index = NULL; in init_struct_elem()
100 mesh->elem_mat_int_val = NULL; in init_struct_elem()
102 mesh->elem_val_index = NULL; in init_struct_elem()
103 mesh->elem_val_item = NULL; in init_struct_elem()
111 static int init_struct_comm(struct hecmwST_local_mesh *mesh) { in init_struct_comm() argument
112 HECMW_assert(mesh); in init_struct_comm()
114 mesh->zero = 0; in init_struct_comm()
115 mesh->PETOT = 0; in init_struct_comm()
116 mesh->PEsmpTOT = 0; in init_struct_comm()
117 mesh->my_rank = 0; in init_struct_comm()
118 mesh->errnof = 0; in init_struct_comm()
119 mesh->n_subdomain = 0; in init_struct_comm()
121 mesh->n_neighbor_pe = 0; in init_struct_comm()
122 mesh->neighbor_pe = NULL; in init_struct_comm()
124 mesh->import_index = NULL; in init_struct_comm()
125 mesh->import_item = NULL; in init_struct_comm()
126 mesh->export_index = NULL; in init_struct_comm()
127 mesh->export_item = NULL; in init_struct_comm()
128 mesh->shared_index = NULL; in init_struct_comm()
129 mesh->shared_item = NULL; in init_struct_comm()
137 static int init_struct_adapt(struct hecmwST_local_mesh *mesh) { in init_struct_adapt() argument
138 HECMW_assert(mesh); in init_struct_adapt()
140 mesh->coarse_grid_level = 0; in init_struct_adapt()
141 mesh->n_adapt = 0; in init_struct_adapt()
142 mesh->when_i_was_refined_node = NULL; in init_struct_adapt()
143 mesh->when_i_was_refined_elem = NULL; in init_struct_adapt()
144 mesh->adapt_parent_type = NULL; in init_struct_adapt()
145 mesh->adapt_type = NULL; in init_struct_adapt()
146 mesh->adapt_level = NULL; in init_struct_adapt()
147 mesh->adapt_parent = NULL; in init_struct_adapt()
148 mesh->adapt_children_index = NULL; in init_struct_adapt()
149 mesh->adapt_children_item = NULL; in init_struct_adapt()
157 static int init_struct_refine(struct hecmwST_local_mesh *mesh) { in init_struct_refine() argument
158 HECMW_assert(mesh); in init_struct_refine()
160 mesh->n_refine = 0; in init_struct_refine()
161 mesh->node_old2new = NULL; in init_struct_refine()
162 mesh->node_new2old = NULL; in init_struct_refine()
163 mesh->elem_old2new = NULL; in init_struct_refine()
164 mesh->elem_new2old = NULL; in init_struct_refine()
165 mesh->n_node_refine_hist = NULL; in init_struct_refine()
173 static int init_struct_sect(struct hecmwST_local_mesh *mesh) { in init_struct_sect() argument
174 HECMW_assert(mesh && mesh->section); in init_struct_sect()
176 mesh->section->n_sect = 0; in init_struct_sect()
177 mesh->section->sect_type = NULL; in init_struct_sect()
178 mesh->section->sect_opt = NULL; in init_struct_sect()
179 mesh->section->sect_mat_ID_index = NULL; in init_struct_sect()
180 mesh->section->sect_mat_ID_item = NULL; in init_struct_sect()
181 mesh->section->sect_I_index = NULL; in init_struct_sect()
182 mesh->section->sect_I_item = NULL; in init_struct_sect()
183 mesh->section->sect_R_index = NULL; in init_struct_sect()
184 mesh->section->sect_R_item = NULL; in init_struct_sect()
192 static int init_struct_mat(struct hecmwST_local_mesh *mesh) { in init_struct_mat() argument
193 HECMW_assert(mesh && mesh->material); in init_struct_mat()
195 mesh->material->n_mat = 0; in init_struct_mat()
196 mesh->material->n_mat_item = 0; in init_struct_mat()
197 mesh->material->n_mat_subitem = 0; in init_struct_mat()
198 mesh->material->n_mat_table = 0; in init_struct_mat()
199 mesh->material->mat_name = NULL; in init_struct_mat()
200 mesh->material->mat_item_index = NULL; in init_struct_mat()
201 mesh->material->mat_subitem_index = NULL; in init_struct_mat()
202 mesh->material->mat_table_index = NULL; in init_struct_mat()
203 mesh->material->mat_val = NULL; in init_struct_mat()
204 mesh->material->mat_temp = NULL; in init_struct_mat()
212 static int init_struct_mpc(struct hecmwST_local_mesh *mesh) { in init_struct_mpc() argument
213 HECMW_assert(mesh && mesh->mpc); in init_struct_mpc()
215 mesh->mpc->n_mpc = 0; in init_struct_mpc()
216 mesh->mpc->mpc_index = NULL; in init_struct_mpc()
217 mesh->mpc->mpc_item = NULL; in init_struct_mpc()
218 mesh->mpc->mpc_dof = NULL; in init_struct_mpc()
219 mesh->mpc->mpc_val = NULL; in init_struct_mpc()
220 mesh->mpc->mpc_const = NULL; in init_struct_mpc()
228 static int init_struct_amp(struct hecmwST_local_mesh *mesh) { in init_struct_amp() argument
229 HECMW_assert(mesh && mesh->amp); in init_struct_amp()
231 mesh->amp->n_amp = 0; in init_struct_amp()
232 mesh->amp->amp_name = NULL; in init_struct_amp()
233 mesh->amp->amp_type_definition = NULL; in init_struct_amp()
234 mesh->amp->amp_type_time = NULL; in init_struct_amp()
235 mesh->amp->amp_type_value = NULL; in init_struct_amp()
236 mesh->amp->amp_index = NULL; in init_struct_amp()
237 mesh->amp->amp_val = NULL; in init_struct_amp()
238 mesh->amp->amp_table = NULL; in init_struct_amp()
246 static int init_struct_node_grp(struct hecmwST_local_mesh *mesh) { in init_struct_node_grp() argument
247 HECMW_assert(mesh && mesh->node_group); in init_struct_node_grp()
249 mesh->node_group->n_grp = 0; in init_struct_node_grp()
250 mesh->node_group->grp_name = NULL; in init_struct_node_grp()
251 mesh->node_group->grp_index = NULL; in init_struct_node_grp()
252 mesh->node_group->grp_item = NULL; in init_struct_node_grp()
254 mesh->node_group->n_bc = 0; in init_struct_node_grp()
255 mesh->node_group->bc_grp_ID = 0; in init_struct_node_grp()
256 mesh->node_group->bc_grp_type = 0; in init_struct_node_grp()
257 mesh->node_group->bc_grp_index = 0; in init_struct_node_grp()
258 mesh->node_group->bc_grp_dof = 0; in init_struct_node_grp()
259 mesh->node_group->bc_grp_val = 0; in init_struct_node_grp()
267 static int init_struct_elem_grp(struct hecmwST_local_mesh *mesh) { in init_struct_elem_grp() argument
268 HECMW_assert(mesh && mesh->elem_group); in init_struct_elem_grp()
270 mesh->elem_group->n_grp = 0; in init_struct_elem_grp()
271 mesh->elem_group->grp_name = NULL; in init_struct_elem_grp()
272 mesh->elem_group->grp_index = NULL; in init_struct_elem_grp()
273 mesh->elem_group->grp_item = NULL; in init_struct_elem_grp()
275 mesh->elem_group->n_bc = 0; in init_struct_elem_grp()
276 mesh->elem_group->bc_grp_ID = NULL; in init_struct_elem_grp()
277 mesh->elem_group->bc_grp_type = NULL; in init_struct_elem_grp()
278 mesh->elem_group->bc_grp_index = NULL; in init_struct_elem_grp()
279 mesh->elem_group->bc_grp_val = NULL; in init_struct_elem_grp()
287 static int init_struct_surf_grp(struct hecmwST_local_mesh *mesh) { in init_struct_surf_grp() argument
288 HECMW_assert(mesh && mesh->surf_group); in init_struct_surf_grp()
290 mesh->surf_group->n_grp = 0; in init_struct_surf_grp()
291 mesh->surf_group->grp_name = NULL; in init_struct_surf_grp()
292 mesh->surf_group->grp_index = NULL; in init_struct_surf_grp()
293 mesh->surf_group->grp_item = NULL; in init_struct_surf_grp()
295 mesh->surf_group->n_bc = 0; in init_struct_surf_grp()
296 mesh->surf_group->bc_grp_ID = NULL; in init_struct_surf_grp()
297 mesh->surf_group->bc_grp_type = NULL; in init_struct_surf_grp()
298 mesh->surf_group->bc_grp_index = NULL; in init_struct_surf_grp()
299 mesh->surf_group->bc_grp_val = NULL; in init_struct_surf_grp()
307 static int init_struct_contact_pair(struct hecmwST_local_mesh *mesh) { in init_struct_contact_pair() argument
308 HECMW_assert(mesh && mesh->contact_pair); in init_struct_contact_pair()
310 mesh->contact_pair->n_pair = 0; in init_struct_contact_pair()
311 mesh->contact_pair->name = NULL; in init_struct_contact_pair()
312 mesh->contact_pair->type = NULL; in init_struct_contact_pair()
313 mesh->contact_pair->slave_grp_id = NULL; in init_struct_contact_pair()
314 mesh->contact_pair->slave_orisgrp_id = NULL; in init_struct_contact_pair()
315 mesh->contact_pair->master_grp_id = NULL; in init_struct_contact_pair()
323 int HECMW_dist_init(struct hecmwST_local_mesh *mesh) { in HECMW_dist_init() argument
324 HECMW_assert(mesh); in HECMW_dist_init()
327 if (init_struct_global(mesh)) { in HECMW_dist_init()
332 if (init_struct_node(mesh)) { in HECMW_dist_init()
337 if (init_struct_elem(mesh)) { in HECMW_dist_init()
342 if (init_struct_comm(mesh)) { in HECMW_dist_init()
347 if (init_struct_adapt(mesh)) { in HECMW_dist_init()
352 if (init_struct_refine(mesh)) { in HECMW_dist_init()
357 if (init_struct_sect(mesh)) { in HECMW_dist_init()
362 if (init_struct_mat(mesh)) { in HECMW_dist_init()
367 if (init_struct_mpc(mesh)) { in HECMW_dist_init()
372 if (init_struct_amp(mesh)) { in HECMW_dist_init()
377 if (init_struct_node_grp(mesh)) { in HECMW_dist_init()
382 if (init_struct_elem_grp(mesh)) { in HECMW_dist_init()
387 if (init_struct_surf_grp(mesh)) { in HECMW_dist_init()
392 if (init_struct_contact_pair(mesh)) { in HECMW_dist_init()
403 struct hecmwST_local_mesh *mesh; in HECMW_dist_alloc() local
406 if ((mesh = (struct hecmwST_local_mesh *)HECMW_calloc( in HECMW_dist_alloc()
413 if ((mesh->section = (struct hecmwST_section *)HECMW_calloc( in HECMW_dist_alloc()
420 if ((mesh->material = (struct hecmwST_material *)HECMW_calloc( in HECMW_dist_alloc()
427 if ((mesh->mpc = (struct hecmwST_mpc *)HECMW_calloc( in HECMW_dist_alloc()
434 if ((mesh->amp = (struct hecmwST_amplitude *)HECMW_calloc( in HECMW_dist_alloc()
441 if ((mesh->node_group = (struct hecmwST_node_grp *)HECMW_calloc( in HECMW_dist_alloc()
448 if ((mesh->elem_group = (struct hecmwST_elem_grp *)HECMW_calloc( in HECMW_dist_alloc()
455 if ((mesh->surf_group = (struct hecmwST_surf_grp *)HECMW_calloc( in HECMW_dist_alloc()
462 if ((mesh->contact_pair = (struct hecmwST_contact_pair *)HECMW_calloc( in HECMW_dist_alloc()
470 mesh->refine_origin = NULL; in HECMW_dist_alloc()
473 if (HECMW_dist_init(mesh)) { in HECMW_dist_alloc()
477 return mesh; in HECMW_dist_alloc()