|
YAC 3.20.0
Yet Another Coupler
|
#include "config.h"#include <stdlib.h>#include <string.h>#include <assert.h>#include <float.h>#include <mpi.h>#include <yaxt.h>#include "grids/basic_grid.h"#include "grids/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 "interpolation/interp_grid.h"#include "field_data_set.h"#include "yac_xmap.h"#include "instrument_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | single_remote_point |
| struct | single_remote_point_reorder |
| struct | global_vertex_reorder |
| struct | global_edge_reorder |
| struct | id_pos |
| struct | n_ids_reorder |
| struct | temp_field_data |
| struct | yac_dist_grid |
| struct | yac_dist_grid_pair |
| struct | nnn_search_result |
| struct | missing_edge_neighbour |
Macros | |
| #define | CHECK_LOCATION() |
| #define | CHECK_GRID_NAME(GRID_NAME) |
Functions | |
| static void | id2idx (char const *caller, yac_int *ids, size_t *idx, size_t num_ids, yac_int *ref_sorted_ids, size_t *ref_sorted_reorder_idx, 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_owner_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_owner_mask (struct yac_dist_grid *dist_grid, int *vertex_owner_mask) |
| static void | generate_owner_masks (struct yac_dist_grid *dist_grid, int comm_rank, int *vertex_owner) |
| static MPI_Datatype | yac_get_id_pos_mpi_datatype (MPI_Comm comm) |
| 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_data, MPI_Comm comm, int **dist_cell_ranks, int *dist_cell_rank_counts, size_t *dist_cell_rank_offsets, int max_num_vertices_per_cell) |
| static void | generate_ce_ids (struct yac_basic_grid_data *grid_data, int *vertex_ranks, int max_num_vertices_per_cell, MPI_Comm comm) |
| static void | check_core_masks (struct yac_basic_grid *grid) |
| static void | generate_global_ids (struct yac_basic_grid *grid, int *vertex_ranks, int max_num_vertices_per_cell, 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 struct bounding_circle | compute_edge_bnd_circle (yac_size_t_2_pointer edge_to_vertex, const yac_coordinate_pointer vertex_coordinates, size_t edge_id) |
| static void | determine_dist_edge_ranks (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid *grid, MPI_Comm comm, size_t *dist_cell_rank_offsets, size_t *dist_edge_rank_offsets, int *num_cell_ranks, int *num_edge_ranks, int **rank_buffer, size_t *rank_buffer_array_size) |
| static void | generate_vertex_to_edge (yac_size_t_2_pointer edge_to_vertex, size_t num_edges, size_t num_vertices, size_t *vertex_to_edge, int *num_edges_per_vertex) |
| static void | determine_dist_vertex_ranks (int *vertex_ranks, struct yac_basic_grid *grid, MPI_Comm comm, size_t *dist_edge_rank_offsets, int *num_edge_ranks, int *num_vertex_ranks, int **rank_buffer, size_t *rank_buffer_array_size) |
| static int | compare_single_remote_point_global_id (const void *a, const void *b) |
| static void | generate_dist_remote_points (struct proc_sphere_part_node *proc_sphere_part, struct yac_basic_grid *grid, int *vertex_ranks, int max_num_vertices_per_cell, MPI_Comm comm, struct remote_point_infos **dist_point_infos, yac_int **dist_global_ids, size_t *dist_count) |
| static void | generate_sorted_ids (yac_int *global_ids, size_t count, yac_int **sorted_global_ids, size_t **reorder_idx) |
| 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 MPI_Datatype | yac_get_coordinate_mpi_datatype (MPI_Comm comm) |
| 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 void | redistribute_vertex_data (struct yac_basic_grid *grid, struct remote_point_infos *dist_vertex_infos, size_t num_vertices, MPI_Comm comm, MPI_Datatype dt_coord, int *vertex_ranks, yac_coordinate_pointer *vertex_coordinates_, int **vertex_owner_, struct yac_field_data **vertex_field_data_) |
| static void | redistribute_edge_data (struct yac_basic_grid *grid, struct remote_point_infos *dist_edge_infos, size_t num_edges, MPI_Comm comm, MPI_Datatype dt_coord, size_t num_vertices, yac_int *sorted_vertex_ids, size_t *sorted_vertex_reorder_idx, yac_size_t_2_pointer *edge_to_vertex_, enum yac_edge_type **edge_type_, struct yac_field_data **edge_field_data_) |
| static void | redistribute_cell_data (struct yac_basic_grid *grid, struct remote_point_infos *dist_cell_infos, size_t num_cells, MPI_Comm comm, MPI_Datatype dt_coord, size_t num_edges, yac_int *sorted_edge_ids, size_t *sorted_edge_reorder_idx, size_t num_vertices, yac_int *sorted_vertex_ids, size_t *sorted_vertex_reorder_idx, int max_num_vertices_per_cell, size_t **cell_to_vertex_, size_t **cell_to_edge_, int **num_vertices_per_cell_, struct yac_field_data **cell_field_data_) |
| static struct bounding_circle * | generate_cell_bounding_circles (size_t num_cells, int max_num_vertices_per_cell, int *num_vertices_per_cell, size_t *cell_to_vertex, size_t *cell_to_vertex_offsets, yac_coordinate_pointer vertex_coordinates, size_t *cell_to_edge, size_t *cell_to_edge_offsets, enum yac_edge_type *edge_type) |
| static int | get_max_num_vertices_per_cell (struct yac_basic_grid_data *grid_data, MPI_Comm comm) |
| static struct yac_dist_grid | generate_dist_grid (struct proc_sphere_part_node *proc_sphere_part, int *vertex_ranks, struct yac_basic_grid *grid, MPI_Comm comm) |
| static void | setup_search_data (struct yac_dist_grid_pair *dist_grid_pair) |
| static struct proc_sphere_part_node * | generate_dist_grid_decomposition (struct yac_basic_grid *grid_a, struct yac_basic_grid *grid_b, int **vertex_ranks[2], MPI_Comm comm) |
| 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) |
| 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) |
| MPI_Comm | yac_dist_grid_pair_get_MPI_Comm (struct yac_dist_grid_pair *grid_pair) |
| struct yac_dist_grid * | yac_dist_grid_pair_get_dist_grid (struct yac_dist_grid_pair *grid_pair, char const *grid_name) |
| struct yac_const_basic_grid_data * | yac_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_total_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_owner_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 *num_indices) |
| static struct yac_field_data * | yac_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_search * | dist_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) |
| static MPI_Datatype | yac_get_single_remote_point_mpi_datatype (MPI_Comm comm) |
| 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_search * | yac_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 int | compare_nnn_search_results_cos_angle (void const *a, void const *b) |
| static void | do_nnn_search_local (struct yac_dist_grid *dist_grid, struct yac_interp_field field, size_t count, yac_coordinate_pointer search_coords, size_t n, double cos_max_search_distance, size_t *result_points) |
| static int | compare_size_t (const void *a, const void *b) |
| 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, double max_search_distance) |
| 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_dnn_search (struct yac_dist_grid_pair *grid_pair, char const *grid_name, const_bounding_circle_pointer bnd_circles, size_t count, size_t **points, 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_dist_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_point * | yac_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) |
| 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) |
| yac_size_t_2_pointer | yac_dist_grid_generate_edge_to_cell (struct yac_dist_grid_pair *grid_pair, char const *grid_name) |
Variables | |
| static char const | yac_dist_grid_dummy_name [] = "yac_dist_grid_dummy" |
| #define CHECK_GRID_NAME | ( | GRID_NAME | ) |
Definition at line 40 of file dist_grid.c.
| #define CHECK_LOCATION | ( | ) |
Definition at line 33 of file dist_grid.c.
|
static |
Definition at line 2996 of file dist_grid.c.


