YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Data Structures | Functions
dist_grid.c File Reference
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <float.h>
#include <yaxt.h>
#include "basic_grid.h"
#include "dist_grid_internal.h"
#include "geometry.h"
#include "yac_mpi_internal.h"
#include "utils_core.h"
#include "sphere_part.h"
#include "proc_sphere_part.h"
#include "ensure_array_size.h"
#include "interp_grid.h"
#include "field_data_set.h"
Include dependency graph for dist_grid.c:

Go to the source code of this file.

Data Structures

struct  single_remote_point
 
struct  single_remote_point_reorder
 
struct  remote_point_reorder
 
struct  global_vertex_reorder
 
struct  global_edge_reorder
 
struct  id_pos
 
struct  n_ids_reorder
 
struct  id_reorder_coord
 
struct  temp_field_data
 
struct  yac_dist_grid
 
struct  yac_dist_grid_pair
 
struct  nnn_search_result
 
struct  missing_edge_neighbour
 

Functions

static void id2idx (yac_int *ids, size_t *idx, size_t num_ids, yac_int *ref_sorted_ids, size_t num_sorted_ids)
 
static size_t get_cell_reference_vertex (struct yac_dist_grid *dist_grid, size_t cell_idx)
 
static int * determine_cell_core_mask (struct yac_dist_grid *dist_grid, int is_root, int *vertex_owner_mask)
 
static size_t get_edge_reference_vertex (struct yac_dist_grid *dist_grid, size_t edge_idx)
 
static int * determine_edge_core_mask (struct yac_dist_grid *dist_grid, int *vertex_owner_mask)
 
static void generate_core_masks (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, int comm_rank)
 
static MPI_Datatype yac_get_single_remote_point_mpi_datatype (MPI_Comm comm)
 
static MPI_Datatype yac_get_n_single_remote_point_reorder_mpi_datatype (int n, MPI_Comm comm)
 
static int compare_single_remote_point_global_id (const void *a, const void *b)
 
static MPI_Datatype yac_get_id_pos_mpi_datatype (MPI_Comm comm)
 
MPI_Datatype yac_get_remote_point_info_mpi_datatype (MPI_Comm comm)
 
static struct remote_point_infos copy_remote_point_infos (struct remote_point_infos point_infos)
 
static struct remote_point_infosgenerate_remote_point_infos (yac_int *sorted_ids, size_t *reorder_idx, size_t count, struct remote_points *points)
 
static void lookup_remote_points (yac_int *requested_ids, struct remote_point_infos **results, size_t *reorder_buffer, size_t request_count, struct remote_points *local_remote_data)
 
