void str_grid_edge_data_free(str_grid_edge_data_t* edge_data) { int_ptr_unordered_map_free(edge_data->x_patches); int_ptr_unordered_map_free(edge_data->y_patches); int_ptr_unordered_map_free(edge_data->z_patches); polymec_free(edge_data->patch_offsets); if (edge_data->owns_buffer) polymec_free(edge_data->buffer); polymec_free(edge_data); }
void str_grid_node_data_free(str_grid_node_data_t* node_data) { int_ptr_unordered_map_free(node_data->patches); polymec_free(node_data->patch_offsets); if (node_data->owns_buffer) polymec_free(node_data->buffer); polymec_free(node_data); }
void amr_grid_free(amr_grid_t* grid) { int_ptr_unordered_map_free(grid->pending_data); for (int n = 0; n < 6; ++n) { if (grid->neighbor_interpolators[n] != NULL) amr_grid_interpolator_free(grid->neighbor_interpolators[n]); } if (grid->coarse_interpolator != NULL) amr_grid_interpolator_free(grid->coarse_interpolator); if (grid->fine_interpolator != NULL) amr_grid_interpolator_free(grid->fine_interpolator); polymec_free(grid->patch_types); polymec_free(grid->remote_owners); if (grid->local_patch_indices != NULL) polymec_free(grid->local_patch_indices); if (grid->cell_ex != NULL) exchanger_free(grid->cell_ex); if (grid->x_face_ex != NULL) exchanger_free(grid->x_face_ex); if (grid->y_face_ex != NULL) exchanger_free(grid->y_face_ex); if (grid->z_face_ex != NULL) exchanger_free(grid->z_face_ex); if (grid->x_edge_ex != NULL) exchanger_free(grid->x_edge_ex); if (grid->y_edge_ex != NULL) exchanger_free(grid->y_edge_ex); if (grid->z_edge_ex != NULL) exchanger_free(grid->z_edge_ex); if (grid->node_ex != NULL) exchanger_free(grid->node_ex); for (int centering = 0; centering < 8; ++centering) ptr_array_free(grid->local_buffers[centering]); polymec_free(grid); }
void str_grid_cell_filler_free(str_grid_cell_filler_t* cell_filler) { int_ptr_unordered_map_free(cell_filler->tokens); int_ptr_unordered_map_free(cell_filler->patch_fillers); polymec_free(cell_filler); }