|
static |
Definition at line 763 of file dist_grid.c.


|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 5129 of file dist_grid.c.


|
static |
Definition at line 931 of file dist_grid.c.


|
static |
Definition at line 2392 of file dist_grid.c.


|
static |
Definition at line 2404 of file dist_grid.c.


|
static |
Definition at line 200 of file dist_grid.c.


|
static |
Definition at line 350 of file dist_grid.c.


|
static |
Definition at line 953 of file dist_grid.c.


|
static |
Definition at line 1072 of file dist_grid.c.


|
static |
Definition at line 232 of file dist_grid.c.


|
static |
Definition at line 2464 of file dist_grid.c.


|
static |
|
static |
Definition at line 4131 of file dist_grid.c.


|
static |
|
static |
Definition at line 1456 of file dist_grid.c.


|
static |
Definition at line 451 of file dist_grid.c.


|
static |
Definition at line 1835 of file dist_grid.c.


|
static |
Definition at line 1913 of file dist_grid.c.


|
static |
Definition at line 2068 of file dist_grid.c.


|
static |
Definition at line 1162 of file dist_grid.c.


|
static |
|
static |
Definition at line 872 of file dist_grid.c.


|
static |
Definition at line 250 of file dist_grid.c.


|
static |
|
static |
|
static |
Definition at line 5789 of file dist_grid.c.