static int yac_remote_point_infos_get_pack_size (struct remote_point_infos const *infos, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void yac_remote_point_infos_get_pack_sizes (struct remote_point_infos **infos, size_t count, int *pack_sizes, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void yac_remote_point_infos_pack (struct remote_point_infos **infos, int *pack_sizes, size_t count, void *buffer, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void yac_remote_point_infos_unpack (void *buffer, int buffer_size, int *position, struct remote_point_infos *infos, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void yac_remote_point_infos_unpack_info_buffer (void *buffer, int buffer_size, int *position, struct remote_point_info *info_buffer, size_t *info_buffer_position, struct remote_point_infos *infos, MPI_Datatype point_info_dt, MPI_Comm comm)
 
int yac_remote_point_get_pack_size (struct remote_point *point, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void yac_remote_point_infos_pack_single (struct remote_point_infos const *infos, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
void yac_remote_point_pack (struct remote_point *point, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
void yac_remote_point_unpack (void *buffer, int buffer_size, int *position, struct remote_point *point, MPI_Datatype point_info_dt, MPI_Comm comm)
 
void yac_remote_point_unpack_info_buffer (void *buffer, int buffer_size, int *position, struct remote_point_info *info_buffer, size_t *info_buffer_position, struct remote_point *point, MPI_Datatype point_info_dt, MPI_Comm comm)
 
int yac_remote_points_get_pack_size (struct remote_points *points, MPI_Datatype point_info_dt, MPI_Comm comm)
 
void yac_remote_points_pack (struct remote_points *points, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
void yac_remote_points_unpack (void *buffer, int buffer_size, int *position, struct remote_points **points, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void generate_dist_grid_remote_point_infos (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, struct remote_points **dist_owner)
 
static int compare_remote_point (const void *a, const void *b)
 
static void insert_global_id (yac_int *ids, size_t n, yac_int id)
 
static void insert_rank (int *ranks, int *count, int rank)
 
static int compare_n_ids_reorder_ids (const void *a, const void *b)
 
static int compare_n_ids_reorder_reorder (const void *a, const void *b)
 
static void determine_dist_cell_ranks (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid_data *grid, MPI_Comm comm, int **dist_cell_ranks, int *dist_cell_rank_counts, size_t *dist_cell_rank_offsets)
 
static MPI_Datatype yac_get_id_reorder_coord_coord_mpi_datatype (MPI_Comm comm)
 
static MPI_Datatype yac_get_id_reorder_coord_id_mpi_datatype (MPI_Comm comm)
 
static int compare_id_reorder_coord_coord (const void *a, const void *b)
 
static int compare_id_reorder_coord_reorder_idx (const void *a, const void *b)
 
static int * generate_vertex_ids (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid_data *grid, MPI_Comm comm)
 
static void generate_ce_ids (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid_data *grid, int *vertex_ranks, MPI_Comm comm)
 
static void generate_global_ids (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid_data *grid, MPI_Comm comm)
 
static yac_size_t_2_pointer generate_edge_to_cell (const_size_t_pointer cell_to_edge, const_int_pointer num_edges_per_cell, int *core_cell_mask, size_t num_cells, size_t num_edges)
 
static void get_vertex_cells (void *grid, size_t vertex_idx, size_t **cells, int *num_cells)
 
static void get_edge_cells (void *edge_to_cell, size_t edge_idx, size_t **cells, int *num_cells)
 
static void get_ve_ranks (int **rank_buffer, size_t *rank_buffer_size, size_t *rank_buffer_array_size, int *num_ve_ranks, int *core_mask, size_t count, void(*get_cells)(void *ve_to_cell_data, size_t idx, size_t **cells, int *num_cells), void *ve_to_cell_data, int *num_cell_ranks, size_t *dist_cell_rank_offsets)
 
static struct remote_points ** generate_dist_remote_points (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid_data *grid, MPI_Comm comm)
 
static void generate_sorted_ids (yac_int *ids, size_t count, yac_int **sorted_ids, size_t **reorder_idx)
 
static Xt_xmap generate_xmap_data (void *data, size_t count, MPI_Comm comm, void(*set_sendcounts)(void *, size_t, size_t *), void(*pack)(void *, size_t, size_t *, int *, int *))
 
static void generate_xmap_set_sendcounts_remote_points (void *data, size_t count, size_t *sendcounts)
 
static void generate_xmap_pack_remote_points (void *data, size_t count, size_t *sdispls, int *dst_pos_buffer, int *send_pos_buffer)
 
static Xt_xmap generate_xmap_from_remote_points (struct remote_point *remote_point_data, size_t count, MPI_Comm comm)
 
static void generate_xmap_set_sendcounts_remote_point_info (void *data, size_t count, size_t *sendcounts)
 
static void generate_xmap_pack_remote_point_info (void *data, size_t count, size_t *sdispls, int *dst_pos_buffer, int *send_pos_buffer)
 
static Xt_xmap generate_xmap_from_remote_point_info (struct remote_point_info *point_infos, size_t count, MPI_Comm comm)
 
static int compare_single_remote_point_reorder_global_id (const void *a, const void *b)
 
static int compare_single_remote_point_reorder_reorder_idx (const void *a, const void *b)
 
static void compute_basic_ve_data (size_t max_num_cell_ve, size_t num_cells, int *num_ve_per_cell, struct single_remote_point_reorder *cell_ve_point_data, yac_int **ids, size_t *num_ids, size_t **cell_to_ve, Xt_xmap *xmap, MPI_Comm comm)
 
static MPI_Datatype yac_get_coordinate_mpi_datatype (MPI_Comm comm)
 
static struct yac_field_datafield_data_init (struct yac_field_data *orig_field_data, size_t dist_size, Xt_redist redist_mask, Xt_redist redist_coords, MPI_Comm comm)
 
static struct yac_dist_grid generate_dist_grid (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid *grid, MPI_Comm comm)
 
static void setup_search_data (struct yac_dist_grid_pair *dist_grid_pair)
 
static void get_grid_cells (struct yac_basic_grid *grid, struct dist_cell *cells, MPI_Comm comm)
 
static struct proc_sphere_part_nodegenerate_dist_grid_decomposition (struct yac_basic_grid *grid_a, struct yac_basic_grid *grid_b, MPI_Comm comm)
 
struct yac_dist_grid_pairyac_dist_grid_pair_new (struct yac_basic_grid *grid_a, struct yac_basic_grid *grid_b, MPI_Comm comm)
 
struct yac_dist_grid_pairyac_dist_grid_pair_new_f2c (struct yac_basic_grid *grid_a, struct yac_basic_grid *grid_b, MPI_Fint comm)
 
MPI_Comm yac_dist_grid_pair_get_MPI_Comm (struct yac_dist_grid_pair *grid_pair)
 
struct yac_dist_gridyac_dist_grid_pair_get_dist_grid (struct yac_dist_grid_pair *grid_pair, char const *grid_name)
 
struct yac_const_basic_grid_datayac_dist_grid_get_basic_grid_data (struct yac_dist_grid *dist_grid)
 
size_t yac_dist_grid_get_local_count (struct yac_dist_grid *dist_grid, enum yac_location location)
 
static size_t yac_dist_grid_get_count (struct yac_dist_grid *dist_grid, enum yac_location location)
 
static int const * yac_dist_grid_get_core_mask (struct yac_dist_grid *dist_grid, enum yac_location location)
 
static yac_int const * yac_dist_grid_get_global_ids (struct yac_dist_grid *dist_grid, enum yac_location location)
 
void yac_dist_grid_get_local_unmasked_points (struct yac_dist_grid *dist_grid, struct yac_interp_field field, size_t **indices, size_t *count)
 
static struct yac_field_datayac_dist_grid_get_field_data (struct yac_dist_grid *dist_grid, enum yac_location location)
 
int const * yac_dist_grid_get_field_mask (struct yac_dist_grid *dist_grid, struct yac_interp_field field)
 
yac_const_coordinate_pointer yac_dist_grid_get_field_coords (struct yac_dist_grid *dist_grid, struct yac_interp_field field)
 
size_t yac_dist_grid_get_unmasked_local_count (struct yac_dist_grid *dist_grid, struct yac_interp_field field)
 
static void yac_remote_point_infos_free (struct remote_point_infos *point_infos, size_t count)
 
static void yac_dist_grid_free (struct yac_dist_grid grid)
 
void yac_dist_grid_pair_delete (struct yac_dist_grid_pair *grid_pair)
 
static int coord_in_cell (double coord[3], struct yac_dist_grid *dist_grid, size_t cell_idx, struct yac_grid_cell *buffer_cell)
 
static int coord_in_cell_gc (double coord[3], struct yac_dist_grid *dist_grid, size_t cell_idx, struct yac_grid_cell *buffer_cell)
 
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 *buffer_cell)
 
static struct bnd_sphere_part_searchdist_grid_pair_get_cell_sphere_part (struct yac_dist_grid_pair *grid_pair, char const *grid_name)
 
static void dist_grid_pair_do_point_search_local (struct yac_dist_grid_pair *grid_pair, char const *grid_name, yac_coordinate_pointer search_coords, size_t count, size_t *cells, int(*coord_in_cell)(double coord[3], struct yac_dist_grid *dist_grid, size_t cell_idx, struct yac_grid_cell *buffer_cell))
 
static void lookup_single_remote_point_reorder_locally (struct yac_dist_grid *dist_grid, enum yac_location location, struct single_remote_point_reorder *ids, size_t *count, size_t *idx)
 
static int get_pack_size_field_data (struct yac_field_data *field_data, MPI_Comm comm)
 
static int get_pack_size_base_cell (struct yac_field_data *cell_field_data, MPI_Datatype bnd_circle_dt, MPI_Comm comm)
 
static int get_pack_size_base_vertex (struct yac_field_data *vertex_field_data, MPI_Comm comm)
 
static int get_pack_size_base_edge (struct yac_field_data *edge_field_data, MPI_Comm comm)
 
static void get_pack_sizes_cell (struct yac_dist_grid *dist_grid, uint64_t *pos, size_t count, int *pack_sizes, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void get_pack_sizes_vertex (struct yac_dist_grid *dist_grid, uint64_t *pos, size_t count, int *pack_sizes, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void get_pack_sizes_edge (struct yac_dist_grid *dist_grid, uint64_t *pos, size_t count, int *pack_sizes, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void get_pack_sizes (struct yac_dist_grid *dist_grid, enum yac_location location, uint64_t *pos, size_t count, int *pack_sizes, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_field_data (size_t idx, void *buffer, int buffer_size, int *position, struct yac_field_data *field_data, MPI_Comm comm)
 
static void pack_grid_data_vertex (struct yac_dist_grid *dist_grid, size_t idx, void *buffer, int buffer_size, int *position, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_grid_data_edge_ (struct yac_dist_grid *dist_grid, size_t idx, void *buffer, int buffer_size, int *position, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_grid_data_edge (struct yac_dist_grid *dist_grid, size_t idx, void *buffer, int buffer_size, int *position, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_grid_data_cell (struct yac_dist_grid *dist_grid, size_t idx, void *buffer, int buffer_size, int *position, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_grid_data (struct yac_dist_grid *dist_grid, enum yac_location location, uint64_t *pos, size_t count, void **pack_data, int *pack_sizes, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_field_data (void *buffer, int buffer_size, int *position, size_t idx, struct temp_field_data temp_field_data, MPI_Comm comm)
 
static void unpack_grid_data_vertex (struct global_vertex_reorder *vertex, size_t idx, void *buffer, int buffer_size, int *position, struct temp_field_data temp_vertex_field_data, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_grid_data_edge (struct global_edge_reorder *edge, size_t idx, void *buffer, int buffer_size, int *position, struct temp_field_data temp_edge_field_data, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int compare_global_vertex_reorder_global_id (const void *a, const void *b)
 
static void add_field_data (struct yac_field_data *field_data, struct temp_field_data temp_field_data, void *reorder_idx, size_t reorder_idx_size, size_t old_count, size_t new_count)
 
static void yac_remote_point_infos_single_free (struct remote_point_infos *point_infos)
 
static void yac_dist_grid_add_vertices (struct yac_dist_grid *dist_grid, struct global_vertex_reorder *vertices, size_t count, size_t *idx, struct temp_field_data temp_vertex_field_data)
 
static int compare_global_edge_reorder_global_id (const void *a, const void *b)
 
static void yac_dist_grid_add_edges (struct yac_dist_grid *dist_grid, struct global_edge_reorder *edges, size_t count, size_t *idx, struct temp_field_data temp_edge_field_data)
 
static void yac_dist_grid_add_cells (struct yac_dist_grid *dist_grid, yac_int *cell_ids, int *num_vertices_per_cell, struct bounding_circle *cell_bnd_circles, size_t count, size_t *cell_to_vertex, size_t *cell_to_edge, struct remote_point_infos *cell_owners, struct temp_field_data temp_cell_field_data)
 
static void ensure_temp_field_data_sizes (struct temp_field_data *temp_field_data, size_t size)
 
static struct temp_field_data temp_field_data_init (struct yac_field_data *field_data, size_t count)
 
static void temp_field_data_free (struct temp_field_data temp_field_data)
 
static void unpack_grid_data_cells (struct yac_dist_grid *dist_grid, size_t count, void *buffer, int buffer_size, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_grid_data_vertices (struct yac_dist_grid *dist_grid, size_t count, void *buffer, int buffer_size, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_grid_data_edges (struct yac_dist_grid *dist_grid, size_t count, void *buffer, int buffer_size, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_grid_data (struct yac_dist_grid *dist_grid, enum yac_location location, size_t count, void *buffer, int buffer_size, MPI_Datatype bnd_circle_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int compare_single_remote_point_reorder_owner (const void *a, const void *b)
 
static void yac_dist_grid_single_remote_point_to_local (struct yac_dist_grid *dist_grid, struct single_remote_point *ids, size_t count, enum yac_location location, size_t *idx)
 
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, int(*coord_in_cell)(double coord[3], struct yac_dist_grid *dist_grid, size_t cell_idx, struct yac_grid_cell *buffer_cell))
 
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)
 
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)
 
static struct point_sphere_part_searchyac_dist_grid_get_field_sphere_part (struct yac_dist_grid *dist_grid, struct yac_interp_field field)
 
static void yac_dist_grid_get_n_unmasked_local_points (struct yac_dist_grid *dist_grid, struct yac_interp_field field, int comm_rank, size_t n, struct single_remote_point *points)
 
static MPI_Datatype yac_get_nnn_search_result_mpi_datatype (size_t n, MPI_Comm comm)
 
static int compare_nnn_search_results_cos_angle (void const *a, void const *b)
 
static void insert_nnn_result_points (struct nnn_search_result *array, size_t array_size, struct nnn_search_result *insert, size_t insert_size)
 
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)
 
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)
 
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)
 
static struct bounding_circle compute_edge_bnd_circle (struct yac_dist_grid *dist_grid, size_t edge_id)
 
static void yac_dist_grid_get_cell_neighbours (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, size_t *cells, size_t count, size_t *neighbours)
 
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)
 
struct remote_pointyac_dist_grid_get_remote_points (struct yac_dist_grid *dist_grid, enum yac_location location, size_t *points, size_t count)
 
static int compute_bucket (yac_int value, int comm_size)
 
static int get_global_id_pack_size (MPI_Comm comm)
 
static void pack_global_id (yac_int global_id, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static void unpack_global_id (void *buffer, int buffer_size, int *position, yac_int *global_id, MPI_Comm comm)
 
static int get_single_remote_point_pack_size (MPI_Datatype single_remote_point_dt, MPI_Comm comm)
 
static void yac_single_remote_point_pack (struct single_remote_point *point, void *buffer, int buffer_size, int *position, MPI_Datatype single_remote_point_dt, MPI_Comm comm)
 
static void yac_single_remote_point_unpack (void *buffer, int buffer_size, int *position, struct single_remote_point *point, MPI_Datatype single_remote_point_dt, MPI_Comm comm)
 
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)
 
static void get_dist_vertex_cells (struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *vertices, size_t count, size_t **cells, size_t *num_cells_per_vertex, struct yac_interp_field field)
 
static void yac_dist_grid_pair_get_aux_grid_cells (struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *vertices, size_t count, size_t **cells, int *num_cells_per_vertex, struct yac_interp_field field)
 
static int compare_size_t (const void *a, const void *b)
 
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)
 
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)
 
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)
 
static void relocate_points (size_t **points, size_t *reorder_idx, int *ranks, size_t count, enum yac_location location, size_t local_count, size_t recv_count, struct single_remote_point *id_send_buffer, struct single_remote_point *id_recv_buffer, size_t *sendcounts, size_t *sdispls, size_t *recvcounts, size_t *rdispls, MPI_Datatype single_remote_point_dt, MPI_Comm comm, struct yac_dist_grid *dist_grid)
 
static void relocate_weights (double **weights, size_t *reorder_idx, int *ranks, size_t count, size_t send_count, size_t local_count, size_t recv_count, size_t *sendcounts, size_t *sdispls, size_t *recvcounts, size_t *rdispls, MPI_Comm comm)
 
void yac_dist_grid_determine_dist_vertex_owner (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, size_t *vertices, size_t count, int *ranks)
 
void yac_dist_grid_determine_dist_ce_owner (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, size_t *indices, size_t count, int *ranks, size_t(*get_ce_reference_vertex)(struct yac_dist_grid *, size_t))
 
void yac_dist_grid_determine_dist_cell_owner (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, size_t *cells, size_t count, int *ranks)
 
void yac_dist_grid_determine_dist_edge_owner (struct yac_dist_grid *dist_grid, struct proc_sphere_part_node *proc_sphere_part, size_t *edges, size_t count, int *ranks)
 
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)
 
void yac_dist_grid_pair_determine_orig_owner (struct yac_dist_grid_pair *grid_pair, char const *grid_name, size_t *points, size_t count, enum yac_location location, int *ranks)
 
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)
 

Function Documentation

◆ add_field_data()

static void add_field_data ( struct yac_field_data field_data,
struct temp_field_data  temp_field_data,
void *  reorder_idx,
size_t  reorder_idx_size,
size_t  old_count,
size_t  new_count 
)
static

Definition at line 3577 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_global_edge_reorder_global_id()

static int compare_global_edge_reorder_global_id ( const void *  a,
const void *  b 
)
static

Definition at line 3728 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_global_vertex_reorder_global_id()

static int compare_global_vertex_reorder_global_id ( const void *  a,
const void *  b 
)
static

Definition at line 3568 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_id_reorder_coord_coord()

static int compare_id_reorder_coord_coord ( const void *  a,
const void *  b 
)
static

Definition at line 1129 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_id_reorder_coord_reorder_idx()

static int compare_id_reorder_coord_reorder_idx ( const void *  a,
const void *  b 
)
static

Definition at line 1136 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_n_ids_reorder_ids()

static int compare_n_ids_reorder_ids ( const void *  a,
const void *  b 
)
static

Definition at line 991 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_n_ids_reorder_reorder()

static int compare_n_ids_reorder_reorder ( const void *  a,
const void *  b 
)
static

Definition at line 1004 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_nnn_search_results_cos_angle()

static int compare_nnn_search_results_cos_angle ( void const *  a,
void const *  b 
)
static

Definition at line 4654 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_remote_point()

static int compare_remote_point ( const void *  a,
const void *  b 
)
static

Definition at line 957 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_single_remote_point_global_id()

static int compare_single_remote_point_global_id ( const void *  a,
const void *  b 
)
static

Definition at line 295 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_single_remote_point_reorder_global_id()

static int compare_single_remote_point_reorder_global_id ( const void *  a,
const void *  b 
)
static

Definition at line 2142 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_single_remote_point_reorder_owner()

static int compare_single_remote_point_reorder_owner ( const void *  a,
const void *  b 
)
static

Definition at line 4292 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_single_remote_point_reorder_reorder_idx()

static int compare_single_remote_point_reorder_reorder_idx ( const void *  a,
const void *  b 
)
static

Definition at line 2151 of file dist_grid.c.

Here is the caller graph for this function:

◆ compare_size_t()

static int compare_size_t ( const void *  a,
const void *  b 
)
inlinestatic
Examples
test_angle.c, test_bnd_sphere_part.c, and test_instance_parallel2.c.

Definition at line 6287 of file dist_grid.c.

Here is the caller graph for this function:

◆ compute_basic_ve_data()

static void compute_basic_ve_data ( size_t  max_num_cell_ve,
size_t  num_cells,
int *  num_ve_per_cell,
struct single_remote_point_reorder cell_ve_point_data,
yac_int **  ids,
size_t *  num_ids,
size_t **  cell_to_ve,
Xt_xmap *  xmap,
MPI_Comm  comm 
)
static

Definition at line 2160 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_bucket()

static int compute_bucket ( yac_int  value,
int  comm_size 
)
inlinestatic

Definition at line 5780 of file dist_grid.c.

Here is the caller graph for this function:

◆ compute_edge_bnd_circle()

static struct bounding_circle compute_edge_bnd_circle ( struct yac_dist_grid dist_grid,
size_t  edge_id 
)
static

Definition at line 5397 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coord_in_cell()

static int coord_in_cell ( double  coord[3],
struct yac_dist_grid dist_grid,
size_t  cell_idx,
struct yac_grid_cell buffer_cell 
)
static

Definition at line 2972 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coord_in_cell_gc()

static int coord_in_cell_gc ( double  coord[3],
struct yac_dist_grid dist_grid,
size_t  cell_idx,
struct yac_grid_cell buffer_cell 
)
static

Definition at line 2983 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_remote_point_infos()

static struct remote_point_infos copy_remote_point_infos ( struct remote_point_infos  point_infos)
static

Definition at line 340 of file dist_grid.c.

Here is the caller graph for this function:

◆ determine_cell_core_mask()

static int * determine_cell_core_mask ( struct yac_dist_grid dist_grid,
int  is_root,
int *  vertex_owner_mask 
)
static

Definition at line 180 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ determine_dist_cell_ranks()

static void determine_dist_cell_ranks ( struct proc_sphere_part_node proc_sphere_part,
struct yac_basic_grid_data grid,
MPI_Comm  comm,
int **  dist_cell_ranks,
int *  dist_cell_rank_counts,
size_t *  dist_cell_rank_offsets 
)
static

Definition at line 1016 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ determine_edge_core_mask()

static int * determine_edge_core_mask ( struct yac_dist_grid dist_grid,
int *  vertex_owner_mask 
)
static

Definition at line 211 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dist_grid_pair_do_point_search_local()

static void dist_grid_pair_do_point_search_local ( struct yac_dist_grid_pair grid_pair,
char const *  grid_name,
yac_coordinate_pointer  search_coords,
size_t  count,
size_t *  cells,
int(*)(double coord[3], struct yac_dist_grid *dist_grid, size_t cell_idx, struct yac_grid_cell *buffer_cell)  coord_in_cell 
)
static

Definition at line 3042 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dist_grid_pair_get_cell_sphere_part()

static struct bnd_sphere_part_search * dist_grid_pair_get_cell_sphere_part ( struct yac_dist_grid_pair grid_pair,
char const *  grid_name 
)
static

Definition at line 3028 of file dist_grid.c.

Here is the caller graph for this function:

◆ ensure_temp_field_data_sizes()

static void ensure_temp_field_data_sizes ( struct temp_field_data temp_field_data,
size_t  size 
)
static

Definition at line 4013 of file dist_grid.c.

Here is the caller graph for this function:

◆ field_data_init()

static struct yac_field_data * field_data_init ( struct yac_field_data orig_field_data,
size_t  dist_size,
Xt_redist  redist_mask,
Xt_redist  redist_coords,
MPI_Comm  comm 
)
static

Definition at line 2217 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_ce_ids()

static void generate_ce_ids ( struct proc_sphere_part_node proc_sphere_part,
struct yac_basic_grid_data grid,
int *  vertex_ranks,
MPI_Comm  comm 
)
static

Definition at line 1305 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_core_masks()

static void generate_core_masks ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
int  comm_rank 
)
static

Definition at line 228 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_dist_grid()

static struct yac_dist_grid generate_dist_grid ( struct proc_sphere_part_node proc_sphere_part,
struct yac_basic_grid grid,
MPI_Comm  comm 
)
static

Definition at line 2331 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_dist_grid_decomposition()

static struct proc_sphere_part_node * generate_dist_grid_decomposition ( struct yac_basic_grid grid_a,
struct yac_basic_grid grid_b,
MPI_Comm  comm 
)
static

Definition at line 2691 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_dist_grid_remote_point_infos()

static void generate_dist_grid_remote_point_infos ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
struct remote_points **  dist_owner 
)
static

Definition at line 638 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_dist_remote_points()

static struct remote_points ** generate_dist_remote_points ( struct proc_sphere_part_node proc_sphere_part,
struct yac_basic_grid_data grid,
MPI_Comm  comm 
)
static

Definition at line 1731 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_edge_to_cell()

static yac_size_t_2_pointer generate_edge_to_cell ( const_size_t_pointer  cell_to_edge,
const_int_pointer  num_edges_per_cell,
int *  core_cell_mask,
size_t  num_cells,
size_t  num_edges 
)
static

Definition at line 1620 of file dist_grid.c.

Here is the caller graph for this function:

◆ generate_global_ids()

static void generate_global_ids ( struct proc_sphere_part_node proc_sphere_part,
struct yac_basic_grid_data grid,
MPI_Comm  comm 
)
static

Definition at line 1606 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_remote_point_infos()

static struct remote_point_infos * generate_remote_point_infos ( yac_int sorted_ids,
size_t *  reorder_idx,
size_t  count,
struct remote_points points 
)
static

Definition at line 352 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_sorted_ids()

static void generate_sorted_ids ( yac_int ids,
size_t  count,
yac_int **  sorted_ids,
size_t **  reorder_idx 
)
static

Definition at line 1974 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_vertex_ids()

static int * generate_vertex_ids ( struct proc_sphere_part_node proc_sphere_part,
struct yac_basic_grid_data grid,
MPI_Comm  comm 
)
static

Definition at line 1148 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_xmap_data()

static Xt_xmap generate_xmap_data ( void *  data,
size_t  count,
MPI_Comm  comm,
void(*)(void *, size_t, size_t *)  set_sendcounts,
void(*)(void *, size_t, size_t *, int *, int *)  pack 
)
static

Definition at line 1989 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_xmap_from_remote_point_info()

static Xt_xmap generate_xmap_from_remote_point_info ( struct remote_point_info point_infos,
size_t  count,
MPI_Comm  comm 
)
static

Definition at line 2133 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_xmap_from_remote_points()

static Xt_xmap generate_xmap_from_remote_points ( struct remote_point remote_point_data,
size_t  count,
MPI_Comm  comm 
)
static

Definition at line 2099 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_xmap_pack_remote_point_info()

static void generate_xmap_pack_remote_point_info ( void *  data,
size_t  count,
size_t *  sdispls,
int *  dst_pos_buffer,
int *  send_pos_buffer 
)
static

Definition at line 2116 of file dist_grid.c.

Here is the caller graph for this function:

◆ generate_xmap_pack_remote_points()

static void generate_xmap_pack_remote_points ( void *  data,
size_t  count,
size_t *  sdispls,
int *  dst_pos_buffer,
int *  send_pos_buffer 
)
static

Definition at line 2078 of file dist_grid.c.

Here is the caller graph for this function:

◆ generate_xmap_set_sendcounts_remote_point_info()

static void generate_xmap_set_sendcounts_remote_point_info ( void *  data,
size_t  count,
size_t *  sendcounts 
)
static

Definition at line 2108 of file dist_grid.c.

Here is the caller graph for this function:

◆ generate_xmap_set_sendcounts_remote_points()

static void generate_xmap_set_sendcounts_remote_points ( void *  data,
size_t  count,
size_t *  sendcounts 
)
static

Definition at line 2064 of file dist_grid.c.

Here is the caller graph for this function:

◆ get_cell_reference_vertex()

static size_t get_cell_reference_vertex ( struct yac_dist_grid dist_grid,
size_t  cell_idx 
)
static

Definition at line 156 of file dist_grid.c.

Here is the caller graph for this function:

◆ get_dist_vertex_cells()

static void get_dist_vertex_cells ( struct yac_dist_grid_pair grid_pair,
char const *  grid_name,
size_t *  vertices,
size_t  count,
size_t **  cells,
size_t *  num_cells_per_vertex,
struct yac_interp_field  field 
)
static

Definition at line 6071 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_edge_cells()

static void get_edge_cells ( void *  edge_to_cell,
size_t  edge_idx,
size_t **  cells,
int *  num_cells 
)
static

Definition at line 1673 of file dist_grid.c.

Here is the caller graph for this function:

◆ get_edge_reference_vertex()

static size_t get_edge_reference_vertex ( struct yac_dist_grid dist_grid,
size_t  edge_idx 
)
inlinestatic

Definition at line 199 of file dist_grid.c.

Here is the caller graph for this function:

◆ get_global_id_pack_size()

static int get_global_id_pack_size ( MPI_Comm  comm)
static

Definition at line 5784 of file dist_grid.c.

Here is the caller graph for this function:

◆ get_grid_cells()

static void get_grid_cells ( struct yac_basic_grid grid,
struct dist_cell cells,
MPI_Comm  comm 
)
static

Definition at line 2664 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_size_base_cell()

static int get_pack_size_base_cell ( struct yac_field_data cell_field_data,
MPI_Datatype  bnd_circle_dt,
MPI_Comm  comm 
)
static

Definition at line 3155 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_size_base_edge()

static int get_pack_size_base_edge ( struct yac_field_data edge_field_data,
MPI_Comm  comm 
)
static

Definition at line 3190 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_size_base_vertex()

static int get_pack_size_base_vertex ( struct yac_field_data vertex_field_data,
MPI_Comm  comm 
)
static

Definition at line 3175 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_size_field_data()

static int get_pack_size_field_data ( struct yac_field_data field_data,
MPI_Comm  comm 
)
static

Definition at line 3137 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_sizes()

static void get_pack_sizes ( struct yac_dist_grid dist_grid,
enum yac_location  location,
uint64_t *  pos,
size_t  count,
int *  pack_sizes,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3294 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_sizes_cell()

static void get_pack_sizes_cell ( struct yac_dist_grid dist_grid,
uint64_t *  pos,
size_t  count,
int *  pack_sizes,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3208 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_sizes_edge()

static void get_pack_sizes_edge ( struct yac_dist_grid dist_grid,
uint64_t *  pos,
size_t  count,
int *  pack_sizes,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3266 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pack_sizes_vertex()

static void get_pack_sizes_vertex ( struct yac_dist_grid dist_grid,
uint64_t *  pos,
size_t  count,
int *  pack_sizes,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3251 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_single_remote_point_pack_size()

static int get_single_remote_point_pack_size ( MPI_Datatype  single_remote_point_dt,
MPI_Comm  comm 
)
static

Definition at line 5812 of file dist_grid.c.

Here is the caller graph for this function:

◆ get_ve_ranks()

static void get_ve_ranks ( int **  rank_buffer,
size_t *  rank_buffer_size,
size_t *  rank_buffer_array_size,
int *  num_ve_ranks,
int *  core_mask,
size_t  count,
void(*)(void *ve_to_cell_data, size_t idx, size_t **cells, int *num_cells)  get_cells,
void *  ve_to_cell_data,
int *  num_cell_ranks,
size_t *  dist_cell_rank_offsets 
)
static

Definition at line 1680 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_vertex_cells()

static void get_vertex_cells ( void *  grid,
size_t  vertex_idx,
size_t **  cells,
int *  num_cells 
)
static

Definition at line 1663 of file dist_grid.c.

Here is the caller graph for this function:

◆ id2idx()

static void id2idx ( yac_int ids,
size_t *  idx,
size_t  num_ids,
yac_int ref_sorted_ids,
size_t  num_sorted_ids 
)
static

Definition at line 133 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert_global_id()

static void insert_global_id ( yac_int ids,
size_t  n,
yac_int  id 
)
static

Definition at line 964 of file dist_grid.c.

Here is the caller graph for this function:

◆ insert_nnn_result_points()

static void insert_nnn_result_points ( struct nnn_search_result array,
size_t  array_size,
struct nnn_search_result insert,
size_t  insert_size 
)
static

Definition at line 4669 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert_rank()

static void insert_rank ( int *  ranks,
int *  count,
int  rank 
)
static

Definition at line 975 of file dist_grid.c.

Here is the caller graph for this function:

◆ lookup_remote_points()

static void lookup_remote_points ( yac_int requested_ids,
struct remote_point_infos **  results,
size_t *  reorder_buffer,
size_t  request_count,
struct remote_points local_remote_data 
)
static

Definition at line 376 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup_single_remote_point_reorder_locally()

static void lookup_single_remote_point_reorder_locally ( struct yac_dist_grid dist_grid,
enum yac_location  location,
struct single_remote_point_reorder ids,
size_t *  count,
size_t *  idx 
)
static

Definition at line 3102 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack_field_data()

static void pack_field_data ( size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
struct yac_field_data field_data,
MPI_Comm  comm 
)
static

Definition at line 3322 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack_global_id()

static void pack_global_id ( yac_int  global_id,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Comm  comm 
)
static

Definition at line 5794 of file dist_grid.c.

Here is the caller graph for this function:

◆ pack_grid_data()

static void pack_grid_data ( struct yac_dist_grid dist_grid,
enum yac_location  location,
uint64_t *  pos,
size_t  count,
void **  pack_data,
int *  pack_sizes,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3464 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack_grid_data_cell()

static void pack_grid_data_cell ( struct yac_dist_grid dist_grid,
size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3423 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack_grid_data_edge()

static void pack_grid_data_edge ( struct yac_dist_grid dist_grid,
size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3407 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack_grid_data_edge_()

static void pack_grid_data_edge_ ( struct yac_dist_grid dist_grid,
size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3371 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pack_grid_data_vertex()

static void pack_grid_data_vertex ( struct yac_dist_grid dist_grid,
size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3346 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ relocate_points()

static void relocate_points ( size_t **  points,
size_t *  reorder_idx,
int *  ranks,
size_t  count,
enum yac_location  location,
size_t  local_count,
size_t  recv_count,
struct single_remote_point id_send_buffer,
struct single_remote_point id_recv_buffer,
size_t *  sendcounts,
size_t *  sdispls,
size_t *  recvcounts,
size_t *  rdispls,
MPI_Datatype  single_remote_point_dt,
MPI_Comm  comm,
struct yac_dist_grid dist_grid 
)
static

Definition at line 6501 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ relocate_weights()

static void relocate_weights ( double **  weights,
size_t *  reorder_idx,
int *  ranks,
size_t  count,
size_t  send_count,
size_t  local_count,
size_t  recv_count,
size_t *  sendcounts,
size_t *  sdispls,
size_t *  recvcounts,
size_t *  rdispls,
MPI_Comm  comm 
)
static

Definition at line 6550 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_search_data()

static void setup_search_data ( struct yac_dist_grid_pair dist_grid_pair)
static

Definition at line 2644 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ temp_field_data_free()

static void temp_field_data_free ( struct temp_field_data  temp_field_data)
static

Definition at line 4060 of file dist_grid.c.

Here is the caller graph for this function:

◆ temp_field_data_init()

static struct temp_field_data temp_field_data_init ( struct yac_field_data field_data,
size_t  count 
)
static

Definition at line 4025 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpack_field_data()

static void unpack_field_data ( void *  buffer,
int  buffer_size,
int *  position,
size_t  idx,
struct temp_field_data  temp_field_data,
MPI_Comm  comm 
)
static

Definition at line 3501 of file dist_grid.c.

Here is the caller graph for this function:

◆ unpack_global_id()

static void unpack_global_id ( void *  buffer,
int  buffer_size,
int *  position,
yac_int global_id,
MPI_Comm  comm 
)
static

Definition at line 5803 of file dist_grid.c.

Here is the caller graph for this function:

◆ unpack_grid_data()

static void unpack_grid_data ( struct yac_dist_grid dist_grid,
enum yac_location  location,
size_t  count,
void *  buffer,
int  buffer_size,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 4263 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpack_grid_data_cells()

static void unpack_grid_data_cells ( struct yac_dist_grid dist_grid,
size_t  count,
void *  buffer,
int  buffer_size,
MPI_Datatype  bnd_circle_dt,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 4072 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpack_grid_data_edge()

static void unpack_grid_data_edge ( struct global_edge_reorder edge,
size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
struct temp_field_data  temp_edge_field_data,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3539 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpack_grid_data_edges()

static void unpack_grid_data_edges ( struct yac_dist_grid dist_grid,
size_t  count,
void *  buffer,
int  buffer_size,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 4215 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpack_grid_data_vertex()

static void unpack_grid_data_vertex ( struct global_vertex_reorder vertex,
size_t  idx,
void *  buffer,
int  buffer_size,
int *  position,
struct temp_field_data  temp_vertex_field_data,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 3517 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpack_grid_data_vertices()

static void unpack_grid_data_vertices ( struct yac_dist_grid dist_grid,
size_t  count,
void *  buffer,
int  buffer_size,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 4182 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_const_basic_grid_data_get_grid_cell()

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 
)

returns the data for a selected grid cell

Parameters
[in]grid_databasic grid data
[in]cell_idxlocal id of the selected cell
[out]cellcell data
Remarks
the user has to ensure that the cell was probably initialised
the user has to free the memory associated to cell (see yac_free_grid_cell)
Examples
test_interp_grid_parallel.c.

Definition at line 2996 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_add_cells()

static void yac_dist_grid_add_cells ( struct yac_dist_grid dist_grid,
yac_int cell_ids,
int *  num_vertices_per_cell,
struct bounding_circle cell_bnd_circles,
size_t  count,
size_t *  cell_to_vertex,
size_t *  cell_to_edge,
struct remote_point_infos cell_owners,
struct temp_field_data  temp_cell_field_data 
)
static

Definition at line 3870 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_add_edges()

static void yac_dist_grid_add_edges ( struct yac_dist_grid dist_grid,
struct global_edge_reorder edges,
size_t  count,
size_t *  idx,
struct temp_field_data  temp_edge_field_data 
)
static

Definition at line 3737 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_add_vertices()

static void yac_dist_grid_add_vertices ( struct yac_dist_grid dist_grid,
struct global_vertex_reorder vertices,
size_t  count,
size_t *  idx,
struct temp_field_data  temp_vertex_field_data 
)
static

Definition at line 3621 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_determine_dist_ce_owner()

void yac_dist_grid_determine_dist_ce_owner ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
size_t *  indices,
size_t  count,
int *  ranks,
size_t(*)(struct yac_dist_grid *, size_t)  get_ce_reference_vertex 
)

Definition at line 6643 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_determine_dist_cell_owner()

void yac_dist_grid_determine_dist_cell_owner ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
size_t *  cells,
size_t  count,
int *  ranks 
)

Definition at line 6694 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_determine_dist_edge_owner()

void yac_dist_grid_determine_dist_edge_owner ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
size_t *  edges,
size_t  count,
int *  ranks 
)

Definition at line 6704 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_determine_dist_vertex_owner()

void yac_dist_grid_determine_dist_vertex_owner ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
size_t *  vertices,
size_t  count,
int *  ranks 
)

Definition at line 6583 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_free()

static void yac_dist_grid_free ( struct yac_dist_grid  grid)
static

Definition at line 2937 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_basic_grid_data()

struct yac_const_basic_grid_data * yac_dist_grid_get_basic_grid_data ( struct yac_dist_grid dist_grid)

gets the basic grid data of a distributed grid

Parameters
[in]dist_griddistributed grid
Returns
basic grid data
Remarks
the contents of the basic grid data may change by some calls (for example by yac_dist_grid_pair_do_bnd_circle_search)
Examples
test_dist_grid_pair_parallel.c.

Definition at line 2796 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_get_cell_neighbours()

static void yac_dist_grid_get_cell_neighbours ( struct yac_dist_grid dist_grid,
struct proc_sphere_part_node proc_sphere_part,
size_t *  cells,
size_t  count,
size_t *  neighbours 
)
static

Definition at line 5418 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_core_mask()

static int const * yac_dist_grid_get_core_mask ( struct yac_dist_grid dist_grid,
enum yac_location  location 
)
static

Definition at line 2828 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_get_count()

static size_t yac_dist_grid_get_count ( struct yac_dist_grid dist_grid,
enum yac_location  location 
)
static

Definition at line 2817 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_get_field_coords()

yac_const_coordinate_pointer yac_dist_grid_get_field_coords ( struct yac_dist_grid dist_grid,
struct yac_interp_field  field 
)

returns a pointer to a field coordinates

Parameters
[in]dist_griddistributed grid
[in]fieldfield for which the coordinates are to be returned
Returns
field coordinates (NULL if no mask is available)
Remarks
if the field location is YAC_LOC_CORNER and no field coordinates are available/defined, this routine will return a pointer to the vertex coordinates of the grid

Definition at line 2895 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_field_data()

static struct yac_field_data * yac_dist_grid_get_field_data ( struct yac_dist_grid dist_grid,
enum yac_location  location 
)
static

Definition at line 2876 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_field_mask()

int const * yac_dist_grid_get_field_mask ( struct yac_dist_grid dist_grid,
struct yac_interp_field  field 
)

returns a pointer to a field mask

Parameters
[in]dist_griddistributed grid
[in]fieldfield for which the mask is to be returned
Returns
field mask (NULL if no mask is available/defined)

Definition at line 2883 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_field_sphere_part()

static struct point_sphere_part_search * yac_dist_grid_get_field_sphere_part ( struct yac_dist_grid dist_grid,
struct yac_interp_field  field 
)
static

Definition at line 4569 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_global_ids()

static yac_int const * yac_dist_grid_get_global_ids ( struct yac_dist_grid dist_grid,
enum yac_location  location 
)
static

Definition at line 2839 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_get_local_count()

size_t yac_dist_grid_get_local_count ( struct yac_dist_grid dist_grid,
enum yac_location  location 
)

gets the number of points in the local part of the distributed grid

Parameters
[in]dist_griddistributed grid
[in]locationlocation of the points
Remarks
each global point is only counted once by a single process
Examples
test_dist_grid_pair_parallel.c.

Definition at line 2802 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_get_local_unmasked_points()

void yac_dist_grid_get_local_unmasked_points ( struct yac_dist_grid grid,
struct yac_interp_field  field,
size_t **  indices,
size_t *  count 
)

gets all unmasked points available in the local part of the distributed grid

Parameters
[in]griddistributed grid
[in]fieldfield description
[out]indiceslocal indices of all unmasked local cells
[out]countnumber of entries in indices
Remarks
each unmask point of the global grid is returned only by a single process
Examples
test_dist_grid_pair_parallel.c.

Definition at line 2850 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_n_unmasked_local_points()

static void yac_dist_grid_get_n_unmasked_local_points ( struct yac_dist_grid dist_grid,
struct yac_interp_field  field,
int  comm_rank,
size_t  n,
struct single_remote_point points 
)
static

Definition at line 4589 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_get_remote_points()

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 
)

allocates and returns remote_point informations for a list of selected points

Parameters
[in]dist_griddistributed grid
[in]locationlocation of the requested points
[in]pointslocal ids of selected points
[in]countnumber of entries in points
Returns
remote_point information for the selected points
Remarks
the user is responsible for freeing the memory allocated for the remote_point information

Definition at line 5757 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_get_unmasked_local_count()

size_t yac_dist_grid_get_unmasked_local_count ( struct yac_dist_grid dist_grid,
struct yac_interp_field  field 
)

Definition at line 2911 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_global_to_local()

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 
)

returns the local ids for the provided global ids

Parameters
[in]dist_griddistributed grid
[in]locationlocation of the selected points
[in]global_idsglobal ids of the selected points
[in]countnumber of entries in global_ids
[out]local_idslocal ids of the selected points
Remarks
the user has to ensure that the array associated to local_ids is big enough to hold enough elements
in case one or more selected global ids are not available in the local data, the local data will be extended accordingly
Examples
test_dist_grid_pair_parallel.c.

Definition at line 5843 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_delete()

void yac_dist_grid_pair_delete ( struct yac_dist_grid_pair grid_pair)

◆ yac_dist_grid_pair_determine_dist_owner()

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 
)

Determines the ranks of the distributed owners for the selected points

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid on which this routine is supposed to work on
[in]pointslocal ids of selected points
[in]countnumber of entries in points
[in]locationlocation of the requested points
[out]ranksdistributed owners of selected points
Examples
test_dist_grid_pair_parallel.c.

Definition at line 6714 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_determine_orig_owner()

void yac_dist_grid_pair_determine_orig_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 at line 6738 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_do_bnd_circle_search()

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 
)

search for all cells matching the provided bounding circles

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid for which the search is to be performed
[in]bnd_circlessearch bounding circles
[in]countnumber of search bounding circles
[out]cellslocal ids of results cells
[out]num_results_per_bnd_circlenumber of results per bounding circle
[in]fieldfield description

Definition at line 5035 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_do_cell_search()

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 
)

search for matches between cells of the two grids within the grid pair

Parameters
[in]grid_pairdistributed grid pair
[in]search_grid_namegrid name of the grid from which to take the search cells
[in]result_grid_namegrid name of the grid from which to take the matching cells
[in]search_cellslocal ids of search cells
[in]countnumber of search cells
[out]result_cellslocal ids of results cells
[out]num_results_per_search_cellnumber of results per search cell
[in]result_fieldfield description

Definition at line 5323 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_do_nnn_search()

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 
)

does a n-nearest-neighbour search

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid for which the search is to be performed
[in]search_coordssearch coordinates
[in]countnumber of search coordinates
[out]local_idslocal ids of results points
[in]nnumber of points per search coordinate
[in]fieldfield description

Definition at line 4702 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_do_point_search()

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 
)

search for cells that map to the provided search coordinates

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid for which the search is to be performed
[in]search_coordssearch coordinates
[in]countnumber of search coordinates
[out]cellslocal ids of matching cells
Remarks
in case for a search coordinate no matching cell was found, the respective entry in cells is SIZE_MAX

Definition at line 4553 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_do_point_search_()

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,
int(*)(double coord[3], struct yac_dist_grid *dist_grid, size_t cell_idx, struct yac_grid_cell *buffer_cell)  coord_in_cell 
)

Definition at line 4418 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_do_point_search_gc()

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 
)

search for cells that map to the provided search coordinates

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid for which the search is to be performed
[in]search_coordssearch coordinates
[in]countnumber of search coordinates
[out]cellslocal ids of matching cells
Remarks
SIZE_MAX is the returned result in case no cell was found
assumes that all grid edges are on great circle edges

Definition at line 4561 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_aux_grid()

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 
)

generates for all vertices of the grid the list of all cells surrounding the vertices
vertices not belonging to the selected cells will have a zero entry in num_cells_per_vertex

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid on which this routine is supposed to work on
[in]cellsselected cells
[in]countnumber of entries in cells
[out]vertex_to_celllist of result cells for all vertices associated to the selected cells
[out]vertex_to_cell_offsetsthe results cells for vertex i can be found at:
vertex_to_cell + vertex_to_cell_offsets[i]
[out]num_cells_per_vertexnumber of result cells for each vertex
[in]fieldif the provided field contains a mask for cells, it will be used
Remarks
the result cells for a vertex are sorted in clock- or counter clockwise order
in case a vertex is not fully surrounded by unmasked cells, the respective entry in num_cells_per_vertex is 0
the user is responsible to free the memory returned through the out arrays

Definition at line 6430 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_aux_grid_cells()

static void yac_dist_grid_pair_get_aux_grid_cells ( struct yac_dist_grid_pair grid_pair,
char const *  grid_name,
size_t *  vertices,
size_t  count,
size_t **  cells,
int *  num_cells_per_vertex,
struct yac_interp_field  field 
)
static

returns for each selected vertex the list of all cells surrounding this vertex

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid on which this routine is supposed to work on
[in]verticeslocal ids of selected vertices
[in]countnumber of entries in vertices
[out]cellslist of result cells for the selected vertices
[out]num_cells_per_vertexnumber of cells per selected vertex
[in]fieldif the provided field contains a mask for cells, it will be used
Remarks
the result cells for a vertex are sorted in clock- or counter clockwise order
in case a vertex is not fully surrounded by unmasked cells, the respective entry in num_cells_per_vertex is 0
the user is responsible to free the memory returned through cells
the user has to ensure that the array associated to num_vertices_per_cell is big enough to hold enough elements

Definition at line 6157 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_cell_neighbours()

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 
)

gets neighbouring grid cells for all provided cells

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid for which the search is to be performed
[in]cellslocal ids of cells for which the neighbours are to be determined
[in]countnumber for entries in cells
[out]neighboursneighbours for all edges of all provided cells
Remarks
the user has to ensure that the array neighbours has the appropriate size, which is the sum of the number of edges for each provided cell
for each provided cell, this routine sets the neighbours for all edges of the cells
in case there is no neighbour of an edge, the respective entry contains SIZE_MAX
the result cells are sorted in clock- or counter clockwise order

Definition at line 5748 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_corner_cells()

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 
)

Determines for all provided vertices the cells surrouding them.

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid on which this routine is supposed to work on
[in]verticeslocal ids of selected vertices
[in]countnumber of entries in vertices
[out]vertex_to_celllist of result cells for all vertices associated to the selected cells
[out]num_cells_per_vertexnumber of result cells for each vertex
Remarks
the result cells for a vertex is sorted by their global id
the user is responsible for free the memory of the vertex_to_cell array
the user has to make sure that the array num_cells_per_vertex is at least of size "count"
Examples
test_dist_grid_pair_parallel.c.

Definition at line 6380 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_dist_grid()

struct yac_dist_grid * yac_dist_grid_pair_get_dist_grid ( struct yac_dist_grid_pair grid_pair,
char const *  grid_name 
)

gets one of the two grids from the distributed grid pairs

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the selected grid
Returns
distributed grid
Examples
test_dist_grid_pair_parallel.c.

Definition at line 2784 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_MPI_Comm()

MPI_Comm yac_dist_grid_pair_get_MPI_Comm ( struct yac_dist_grid_pair grid_pair)

gets a communicator containing all ranks of the distributed grid pair

Parameters
[in]grid_pairdistributed grid pair
Returns
comm communicator

Definition at line 2779 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_dist_grid_pair_get_vertex_neighbours()

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 
)

Determines all non-masked neighour vertices for the selected vertices

Parameters
[in]grid_pairdistributed grid pair
[in]grid_namegrid name of the grid on which this routine is supposed to work on
[in]verticeslocal ids of selected vertices
[in]countnumber of entries in vertices
[out]neigh_verticesneighbour vertices
[out]num_neighs_per_vertexnumber of neighbours per vertex
[in]fieldif the provided field contains a mask for corners, it will be used
Remarks
the user has to ensure that num_neighs_per_vertex is allocated big enough
the user is responsible for freeing memory associated to neigh_vertices

Definition at line 6294 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_new()

struct yac_dist_grid_pair * yac_dist_grid_pair_new ( struct yac_basic_grid grid_a,
struct yac_basic_grid grid_b,
MPI_Comm  comm 
)

generate a distributed grid pair

Parameters
[in]grid_afirst basic grid
[in]grid_bsecond basic grid
[in]commcommunicator containing the ranks of all processes participating in this call
Returns
distributed grid pair
Remarks
this routine is collective for all processes in comm
Examples
test_dist_grid_pair_parallel.c, test_interp_grid_parallel.c, test_interp_method_avg_parallel.c, test_interp_method_callback_parallel.c, test_interp_method_conserv_parallel.c, test_interp_method_creep_parallel.c, test_interp_method_file_parallel.c, test_interp_method_hcsbb_parallel.c, test_interp_method_ncc_parallel.c, test_interp_method_nnn_parallel.c, test_interp_method_nnn_parallel2.c, test_interp_method_rbf_parallel.c, test_interp_method_spmap_parallel.c, test_interp_weights_parallel.c, test_interpolation_parallel1_c.c, test_interpolation_parallel2.c, test_interpolation_parallel3.c, test_interpolation_parallel4.c, and test_interpolation_parallel5.c.

Definition at line 2714 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_pair_new_f2c()

struct yac_dist_grid_pair * yac_dist_grid_pair_new_f2c ( struct yac_basic_grid grid_a,
struct yac_basic_grid grid_b,
MPI_Fint  comm 
)

Definition at line 2771 of file dist_grid.c.

Here is the call graph for this function:

◆ yac_dist_grid_pair_relocate_point_pairs()

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 
)

Each point in a distributed grid has a unique owner rank.
This routine relocates point pairs of two grids. If (a_is_ref != 0), this routine will relocate the point pairs such that each process only has pairs with points_a being owned by the respective process.

Parameters
[in]grid_pairdistributed grid pair
[in]a_is_refdetermines whether points_a or points_b are used as the sorting reference
[in]to_dist_ownerdetermines whether the sorting is based on the dist or orig owner of the respective points
[in]grid_name_agrid name for the a-part of point pairs
[in,out]points_alocal ids of the a-part of the point pairs
[in]location_alocation of the a-part of the point pairs
[in]grid_name_bgrid name for the b-part of point pairs
[in,out]points_blocal ids of the b-part of the point pairs
[in]location_blocation of the b-part of the point pairs
[in,out]weightsweights for all point pairs
[in,out]countnumber of point pairs before and after this routine

Definition at line 6773 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_dist_grid_single_remote_point_to_local()

static void yac_dist_grid_single_remote_point_to_local ( struct yac_dist_grid dist_grid,
struct single_remote_point ids,
size_t  count,
enum yac_location  location,
size_t *  idx 
)
static

Definition at line 4299 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_coordinate_mpi_datatype()

static MPI_Datatype yac_get_coordinate_mpi_datatype ( MPI_Comm  comm)
static

Definition at line 2209 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_get_id_pos_mpi_datatype()

static MPI_Datatype yac_get_id_pos_mpi_datatype ( MPI_Comm  comm)
static

Definition at line 304 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_id_reorder_coord_coord_mpi_datatype()

static MPI_Datatype yac_get_id_reorder_coord_coord_mpi_datatype ( MPI_Comm  comm)
static

Definition at line 1099 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_id_reorder_coord_id_mpi_datatype()

static MPI_Datatype yac_get_id_reorder_coord_id_mpi_datatype ( MPI_Comm  comm)
static

Definition at line 1114 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_n_single_remote_point_reorder_mpi_datatype()

static MPI_Datatype yac_get_n_single_remote_point_reorder_mpi_datatype ( int  n,
MPI_Comm  comm 
)
static

Definition at line 278 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_nnn_search_result_mpi_datatype()

static MPI_Datatype yac_get_nnn_search_result_mpi_datatype ( size_t  n,
MPI_Comm  comm 
)
static

Definition at line 4624 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_remote_point_info_mpi_datatype()

MPI_Datatype yac_get_remote_point_info_mpi_datatype ( MPI_Comm  comm)

generates an MPI Datatype for struct remote_point_info

Parameters
[in]commcommunicator
Returns
MPI Datatype for struct remote_point_info
Remarks
the user has to free the returned MPI Datatype using MPI_Type_free

Definition at line 322 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_get_single_remote_point_mpi_datatype()

static MPI_Datatype yac_get_single_remote_point_mpi_datatype ( MPI_Comm  comm)
static

Definition at line 258 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_point_get_pack_size()

int yac_remote_point_get_pack_size ( struct remote_point point,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

computes the maximum size required by MPI to pack the provided point of type struct remote_point

Parameters
[in]pointpoint for which the pack size is to be determined
[in]point_info_dtMPI Datatype for packing struct point_info
[in]commcommunicator
Returns
maximum packing size

Definition at line 507 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_point_infos_free()

static void yac_remote_point_infos_free ( struct remote_point_infos point_infos,
size_t  count 
)
static

Definition at line 2929 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_get_pack_size()

static int yac_remote_point_infos_get_pack_size ( struct remote_point_infos const *  infos,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 402 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_get_pack_sizes()

static void yac_remote_point_infos_get_pack_sizes ( struct remote_point_infos **  infos,
size_t  count,
int *  pack_sizes,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 416 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_pack()

static void yac_remote_point_infos_pack ( struct remote_point_infos **  infos,
int *  pack_sizes,
size_t  count,
void *  buffer,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 432 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_pack_single()

static void yac_remote_point_infos_pack_single ( struct remote_point_infos const *  infos,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 520 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_single_free()

static void yac_remote_point_infos_single_free ( struct remote_point_infos point_infos)
static

Definition at line 3615 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_unpack()

static void yac_remote_point_infos_unpack ( void *  buffer,
int  buffer_size,
int *  position,
struct remote_point_infos infos,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 455 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_infos_unpack_info_buffer()

static void yac_remote_point_infos_unpack_info_buffer ( void *  buffer,
int  buffer_size,
int *  position,
struct remote_point_info info_buffer,
size_t *  info_buffer_position,
struct remote_point_infos infos,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)
static

Definition at line 482 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_remote_point_pack()

void yac_remote_point_pack ( struct remote_point point,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

packs a provided remote_point; this is simlar to MPI_Pack

Parameters
[in]pointremote_point to be packed
[in,out]bufferpacking buffer
[in]buffer_sizesize of packing buffer
[in,out]positionpacking position
[in]point_info_dtMPI Datatype for packing struct point_info
[in]commcommunicator

Definition at line 536 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_point_unpack()

void yac_remote_point_unpack ( void *  buffer,
int  buffer_size,
int *  position,
struct remote_point point,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

unpacks and allocates a remote_point from a buffer; this is similar to MPI_Unpack

Parameters
[in]bufferpacking buffer
[in]buffer_sizesize of packing buffer
[in,out]positionunpacking position
[out]pointunpacked point
[in]point_info_dtMPI Datatype for unpacking struct point_info
[in]commcommunicator

Definition at line 548 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_point_unpack_info_buffer()

void yac_remote_point_unpack_info_buffer ( void *  buffer,
int  buffer_size,
int *  position,
struct remote_point_info info_buffer,
size_t *  info_buffer_position,
struct remote_point point,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

Definition at line 560 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_points_get_pack_size()

int yac_remote_points_get_pack_size ( struct remote_points points,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

computes the maximum size required by MPI to pack the provided points of type struct remote_points

Parameters
[in]pointspoints for which the pack size is to be determined
[in]point_info_dtMPI Datatype for unpacking struct point_info
[in]commcommunicator
Returns
maximum packing size

Definition at line 574 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_points_pack()

void yac_remote_points_pack ( struct remote_points points,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

packs provided remote_points; this is simlar to MPI_Pack

Parameters
[in]pointsremote_points to be packed
[in,out]bufferpacking buffer
[in]buffer_sizesize of packing buffer
[in,out]positionpacking position
[in]point_info_dtMPI Datatype for packing struct point_info
[in]commcommunicator

Definition at line 592 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_remote_points_unpack()

void yac_remote_points_unpack ( void *  buffer,
int  buffer_size,
int *  position,
struct remote_points **  points,
MPI_Datatype  point_info_dt,
MPI_Comm  comm 
)

unpacks and allocates remote_points from a buffer; this is similar to MPI_Unpack

Parameters
[in]bufferpacking buffer
[in]buffer_sizesize of packing buffer
[in,out]positionunpacking position
[out]pointsunpacked points
[in]point_info_dtMPI Datatype for unpacking struct point_info
[in]commcommunicator

Definition at line 611 of file dist_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_single_remote_point_pack()

static void yac_single_remote_point_pack ( struct single_remote_point point,
void *  buffer,
int  buffer_size,
int *  position,
MPI_Datatype  single_remote_point_dt,
MPI_Comm  comm 
)
static

Definition at line 5823 of file dist_grid.c.

Here is the caller graph for this function:

◆ yac_single_remote_point_unpack()

static void yac_single_remote_point_unpack ( void *  buffer,
int  buffer_size,
int *  position,
struct single_remote_point point,
MPI_Datatype  single_remote_point_dt,
MPI_Comm  comm 
)
static

Definition at line 5833 of file dist_grid.c.

Here is the caller graph for this function: