YAC 3.7.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_weights.c File Reference
#include "config.h"
#include <string.h>
#include "ppm/ppm_xfuncs.h"
#include "yac_mpi_internal.h"
#include "interp_weights_internal.h"
#include "ensure_array_size.h"
#include "io_utils.h"
#include "utils_core.h"
#include "interp_method_file.h"
#include "interpolation_exchange.h"
Include dependency graph for interp_weights.c:

Go to the source code of this file.

Data Structures

struct  interp_weight_stencil
 
struct  interp_weight_stencil_wsum_mf_weight
 
struct  interp_weight_stencil_wsum_mf
 
struct  interp_weight_stencils_wsum_mf
 
struct  interp_weight_stencils_wsum_mf_buffer
 
struct  interp_weight_stencil_fixed
 
struct  interp_weight_stencil_direct
 
struct  interp_weight_stencil_direct_mf
 
struct  weighted_global_id
 
struct  yac_interp_weights
 
struct  remote_point_info_reorder
 
struct  yac_interpolation_raw
 
struct  yac_interpolation_raw::yac_src_field_exchange_data
 
struct  yac_interpolation_raw::yac_src_field_exchange_data::yac_src_field_exchange_data_msgs
 
struct  yac_interpolation_raw::yac_src_field_exchange_data::yac_src_field_exchange_data_msgs::yac_src_field_exchange_data_msg
 

Macros

#define WEIGHT_TOL   (1e-9)
 
#define YAC_YAXT_EXCHANGER_STR   "YAC_YAXT_EXCHANGER"
 
#define COPY_ARRAY(DATA, COUNT)
 

Enumerations

enum  yac_interp_weight_stencil_type {
  FIXED = 0 , DIRECT = 1 , SUM = 2 , WEIGHT_SUM = 3 ,
  DIRECT_MF = 4 , SUM_MF = 5 , WEIGHT_SUM_MF = 6 , WEIGHT_STENCIL_TYPE_SIZE = 7
}
 

Functions

struct yac_interp_weightsyac_interp_weights_new (MPI_Comm comm, enum yac_location tgt_location, enum yac_location *src_locations, size_t num_src_fields)
 
static struct remote_point copy_remote_point (struct remote_point point)
 
static void copy_remote_points_no_alloc (struct remote_point *points_to, struct remote_point *points_from, size_t count, struct remote_point_info **point_info_buffer_)
 
static struct remote_pointscopy_remote_points (struct remote_point *points, size_t count)
 
static struct remote_pointscopy_remote_points_mf (struct remote_point **points, size_t *counts, size_t num_fields)
 
void yac_interp_weights_add_fixed (struct yac_interp_weights *weights, struct remote_points *tgts, double fixed_value)
 
void yac_interp_weights_add_wsum (struct yac_interp_weights *weights, struct remote_points *tgts, size_t *num_src_per_tgt, struct remote_point *srcs, double *w)
 
void yac_interp_weights_add_sum (struct yac_interp_weights *weights, struct remote_points *tgts, size_t *num_src_per_tgt, struct remote_point *srcs)
 
void yac_interp_weights_add_direct (struct yac_interp_weights *weights, struct remote_points *tgts, struct remote_point *srcs)
 
void yac_interp_weights_add_direct_mf (struct yac_interp_weights *weights, struct remote_points *tgts, size_t *src_field_indices, struct remote_point **srcs_per_field, size_t num_src_fields)
 
void yac_interp_weights_add_sum_mf (struct yac_interp_weights *weights, struct remote_points *tgts, size_t *num_src_per_field_per_tgt, struct remote_point **srcs_per_field, size_t num_src_fields)
 
void yac_interp_weights_add_wsum_mf (struct yac_interp_weights *weights, struct remote_points *tgts, size_t *num_src_per_field_per_tgt, struct remote_point **srcs_per_field, double *w, size_t num_src_fields)
 
static int compare_stencils_fixed (const void *a, const void *b)
 
static MPI_Datatype get_fixed_stencil_mpi_datatype (MPI_Comm comm)
 
static void interp_add_fixed (void *interp, double fixed_value, size_t count, size_t *tgt_pos)
 
static void interp_raw_add_fixed (void *interp, double fixed_value, size_t count, size_t *tgt_pos)
 
static void yac_interp_weights_redist_fixed (MPI_Comm comm, size_t count, struct interp_weight_stencil *fixed_stencils, void *interp, void(*interp_add_fixed)(void *, double, size_t, size_t *))
 
static struct remote_point_info select_src (struct remote_point_infos src)
 
static void xt_redist_msg_free (struct Xt_redist_msg *msgs, size_t count, MPI_Comm comm)
 
static Xt_redist generate_direct_redist (size_t *src_orig_poses, size_t *sendcounts, struct interp_weight_stencil_direct *tgt_stencils, size_t *recvcounts, MPI_Comm comm, Xt_config redist_config)
 
static Xt_redist * generate_direct_mf_redists (size_t *src_orig_poses, size_t *sendcounts, struct interp_weight_stencil_direct_mf *tgt_stencils, size_t *recvcounts, size_t num_src_fields, MPI_Comm comm, Xt_config redist_config)
 
static MPI_Datatype get_direct_stencil_mpi_datatype (MPI_Comm comm)
 
static int compare_stencils_direct (const void *a, const void *b)
 
static void interp_add_direct (void *interp, size_t *src_orig_poses, size_t *sendcounts, struct interp_weight_stencil_direct *tgt_stencils, size_t *recvcounts, MPI_Comm comm, Xt_config redist_config)
 
static void yac_interp_weights_redist_direct (MPI_Comm comm, size_t count, struct interp_weight_stencil *direct_stencils, void *interp, void(*interp_add_direct)(void *, size_t *, size_t *, struct interp_weight_stencil_direct *, size_t *, MPI_Comm, Xt_config), Xt_config redist_config)
 
static MPI_Datatype get_direct_mf_stencil_mpi_datatype (MPI_Comm comm)
 
static int compare_stencils_direct_mf (const void *a, const void *b)
 
static void interp_add_direct_mf (void *interp, size_t num_src_fields, size_t *src_orig_poses, size_t *sendcounts, struct interp_weight_stencil_direct_mf *tgt_stencils, size_t *recvcounts, MPI_Comm comm, Xt_config redist_config)
 
static void yac_src_field_exchange_data_init (struct yac_src_field_exchange_data *src_field_exchange_data)
 
static void yac_src_field_exchange_data_realloc (struct yac_interpolation_raw *interp_raw, size_t num_src_fields)
 
static void yac_interp_weights_data_set_wgt_tgt (struct yac_interp_weights_data *interp_weights_data, size_t num_src_fields, size_t tgt_count, size_t *tgt_idx, size_t *num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t *src_field_buffer_size)
 
static struct yac_src_field_exchange_data_msg * yac_src_field_exchange_data_msgs_get_msg (struct yac_src_field_exchange_data_msgs *msgs, int rank)
 
static void yac_src_field_exchange_data_msgs_add (struct yac_src_field_exchange_data_msgs *msgs, int rank, size_t count, size_t *pos, size_t offset)
 
static void yac_src_field_exchange_data_add (struct yac_src_field_exchange_data *src_field_exchange_data, size_t num_src_fields, MPI_Comm comm, size_t *send_msg_sizes, size_t *send_pos, size_t *recv_msg_sizes, size_t *recv_pos, size_t *recv_offsets)
 
static void interp_add_direct_raw (void *interp, size_t *src_orig_poses, size_t *sendcounts, struct interp_weight_stencil_direct *tgt_stencils, size_t *recvcounts, MPI_Comm comm, Xt_config redist_config)
 
static void interp_add_direct_mf_raw (void *interp, size_t num_src_fields, size_t *src_orig_poses, size_t *sendcounts, struct interp_weight_stencil_direct_mf *tgt_stencils, size_t *recvcounts, MPI_Comm comm, Xt_config redist_config)
 
static void yac_interp_weights_redist_direct_mf (MPI_Comm comm, size_t count, struct interp_weight_stencil *direct_mf_stencils, void *interp, void(*interp_add_direct_mf)(void *, size_t, size_t *, size_t *, struct interp_weight_stencil_direct_mf *, size_t *, MPI_Comm, Xt_config), Xt_config redist_config)
 