|
inlinestatic |
|
static |
|
static |
|
static |
Definition at line 2573 of file dist_grid.c.


|
static |
Definition at line 2608 of file dist_grid.c.


|
static |
Definition at line 2593 of file dist_grid.c.


|
static |
Definition at line 2555 of file dist_grid.c.


|
static |
Definition at line 2721 of file dist_grid.c.


|
static |
Definition at line 2626 of file dist_grid.c.


|
static |
Definition at line 2693 of file dist_grid.c.


|
static |
Definition at line 2678 of file dist_grid.c.


|
static |
|
static |
Definition at line 152 of file dist_grid.c.


|
static |
|
static |
Definition at line 2524 of file dist_grid.c.


|
static |
Definition at line 2745 of file dist_grid.c.


|
static |
|
static |
Definition at line 2887 of file dist_grid.c.


|
static |
Definition at line 2846 of file dist_grid.c.


|
static |
Definition at line 2830 of file dist_grid.c.


|
static |
Definition at line 2794 of file dist_grid.c.


|
static |
Definition at line 2769 of file dist_grid.c.


|
static |
Definition at line 1704 of file dist_grid.c.


|
static |
Definition at line 1611 of file dist_grid.c.


|
static |
Definition at line 1569 of file dist_grid.c.


|
static |
Definition at line 6248 of file dist_grid.c.


|
static |
Definition at line 6299 of file dist_grid.c.


|
static |
Definition at line 2048 of file dist_grid.c.


|
static |
|
static |
Definition at line 3444 of file dist_grid.c.


|
static |
|
static |
|
static |
Definition at line 3682 of file dist_grid.c.


|
static |
Definition at line 3491 of file dist_grid.c.


|
static |
Definition at line 2958 of file dist_grid.c.


|
static |
Definition at line 3634 of file dist_grid.c.


|
static |
Definition at line 2936 of file dist_grid.c.


|
static |
Definition at line 3601 of file dist_grid.c.


| 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
| [in] | grid_data | basic grid data |
| [in] | cell_idx | local id of the selected cell |
| [out] | cell | cell data |
Definition at line 2418 of file dist_grid.c.

|
static |
Definition at line 3289 of file dist_grid.c.


|
static |
Definition at line 3156 of file dist_grid.c.


|
static |
Definition at line 3040 of file dist_grid.c.


| 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) ) |
Definition at line 6394 of file dist_grid.c.


| 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 6445 of file dist_grid.c.


| 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 6455 of file dist_grid.c.


| 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 6334 of file dist_grid.c.


|
static |
Definition at line 2351 of file dist_grid.c.


| yac_size_t_2_pointer yac_dist_grid_generate_edge_to_cell | ( | struct yac_dist_grid_pair * | grid_pair, |
| char const * | grid_name ) |
Generates the edge_to_cell data for the current state of the local grid.
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid on which this routine is supposed to work on |
Definition at line 6613 of file dist_grid.c.


| 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
| [in] | dist_grid | distributed grid |
Definition at line 2204 of file dist_grid.c.

