YetAnotherCoupler 3.2.0
Loading...
Searching...
No Matches
dist_grid_internal.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef DIST_GRID_INTERNAL_H
6#define DIST_GRID_INTERNAL_H
7
8#include "dist_grid.h"
9#include "geometry.h"
10
11struct yac_dist_grid;
12typedef size_t const (* const const_size_t_2_pointer)[2];
13typedef int const * const_int_pointer;
14typedef size_t const * const const_size_t_pointer;
16typedef enum yac_edge_type const * const const_yac_edge_type_pointer;
19
36
37// information about a point on a remote process
39 int rank; // MPI rank
40 uint64_t orig_pos; // local id on the remote process
41};
42
44 int count;
45 union {
46 struct remote_point_info single; // valid if count == 1;
47 struct remote_point_info * multi; // valid if count != -1;
49};
50
55
58 size_t count;
60};
61
68 struct yac_dist_grid_pair * grid_pair);
69
77 struct yac_dist_grid_pair * grid_pair, char const * grid_name);
78
91 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
92 yac_coordinate_pointer search_coords, size_t count, size_t * cells);
93
106 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
107 yac_coordinate_pointer search_coords, size_t count, size_t * cells);
108
121 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
122 yac_coordinate_pointer search_coords, size_t count, size_t * local_ids,
123 size_t n, struct yac_interp_field field);
124
137 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
138 const_bounding_circle_pointer bnd_circles, size_t count, size_t ** cells,
139 size_t * num_results_per_bnd_circle, struct yac_interp_field field);
140
155 struct yac_dist_grid_pair * grid_pair,
156 char const * search_grid_name, char const * result_grid_name,
157 size_t * search_cells, size_t count, size_t ** result_cells,
158 size_t * num_results_per_search_cell, struct yac_interp_field result_field);
159
180 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
181 size_t * cells, size_t count, size_t * neighbours);
182
192
200 struct yac_dist_grid * dist_grid, enum yac_location location);
201
212 struct yac_dist_grid * grid, struct yac_interp_field field,
213 size_t ** indices, size_t * count);
214
221MPI_Datatype yac_get_remote_point_info_mpi_datatype(MPI_Comm comm);
222
232 struct remote_point * point, MPI_Datatype point_info_dt, MPI_Comm comm);
233
244 struct remote_point * point, void * buffer, int buffer_size, int * position,
245 MPI_Datatype point_info_dt, MPI_Comm comm);
246
258 void * buffer, int buffer_size, int * position, struct remote_point * point,
259 MPI_Datatype point_info_dt, MPI_Comm comm);
260
270 struct remote_points * points, MPI_Datatype point_info_dt, MPI_Comm comm);
271
282 struct remote_points * points, void * buffer, int buffer_size, int * position,
283 MPI_Datatype point_info_dt, MPI_Comm comm);
284
296 void * buffer, int buffer_size, int * position,
297 struct remote_points ** points, MPI_Datatype point_info_dt, MPI_Comm comm);
298
310 struct yac_dist_grid * dist_grid, enum yac_location location,
311 size_t * points, size_t count);
312
326 struct yac_dist_grid * dist_grid, enum yac_location location,
327 yac_int * global_ids, size_t count, size_t * local_ids);
328
355 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
356 size_t * cells, size_t count,
357 size_t ** vertex_to_cell, size_t ** vertex_to_cell_offsets,
358 int ** num_cells_per_vertex, struct yac_interp_field field);
359
381 struct yac_dist_grid_pair * grid_pair, int a_is_ref, int to_dist_owner,
382 char const * grid_name_a, size_t ** points_a, enum yac_location location_a,
383 char const * grid_name_b, size_t ** points_b, enum yac_location location_b,
384 double ** weights, size_t * count);
385
393 struct yac_dist_grid * dist_grid, struct yac_interp_field field);
394
405 struct yac_dist_grid * dist_grid, struct yac_interp_field field);
406
417 struct yac_const_basic_grid_data * grid_data, size_t cell_idx,
418 struct yac_grid_cell * cell);
419
431 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
432 size_t * points, size_t count, enum yac_location location, int * ranks);
433
451 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
452 size_t * vertices, size_t count, size_t ** neigh_vertices,
453 int * num_neighs_per_vertex, struct yac_interp_field field);
454
472 struct yac_dist_grid_pair * grid_pair, char const * grid_name,
473 size_t * vertices, size_t count, size_t ** vertex_to_cell,
474 size_t * num_cells_per_vertex);
475
476#endif // DIST_GRID_INTERNAL_H
void yac_dist_grid_pair_do_point_search_gc(struct yac_dist_grid_pair *grid_pair, char const *grid_name, yac_coordinate_pointer search_coords, size_t count, size_t *cells)
Definition dist_grid.c:4563
yac_const_coordinate_pointer yac_dist_grid_get_field_coords(struct yac_dist_grid *dist_grid, struct yac_interp_field field)
Definition dist_grid.c:2897
void yac_remote_point_pack(struct remote_point *point, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
Definition dist_grid.c:536
int const * const_int_pointer
void yac_dist_grid_pair_determine_dist_owner(struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *points, size_t count, enum yac_location location, int *ranks)
Definition dist_grid.c:6719
void yac_dist_grid_pair_do_point_search(struct yac_dist_grid_pair *grid_pair, char const *grid_name, yac_coordinate_pointer search_coords, size_t count, size_t *cells)
Definition dist_grid.c:4555
size_t yac_dist_grid_get_local_count(struct yac_dist_grid *dist_grid, enum yac_location location)
Definition dist_grid.c:2801
struct bounding_circle const *const const_bounding_circle_pointer
void yac_remote_point_unpack(void *buffer, int buffer_size, int *position, struct remote_point *point, MPI_Datatype point_info_dt, MPI_Comm comm)
Definition dist_grid.c:548
size_t const *const const_size_t_pointer
yac_int const * const_yac_int_pointer
struct remote_point_infos const *const const_remote_point_infos_pointer
enum yac_edge_type const *const const_yac_edge_type_pointer
struct yac_dist_grid * yac_dist_grid_pair_get_dist_grid(struct yac_dist_grid_pair *grid_pair, char const *grid_name)
Definition dist_grid.c:2783
void yac_dist_grid_pair_get_aux_grid(struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *cells, size_t count, size_t **vertex_to_cell, size_t **vertex_to_cell_offsets, int **num_cells_per_vertex, struct yac_interp_field field)
Definition dist_grid.c:6435
int const * yac_dist_grid_get_field_mask(struct yac_dist_grid *dist_grid, struct yac_interp_field field)
Definition dist_grid.c:2885
void yac_remote_points_pack(struct remote_points *points, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
Definition dist_grid.c:592
void yac_remote_points_unpack(void *buffer, int buffer_size, int *position, struct remote_points **points, MPI_Datatype point_info_dt, MPI_Comm comm)
Definition dist_grid.c:611
void yac_dist_grid_pair_get_vertex_neighbours(struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *vertices, size_t count, size_t **neigh_vertices, int *num_neighs_per_vertex, struct yac_interp_field field)
Definition dist_grid.c:6299
int yac_remote_points_get_pack_size(struct remote_points *points, MPI_Datatype point_info_dt, MPI_Comm comm)
Definition dist_grid.c:574
void yac_dist_grid_pair_get_cell_neighbours(struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *cells, size_t count, size_t *neighbours)
Definition dist_grid.c:5750
MPI_Datatype yac_get_remote_point_info_mpi_datatype(MPI_Comm comm)
Definition dist_grid.c:322
struct remote_point * yac_dist_grid_get_remote_points(struct yac_dist_grid *dist_grid, enum yac_location location, size_t *points, size_t count)
Definition dist_grid.c:5759
struct yac_const_basic_grid_data * yac_dist_grid_get_basic_grid_data(struct yac_dist_grid *dist_grid)
Definition dist_grid.c:2795
void yac_dist_grid_pair_relocate_point_pairs(struct yac_dist_grid_pair *grid_pair, int a_is_ref, int to_dist_owner, char const *grid_name_a, size_t **points_a, enum yac_location location_a, char const *grid_name_b, size_t **points_b, enum yac_location location_b, double **weights, size_t *count)
Definition dist_grid.c:6778
void yac_dist_grid_pair_do_bnd_circle_search(struct yac_dist_grid_pair *grid_pair, char const *grid_name, const_bounding_circle_pointer bnd_circles, size_t count, size_t **cells, size_t *num_results_per_bnd_circle, struct yac_interp_field field)
Definition dist_grid.c:5037
void yac_dist_grid_pair_do_cell_search(struct yac_dist_grid_pair *grid_pair, char const *search_grid_name, char const *result_grid_name, size_t *search_cells, size_t count, size_t **result_cells, size_t *num_results_per_search_cell, struct yac_interp_field result_field)
Definition dist_grid.c:5325
size_t const (*const const_size_t_2_pointer)[2]
MPI_Comm yac_dist_grid_pair_get_MPI_Comm(struct yac_dist_grid_pair *grid_pair)
Definition dist_grid.c:2778
void yac_dist_grid_global_to_local(struct yac_dist_grid *dist_grid, enum yac_location location, yac_int *global_ids, size_t count, size_t *local_ids)
Definition dist_grid.c:5845
void yac_dist_grid_pair_get_corner_cells(struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *vertices, size_t count, size_t **vertex_to_cell, size_t *num_cells_per_vertex)
Definition dist_grid.c:6385
void yac_const_basic_grid_data_get_grid_cell(struct yac_const_basic_grid_data *grid_data, size_t cell_idx, struct yac_grid_cell *cell)
Definition dist_grid.c:2998
int yac_remote_point_get_pack_size(struct remote_point *point, MPI_Datatype point_info_dt, MPI_Comm comm)
Definition dist_grid.c:507
void yac_dist_grid_pair_do_nnn_search(struct yac_dist_grid_pair *grid_pair, char const *grid_name, yac_coordinate_pointer search_coords, size_t count, size_t *local_ids, size_t n, struct yac_interp_field field)
Definition dist_grid.c:4704
void yac_dist_grid_get_local_unmasked_points(struct yac_dist_grid *grid, struct yac_interp_field field, size_t **indices, size_t *count)
Definition dist_grid.c:2852
yac_edge_type
Definition grid_cell.h:12
yac_location
Definition location.h:12
struct remote_point_info single
struct remote_point_info * multi
union remote_point_infos::@1 data
struct remote_point_infos data
struct remote_point_info buffer[]
struct remote_point * data
const_bounding_circle_pointer cell_bnd_circles
const yac_const_coordinate_pointer vertex_coordinates
const_size_t_pointer cell_to_vertex_offsets
const_size_t_pointer cell_to_vertex
const const_int_pointer num_vertices_per_cell
const_size_t_pointer cell_to_edge
const_remote_point_infos_pointer cell_owners
const const_yac_int_pointer ids[3]
const_size_t_pointer cell_to_edge_offsets
const_yac_edge_type_pointer edge_type
const_size_t_2_pointer edge_to_vertex
const_remote_point_infos_pointer edge_owners
const_remote_point_infos_pointer vertex_owners
size_t count[3]
Definition dist_grid.c:102
static struct user_input_data_points ** points
Definition yac.c:120
Xt_int yac_int
Definition yac_types.h:15
double const (* yac_const_coordinate_pointer)[3]
Definition yac_types.h:20
double(* yac_coordinate_pointer)[3]
Definition yac_types.h:19