static int get_stencil_pack_size_fixed (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int get_stencil_pack_size_direct (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int get_stencil_pack_size_sum (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int get_stencil_pack_size_wsum (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int get_stencil_pack_size_direct_mf (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int get_stencil_pack_size_wsum_mf (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static int get_stencil_pack_size_sum_mf (struct interp_weight_stencil *stencil, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static struct interp_weight_stencil copy_interp_weight_stencil (struct interp_weight_stencil *stencil, struct remote_point point)
 
static struct interp_weight_stencil wcopy_interp_weight_stencil (struct interp_weight_stencil *stencil, struct remote_point point, double weight)
 
static int compare_w_global_id (const void *a, const void *b)
 
static int compare_remote_point (const void *a, const void *b)
 
static void compact_srcs_w (struct remote_points *srcs, double **w)
 
static struct interp_weight_stencil stencils_merge_wsum (struct interp_weight_stencil **stencils, double *w, size_t num_stencils)
 
static struct interp_weight_stencil stencils_merge_sum (struct interp_weight_stencil **stencils, double *w, size_t num_stencils)
 
static struct interp_weight_stencil stencils_merge (struct interp_weight_stencil **stencils, double *w, size_t num_stencils, struct remote_point point)
 
static void get_stencils_pack_sizes (struct interp_weight_stencil *stencils, size_t count, size_t *pack_order, int *pack_sizes, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_fixed (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_direct (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_sum (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_wsum (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_direct_mf (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_sum_mf (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencil_wsum_mf (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencils (struct interp_weight_stencil *stencils, size_t count, size_t *pack_order, void **pack_data, int *pack_sizes, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_fixed (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_direct (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_sum (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_wsum (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_direct_mf (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_sum_mf (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencil_wsum_mf (struct interp_weight_stencil *stencil, void *buffer, int buffer_size, int *position, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void unpack_stencils (struct interp_weight_stencil *stencils, size_t count, void *packed_data, size_t packed_data_size, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static struct interp_weight_stencilexchange_stencils (MPI_Comm comm, struct interp_weight_stencil *stencils, size_t *stencil_indices, size_t *stencil_sendcounts, size_t *stencil_recvcounts)
 
static struct interp_weight_stencilyac_interp_weights_get_stencils (struct yac_interp_weights *weights, size_t *stencil_indices, int *stencil_ranks, size_t count)
 
static void yac_interp_weight_stencils_delete (struct interp_weight_stencil *stencils, size_t count)
 
void yac_interp_weights_wcopy_weights (struct yac_interp_weights *weights, struct remote_points *tgts, size_t *num_stencils_per_tgt, size_t *stencil_indices, int *stencil_ranks, double *w)
 
static int compute_owner (int *ranks, size_t count)
 
static struct interp_weight_stencils_wsum_mfgenerate_w_sum_mf_stencils (struct interp_weight_stencil *stencils, size_t count, enum yac_interp_weight_stencil_type stencil_type)
 
static MPI_Datatype get_wsum_mf_weight_mpi_datatype (MPI_Comm comm)
 
static int get_stencil_wsum_mf_pack_size (struct interp_weight_stencil_wsum_mf *stencil, MPI_Datatype wsum_mf_weight_dt, MPI_Datatype point_info_dt, MPI_Comm comm)
 
static void pack_stencils_wsum_mf (struct interp_weight_stencil_wsum_mf *wsum_stencils, size_t count, size_t *pack_order, void **pack_data, int *pack_sizes, int *weight_counts, MPI_Comm comm)
 
static size_t unpack_stencils_wsum_mf (struct interp_weight_stencil_wsum_mf *wsum_stencils, struct interp_weight_stencil_wsum_mf_weight *weight_buffer, size_t count, void *packed_data, size_t packed_data_size, MPI_Comm comm)
 
static struct interp_weight_stencils_wsum_mfredist_wsum_mf_stencils (MPI_Comm comm, struct interp_weight_stencils_wsum_mf *wsum_stencils_data, int *stencil_owner, size_t *reorder_idx, size_t num_owners)
 
static struct interp_weight_stencils_wsum_mfredist_wsum_mf_stencils_src (MPI_Comm comm, struct interp_weight_stencils_wsum_mf *wsum_stencils_data)
 
static int compare_remote_point_info (const void *a, const void *b)
 
static struct interp_weight_stencils_wsum_mfredist_wsum_mf_stencils_tgt (MPI_Comm comm, struct interp_weight_stencils_wsum_mf *wsum_stencils_data)
 
static Xt_redist * generate_halo_redists (struct remote_point_info_reorder *halo_points, size_t count, size_t num_src_fields, MPI_Comm comm, Xt_config redist_config)
 
static int compare_rank_pos_reorder_field_idx (const void *a, const void *b)
 
static int compare_interp_weight_stencil_wsum_mf_src_orig_pos (const void *a, const void *b)
 
static int compare_interp_weight_stencil_wsum_mf_tgt_orig_pos (const void *a, const void *b)
 
static void free_remote_point (struct remote_point point)
 
static Xt_redist generate_redist_put_double (struct remote_point_infos *point_infos, size_t count, MPI_Comm comm, Xt_config redist_config)
 
static void interpolation_add_w_sum_mf (struct remote_point_info_reorder *remote_src_points, size_t halo_size, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, enum yac_interp_weights_reorder_type reorder, struct yac_interpolation *interp, void(*interp_add_wsum_mf_at_src)(struct yac_interpolation *, Xt_redist *, size_t, size_t *, double *, size_t *, size_t *, size_t, Xt_redist), void(*interp_add_wsum_mf_at_tgt)(struct yac_interpolation *, Xt_redist *, size_t *, size_t, size_t *, double *, size_t *, size_t *, size_t), Xt_config redist_config)
 
static void interpolation_add_sum_at_src (struct yac_interpolation *interp, Xt_redist *halo_redists, size_t tgt_count, size_t *num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields, Xt_redist result_redist)
 
static void interpolation_add_sum_at_tgt (struct yac_interpolation *interp, Xt_redist *src_redists, size_t *tgt_pos, size_t tgt_count, size_t *num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields)
 
static void interpolation_add_sum_mf (struct remote_point_info_reorder *remote_src_points, size_t halo_size, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, enum yac_interp_weights_reorder_type reorder, void *interp, Xt_config redist_config)
 
static void interpolation_add_sum (struct remote_point_info_reorder *remote_src_points, size_t halo_size, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, enum yac_interp_weights_reorder_type reorder, void *interp, Xt_config redist_config)
 
static void interpolation_add_wsum_mf (struct remote_point_info_reorder *remote_src_points, size_t halo_size, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, enum yac_interp_weights_reorder_type reorder, void *interp, Xt_config redist_config)
 
static void interpolation_add_wsum (struct remote_point_info_reorder *remote_src_points, size_t halo_size, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, enum yac_interp_weights_reorder_type reorder, void *interp, Xt_config redist_config)
 
static void yac_interp_weights_redist_w_sum_mf (MPI_Comm comm, struct interp_weight_stencils_wsum_mf *wsum_mf_stencils_data, struct yac_interpolation *interp, enum yac_interp_weights_reorder_type reorder, void(*interp_add_w_sum_mf)(struct remote_point_info_reorder *, size_t, size_t, size_t, struct interp_weight_stencil_wsum_mf *, size_t *, double *, size_t *, size_t *, MPI_Comm, enum yac_interp_weights_reorder_type, void *, Xt_config), Xt_config redist_config)
 
static void yac_interp_weights_redist_w_sum_mf_raw (MPI_Comm comm, struct interp_weight_stencils_wsum_mf *wsum_mf_stencils_data, struct yac_interpolation *interp, void(*interp_add_w_sum_mf)(struct remote_point_info_reorder *, size_t, size_t, size_t, struct interp_weight_stencil_wsum_mf *, size_t *, double *, size_t *, size_t *, MPI_Comm, void *, Xt_config), Xt_config redist_config)
 
static int compare_stencils (const void *a, const void *b)
 
static Xt_config get_redist_config (char const *yaxt_exchanger_name, MPI_Comm comm)
 
struct yac_interpolationyac_interp_weights_get_interpolation (struct yac_interp_weights *weights, enum yac_interp_weights_reorder_type reorder, size_t collection_size, double frac_mask_fallback_value, double scaling_factor, double scaling_summand, char const *yaxt_exchanger_name)
 
static Xt_redist * generate_src_field_exchange_redists (struct yac_src_field_exchange_data *src_field_exchange_data, size_t num_src_fields, MPI_Comm comm, Xt_config redist_config)
 
static void yac_interp_weights_data_init_ (double frac_mask_fallback_value, double scaling_factor, double scaling_summand, struct yac_interp_weights_data *interp_weights_data)
 
static void yac_src_field_exchange_data_free (struct yac_src_field_exchange_data *src_field_exchange_data, size_t num_src_fields)
 
static void interpolation_raw_add_w_sum_mf (struct remote_point_info_reorder *remote_src_points, size_t num_src_points, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, struct yac_interpolation_raw *interp_raw, Xt_config redist_config)
 
static void interpolation_raw_add_wsum_mf (struct remote_point_info_reorder *src_points, size_t num_src_points, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, void *interp_raw, Xt_config redist_config)
 
static void interpolation_raw_add_sum_mf (struct remote_point_info_reorder *src_points, size_t num_src_points, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, void *interp_raw, Xt_config redist_config)
 
static void interpolation_raw_add_wsum (struct remote_point_info_reorder *src_points, size_t num_src_points, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, void *interp_raw, Xt_config redist_config)
 
static void interpolation_raw_add_sum (struct remote_point_info_reorder *src_points, size_t num_src_points, size_t num_src_fields, size_t tgt_count, struct interp_weight_stencil_wsum_mf *tgt_stencils, size_t *num_src_per_tgt, double *weights, size_t *src_idx, size_t *src_field_idx, MPI_Comm comm, void *interp_raw, Xt_config redist_config)
 
void yac_interp_weights_get_interpolation_raw (struct yac_interp_weights *weights, size_t collection_size, double frac_mask_fallback_value, double scaling_factor, double scaling_summand, char const *yaxt_exchanger_name, struct yac_interpolation_exchange **interpolation_exchange, struct yac_interp_weights_data *interp_weights_data)
 
struct yac_interpolationyac_interp_weights_get_interpolation_f2c (struct yac_interp_weights *weights, int reorder, size_t collection_size, double frac_mask_fallback_value, double scaling_factor, double scaling_summand, char const *yaxt_exchanger_name)
 
static void free_remote_points (struct remote_points *points)
 
static int compare_double (void const *a, void const *b)
 
static void create_weight_file (char const *filename, char const *src_grid_name, char const *tgt_grid_name, size_t num_fixed_values, double *fixed_values, size_t *num_tgt_per_fixed_value, size_t num_links, size_t num_weights_per_link, size_t num_src_fields, size_t *num_links_per_src_field, enum yac_location *src_locations, enum yac_location tgt_location, size_t src_grid_size, size_t tgt_grid_size)
 
static int compare_interp_weight_stencil (const void *a, const void *b)
 
static void stencil_determine_tgt_global_id_range (struct interp_weight_stencil *stencils, size_t stencils_size, yac_int *min_tgt_global_id, yac_int *max_tgt_global_id, MPI_Comm comm)
 
static void determine_stencils_io_owner (struct interp_weight_stencil *stencils, size_t stencils_size, yac_int min_tgt_global_id, yac_int max_tgt_global_id, int num_io_procs_int, int *io_owner)
 
static void stencil_get_fixed_values (struct interp_weight_stencil *stencils, size_t stencil_count, double **fixed_values, size_t *num_fixed_values, MPI_Comm comm)
 
static size_t get_num_weights_per_link (struct interp_weight_stencil *stencil)
 
static size_t stencil_get_num_weights_per_tgt (struct interp_weight_stencil *stencils, size_t stencil_count, MPI_Comm comm)
 
static size_t get_num_links_per_src_field (struct interp_weight_stencil *stencil, size_t src_field_idx)
 
static void stencil_get_counts (struct interp_weight_stencil *stencils, size_t stencil_count, size_t num_fixed_values, double *fixed_values, size_t *num_tgt_per_fixed_value, size_t *num_fixed_tgt, size_t num_src_fields, size_t *num_links_per_src_field, size_t *num_links)
 
static void stencil_xscan_offsets (size_t num_fixed_values, size_t *num_tgt_per_fixed_value, size_t num_src_fields, size_t *num_links_per_src_field, size_t *fixed_offsets, size_t *link_offsets, MPI_Comm comm)
 
static int global_id_to_address (yac_int global_id)
 
static void stencil_get_tgt_address (struct interp_weight_stencil *stencils, size_t stencil_count, int *tgt_address)
 
static void stencil_get_link_data (struct interp_weight_stencil *stencils, size_t stencil_count, size_t *num_links_per_src_field, size_t num_src_fields, int *src_address, int *tgt_address, double *weight)
 
static void yac_interp_weights_redist_stencils (MPI_Comm comm, size_t count, struct interp_weight_stencil *stencils, int *owner_ranks, size_t *new_count, struct interp_weight_stencil **new_stencils)
 
void yac_interp_weights_write_to_file (struct yac_interp_weights *weights, char const *filename, char const *src_grid_name, char const *tgt_grid_name, size_t src_grid_size, size_t tgt_grid_size, enum yac_weight_file_on_existing on_existing)
 
size_t yac_interp_weights_get_interp_count (struct yac_interp_weights *weights)
 
yac_intyac_interp_weights_get_interp_tgt (struct yac_interp_weights *weights)
 
MPI_Comm yac_interp_weights_get_comm (struct yac_interp_weights *weights)
 
void yac_interp_weights_delete (struct yac_interp_weights *weights)
 
void yac_interp_weights_data_init (struct yac_interp_weights_data *interp_weights_data)
 
struct yac_interp_weights_data yac_interp_weights_data_copy (struct yac_interp_weights_data interp_weights_data)
 
void yac_interp_weights_data_free (struct yac_interp_weights_data interp_weights_data)
 

Macro Definition Documentation

◆ COPY_ARRAY

#define COPY_ARRAY ( DATA,
COUNT )
Value:
{ \
size_t size = COUNT * sizeof(*(interp_weights_data.DATA)); \
interp_weights_data_copy.DATA = xmalloc(size); \
memcpy(interp_weights_data_copy.DATA, interp_weights_data.DATA, size); \
}
#define xmalloc(size)
Definition ppm_xfuncs.h:66

◆ WEIGHT_TOL

#define WEIGHT_TOL   (1e-9)

Definition at line 12 of file interp_weights.c.

◆ YAC_YAXT_EXCHANGER_STR

#define YAC_YAXT_EXCHANGER_STR   "YAC_YAXT_EXCHANGER"

Definition at line 23 of file interp_weights.c.

Enumeration Type Documentation

◆ yac_interp_weight_stencil_type

Enumerator
FIXED 
DIRECT 
SUM 
WEIGHT_SUM 
DIRECT_MF 
SUM_MF 
WEIGHT_SUM_MF 
WEIGHT_STENCIL_TYPE_SIZE 

Definition at line 25 of file interp_weights.c.

Function Documentation

◆ compact_srcs_w()

static void compact_srcs_w ( struct remote_points * srcs,
double ** w )
static

Definition at line 2217 of file interp_weights.c.

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

◆ compare_double()

static int compare_double ( void const * a,
void const * b )
static
Examples
test_angle.c.

Definition at line 5283 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_interp_weight_stencil()

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

Definition at line 5466 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_interp_weight_stencil_wsum_mf_src_orig_pos()

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

Definition at line 3920 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_interp_weight_stencil_wsum_mf_tgt_orig_pos()

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

Definition at line 3941 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_rank_pos_reorder_field_idx()

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

Definition at line 3900 of file interp_weights.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 2211 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_remote_point_info()

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

Definition at line 3582 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_stencils()

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

Definition at line 4503 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_stencils_direct()

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

Definition at line 1154 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_stencils_direct_mf()

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

Definition at line 1325 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_stencils_fixed()

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

Definition at line 668 of file interp_weights.c.

Here is the caller graph for this function:

◆ compare_w_global_id()

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

Definition at line 2196 of file interp_weights.c.

Here is the caller graph for this function:

◆ compute_owner()

static int compute_owner ( int * ranks,
size_t count )
static

Definition at line 3188 of file interp_weights.c.

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

◆ copy_interp_weight_stencil()

static struct interp_weight_stencil copy_interp_weight_stencil ( struct interp_weight_stencil * stencil,
struct remote_point point )
static

Definition at line 2052 of file interp_weights.c.

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

◆ copy_remote_point()

static struct remote_point copy_remote_point ( struct remote_point point)
inlinestatic

Definition at line 168 of file interp_weights.c.

Here is the caller graph for this function:

◆ copy_remote_points()

static struct remote_points * copy_remote_points ( struct remote_point * points,
size_t count )
inlinestatic

Definition at line 202 of file interp_weights.c.

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

◆ copy_remote_points_mf()

static struct remote_points * copy_remote_points_mf ( struct remote_point ** points,
size_t * counts,
size_t num_fields )
inlinestatic

Definition at line 223 of file interp_weights.c.

Here is the caller graph for this function:

◆ copy_remote_points_no_alloc()

static void copy_remote_points_no_alloc ( struct remote_point * points_to,
struct remote_point * points_from,
size_t count,
struct remote_point_info ** point_info_buffer_ )
inlinestatic

Definition at line 182 of file interp_weights.c.

Here is the caller graph for this function:

◆ create_weight_file()

static void create_weight_file ( char const * filename,
char const * src_grid_name,
char const * tgt_grid_name,
size_t num_fixed_values,
double * fixed_values,
size_t * num_tgt_per_fixed_value,
size_t num_links,
size_t num_weights_per_link,
size_t num_src_fields,
size_t * num_links_per_src_field,
enum yac_location * src_locations,
enum yac_location tgt_location,
size_t src_grid_size,
size_t tgt_grid_size )
static

create a weight file with basic meta data

Definition at line 5292 of file interp_weights.c.

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

◆ determine_stencils_io_owner()

static void determine_stencils_io_owner ( struct interp_weight_stencil * stencils,
size_t stencils_size,
yac_int min_tgt_global_id,
yac_int max_tgt_global_id,
int num_io_procs_int,
int * io_owner )
static

Definition at line 5515 of file interp_weights.c.

Here is the caller graph for this function:

◆ exchange_stencils()

static struct interp_weight_stencil * exchange_stencils ( MPI_Comm comm,
struct interp_weight_stencil * stencils,
size_t * stencil_indices,
size_t * stencil_sendcounts,
size_t * stencil_recvcounts )
static

Definition at line 2938 of file interp_weights.c.

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

◆ free_remote_point()

static void free_remote_point ( struct remote_point point)
static

Definition at line 3959 of file interp_weights.c.

Here is the caller graph for this function:

◆ free_remote_points()

static void free_remote_points ( struct remote_points * points)
static

Definition at line 5229 of file interp_weights.c.

Here is the caller graph for this function:

◆ generate_direct_mf_redists()

static Xt_redist * generate_direct_mf_redists ( size_t * src_orig_poses,
size_t * sendcounts,
struct interp_weight_stencil_direct_mf * tgt_stencils,
size_t * recvcounts,
size_t num_src_fields,
MPI_Comm comm,
Xt_config redist_config )
static

generates a yaxt redist for a direct transfer of source to target points for cases with multiple source fields

Parameters
[in]src_orig_posespositions of source points that have to be sent to other processes
[in]sendcountsnumber of source points to be sent to each process
[in]tgt_stencilsstencils containing local of target points that will be overwritten by received source points
[in]recvcountsnumber of source points to be received by each process
[in]num_src_fieldsnumber of source fields
[in]commMPI communicator for which the redist is to be generated
[in]redist_configconfiguration information for the yaxt redist (e.g. yaxt exchanger to be used)

Definition at line 1003 of file interp_weights.c.

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

◆ generate_direct_redist()

static Xt_redist generate_direct_redist ( size_t * src_orig_poses,
size_t * sendcounts,
struct interp_weight_stencil_direct * tgt_stencils,
size_t * recvcounts,
MPI_Comm comm,
Xt_config redist_config )
static

generates a yaxt redist for a direct transfer of source to target points

Parameters
[in]src_orig_posespositions of source points that have to be sent to other processes
[in]sendcountsnumber of source points to be sent to each process
[in]tgt_stencilsstencils containing local of target points that will be overwritten by received source points
[in]recvcountsnumber of source points to be received by each process
[in]commMPI communicator for which the redist is to be generated
[in]redist_configconfiguration information for the yaxt redist (e.g. yaxt exchanger to be used)

Definition at line 883 of file interp_weights.c.

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

◆ generate_halo_redists()

static Xt_redist * generate_halo_redists ( struct remote_point_info_reorder * halo_points,
size_t count,
size_t num_src_fields,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 3720 of file interp_weights.c.

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

◆ generate_redist_put_double()

static Xt_redist generate_redist_put_double ( struct remote_point_infos * point_infos,
size_t count,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 3964 of file interp_weights.c.

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

◆ generate_src_field_exchange_redists()

static Xt_redist * generate_src_field_exchange_redists ( struct yac_src_field_exchange_data * src_field_exchange_data,
size_t num_src_fields,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 4708 of file interp_weights.c.

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

◆ generate_w_sum_mf_stencils()

static struct interp_weight_stencils_wsum_mf * generate_w_sum_mf_stencils ( struct interp_weight_stencil * stencils,
size_t count,
enum yac_interp_weight_stencil_type stencil_type )
static

Definition at line 3215 of file interp_weights.c.

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

◆ get_direct_mf_stencil_mpi_datatype()

static MPI_Datatype get_direct_mf_stencil_mpi_datatype ( MPI_Comm comm)
static

Definition at line 1304 of file interp_weights.c.

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

◆ get_direct_stencil_mpi_datatype()

static MPI_Datatype get_direct_stencil_mpi_datatype ( MPI_Comm comm)
static

Definition at line 1135 of file interp_weights.c.

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

◆ get_fixed_stencil_mpi_datatype()

static MPI_Datatype get_fixed_stencil_mpi_datatype ( MPI_Comm comm)
static

Definition at line 683 of file interp_weights.c.

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

◆ get_num_links_per_src_field()

static size_t get_num_links_per_src_field ( struct interp_weight_stencil * stencil,
size_t src_field_idx )
static

Definition at line 5623 of file interp_weights.c.

Here is the caller graph for this function:

◆ get_num_weights_per_link()

static size_t get_num_weights_per_link ( struct interp_weight_stencil * stencil)
static

Definition at line 5589 of file interp_weights.c.

Here is the caller graph for this function:

◆ get_redist_config()

static Xt_config get_redist_config ( char const * yaxt_exchanger_name,
MPI_Comm comm )
static

Definition at line 4509 of file interp_weights.c.

Here is the caller graph for this function:

◆ get_stencil_pack_size_direct()

static int get_stencil_pack_size_direct ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 1968 of file interp_weights.c.

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

◆ get_stencil_pack_size_direct_mf()

static int get_stencil_pack_size_direct_mf ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2002 of file interp_weights.c.

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

◆ get_stencil_pack_size_fixed()

static int get_stencil_pack_size_fixed ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 1954 of file interp_weights.c.

Here is the caller graph for this function:

◆ get_stencil_pack_size_sum()

static int get_stencil_pack_size_sum ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 1977 of file interp_weights.c.

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

◆ get_stencil_pack_size_sum_mf()

static int get_stencil_pack_size_sum_mf ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2036 of file interp_weights.c.

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

◆ get_stencil_pack_size_wsum()

static int get_stencil_pack_size_wsum ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 1986 of file interp_weights.c.

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

◆ get_stencil_pack_size_wsum_mf()

static int get_stencil_pack_size_wsum_mf ( struct interp_weight_stencil * stencil,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2017 of file interp_weights.c.

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

◆ get_stencil_wsum_mf_pack_size()

static int get_stencil_wsum_mf_pack_size ( struct interp_weight_stencil_wsum_mf * stencil,
MPI_Datatype wsum_mf_weight_dt,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 3310 of file interp_weights.c.

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

◆ get_stencils_pack_sizes()

static void get_stencils_pack_sizes ( struct interp_weight_stencil * stencils,
size_t count,
size_t * pack_order,
int * pack_sizes,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2499 of file interp_weights.c.

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

◆ get_wsum_mf_weight_mpi_datatype()

static MPI_Datatype get_wsum_mf_weight_mpi_datatype ( MPI_Comm comm)
static

Definition at line 3288 of file interp_weights.c.

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

◆ global_id_to_address()

static int global_id_to_address ( yac_int global_id)
static

Definition at line 5735 of file interp_weights.c.

Here is the caller graph for this function:

◆ interp_add_direct()

static void interp_add_direct ( void * interp,
size_t * src_orig_poses,
size_t * sendcounts,
struct interp_weight_stencil_direct * tgt_stencils,
size_t * recvcounts,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 1167 of file interp_weights.c.

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

◆ interp_add_direct_mf()

static void interp_add_direct_mf ( void * interp,
size_t num_src_fields,
size_t * src_orig_poses,
size_t * sendcounts,
struct interp_weight_stencil_direct_mf * tgt_stencils,
size_t * recvcounts,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 1345 of file interp_weights.c.

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

◆ interp_add_direct_mf_raw()

static void interp_add_direct_mf_raw ( void * interp,
size_t num_src_fields,
size_t * src_orig_poses,
size_t * sendcounts,
struct interp_weight_stencil_direct_mf * tgt_stencils,
size_t * recvcounts,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 1684 of file interp_weights.c.

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

◆ interp_add_direct_raw()

static void interp_add_direct_raw ( void * interp,
size_t * src_orig_poses,
size_t * sendcounts,
struct interp_weight_stencil_direct * tgt_stencils,
size_t * recvcounts,
MPI_Comm comm,
Xt_config redist_config )
static

Definition at line 1622 of file interp_weights.c.

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

◆ interp_add_fixed()

static void interp_add_fixed ( void * interp,
double fixed_value,
size_t count,
size_t * tgt_pos )
static

Definition at line 700 of file interp_weights.c.

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

◆ interp_raw_add_fixed()

static void interp_raw_add_fixed ( void * interp,
double fixed_value,
size_t count,
size_t * tgt_pos )
static

Definition at line 707 of file interp_weights.c.

Here is the caller graph for this function:

◆ interpolation_add_sum()

static void interpolation_add_sum ( struct remote_point_info_reorder * remote_src_points,
size_t halo_size,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
enum yac_interp_weights_reorder_type reorder,
void * interp,
Xt_config redist_config )
static

Definition at line 4170 of file interp_weights.c.

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

◆ interpolation_add_sum_at_src()

static void interpolation_add_sum_at_src ( struct yac_interpolation * interp,
Xt_redist * halo_redists,
size_t tgt_count,
size_t * num_src_per_tgt,
double * weights,
size_t * src_field_idx,
size_t * src_idx,
size_t num_src_fields,
Xt_redist result_redist )
static

Definition at line 4128 of file interp_weights.c.

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

◆ interpolation_add_sum_at_tgt()

static void interpolation_add_sum_at_tgt ( struct yac_interpolation * interp,
Xt_redist * src_redists,
size_t * tgt_pos,
size_t tgt_count,
size_t * num_src_per_tgt,
double * weights,
size_t * src_field_idx,
size_t * src_idx,
size_t num_src_fields )
static

Definition at line 4141 of file interp_weights.c.

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

◆ interpolation_add_sum_mf()

static void interpolation_add_sum_mf ( struct remote_point_info_reorder * remote_src_points,
size_t halo_size,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
enum yac_interp_weights_reorder_type reorder,
void * interp,
Xt_config redist_config )
static

Definition at line 4154 of file interp_weights.c.

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

◆ interpolation_add_w_sum_mf()

static void interpolation_add_w_sum_mf ( struct remote_point_info_reorder * remote_src_points,
size_t halo_size,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
enum yac_interp_weights_reorder_type reorder,
struct yac_interpolation * interp,
void(* interp_add_wsum_mf_at_src )(struct yac_interpolation *, Xt_redist *, size_t, size_t *, double *, size_t *, size_t *, size_t, Xt_redist),
void(* interp_add_wsum_mf_at_tgt )(struct yac_interpolation *, Xt_redist *, size_t *, size_t, size_t *, double *, size_t *, size_t *, size_t),
Xt_config redist_config )
static

Definition at line 4064 of file interp_weights.c.

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

◆ interpolation_add_wsum()

static void interpolation_add_wsum ( struct remote_point_info_reorder * remote_src_points,
size_t halo_size,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
enum yac_interp_weights_reorder_type reorder,
void * interp,
Xt_config redist_config )
static

Definition at line 4201 of file interp_weights.c.

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

◆ interpolation_add_wsum_mf()

static void interpolation_add_wsum_mf ( struct remote_point_info_reorder * remote_src_points,
size_t halo_size,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
enum yac_interp_weights_reorder_type reorder,
void * interp,
Xt_config redist_config )
static

Definition at line 4185 of file interp_weights.c.

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

◆ interpolation_raw_add_sum()

static void interpolation_raw_add_sum ( struct remote_point_info_reorder * src_points,
size_t num_src_points,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
void * interp_raw,
Xt_config redist_config )
static

Definition at line 5030 of file interp_weights.c.

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

◆ interpolation_raw_add_sum_mf()

static void interpolation_raw_add_sum_mf ( struct remote_point_info_reorder * src_points,
size_t num_src_points,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
void * interp_raw,
Xt_config redist_config )
static

Definition at line 5000 of file interp_weights.c.

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

◆ interpolation_raw_add_w_sum_mf()

static void interpolation_raw_add_w_sum_mf ( struct remote_point_info_reorder * remote_src_points,
size_t num_src_points,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
struct yac_interpolation_raw * interp_raw,
Xt_config redist_config )
static

Definition at line 4884 of file interp_weights.c.

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

◆ interpolation_raw_add_wsum()

static void interpolation_raw_add_wsum ( struct remote_point_info_reorder * src_points,
size_t num_src_points,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
void * interp_raw,
Xt_config redist_config )
static

Definition at line 5015 of file interp_weights.c.

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

◆ interpolation_raw_add_wsum_mf()

static void interpolation_raw_add_wsum_mf ( struct remote_point_info_reorder * src_points,
size_t num_src_points,
size_t num_src_fields,
size_t tgt_count,
struct interp_weight_stencil_wsum_mf * tgt_stencils,
size_t * num_src_per_tgt,
double * weights,
size_t * src_idx,
size_t * src_field_idx,
MPI_Comm comm,
void * interp_raw,
Xt_config redist_config )
static

Definition at line 4987 of file interp_weights.c.

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

◆ pack_stencil_direct()

static void pack_stencil_direct ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2564 of file interp_weights.c.

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

◆ pack_stencil_direct_mf()

static void pack_stencil_direct_mf ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2598 of file interp_weights.c.

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

◆ pack_stencil_fixed()

static void pack_stencil_fixed ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2552 of file interp_weights.c.

Here is the caller graph for this function:

◆ pack_stencil_sum()

static void pack_stencil_sum ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2574 of file interp_weights.c.

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

◆ pack_stencil_sum_mf()

static void pack_stencil_sum_mf ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2614 of file interp_weights.c.

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

◆ pack_stencil_wsum()

static void pack_stencil_wsum ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2583 of file interp_weights.c.

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

◆ pack_stencil_wsum_mf()

static void pack_stencil_wsum_mf ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2634 of file interp_weights.c.

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

◆ pack_stencils()

static void pack_stencils ( struct interp_weight_stencil * stencils,
size_t count,
size_t * pack_order,
void ** pack_data,
int * pack_sizes,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2658 of file interp_weights.c.

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

◆ pack_stencils_wsum_mf()

static void pack_stencils_wsum_mf ( struct interp_weight_stencil_wsum_mf * wsum_stencils,
size_t count,
size_t * pack_order,
void ** pack_data,
int * pack_sizes,
int * weight_counts,
MPI_Comm comm )
static

Definition at line 3328 of file interp_weights.c.

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

◆ redist_wsum_mf_stencils()

static struct interp_weight_stencils_wsum_mf * redist_wsum_mf_stencils ( MPI_Comm comm,
struct interp_weight_stencils_wsum_mf * wsum_stencils_data,
int * stencil_owner,
size_t * reorder_idx,
size_t num_owners )
static

Definition at line 3427 of file interp_weights.c.

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

◆ redist_wsum_mf_stencils_src()

static struct interp_weight_stencils_wsum_mf * redist_wsum_mf_stencils_src ( MPI_Comm comm,
struct interp_weight_stencils_wsum_mf * wsum_stencils_data )
static

Definition at line 3541 of file interp_weights.c.

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

◆ redist_wsum_mf_stencils_tgt()

static struct interp_weight_stencils_wsum_mf * redist_wsum_mf_stencils_tgt ( MPI_Comm comm,
struct interp_weight_stencils_wsum_mf * wsum_stencils_data )
static

Definition at line 3595 of file interp_weights.c.

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

◆ select_src()

static struct remote_point_info select_src ( struct remote_point_infos src)
inlinestatic

Definition at line 844 of file interp_weights.c.

Here is the caller graph for this function:

◆ stencil_determine_tgt_global_id_range()

static void stencil_determine_tgt_global_id_range ( struct interp_weight_stencil * stencils,
size_t stencils_size,
yac_int * min_tgt_global_id,
yac_int * max_tgt_global_id,
MPI_Comm comm )
static

Definition at line 5492 of file interp_weights.c.

Here is the caller graph for this function:

◆ stencil_get_counts()

static void stencil_get_counts ( struct interp_weight_stencil * stencils,
size_t stencil_count,
size_t num_fixed_values,
double * fixed_values,
size_t * num_tgt_per_fixed_value,
size_t * num_fixed_tgt,
size_t num_src_fields,
size_t * num_links_per_src_field,
size_t * num_links )
static

Definition at line 5664 of file interp_weights.c.

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

◆ stencil_get_fixed_values()

static void stencil_get_fixed_values ( struct interp_weight_stencil * stencils,
size_t stencil_count,
double ** fixed_values,
size_t * num_fixed_values,
MPI_Comm comm )
static

Definition at line 5530 of file interp_weights.c.

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

◆ stencil_get_link_data()

static void stencil_get_link_data ( struct interp_weight_stencil * stencils,
size_t stencil_count,
size_t * num_links_per_src_field,
size_t num_src_fields,
int * src_address,
int * tgt_address,
double * weight )
static

Definition at line 5752 of file interp_weights.c.

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

◆ stencil_get_num_weights_per_tgt()

static size_t stencil_get_num_weights_per_tgt ( struct interp_weight_stencil * stencils,
size_t stencil_count,
MPI_Comm comm )
static

Definition at line 5604 of file interp_weights.c.

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

◆ stencil_get_tgt_address()

static void stencil_get_tgt_address ( struct interp_weight_stencil * stencils,
size_t stencil_count,
int * tgt_address )
static

Definition at line 5744 of file interp_weights.c.

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

◆ stencil_xscan_offsets()

static void stencil_xscan_offsets ( size_t num_fixed_values,
size_t * num_tgt_per_fixed_value,
size_t num_src_fields,
size_t * num_links_per_src_field,
size_t * fixed_offsets,
size_t * link_offsets,
MPI_Comm comm )
static

Definition at line 5697 of file interp_weights.c.

Here is the caller graph for this function:

◆ stencils_merge()

static struct interp_weight_stencil stencils_merge ( struct interp_weight_stencil ** stencils,
double * w,
size_t num_stencils,
struct remote_point point )
static

Definition at line 2430 of file interp_weights.c.

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

◆ stencils_merge_sum()

static struct interp_weight_stencil stencils_merge_sum ( struct interp_weight_stencil ** stencils,
double * w,
size_t num_stencils )
static

Definition at line 2357 of file interp_weights.c.

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

◆ stencils_merge_wsum()

static struct interp_weight_stencil stencils_merge_wsum ( struct interp_weight_stencil ** stencils,
double * w,
size_t num_stencils )
static

Definition at line 2267 of file interp_weights.c.

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

◆ unpack_stencil_direct()

static void unpack_stencil_direct ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2753 of file interp_weights.c.

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

◆ unpack_stencil_direct_mf()

static void unpack_stencil_direct_mf ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2794 of file interp_weights.c.

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

◆ unpack_stencil_fixed()

static void unpack_stencil_fixed ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2741 of file interp_weights.c.

Here is the caller graph for this function:

◆ unpack_stencil_sum()

static void unpack_stencil_sum ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2763 of file interp_weights.c.

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

◆ unpack_stencil_sum_mf()

static void unpack_stencil_sum_mf ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2812 of file interp_weights.c.

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

◆ unpack_stencil_wsum()

static void unpack_stencil_wsum ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2774 of file interp_weights.c.

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

◆ unpack_stencil_wsum_mf()

static void unpack_stencil_wsum_mf ( struct interp_weight_stencil * stencil,
void * buffer,
int buffer_size,
int * position,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2837 of file interp_weights.c.

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

◆ unpack_stencils()

static void unpack_stencils ( struct interp_weight_stencil * stencils,
size_t count,
void * packed_data,
size_t packed_data_size,
MPI_Datatype point_info_dt,
MPI_Comm comm )
static

Definition at line 2872 of file interp_weights.c.

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

◆ unpack_stencils_wsum_mf()

static size_t unpack_stencils_wsum_mf ( struct interp_weight_stencil_wsum_mf * wsum_stencils,
struct interp_weight_stencil_wsum_mf_weight * weight_buffer,
size_t count,
void * packed_data,
size_t packed_data_size,
MPI_Comm comm )
static

Definition at line 3382 of file interp_weights.c.

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

◆ wcopy_interp_weight_stencil()

static struct interp_weight_stencil wcopy_interp_weight_stencil ( struct interp_weight_stencil * stencil,
struct remote_point point,
double weight )
static

Definition at line 2139 of file interp_weights.c.

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

◆ xt_redist_msg_free()

static void xt_redist_msg_free ( struct Xt_redist_msg * msgs,
size_t count,
MPI_Comm comm )
static

Definition at line 861 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weight_stencils_delete()

static void yac_interp_weight_stencils_delete ( struct interp_weight_stencil * stencils,
size_t count )
static

Definition at line 5235 of file interp_weights.c.

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

◆ yac_interp_weights_add_direct()

void yac_interp_weights_add_direct ( struct yac_interp_weights * weights,
struct remote_points * tgts,
struct remote_point * srcs )

adds targets that are to get single source values

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the value of a selected source point
[in]srcssources
Examples
test_duplicate_stencils_parallel_c.c, and test_interp_weights_parallel.c.

Definition at line 434 of file interp_weights.c.

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

◆ yac_interp_weights_add_direct_mf()

void yac_interp_weights_add_direct_mf ( struct yac_interp_weights * weights,
struct remote_points * tgts,
size_t * src_field_indices,
struct remote_point ** srcs_per_field,
size_t num_src_fields )

adds targets that are to get single source values

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the value of a selected source point
[in]src_field_indicessource field indices of selected source point
[in]srcs_per_fieldsources per source field
[in]num_src_fieldsnumber of input source fields
Examples
test_interp_weights_parallel.c.

Definition at line 458 of file interp_weights.c.

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

◆ yac_interp_weights_add_fixed()

void yac_interp_weights_add_fixed ( struct yac_interp_weights * weights,
struct remote_points * tgts,
double fixed_value )

adds targets that are to get a fixed value

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get a fixed value
[in]fixed_valuefixed value that is to be assigned to the provided targets
Examples
test_interp_weights_parallel.c.

Definition at line 259 of file interp_weights.c.

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

◆ yac_interp_weights_add_sum()

void yac_interp_weights_add_sum ( struct yac_interp_weights * weights,
struct remote_points * tgts,
size_t * num_src_per_tgt,
struct remote_point * srcs )

adds targets that are to get a sum of source values

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the weighted sum
[in]num_src_per_tgtnumber of sources per target
[in]srcssources
Examples
test_interp_weights_parallel.c.

Definition at line 387 of file interp_weights.c.

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

◆ yac_interp_weights_add_sum_mf()

void yac_interp_weights_add_sum_mf ( struct yac_interp_weights * weights,
struct remote_points * tgts,
size_t * num_src_per_field_per_tgt,
struct remote_point ** srcs_per_field,
size_t num_src_fields )

adds targets that are to get a sum of source values

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the sum
[in]num_src_per_field_per_tgtnumber of sources per target per source field
[in]srcs_per_fieldsources per source field
[in]num_src_fieldsnumber of input source fields
Remarks
num_src_per_field_per_tgt is a 1-D Array with the following data layout:
num_src_per_field_per_tgt[tgts->count][num_src_fields]
Examples
test_interp_weights_parallel.c.

Definition at line 497 of file interp_weights.c.

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

◆ yac_interp_weights_add_wsum()

void yac_interp_weights_add_wsum ( struct yac_interp_weights * weights,
struct remote_points * tgts,
size_t * num_src_per_tgt,
struct remote_point * srcs,
double * w )

adds targets that are to get a weighted sum of source values

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the sum
[in]num_src_per_tgtnumber of sources per target
[in]srcssources
[in]wweights
Examples
test_interp_weights_parallel.c.

Definition at line 281 of file interp_weights.c.

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

◆ yac_interp_weights_add_wsum_mf()

void yac_interp_weights_add_wsum_mf ( struct yac_interp_weights * weights,
struct remote_points * tgts,
size_t * num_src_per_field_per_tgt,
struct remote_point ** srcs_per_field,
double * w,
size_t num_src_fields )

adds targets that are to get a weighted sum of source values

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the weighted sum
[in]num_src_per_field_per_tgtnumber of sources per target per source field
[in]srcs_per_fieldsources per source field
[in]wweights
[in]num_src_fieldsnumber of input source fields
Remarks
num_src_per_field_per_tgt is a 1-D Array with the following data layout:
num_src_per_field_per_tgt[tgts->count][num_src_fields]
Examples
test_interp_weights_parallel.c.

Definition at line 584 of file interp_weights.c.

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

◆ yac_interp_weights_data_copy()

struct yac_interp_weights_data yac_interp_weights_data_copy ( struct yac_interp_weights_data interp_weights_data)

Generates a copy of a provided instance of type yac_interp_weights_data

Parameters
[in]interp_weights_datadata to be copied
Returns
copy of provided instance of type yac_interp_weights_data

Definition at line 6193 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_data_free()

void yac_interp_weights_data_free ( struct yac_interp_weights_data interp_weights_data)

Frees data associated with an instance of type yac_interp_weights_data

Parameters
[in,out]interp_weights_datadata to be free
Remarks
an object of type yac_interp_weights_data can be generate by yac_interp_weights_get_interpolation_raw
Examples
test_interp_weights_parallel.c.

Definition at line 6239 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_data_init()

void yac_interp_weights_data_init ( struct yac_interp_weights_data * interp_weights_data)

Initialises an instance of type yac_interp_weights with empty data

Parameters
[in,out]interp_weights_datadata to be initialised

Definition at line 6186 of file interp_weights.c.

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

◆ yac_interp_weights_data_init_()

static void yac_interp_weights_data_init_ ( double frac_mask_fallback_value,
double scaling_factor,
double scaling_summand,
struct yac_interp_weights_data * interp_weights_data )
static

Definition at line 4844 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_data_set_wgt_tgt()

static void yac_interp_weights_data_set_wgt_tgt ( struct yac_interp_weights_data * interp_weights_data,
size_t num_src_fields,
size_t tgt_count,
size_t * tgt_idx,
size_t * num_src_per_tgt,
double * weights,
size_t * src_field_idx,
size_t * src_idx,
size_t * src_field_buffer_size )
static

stores information on how to compute target points from given source information

Parameters
[in,out]interp_weights_datainterpolation weight data
[in]num_src_fieldsnumber of source fields
[in]tgt_countnumber of target points
[in]tgt_idxlocal ids of target points
[in]num_src_per_tgtnumber of source points per target point (if NULL, "1" is assumed for all targets)
[in]weightsweights (if NULL, "1.0" is assumed for all targets)
[in]src_field_idxsource field indices (if NULL, "0" is assumed for all target points)
[in]src_idxindices of source points in source field buffer (assuming that the source field buffer only contains the source points reference in this call)
[in]src_field_buffer_sizenumber of source points per source field

Definition at line 1419 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_delete()

◆ yac_interp_weights_get_comm()

MPI_Comm yac_interp_weights_get_comm ( struct yac_interp_weights * weights)

returns the MPI communicator used by weights

Parameters
[in]weightsinterpololation weights
Returns
MPI communicator used by weights
Examples
test_interp_weights_parallel.c.

Definition at line 6173 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_get_interp_count()

size_t yac_interp_weights_get_interp_count ( struct yac_interp_weights * weights)

returns the count of all target for which the weights contain a stencil

Parameters
[in]weightsinterpolation weights
Returns
count of all targets in weights with a stencil
Examples
test_interp_method_parallel.c.

Definition at line 6153 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_get_interp_tgt()

yac_int * yac_interp_weights_get_interp_tgt ( struct yac_interp_weights * weights)

returns the global ids of all targets for which the weights contain a stencil

Parameters
[in]weightsinterpolation weights
Returns
global ids of all targets in weights with a stencil

Definition at line 6159 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_get_interpolation()

struct yac_interpolation * yac_interp_weights_get_interpolation ( struct yac_interp_weights * weights,
enum yac_interp_weights_reorder_type reorder,
size_t collection_size,
double frac_mask_fallback_value,
double scaling_factor,
double scaling_summand,
char const * yaxt_exchanger_name )

generates an interpolation from interpolation weights

Parameters
[in]weightsinterpolation weights
[in]reorderdetermines at which processes the weights are to be applied
[in]collection_sizecollection size
[in]frac_mask_fallback_valuefallback value for dynamic fractional masking
[in]scaling_factorscaling factor
[in]scaling_summandscaling summand
[in]yaxt_exchanger_namename of the yaxt exchanger that is to be used in the interpolation
Returns
interpolation
Remarks
if frac_mask_fallback_value != YAC_FRAC_MASK_NO_VALUE, dynamic fractional masking will be used
all target field values, whose source points are not masked by the fractional mask, that receive a interpolation value, which is not a fixed value will by scaled by the following formula:
y = scaling_factor * x + scaling_summand
if yaxt_exchanger_name == NULL, the default exchanger will be used
Examples
test_duplicate_stencils_parallel_c.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_parallel.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 4572 of file interp_weights.c.

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

◆ yac_interp_weights_get_interpolation_f2c()

struct yac_interpolation * yac_interp_weights_get_interpolation_f2c ( struct yac_interp_weights * weights,
int reorder,
size_t collection_size,
double frac_mask_fallback_value,
double scaling_factor,
double scaling_summand,
char const * yaxt_exchanger_name )

Definition at line 5208 of file interp_weights.c.

Here is the call graph for this function:

◆ yac_interp_weights_get_interpolation_raw()

void yac_interp_weights_get_interpolation_raw ( struct yac_interp_weights * weights,
size_t collection_size,
double frac_mask_fallback_value,
double scaling_factor,
double scaling_summand,
char const * yaxt_exchanger_name,
struct yac_interpolation_exchange ** interpolation_exchange,
struct yac_interp_weights_data * interp_weights_data )

generates a raw interpolation from interpolation weights

In an exchange, the interpolation will receive on all target process the source points required to compute the local target points based on the interpolation data, which is provied by this routine as well.

Parameters
[in]weightsinterpolation weights
[in]collection_sizecollection size
[in]frac_mask_fallback_valuefallback value for dynamic fractional masking
[in]scaling_factorscaling factor
[in]scaling_summandscaling summand
[in]yaxt_exchanger_namename of the yaxt exchanger that is to be used in the interpolation
[out]interpolation_exchangeinterpolation exchange structure
[out]interp_weights_datainterpolation data required to compute local target points from the received source points
Remarks
if yaxt_exchanger_name == NULL, the default exchanger will be used
memory associated with interp_weights_data can be free by a call to yac_interp_weights_data_free
Examples
test_interp_weights_parallel.c.

Definition at line 5046 of file interp_weights.c.

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

◆ yac_interp_weights_get_stencils()

static struct interp_weight_stencil * yac_interp_weights_get_stencils ( struct yac_interp_weights * weights,
size_t * stencil_indices,
int * stencil_ranks,
size_t count )
static

Definition at line 3039 of file interp_weights.c.

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

◆ yac_interp_weights_new()

struct yac_interp_weights * yac_interp_weights_new ( MPI_Comm comm,
enum yac_location tgt_location,
enum yac_location * src_locations,
size_t num_src_fields )

Constructor for interpolation weights.

Parameters
[in]commMPI communicator
[in]tgt_locationlocation of target field
[in]src_locationslocations of source fields
[in]num_src_fieldsnumber of source fields
Returns
interpolation weights
Examples
test_duplicate_stencils_parallel_c.c, and test_interp_weights_parallel.c.

Definition at line 148 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_interp_weights_redist_direct()

static void yac_interp_weights_redist_direct ( MPI_Comm comm,
size_t count,
struct interp_weight_stencil * direct_stencils,
void * interp,
void(* interp_add_direct )(void *, size_t *, size_t *, struct interp_weight_stencil_direct *, size_t *, MPI_Comm, Xt_config),
Xt_config redist_config )
static

Definition at line 1183 of file interp_weights.c.

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

◆ yac_interp_weights_redist_direct_mf()

static void yac_interp_weights_redist_direct_mf ( MPI_Comm comm,
size_t count,
struct interp_weight_stencil * direct_mf_stencils,
void * interp,
void(* interp_add_direct_mf )(void *, size_t, size_t *, size_t *, struct interp_weight_stencil_direct_mf *, size_t *, MPI_Comm, Xt_config),
Xt_config redist_config )
static

Definition at line 1771 of file interp_weights.c.

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

◆ yac_interp_weights_redist_fixed()

static void yac_interp_weights_redist_fixed ( MPI_Comm comm,
size_t count,
struct interp_weight_stencil * fixed_stencils,
void * interp,
void(* interp_add_fixed )(void *, double, size_t, size_t *) )
static

Definition at line 744 of file interp_weights.c.

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

◆ yac_interp_weights_redist_stencils()

static void yac_interp_weights_redist_stencils ( MPI_Comm comm,
size_t count,
struct interp_weight_stencil * stencils,
int * owner_ranks,
size_t * new_count,
struct interp_weight_stencil ** new_stencils )
static

Definition at line 5866 of file interp_weights.c.

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

◆ yac_interp_weights_redist_w_sum_mf()

static void yac_interp_weights_redist_w_sum_mf ( MPI_Comm comm,
struct interp_weight_stencils_wsum_mf * wsum_mf_stencils_data,
struct yac_interpolation * interp,
enum yac_interp_weights_reorder_type reorder,
void(* interp_add_w_sum_mf )(struct remote_point_info_reorder *, size_t, size_t, size_t, struct interp_weight_stencil_wsum_mf *, size_t *, double *, size_t *, size_t *, MPI_Comm, enum yac_interp_weights_reorder_type, void *, Xt_config),
Xt_config redist_config )
static

Definition at line 4216 of file interp_weights.c.

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

◆ yac_interp_weights_redist_w_sum_mf_raw()

static void yac_interp_weights_redist_w_sum_mf_raw ( MPI_Comm comm,
struct interp_weight_stencils_wsum_mf * wsum_mf_stencils_data,
struct yac_interpolation * interp,
void(* interp_add_w_sum_mf )(struct remote_point_info_reorder *, size_t, size_t, size_t, struct interp_weight_stencil_wsum_mf *, size_t *, double *, size_t *, size_t *, MPI_Comm, void *, Xt_config),
Xt_config redist_config )
static

Definition at line 4367 of file interp_weights.c.

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

◆ yac_interp_weights_wcopy_weights()

void yac_interp_weights_wcopy_weights ( struct yac_interp_weights * weights,
struct remote_points * tgts,
size_t * num_stencils_per_tgt,
size_t * stencil_indices,
int * stencil_ranks,
double * w )

adds targets whose stencil is the weighted sum of the copies of existing stencils

Parameters
[in]weightsinterpolation weights
[in]tgtstargets that get the weightes sum
[in]num_stencils_per_tgtnumber of stencils per target
[in]stencil_indicesindices of the stencils to be copied
[in]stencil_ranksranks of the processs owning the respective stencil
[in]wweights
Remarks
this call is collective
Examples
test_interp_weights_parallel.c.

Definition at line 3107 of file interp_weights.c.

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

◆ yac_interp_weights_write_to_file()

void yac_interp_weights_write_to_file ( struct yac_interp_weights * weights,
char const * filename,
char const * src_grid_name,
char const * tgt_grid_name,
size_t src_grid_size,
size_t tgt_grid_size,
enum yac_weight_file_on_existing on_existing )

writes interpolation weights to file

Parameters
[in]weightsinterpolation weights
[in]filenamefile name
[in]src_grid_namename of the source grid
[in]tgt_grid_namename of the target grid
[in]src_grid_sizeglobal size of the source grid
[in]tgt_grid_sizeglobal size of the target grid
[in]on_existingspecifies how YAC is supposed to handle the case of an already existing file with the same name
Remarks
this call is collective
Global grid size argument can be either the global grid size or zero. If a valid global grid size was provided by at least one process, it will be added as a dimension to the weight file.
Examples
test_interp_method_file_parallel.c, test_interp_weights_parallel.c, test_interpolation_parallel3.c, test_interpolation_parallel4.c, and test_interpolation_parallel5.c.

Definition at line 5900 of file interp_weights.c.

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

◆ yac_src_field_exchange_data_add()

static void yac_src_field_exchange_data_add ( struct yac_src_field_exchange_data * src_field_exchange_data,
size_t num_src_fields,
MPI_Comm comm,
size_t * send_msg_sizes,
size_t * send_pos,
size_t * recv_msg_sizes,
size_t * recv_pos,
size_t * recv_offsets )
static

adds new data to a source field exchange messages

Parameters
[in,out]src_field_exchange_datasource field exchange messages
[in]num_src_fieldsnumber of source fields
[in]commMPI communicator
[in]send_msg_sizesarray with send message sizes ([comm_size][num_src_fields])
[in]send_pospositions to be sent
[in]recv_msg_sizesarray with receive messages sizes ([comm_size][num_src_fields])
[in]recv_pospositions to be received
[in]recv_offsetsoffsets to be added to receive messages ([num_src_fields])
Remarks
The send data is extracted from the field data provided by the user.
The receive data is written to a buffer, which may already contain data. Hence the receive positions have to be offset by the amount of data already in the buffer.

Definition at line 1580 of file interp_weights.c.

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

◆ yac_src_field_exchange_data_free()

static void yac_src_field_exchange_data_free ( struct yac_src_field_exchange_data * src_field_exchange_data,
size_t num_src_fields )
static

Definition at line 4868 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_src_field_exchange_data_init()

static void yac_src_field_exchange_data_init ( struct yac_src_field_exchange_data * src_field_exchange_data)
static

Definition at line 1366 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_src_field_exchange_data_msgs_add()

static void yac_src_field_exchange_data_msgs_add ( struct yac_src_field_exchange_data_msgs * msgs,
int rank,
size_t count,
size_t * pos,
size_t offset )
static

adds new data to a source field exchange message

Parameters
[in,out]msgsarray of existing source field exchange messages
[in]rankrank of communcation partner
[in]countnumber of positions to be added
[in]pospositions to be communicated
[in]offsetoffset to be added to all positions that are to be added

Definition at line 1546 of file interp_weights.c.

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

◆ yac_src_field_exchange_data_msgs_get_msg()

static struct yac_src_field_exchange_data_msg * yac_src_field_exchange_data_msgs_get_msg ( struct yac_src_field_exchange_data_msgs * msgs,
int rank )
static

Definition at line 1517 of file interp_weights.c.

Here is the caller graph for this function:

◆ yac_src_field_exchange_data_realloc()

static void yac_src_field_exchange_data_realloc ( struct yac_interpolation_raw * interp_raw,
size_t num_src_fields )
static

Definition at line 1376 of file interp_weights.c.

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