YetAnotherCoupler 3.5.2
|
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <yaxt.h>
#include "dist_grid_internal.h"
#include "interp_grid_internal.h"
#include "yac_mpi_internal.h"
#include "geometry.h"
#include "utils_core.h"
#include "sphere_part.h"
Go to the source code of this file.
Data Structures | |
struct | yac_interp_grid |
Functions | |
struct yac_interp_grid * | yac_interp_grid_new (struct yac_dist_grid_pair *grid_pair, char const *src_grid_name, char const *tgt_grid_name, size_t num_src_fields, struct yac_interp_field const *src_fields, struct yac_interp_field const tgt_field) |
struct yac_interp_grid * | yac_interp_grid_new_f2c (struct yac_dist_grid_pair *grid_pair, char const *src_grid_name, char const *tgt_grid_name, size_t num_src_fields, int const *src_field_locations, size_t const *src_field_coordinate_idxs, size_t const *src_field_masks_idxs, int tgt_field_location, size_t tgt_field_coordinate_idx, size_t tgt_field_masks_idx) |
char const * | yac_interp_grid_get_src_grid_name (struct yac_interp_grid *interp_grid) |
char const * | yac_interp_grid_get_tgt_grid_name (struct yac_interp_grid *interp_grid) |
void | yac_interp_grid_get_src_points (struct yac_interp_grid *interp_grid, size_t src_field_idx, size_t **src_indices, size_t *count) |
void | yac_interp_grid_get_tgt_points (struct yac_interp_grid *interp_grid, size_t **tgt_indices, size_t *count) |
struct remote_point * | yac_interp_grid_get_src_remote_points2 (struct yac_interp_grid *interp_grid, enum yac_location location, size_t *src_points, size_t count) |
struct remote_point * | yac_interp_grid_get_src_remote_points (struct yac_interp_grid *interp_grid, size_t src_field_idx, size_t *src_points, size_t count) |
void | yac_interp_grid_src_global_to_local (struct yac_interp_grid *interp_grid, size_t src_field_idx, yac_int *src_global_ids, size_t count, size_t *src_local_ids) |
void | yac_interp_grid_tgt_global_to_local (struct yac_interp_grid *interp_grid, yac_int *tgt_global_ids, size_t count, size_t *tgt_local_ids) |
struct remote_point * | yac_interp_grid_get_tgt_remote_points (struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count) |
static yac_int const * | get_tgt_grid_global_ids (struct yac_interp_grid *interp_grid) |
enum yac_location | yac_interp_grid_get_tgt_field_location (struct yac_interp_grid *interp_grid) |
void | yac_interp_grid_get_src_global_ids (struct yac_interp_grid *interp_grid, size_t *src_points, size_t count, size_t src_field_idx, yac_int *src_global_ids) |
void | yac_interp_grid_get_tgt_global_ids (struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, yac_int *tgt_global_ids) |
static void | yac_interp_grid_get_coordinates (size_t *points, size_t count, yac_coordinate_pointer coordinates, yac_const_coordinate_pointer grid_coordinates) |
void | yac_interp_grid_get_src_coordinates (struct yac_interp_grid *interp_grid, size_t *src_points, size_t count, size_t src_field_idx, yac_coordinate_pointer src_coordinates) |
void | yac_interp_grid_get_tgt_coordinates (struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, yac_coordinate_pointer tgt_coordinates) |
size_t | yac_interp_grid_get_num_src_fields (struct yac_interp_grid *interp_grid) |
enum yac_location | yac_interp_grid_get_src_field_location (struct yac_interp_grid *interp_grid, size_t src_field_idx) |
const_yac_int_pointer | yac_interp_grid_get_src_field_global_ids (struct yac_interp_grid *interp_grid, size_t src_field_idx) |
yac_const_coordinate_pointer | yac_interp_grid_get_src_field_coords (struct yac_interp_grid *interp_grid, size_t src_field_idx) |
yac_const_coordinate_pointer | yac_interp_grid_get_tgt_field_coords (struct yac_interp_grid *interp_grid) |
const_int_pointer | yac_interp_grid_get_src_field_mask (struct yac_interp_grid *interp_grid, size_t src_field_idx) |
void | yac_interp_grid_do_points_search (struct yac_interp_grid *interp_grid, yac_coordinate_pointer search_coords, size_t count, size_t *src_cells) |
void | yac_interp_grid_do_points_search_gc (struct yac_interp_grid *interp_grid, yac_coordinate_pointer search_coords, size_t count, size_t *src_cells) |
void | yac_interp_grid_do_nnn_search_src (struct yac_interp_grid *interp_grid, yac_coordinate_pointer search_coords, size_t count, size_t n, size_t *src_points, double max_search_distance) |
void | yac_interp_grid_do_nnn_search_tgt (struct yac_interp_grid *interp_grid, yac_coordinate_pointer search_coords, size_t count, size_t n, size_t *tgt_points, double max_search_distance) |
void | yac_interp_grid_do_bnd_circle_search_src (struct yac_interp_grid *interp_grid, const_bounding_circle_pointer bnd_circles, size_t count, size_t src_field_idx, size_t **src_cells, size_t *num_src_per_bnd_circle) |
void | yac_interp_grid_do_bnd_circle_search_tgt (struct yac_interp_grid *interp_grid, const_bounding_circle_pointer bnd_circles, size_t count, size_t **tgt_cells, size_t *num_tgt_per_bnd_circle) |
void | yac_interp_grid_do_cell_search_src (struct yac_interp_grid *interp_grid, size_t *tgt_cells, size_t count, size_t **src_cells, size_t *num_src_per_tgt) |
void | yac_interp_grid_do_cell_search_tgt (struct yac_interp_grid *interp_grid, size_t *src_cells, size_t count, size_t **tgt_cells, size_t *num_tgt_per_src) |
MPI_Comm | yac_interp_grid_get_MPI_Comm (struct yac_interp_grid *interp_grid) |
struct yac_const_basic_grid_data * | yac_interp_grid_get_basic_grid_data_src (struct yac_interp_grid *interp_grid) |
struct yac_const_basic_grid_data * | yac_interp_grid_get_basic_grid_data_tgt (struct yac_interp_grid *interp_grid) |
void | yac_interp_grid_get_src_cell_neighbours (struct yac_interp_grid *interp_grid, size_t *src_cells, size_t count, size_t *neighbours) |
void | yac_interp_grid_get_tgt_cell_neighbours (struct yac_interp_grid *interp_grid, size_t *tgt_cells, size_t count, size_t *neighbours) |
void | yac_interp_grid_get_src_corner_cells (struct yac_interp_grid *interp_grid, size_t *src_corners, size_t count, size_t **src_cells, size_t *num_cells_per_corner) |
void | yac_interp_grid_get_tgt_corner_cells (struct yac_interp_grid *interp_grid, size_t *tgt_corners, size_t count, size_t **tgt_cells, size_t *num_cells_per_corner) |
void | yac_interp_grid_get_aux_grid_src (struct yac_interp_grid *interp_grid, size_t *cells, size_t count, size_t **vertex_to_cell, size_t **vertex_to_cell_offsets, int **num_cells_per_vertex) |
void | yac_interp_grid_relocate_src_tgt_pairs (struct yac_interp_grid *interp_grid, int to_tgt_owner, size_t src_field_idx, size_t **src_points, size_t **tgt_points, double **weights, size_t *count) |
void | yac_interp_grid_determine_dist_tgt_owners (struct yac_interp_grid *interp_grid, size_t *tgt_indices, size_t count, int *owners) |
void | yac_interp_grid_get_tgt_vertex_neighbours (struct yac_interp_grid *interp_grid, size_t *vertices, size_t count, size_t **neigh_vertices, int *num_neighs_per_vertex) |
void | yac_interp_grid_relocate_src_tgt_pairs_orig (struct yac_interp_grid *interp_grid, int to_tgt_owner, enum yac_location src_location, size_t **src_points, size_t **tgt_points, double **weights, size_t *count) |
void | yac_interp_grid_delete (struct yac_interp_grid *interp_grid) |
|
static |
Definition at line 170 of file interp_grid.c.
void yac_interp_grid_delete | ( | struct yac_interp_grid * | interp_grid | ) |
deletes all memory associated with the provided interpolation grid
[in,out] | interp_grid | interpolation grid |
Definition at line 575 of file interp_grid.c.
void yac_interp_grid_determine_dist_tgt_owners | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_indices, | ||
size_t | count, | ||
int * | owners ) |
Gets the distributed owners of the given target indices
[in] | interp_grid | interpolation grid |
[in] | tgt_indices | local indices of target points |
[in] | count | number of indices in tgt_indices |
[out] | owners | ranks of processes to which the target points in tgt_indices are assigned to by the distributed grid decomposition |
Definition at line 544 of file interp_grid.c.
void yac_interp_grid_do_bnd_circle_search_src | ( | struct yac_interp_grid * | interp_grid, |
const_bounding_circle_pointer | bnd_circles, | ||
size_t | count, | ||
size_t | src_field_idx, | ||
size_t ** | src_cells, | ||
size_t * | num_src_per_bnd_circle ) |
search for all source cells matching the provided bounding circles
[in] | interp_grid | interpolation grid |
[in] | bnd_circles | search bounding circles |
[in] | count | number of search bounding circles |
[in] | src_field_idx | index of the source field |
[out] | src_cells | local ids of result source points |
[out] | num_src_per_bnd_circle | number of result source points per bounding circle |
Definition at line 370 of file interp_grid.c.
void yac_interp_grid_do_bnd_circle_search_tgt | ( | struct yac_interp_grid * | interp_grid, |
const_bounding_circle_pointer | bnd_circles, | ||
size_t | count, | ||
size_t ** | tgt_cells, | ||
size_t * | num_tgt_per_bnd_circle ) |
search for all target cells matching the provided bounding circles
[in] | interp_grid | interpolation grid |
[in] | bnd_circles | search bounding circles |
[in] | count | number of search bounding circles |
[out] | tgt_cells | local ids of result target points |
[out] | num_tgt_per_bnd_circle | number of result target points per bounding circle |
Definition at line 390 of file interp_grid.c.
void yac_interp_grid_do_cell_search_src | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_cells, | ||
size_t | count, | ||
size_t ** | src_cells, | ||
size_t * | num_src_per_tgt ) |
search for all source cells matching the provided target cells
[in] | interp_grid | interpolation grid |
[in] | tgt_cells | local ids of target cells |
[in] | count | number of target cells |
[out] | src_cells | local ids of result source points |
[out] | num_src_per_tgt | number of result source points per target cell |
Definition at line 405 of file interp_grid.c.
void yac_interp_grid_do_cell_search_tgt | ( | struct yac_interp_grid * | interp_grid, |
size_t * | src_cells, | ||
size_t | count, | ||
size_t ** | tgt_cells, | ||
size_t * | num_tgt_per_src ) |
search for all target cells matching the provided source cells
[in] | interp_grid | interpolation grid |
[in] | src_cells | local ids of source cells |
[in] | count | number of source cells |
[out] | tgt_cells | local ids of result target points |
[out] | num_tgt_per_src | number of result target points per source cell |
Definition at line 430 of file interp_grid.c.
void yac_interp_grid_do_nnn_search_src | ( | struct yac_interp_grid * | interp_grid, |
yac_coordinate_pointer | search_coords, | ||
size_t | count, | ||
size_t | n, | ||
size_t * | src_points, | ||
double | max_search_distance ) |
does a n-nearest-neighbour search on the source grid
[in] | interp_grid | interpolation grid |
[in] | search_coords | search coordinates |
[in] | count | number of search coordinates |
[in] | n | number of source points per search coordinate |
[out] | src_points | local ids of result source points |
[in] | max_search_distance | routine does not return further away then this value (valid range: [0;M_PI]) |
Definition at line 348 of file interp_grid.c.
void yac_interp_grid_do_nnn_search_tgt | ( | struct yac_interp_grid * | interp_grid, |
yac_coordinate_pointer | search_coords, | ||
size_t | count, | ||
size_t | n, | ||
size_t * | tgt_points, | ||
double | max_search_distance ) |
does a n-nearest-neighbour search on the target grid
[in] | interp_grid | interpolation grid |
[in] | search_coords | search coordinates |
[in] | count | number of search coordinates |
[in] | n | number of target points per search coordinate |
[out] | tgt_points | local ids of result target points |
[in] | max_search_distance | routine does not return further away then this value (valid range: [0;M_PI]) |
Definition at line 361 of file interp_grid.c.
void yac_interp_grid_do_points_search | ( | struct yac_interp_grid * | interp_grid, |
yac_coordinate_pointer | search_coords, | ||
size_t | count, | ||
size_t * | src_cells ) |
search for source cells that map to the provided search coordinates
[in] | interp_grid | interpolation grid |
[in] | search_coords | search coordinates |
[in] | count | number of search coordinates |
[out] | src_cells | local ids of matching source cells |
Definition at line 330 of file interp_grid.c.
void yac_interp_grid_do_points_search_gc | ( | struct yac_interp_grid * | interp_grid, |
yac_coordinate_pointer | search_coords, | ||
size_t | count, | ||
size_t * | src_cells ) |
search for source cells that map to the provided search coordinates
[in] | interp_grid | interpolation grid |
[in] | search_coords | search coordinates |
[in] | count | number of search coordinates |
[out] | src_cells | local ids of matching source cells |
Definition at line 339 of file interp_grid.c.
void yac_interp_grid_get_aux_grid_src | ( | struct yac_interp_grid * | interp_grid, |
size_t * | cells, | ||
size_t | count, | ||
size_t ** | vertex_to_cell, | ||
size_t ** | vertex_to_cell_offsets, | ||
int ** | num_cells_per_vertex ) |
generates for all vertices of the source 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] | interp_grid | interpolation grid |
[in] | cells | selected source 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 |
Definition at line 516 of file interp_grid.c.
struct yac_const_basic_grid_data * yac_interp_grid_get_basic_grid_data_src | ( | struct yac_interp_grid * | interp_grid | ) |
gets the basic grid data of the source grid
[in] | interp_grid | interpolation grid |
Definition at line 460 of file interp_grid.c.
struct yac_const_basic_grid_data * yac_interp_grid_get_basic_grid_data_tgt | ( | struct yac_interp_grid * | interp_grid | ) |
gets the basic grid data of the target grid
[in] | interp_grid | interpolation grid |
Definition at line 469 of file interp_grid.c.
|
static |
MPI_Comm yac_interp_grid_get_MPI_Comm | ( | struct yac_interp_grid * | interp_grid | ) |
gets a communicator containing all ranks of the interpolation grid
[in] | interp_grid | interpolation grid |
Definition at line 455 of file interp_grid.c.
size_t yac_interp_grid_get_num_src_fields | ( | struct yac_interp_grid * | interp_grid | ) |
gets the number of source fields in the provided interpolation grid
[in] | interp_grid | interpolation grid |
Definition at line 246 of file interp_grid.c.
void yac_interp_grid_get_src_cell_neighbours | ( | struct yac_interp_grid * | interp_grid, |
size_t * | src_cells, | ||
size_t | count, | ||
size_t * | neighbours ) |
gets neighbouring source grid cells for all provided source cells
[in] | interp_grid | interpolation grid |
[in] | src_cells | local ids of source cells for which the neighbours are to be determined |
[in] | count | number for entries in src_cells |
[out] | neighbours | neighbours for all edges of all provided source cells |
Definition at line 478 of file interp_grid.c.
void yac_interp_grid_get_src_coordinates | ( | struct yac_interp_grid * | interp_grid, |
size_t * | src_points, | ||
size_t | count, | ||
size_t | src_field_idx, | ||
yac_coordinate_pointer | src_coordinates ) |
gets the coordinates of the selected source points
[in] | interp_grid | interpolation grid |
[in] | src_points | local ids of the selected source points |
[in] | count | number of entries in src_points |
[in] | src_field_idx | index of the source field |
[in] | src_coordinates | coordinates of selected source points |
Definition at line 228 of file interp_grid.c.
void yac_interp_grid_get_src_corner_cells | ( | struct yac_interp_grid * | interp_grid, |
size_t * | src_corners, | ||
size_t | count, | ||
size_t ** | src_cells, | ||
size_t * | num_cells_per_corner ) |
gets for each provided source corner all cells connected to them
[in] | interp_grid | interpolation grid |
[in] | src_corners | local ids of source corners for which the connected cells are to be determined |
[in] | count | number of entries in src_corners |
[out] | src_cells | source cells connected to the provided source corners |
[out] | num_cells_per_corner | number of cells per corner |
Definition at line 496 of file interp_grid.c.
yac_const_coordinate_pointer yac_interp_grid_get_src_field_coords | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx ) |
gets the coordinates of the selected field of all points in the local part of the distributed source grid
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
Definition at line 285 of file interp_grid.c.
const_yac_int_pointer yac_interp_grid_get_src_field_global_ids | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx ) |
gets the global ids of the selected field of all points in the local part of the distributed source grid
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
Definition at line 262 of file interp_grid.c.
enum yac_location yac_interp_grid_get_src_field_location | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx ) |
gets the location of a source field
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
Definition at line 252 of file interp_grid.c.
const_int_pointer yac_interp_grid_get_src_field_mask | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx ) |
gets the mask of the selected field of all points in the local part of the distributed source grid
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
Definition at line 314 of file interp_grid.c.
void yac_interp_grid_get_src_global_ids | ( | struct yac_interp_grid * | interp_grid, |
size_t * | src_points, | ||
size_t | count, | ||
size_t | src_field_idx, | ||
yac_int * | src_global_ids ) |
gets the global ids of the selected source points
[in] | interp_grid | interpolation grid |
[in] | src_points | local ids of the selected source points |
[in] | count | number of entries in src_points |
[in] | src_field_idx | index of the source field |
[in] | src_global_ids | global ids of selected source points |
Definition at line 194 of file interp_grid.c.
char const * yac_interp_grid_get_src_grid_name | ( | struct yac_interp_grid * | interp_grid | ) |
gets the name of the source grid
[in] | interp_grid | interpolation grid |
Definition at line 77 of file interp_grid.c.
void yac_interp_grid_get_src_points | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx, | ||
size_t ** | src_indices, | ||
size_t * | count ) |
gets all unmasked points available in the local part of the distributed source grids
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
[out] | src_indices | local indices of all unmasked local source cells |
[out] | count | number of entries in src_indices |
Definition at line 87 of file interp_grid.c.
struct remote_point * yac_interp_grid_get_src_remote_points | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx, | ||
size_t * | src_points, | ||
size_t | count ) |
allocates and returns remote_point informations for a list of selected source points
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
[in] | src_points | local ids of selected source points |
[in] | count | number of entries in src_points |
Definition at line 122 of file interp_grid.c.
struct remote_point * yac_interp_grid_get_src_remote_points2 | ( | struct yac_interp_grid * | interp_grid, |
enum yac_location | location, | ||
size_t * | src_points, | ||
size_t | count ) |
allocates and returns remote_point informations for a list of selected source points
[in] | interp_grid | interpolation grid |
[in] | location | location for which the remote point info is requested |
[in] | src_points | local ids of selected source points |
[in] | count | number of entries in src_points |
Definition at line 110 of file interp_grid.c.
void yac_interp_grid_get_tgt_cell_neighbours | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_cells, | ||
size_t | count, | ||
size_t * | neighbours ) |
gets neighbouring target grid cells for all provided target cells
[in] | interp_grid | interpolation grid |
[in] | tgt_cells | local ids of target cells for which the neighbours are to be determined |
[in] | count | number for entries in tgt_cells |
[out] | neighbours | neighbours for all edges of all provided target cells |
Definition at line 487 of file interp_grid.c.
void yac_interp_grid_get_tgt_coordinates | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_points, | ||
size_t | count, | ||
yac_coordinate_pointer | tgt_coordinates ) |
gets the coordinates of the selected target points
[in] | interp_grid | interpolation grid |
[in] | tgt_points | local ids of the selected target points |
[in] | count | number of entries in tgt_points |
[in] | tgt_coordinates | coordinates of selected target points |
Definition at line 237 of file interp_grid.c.
void yac_interp_grid_get_tgt_corner_cells | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_corners, | ||
size_t | count, | ||
size_t ** | tgt_cells, | ||
size_t * | num_cells_per_corner ) |
gets for each provided target corner all cells connected to them
[in] | interp_grid | interpolation grid |
[in] | tgt_corners | local ids of target corners for which the connected cells are to be determined |
[in] | count | number of entries in tgt_corners |
[out] | tgt_cells | target cells connected to the provided target corners |
[out] | num_cells_per_corner | number of cells per corner |
Definition at line 506 of file interp_grid.c.
yac_const_coordinate_pointer yac_interp_grid_get_tgt_field_coords | ( | struct yac_interp_grid * | interp_grid | ) |
gets the coordinates of the target field of all points in the local part of the distributed target grid
[in] | interp_grid | interpolation grid |
Definition at line 302 of file interp_grid.c.
enum yac_location yac_interp_grid_get_tgt_field_location | ( | struct yac_interp_grid * | interp_grid | ) |
gets the location of the target field
[in] | interp_grid | interpolation grid |
Definition at line 188 of file interp_grid.c.
void yac_interp_grid_get_tgt_global_ids | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_points, | ||
size_t | count, | ||
yac_int * | tgt_global_ids ) |
gets the global ids of the selected target points
[in] | interp_grid | interpolation grid |
[in] | tgt_points | local ids of the selected target points |
[in] | count | number of entries in tgt_points |
[in] | tgt_global_ids | global ids of selected target points |
Definition at line 205 of file interp_grid.c.
char const * yac_interp_grid_get_tgt_grid_name | ( | struct yac_interp_grid * | interp_grid | ) |
gets the name of the target grid
[in] | interp_grid | interpolation grid |
Definition at line 82 of file interp_grid.c.
void yac_interp_grid_get_tgt_points | ( | struct yac_interp_grid * | interp_grid, |
size_t ** | tgt_indices, | ||
size_t * | count ) |
gets all unmasked points available in the local part of the distributed target grids
[in] | interp_grid | interpolation grid |
[out] | tgt_indices | local indices of all unmasked local target cells |
[out] | count | number of entries in tgt_indices |
Definition at line 99 of file interp_grid.c.
struct remote_point * yac_interp_grid_get_tgt_remote_points | ( | struct yac_interp_grid * | interp_grid, |
size_t * | tgt_points, | ||
size_t | count ) |
allocates and returns remote_point informations for a list of selected target points
[in] | interp_grid | interpolation grid |
[in] | tgt_points | local ids of selected target points |
[in] | count | number of entries in tgt_points |
Definition at line 158 of file interp_grid.c.
void yac_interp_grid_get_tgt_vertex_neighbours | ( | struct yac_interp_grid * | interp_grid, |
size_t * | vertices, | ||
size_t | count, | ||
size_t ** | neigh_vertices, | ||
int * | num_neighs_per_vertex ) |
Determines all non-masked neighour vertices for the selected target vertices
[in] | interp_grid | interpolation grid |
[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 |
Definition at line 553 of file interp_grid.c.
struct yac_interp_grid * yac_interp_grid_new | ( | struct yac_dist_grid_pair * | grid_pair, |
char const * | src_grid_name, | ||
char const * | tgt_grid_name, | ||
size_t | num_src_fields, | ||
struct yac_interp_field const * | src_fields, | ||
struct yac_interp_field const | tgt_field ) |
generate a interpolation grid
[in] | grid_pair | distributed grid pair |
[in] | src_grid_name | name of the source grid |
[in] | tgt_grid_name | name of the target grid |
[in] | num_src_fields | number of source fields |
[in] | src_fields | specifies the source fields |
[in] | tgt_field | specifies the target field |
Definition at line 31 of file interp_grid.c.
struct yac_interp_grid * yac_interp_grid_new_f2c | ( | struct yac_dist_grid_pair * | grid_pair, |
char const * | src_grid_name, | ||
char const * | tgt_grid_name, | ||
size_t | num_src_fields, | ||
int const * | src_field_locations, | ||
size_t const * | src_field_coordinate_idxs, | ||
size_t const * | src_field_masks_idxs, | ||
int | tgt_field_location, | ||
size_t | tgt_field_coordinate_idx, | ||
size_t | tgt_field_masks_idx ) |
void yac_interp_grid_relocate_src_tgt_pairs | ( | struct yac_interp_grid * | interp_grid, |
int | to_tgt_owner, | ||
size_t | src_field_idx, | ||
size_t ** | src_points, | ||
size_t ** | tgt_points, | ||
double ** | weights, | ||
size_t * | count ) |
Relocates source-target-point-pairs. The flag "to_tgt_owner" determines whether the pairs go to the dist owner process of the target or source points for each pair.
[in] | interp_grid | interpolation grid |
[in] | to_tgt_owner | determines whether the pairs go to the dist owner process of the target or source points |
[in] | src_field_idx | index of the source field |
[in,out] | src_points | local ids of the source-part of the point pairs |
[in,out] | tgt_points | local ids of the target-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 531 of file interp_grid.c.
void yac_interp_grid_relocate_src_tgt_pairs_orig | ( | struct yac_interp_grid * | interp_grid, |
int | to_tgt_owner, | ||
enum yac_location | src_location, | ||
size_t ** | src_points, | ||
size_t ** | tgt_points, | ||
double ** | weights, | ||
size_t * | count ) |
Relocates source-target-point-pairs. The flag "to_tgt_owner" determines whether the pairs go to the orig owner process of the target or source points for each pair.
[in] | interp_grid | interpolation grid |
[in] | to_tgt_owner | determines whether the pairs go to the dist owner process of the target or source points |
[in] | src_location | location of the source points |
[in,out] | src_points | local ids of the source-part of the point pairs |
[in,out] | tgt_points | local ids of the target-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 563 of file interp_grid.c.
void yac_interp_grid_src_global_to_local | ( | struct yac_interp_grid * | interp_grid, |
size_t | src_field_idx, | ||
yac_int * | src_global_ids, | ||
size_t | count, | ||
size_t * | src_local_ids ) |
returns the local ids for the provided global source ids
[in] | interp_grid | interpolation grid |
[in] | src_field_idx | index of the source field |
[in] | src_global_ids | global ids of the selected source points |
[in] | count | number of entries in src_global_ids |
[out] | src_local_ids | local ids of the selected source points |
Definition at line 132 of file interp_grid.c.
void yac_interp_grid_tgt_global_to_local | ( | struct yac_interp_grid * | interp_grid, |
yac_int * | tgt_global_ids, | ||
size_t | count, | ||
size_t * | tgt_local_ids ) |
returns the local ids for the provided global target ids
[in] | interp_grid | interpolation grid |
[in] | tgt_global_ids | global ids of the selected target points |
[in] | count | number of entries in tgt_global_ids |
[out] | tgt_local_ids | local ids of the selected target points |
Definition at line 145 of file interp_grid.c.