|
static |
Definition at line 5137 of file dist_grid.c.


|
static |
| 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
| [in] | dist_grid | distributed grid |
| [in] | field | field for which the coordinates are to be returned |
Definition at line 2308 of file dist_grid.c.


|
static |
Definition at line 2289 of file dist_grid.c.


| 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
| [in] | dist_grid | distributed grid |
| [in] | field | field for which the mask is to be returned |
Definition at line 2296 of file dist_grid.c.


|
static |
Definition at line 4050 of file dist_grid.c.


|
static |
| 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
| [in] | dist_grid | distributed grid |
| [in] | location | location of the points |
Definition at line 2212 of file dist_grid.c.

| 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
| [in] | grid | distributed grid |
| [in] | field | field description |
| [out] | indices | local indices of all unmasked local cells |
| [out] | count | number of entries in indices |
Definition at line 2263 of file dist_grid.c.


|
static |
Definition at line 4079 of file dist_grid.c.


|
static |
| 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
| [in] | dist_grid | distributed grid |
| [in] | location | location of the requested points |
| [in] | points | local ids of selected points |
| [in] | count | number of entries in points |
Definition at line 5475 of file dist_grid.c.

|
static |
| size_t yac_dist_grid_get_unmasked_local_count | ( | struct yac_dist_grid * | dist_grid, |
| struct yac_interp_field | field ) |
Definition at line 2324 of file dist_grid.c.


| 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
| [in] | dist_grid | distributed grid |
| [in] | location | location of the selected points |
| [in] | global_ids | global ids of the selected points |
| [in] | count | number of entries in global_ids |
| [out] | local_ids | local ids of the selected points |
Definition at line 5560 of file dist_grid.c.


| void yac_dist_grid_pair_delete | ( | struct yac_dist_grid_pair * | grid_pair | ) |
delete all memory associated to the provided grid pair
| [in,out] | grid_pair |
Definition at line 2377 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid on which this routine is supposed to work on |
| [in] | points | local ids of selected points |
| [in] | count | number of entries in points |
| [in] | location | location of the requested points |
| [out] | ranks | distributed owners of selected points |
Definition at line 6465 of file dist_grid.c.


| 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 6485 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid for which the search is to be performed |
| [in] | bnd_circles | search bounding circles |
| [in] | count | number of search bounding circles |
| [out] | cells | local ids of results cells |
| [out] | num_results_per_bnd_circle | number of results per bounding circle |
| [in] | field | field description |
Definition at line 4531 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | search_grid_name | grid name of the grid from which to take the search cells |
| [in] | result_grid_name | grid name of the grid from which to take the matching cells |
| [in] | search_cells | local ids of search cells |
| [in] | count | number of search cells |
| [out] | result_cells | local ids of results cells |
| [out] | num_results_per_search_cell | number of results per search cell |
| [in] | result_field | field description |
Definition at line 5055 of file dist_grid.c.


| void yac_dist_grid_pair_do_dnn_search | ( | struct yac_dist_grid_pair * | grid_pair, |
| char const * | grid_name, | ||
| const_bounding_circle_pointer | bnd_circles, | ||
| size_t | count, | ||
| size_t ** | points, | ||
| size_t * | num_results_per_bnd_circle, | ||
| struct yac_interp_field | field ) |
search for all points matching the provided bounding circles
| [in,out] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid for which the search is to be performed |
| [in] | bnd_circles | search bounding circles |
| [in] | count | number of search bounding circles |
| [out] | points | local ids of result points |
| [out] | num_results_per_bnd_circle | number of results per bounding |
| [in] | field | circle field description |
num_results_per_bnd_circle has a size of at least count. Definition at line 4848 of file dist_grid.c.


| 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, | ||
| double | max_search_distance ) |
does a n-nearest-neighbour search
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid for which the search is to be performed |
| [in] | search_coords | search coordinates |
| [in] | count | number of search coordinates |
| [out] | local_ids | local ids of results points |
| [in] | n | number of points per search coordinate |
| [in] | field | field description |
| [in] | max_search_distance | routine does not return further away then this value (valid range: [0;M_PI]) |
Definition at line 4212 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid for which the search is to be performed |
| [in] | search_coords | search coordinates |
| [in] | count | number of search coordinates |
| [out] | cells | local ids of matching cells |
Definition at line 4031 of file dist_grid.c.


| 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) ) |
Definition at line 3866 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid for which the search is to be performed |
| [in] | search_coords | search coordinates |
| [in] | count | number of search coordinates |
| [out] | cells | local ids of matching cells |
Definition at line 4039 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid on which this routine is supposed to work on |
| [in] | cells | selected cells |
| [in] | count | number of entries in cells |
| [out] | vertex_to_cell | list of result cells for all vertices associated to the selected cells |
| [out] | vertex_to_cell_offsets | the results cells for vertex i can be found at: vertex_to_cell + vertex_to_cell_offsets[i] |
| [out] | num_cells_per_vertex | number of result cells for each vertex |
| [in] | field | if the provided field contains a mask for cells, it will be used |
Definition at line 6177 of file dist_grid.c.


|
static |
returns for each selected vertex the list of all cells surrounding this vertex
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid on which this routine is supposed to work on |
| [in] | vertices | local ids of selected vertices |
| [in] | count | number of entries in vertices |
| [out] | cells | list of result cells for the selected vertices |
| [out] | num_cells_per_vertex | number of cells per selected vertex |
| [in] | field | if the provided field contains a mask for cells, it will be used |
Definition at line 5875 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid for which the search is to be performed |
| [in] | cells | local ids of cells for which the neighbours are to be determined |
| [in] | count | number for entries in cells |
| [out] | neighbours | neighbours for all edges of all provided cells |
Definition at line 5466 of file dist_grid.c.


| 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.
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid on which this routine is supposed to work on |
| [in] | vertices | local ids of selected vertices |
| [in] | count | number of entries in vertices |
| [out] | vertex_to_cell | list of result cells for all vertices associated to the selected cells |
| [out] | num_cells_per_vertex | number of result cells for each vertex |
Definition at line 6128 of file dist_grid.c.


| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the selected grid |
Definition at line 2191 of file dist_grid.c.

| 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
| [in] | grid_pair | distributed grid pair |
Definition at line 2186 of file dist_grid.c.

| 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
| [in] | grid_pair | distributed grid pair |
| [in] | grid_name | grid name of the grid on which this routine is supposed to work on |
| [in] | vertices | local ids of selected vertices |
| [in] | count | number of entries in vertices |
| [out] | neigh_vertices | neighbour vertices |
| [out] | num_neighs_per_vertex | number of neighbours per vertex |
| [in] | field | if the provided field contains a mask for corners, it will be used |
Definition at line 6013 of file dist_grid.c.


| 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
| [in] | grid_a | first basic grid |
| [in] | grid_b | second basic grid |
| [in] | comm | communicator containing the ranks of all processes participating in this call |
Definition at line 2089 of file dist_grid.c.


| 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 ) |
| 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.
| [in] | grid_pair | distributed grid pair |
| [in] | a_is_ref | determines whether points_a or points_b are used as the sorting reference |
| [in] | to_dist_owner | determines whether the sorting is based on the dist or orig owner of the respective points |
| [in] | grid_name_a | grid name for the a-part of point pairs |
| [in,out] | points_a | local ids of the a-part of the point pairs |
| [in] | location_a | location of the a-part of the point pairs |
| [in] | grid_name_b | grid name for the b-part of point pairs |
| [in,out] | points_b | local ids of the b-part of the point pairs |
| [in] | location_b | location of the b-part of the point pairs |
| [in,out] | weights | weights for all point pairs |
| [in,out] | count | number of point pairs before and after this routine |
Definition at line 6518 of file dist_grid.c.


|
static |
Definition at line 3714 of file dist_grid.c.


|
static |
|
static |
Definition at line 269 of file dist_grid.c.


|
static |
Definition at line 3833 of file dist_grid.c.


|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 31 of file dist_grid.c.