YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_method_spmap.c File Reference
#include "config.h"
#include <float.h>
#include <limits.h>
#include <string.h>
#include "interpolation/methods/interp_method_internal.h"
#include "interpolation/methods/interp_method_config_internal.h"
#include "interpolation/methods/interp_method_utils.h"
#include "interpolation/methods/interp_method_spmap.h"
#include "parameter/param_distance.h"
#include "parameter/param_dble.h"
#include "parameter/param_enum.h"
#include "parameter/param_int.h"
#include "parameter/param_list.h"
#include "parameter/param_oneof.h"
#include "parameter/param_str.h"
#include "parameter/param_struct.h"
#include "ensure_array_size.h"
#include "area.h"
#include "io_utils.h"
#include "point_selection.h"
#include "yac_mpi_internal.h"
#include "yac_mpi_common.h"
#include <netcdf.h>
Include dependency graph for interp_method_spmap.c:

Go to the source code of this file.

Data Structures

struct  interp_link
 
struct  yac_spmap_cell_area_config
 
struct  yac_spmap_scale_config
 
struct  yac_interp_spmap_basic_config
 
struct  yac_interp_spmap_config
 
struct  yac_spmap_overwrite_config
 
struct  interp_method_spmap_config
 
struct  interp_method_spmap
 
struct  yac_interp_method_config_spmap
 

Macros

#define SCALE_WEIGHTS(SRC_CELL_AREA, TGT_CELL_AREA)
 

Typedefs

typedef struct interp_link InterpLink
 

Functions

static size_t do_search_spmap (struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t tgt_point_count, struct yac_interp_weights *weights, int *interpolation_complete)
 basic routine for the computation of the interpolation weights
 
static void delete_spmap (struct interp_method *method)
 
static int compare_size_t (const void *a, const void *b)
 
static size_t check_tgt_result_points (struct yac_interp_grid *interp_grid, struct sin_cos_angle spread_distance, size_t num_src_points, size_t const *const tgt_result_points, size_t *num_tgt_per_src, size_t *spread_tgt_result_points)
 
static double * compute_weights (struct yac_interp_grid *interp_grid, enum yac_interp_spmap_weight_type weight_type, size_t num_src_points, size_t const *const src_points, size_t const *const num_tgt_per_src, size_t total_num_tgt, size_t const *const tgt_result_points)
 
static void compute_cell_areas (struct yac_const_basic_grid_data *basic_grid_data, int const *required_cell_areas, double area_scale, char const *type, double *cell_areas)
 
static void dist_read_cell_areas (char const *filename, char const *varname, MPI_Comm comm, int *const io_ranks, int io_rank_idx, int num_io_ranks, double **dist_cell_areas, size_t *dist_cell_areas_global_size)
 
static void read_cell_areas (struct yac_const_basic_grid_data *basic_grid_data, struct yac_spmap_cell_area_file_config file_config, MPI_Comm comm, int const *required_cell_areas, char const *type, double *cell_areas)
 
static double * get_cell_areas (struct yac_const_basic_grid_data *basic_grid_data, char const *type, struct yac_spmap_cell_area_config const *cell_area_config, MPI_Comm comm, size_t const *required_points, size_t num_required_points)
 
static void scale_weights (struct yac_interp_grid *interp_grid, struct yac_spmap_scale_config const *scale_config, size_t num_src_points, size_t const *src_points, size_t const *num_tgt_per_src, size_t const *tgt_points, size_t total_num_weights, double *weights)
 
static void spread_src_data (struct yac_interp_grid *interp_grid, struct yac_interp_spmap_basic_config const *basic_config, struct yac_spmap_scale_config const *scale_config, size_t num_src_points, size_t **src_points_, size_t **tgt_result_points_, double **weights_, size_t *total_num_weights_)
 
static void do_search_spmap_ (struct yac_interp_grid *interp_grid, struct yac_interp_spmap_basic_config const *basic_config, struct yac_spmap_scale_config const *scale_config, size_t *src_points, size_t num_src_points, yac_coordinate_pointer src_coords, InterpLink **combined_result, size_t *combined_result_count)
 
static void src_point_selection_apply (struct yac_point_selection const *src_point_selection, size_t *src_points, size_t num_src_points, yac_coordinate_pointer src_coords, size_t **selected_src_points, size_t *num_selected_src_points, yac_coordinate_pointer *selected_src_coords)
 
static int compare_interp_link_tgt_point (void const *a_, void const *b_)
 
static struct yac_spmap_cell_area_configyac_spmap_cell_area_config_copy (struct yac_spmap_cell_area_config const *cell_area_config, char const *desc)
 
struct yac_interp_spmap_configyac_interp_spmap_config_copy (struct yac_interp_spmap_config const *spmap_config)
 
struct yac_spmap_overwrite_configyac_spmap_overwrite_config_copy (struct yac_spmap_overwrite_config const *overwrite_config)
 
struct yac_spmap_overwrite_config ** yac_spmap_overwrite_configs_copy (struct yac_spmap_overwrite_config const *const *overwrite_configs)
 
struct interp_methodyac_interp_method_spmap_new (struct yac_interp_spmap_config const *default_config, struct yac_spmap_overwrite_config const *const *overwrite_configs)
 
struct yac_spmap_cell_area_configyac_spmap_cell_area_config_yac_new (double sphere_radius)
 
struct yac_spmap_cell_area_configyac_spmap_cell_area_config_file_new (char const *filename, char const *varname, yac_int min_global_id)
 
struct yac_spmap_cell_area_configyac_spmap_cell_area_config_file_new_f2c (char const *filename, char const *varname, int min_global_id)
 
void yac_spmap_cell_area_config_delete (struct yac_spmap_cell_area_config *cell_area_config)
 
enum yac_interp_spmap_cell_area_provider yac_spmap_cell_area_config_get_type (struct yac_spmap_cell_area_config const *cell_area_config)
 
double yac_spmap_cell_area_config_get_sphere_radius (struct yac_spmap_cell_area_config const *cell_area_config)
 
char const * yac_spmap_cell_area_config_get_filename (struct yac_spmap_cell_area_config const *cell_area_config)
 
char const * yac_spmap_cell_area_config_get_varname (struct yac_spmap_cell_area_config const *cell_area_config)
 
yac_int yac_spmap_cell_area_config_get_min_global_id (struct yac_spmap_cell_area_config const *cell_area_config)
 
struct yac_spmap_scale_configyac_spmap_scale_config_new (enum yac_interp_spmap_scale_type scale_type, struct yac_spmap_cell_area_config const *source_cell_area_config, struct yac_spmap_cell_area_config const *target_cell_area_config)
 
struct yac_spmap_scale_configyac_spmap_scale_config_new_f2c (int scale_type, struct yac_spmap_cell_area_config *source_cell_area_config, struct yac_spmap_cell_area_config *target_cell_area_config)
 
void yac_spmap_scale_config_delete (struct yac_spmap_scale_config *scale_config)
 
enum yac_interp_spmap_scale_type yac_spmap_scale_config_get_type (struct yac_spmap_scale_config const *scale_config)
 
struct yac_spmap_cell_area_config const * yac_spmap_scale_config_get_src_cell_area_config (struct yac_spmap_scale_config const *scale_config)
 
struct yac_spmap_cell_area_config const * yac_spmap_scale_config_get_tgt_cell_area_config (struct yac_spmap_scale_config const *scale_config)
 
struct yac_interp_spmap_configyac_interp_spmap_config_new (double spread_distance, double max_search_distance, enum yac_interp_spmap_weight_type weight_type, struct yac_spmap_scale_config const *scale_config)
 
struct yac_interp_spmap_configyac_interp_spmap_config_new_f2c (double spread_distance, double max_search_distance, int weight_type, struct yac_spmap_scale_config *scale_config)
 
void yac_interp_spmap_config_delete (struct yac_interp_spmap_config *config)
 
double yac_interp_spmap_config_get_spread_distance (struct yac_interp_spmap_config const *spmap_config)
 
double yac_interp_spmap_config_get_max_search_distance (struct yac_interp_spmap_config const *spmap_config)
 
enum yac_interp_spmap_weight_type yac_interp_spmap_config_get_weight_type (struct yac_interp_spmap_config const *spmap_config)
 
struct yac_spmap_scale_config const * yac_interp_spmap_config_get_scale_config (struct yac_interp_spmap_config const *spmap_config)
 
struct yac_spmap_overwrite_configyac_spmap_overwrite_config_new (struct yac_point_selection const *src_point_selection, struct yac_interp_spmap_config const *config)
 
void yac_spmap_overwrite_config_delete (struct yac_spmap_overwrite_config *overwrite_config)
 
void yac_spmap_overwrite_configs_delete (struct yac_spmap_overwrite_config **overwrite_configs)
 
struct yac_point_selection const * yac_spmap_overwrite_config_get_src_point_selection (struct yac_spmap_overwrite_config const *overwrite_config)
 
struct yac_interp_spmap_config const * yac_spmap_overwrite_config_get_spmap_config (struct yac_spmap_overwrite_config const *overwrite_config)
 
static int yac_interp_spmap_basic_config_compare (struct yac_interp_spmap_basic_config const *a, struct yac_interp_spmap_basic_config const *b)
 
static int yac_spmap_cell_area_config_compare (struct yac_spmap_cell_area_config const *a, struct yac_spmap_cell_area_config const *b)
 
int yac_spmap_scale_config_compare (struct yac_spmap_scale_config const *a, struct yac_spmap_scale_config const *b)
 
int yac_interp_spmap_config_compare (struct yac_interp_spmap_config const *a, struct yac_interp_spmap_config const *b)
 
int yac_spmap_overwrite_config_compare (struct yac_spmap_overwrite_config const *a, struct yac_spmap_overwrite_config const *b)
 
static size_t yac_spmap_cell_area_config_get_pack_size (struct yac_spmap_cell_area_config const *cell_area_config, MPI_Comm comm)
 
size_t yac_spmap_scale_config_get_pack_size (struct yac_spmap_scale_config const *scale_config, MPI_Comm comm)
 
size_t yac_interp_spmap_config_get_pack_size (struct yac_interp_spmap_config const *spmap_config, MPI_Comm comm)
 
size_t yac_spmap_overwrite_config_get_pack_size (struct yac_spmap_overwrite_config const *overwrite_config, MPI_Comm comm)
 
size_t yac_spmap_overwrite_configs_get_pack_size (struct yac_spmap_overwrite_config const *const *overwrite_configs, MPI_Comm comm)
 
static void yac_spmap_cell_area_config_pack (struct yac_spmap_cell_area_config const *cell_area_config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
void yac_spmap_scale_config_pack (struct yac_spmap_scale_config const *scale_config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
void yac_interp_spmap_config_pack (struct yac_interp_spmap_config const *spmap_config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static void yac_spmap_overwrite_config_pack (struct yac_spmap_overwrite_config const *overwrite_config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
void yac_spmap_overwrite_configs_pack (struct yac_spmap_overwrite_config const *const *overwrite_configs, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static void yac_spmap_cell_area_config_unpack (void *buffer, int buffer_size, int *position, struct yac_spmap_cell_area_config **cell_area_config, MPI_Comm comm)
 
void yac_spmap_scale_config_unpack (void *buffer, int buffer_size, int *position, struct yac_spmap_scale_config *scale_config, MPI_Comm comm)
 
void yac_interp_spmap_config_unpack (void *buffer, int buffer_size, int *position, struct yac_interp_spmap_config **spmap_config, MPI_Comm comm)
 
static struct yac_spmap_overwrite_configyac_spmap_overwrite_config_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
void yac_spmap_overwrite_configs_unpack (void *buffer, int buffer_size, int *position, struct yac_spmap_overwrite_config ***overwrite_configs, MPI_Comm comm)
 
static size_t get_overwrite_config_count (struct yac_spmap_overwrite_config const *const *overwrite_configs)
 
static struct yac_paramspmap_cell_area_config_build_subparam (struct yac_spmap_cell_area_config *cell_area_config)
 
static int spmap_cell_area_config_factory (char const *name, void **obj, struct yac_param **param, int *is_default)
 
static void yac_interp_method_config_spmap_init_from (struct interp_method_spmap_config *config_spmap, struct yac_interp_spmap_config const *ext)
 
static void config_spmap_delete (struct yac_interp_method_config *config)
 
static struct yac_interp_method_configconfig_spmap_copy (struct yac_interp_method_config const *config)
 
static int config_spmap_compare (void const *a_, void const *b_)
 
static size_t config_spmap_get_pack_size (struct yac_interp_method_config const *config, MPI_Comm comm)
 
static void config_spmap_pack (struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static enum yac_interpolation_list config_spmap_get_type (void)
 
static struct interp_methodconfig_spmap_generate (struct yac_interp_method_config const *config)
 
static void spmap_create_basic_params (double *spread_distance, double *max_search_distance, enum yac_interp_spmap_weight_type *weight_type, struct yac_param **spread_distance_param, struct yac_param **max_search_distance_param, struct yac_param **weighted_param)
 
static int spmap_overwrite_config_get_param (void *element, struct yac_param **param_ptr)
 Generates the configuration parameter for accessing the spmap overwrite configuration.
 
static int create_spmap_overwrite_entry (void **element_ptr, struct yac_param **param_ptr)
 Creates a overwrite configuration, initialises it to the default values, and generate a parameter object to access it.
 
static struct yac_paramconfig_spmap_get_param (struct yac_interp_method_config const *config)
 Generates the parameter object for accessing the provided spmap configuration object.
 
static struct yac_interp_method_config_spmapyac_interp_method_config_spmap_new_ (void)
 
struct yac_interp_method_configyac_interp_method_config_default_spmap_new (void)
 Creates a source-point-mapping interpolation method configuration with default parameters.
 
struct yac_interp_method_configyac_interp_method_config_spmap_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm)
 Unpacks a spmap interpolation method configuration from a buffer.
 

Variables

static struct interp_method_vtable interp_method_spmap_vtable
 
static struct yac_spmap_cell_area_config cell_area_config_default
 
static struct yac_spmap_scale_config spmap_scale_config_default
 
static struct yac_interp_spmap_config spmap_config_default
 
static struct yac_spmap_overwrite_config overwrite_config_default
 
static struct yac_interp_method_config_vtable yac_interp_method_config_vtable_spmap
 

Macro Definition Documentation

◆ SCALE_WEIGHTS

#define SCALE_WEIGHTS ( SRC_CELL_AREA,
TGT_CELL_AREA )
Value:
{ \
for (size_t i = 0, offset = 0; i < num_src_points; ++i) { \
size_t curr_num_tgt = num_tgt_per_src[i]; \
for (size_t j = 0; j < curr_num_tgt; ++j, ++offset) { \
weights[offset] *= SRC_CELL_AREA / TGT_CELL_AREA; \
} \
} \
}

Typedef Documentation

◆ InterpLink

typedef struct interp_link InterpLink

Datatype used to store a single link (reference to source and target cell and the associated weight). Using this datatye makes links easily comparable, which produces decomposition independent weight order, if the compare is based on user-provided global ids.

Function Documentation

◆ check_tgt_result_points()

static size_t check_tgt_result_points ( struct yac_interp_grid * interp_grid,
struct sin_cos_angle spread_distance,
size_t num_src_points,
size_t const *const tgt_result_points,
size_t * num_tgt_per_src,
size_t * spread_tgt_result_points )
static

Checks initial results from bounding circle search (if spread_distance > 0.0) and removes target points that are not connected with the initial search (single) search result or are too far away from it.

Parameters
[in]interp_grid
[in]spread_distancesin and cos values of spread distance
[in]num_src_pointsnumber of source points/initial target points
[in]tgt_result_pointsinitial target result points (the one closest to the source point)
[in,out]num_tgt_per_srcnumber of bounding circle search results per source points/initial target point
[in,out]spread_tgt_result_pointsresults of bounding circle search
Remarks
num_tgt_per_src and spread_tgt_result_points are updated by this routine

Definition at line 174 of file interp_method_spmap.c.

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

◆ compare_interp_link_tgt_point()

static int compare_interp_link_tgt_point ( void const * a_,
void const * b_ )
static

Compare routine for objects of type InterpLink to be used by std::qsort

Definition at line 1007 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ compare_size_t()

static int compare_size_t ( const void * a,
const void * b )
inlinestatic

Definition at line 150 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ compute_cell_areas()

static void compute_cell_areas ( struct yac_const_basic_grid_data * basic_grid_data,
int const * required_cell_areas,
double area_scale,
char const * type,
double * cell_areas )
static

Definition at line 397 of file interp_method_spmap.c.

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

◆ compute_weights()

static double * compute_weights ( struct yac_interp_grid * interp_grid,
enum yac_interp_spmap_weight_type weight_type,
size_t num_src_points,
size_t const *const src_points,
size_t const *const num_tgt_per_src,
size_t total_num_tgt,
size_t const *const tgt_result_points )
static

Computes the weights

Parameters
[in]interp_grid
[in]weight_typedetermines how the source value is distribted to the target points
[in]num_src_pointsnumber of source points
[in]src_pointslocal indices of all interpolated source points
[in]num_tgt_per_srcnumber of target points to which each source value is to be distributed
[in]total_num_tgttotal size of tgt_result_points or SUM(num_tgt_per_src(:))
[in]tgt_result_pointslocal indices of all targets
Returns
weights associated with each entry in tgt_result_points

Definition at line 303 of file interp_method_spmap.c.

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

◆ config_spmap_compare()

static int config_spmap_compare ( void const * a_,
void const * b_ )
static

Definition at line 2361 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ config_spmap_copy()

static struct yac_interp_method_config * config_spmap_copy ( struct yac_interp_method_config const * config)
static

Definition at line 2334 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ config_spmap_delete()

static void config_spmap_delete ( struct yac_interp_method_config * config)
static

Definition at line 2321 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ config_spmap_generate()

static struct interp_method * config_spmap_generate ( struct yac_interp_method_config const * config)
static

Definition at line 2449 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ config_spmap_get_pack_size()

static size_t config_spmap_get_pack_size ( struct yac_interp_method_config const * config,
MPI_Comm comm )
static

Definition at line 2418 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ config_spmap_get_param()

static struct yac_param * config_spmap_get_param ( struct yac_interp_method_config const * config)
static

Generates the parameter object for accessing the provided spmap configuration object.

Parameters
[in]configPointer the a spmap configuration structure.
Returns
Pointer to the parameter object.

Definition at line 2615 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ config_spmap_get_type()

static enum yac_interpolation_list config_spmap_get_type ( void )
static

Definition at line 2445 of file interp_method_spmap.c.

◆ config_spmap_pack()

static void config_spmap_pack ( struct yac_interp_method_config const * config,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )
static

Definition at line 2431 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ create_spmap_overwrite_entry()

static int create_spmap_overwrite_entry ( void ** element_ptr,
struct yac_param ** param_ptr )
static

Creates a overwrite configuration, initialises it to the default values, and generate a parameter object to access it.

Parameters
[out]element_ptrPointer to a overwrite configuration handle.
[out]param_ptrPointer to a parameter handle.
Returns
0 on success, non-zero error code on failure.

Definition at line 2582 of file interp_method_spmap.c.

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

◆ delete_spmap()

static void delete_spmap ( struct interp_method * method)
static

Definition at line 1672 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ dist_read_cell_areas()

static void dist_read_cell_areas ( char const * filename,
char const * varname,
MPI_Comm comm,
int *const io_ranks,
int io_rank_idx,
int num_io_ranks,
double ** dist_cell_areas,
size_t * dist_cell_areas_global_size )
static

Definition at line 425 of file interp_method_spmap.c.

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

◆ do_search_spmap()

static size_t do_search_spmap ( struct interp_method * method,
struct yac_interp_grid * interp_grid,
size_t * tgt_points,
size_t tgt_point_count,
struct yac_interp_weights * weights,
int * interpolation_complete )
static

basic routine for the computation of the interpolation weights

Parameters
[in]methodabstract pointer to interpolation method data
[in,out]interp_gridinterpolation grids information
[in,out]tgt_pointslocal indices of all target points that are to be interpolated
[in]tgt_point_countnumber of entries in tgt_points
[in,out]weightsdata structure containing the weights
[in]interpolation_completeif it is one, no weights are to be computed
Returns
number of target points for which an interpolation was generated
Remarks
entries in tgt_points are reordered such that successfully interpolated target points are moved to the beginning of the array

Definition at line 1032 of file interp_method_spmap.c.

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

◆ do_search_spmap_()

static void do_search_spmap_ ( struct yac_interp_grid * interp_grid,
struct yac_interp_spmap_basic_config const * basic_config,
struct yac_spmap_scale_config const * scale_config,
size_t * src_points,
size_t num_src_points,
yac_coordinate_pointer src_coords,
InterpLink ** combined_result,
size_t * combined_result_count )
static

Applies spmap to a set of given source points for a single basic+scale configuration pair.

Definition at line 910 of file interp_method_spmap.c.

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

◆ get_cell_areas()

static double * get_cell_areas ( struct yac_const_basic_grid_data * basic_grid_data,
char const * type,
struct yac_spmap_cell_area_config const * cell_area_config,
MPI_Comm comm,
size_t const * required_points,
size_t num_required_points )
static

Gets cell areas for scaling either from file or compute them (depending on configuration)

Parameters
[in]basic_grid_data
[in]typeused for error message (either "source" or "target");
[in]cell_area_configdetermines whether areas are written from file or computed and contains additional configuration specific to respective type
[in]commMPI communicator (required for parallel reading of areas from file)
[in]required_pointslocal ids of cell for which the areas are required
[in]num_required_points
Returns
cell areas

Definition at line 678 of file interp_method_spmap.c.

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

◆ get_overwrite_config_count()

static size_t get_overwrite_config_count ( struct yac_spmap_overwrite_config const *const * overwrite_configs)
static

Definition at line 2100 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ read_cell_areas()

static void read_cell_areas ( struct yac_const_basic_grid_data * basic_grid_data,
struct yac_spmap_cell_area_file_config file_config,
MPI_Comm comm,
int const * required_cell_areas,
char const * type,
double * cell_areas )
static

Definition at line 538 of file interp_method_spmap.c.

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

◆ scale_weights()

static void scale_weights ( struct yac_interp_grid * interp_grid,
struct yac_spmap_scale_config const * scale_config,
size_t num_src_points,
size_t const * src_points,
size_t const * num_tgt_per_src,
size_t const * tgt_points,
size_t total_num_weights,
double * weights )
static

Scale weights based on source/target cell areas depending on used configuration.

Remarks
this is required if for example the source field contains data in kg/m^2 (a flux) but the target expects it in kg

Definition at line 727 of file interp_method_spmap.c.

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

◆ spmap_cell_area_config_build_subparam()

static struct yac_param * spmap_cell_area_config_build_subparam ( struct yac_spmap_cell_area_config * cell_area_config)
static

Definition at line 2110 of file interp_method_spmap.c.

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

◆ spmap_cell_area_config_factory()

static int spmap_cell_area_config_factory ( char const * name,
void ** obj,
struct yac_param ** param,
int * is_default )
static

Factory function for cell area config object of SPMAP method.

Definition at line 2204 of file interp_method_spmap.c.

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

◆ spmap_create_basic_params()

static void spmap_create_basic_params ( double * spread_distance,
double * max_search_distance,
enum yac_interp_spmap_weight_type * weight_type,
struct yac_param ** spread_distance_param,
struct yac_param ** max_search_distance_param,
struct yac_param ** weighted_param )
static

Creates interpolation method configuration parameters for the basic SPMAP config parameters. Used by both the main SPMAP config and the overwrite config, which share the same basic parameters.

Parameters
spread_distancepointer to the spread distance variable
max_search_distancepointer to the max search distance variable
weight_typepointer to the weight type variable
spread_distance_paramoutput pointer for the created spread distance parameter
max_search_distance_paramoutput pointer for the created max search distance parameter
weighted_paramoutput pointer for the created weighted parameter

Definition at line 2474 of file interp_method_spmap.c.

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

◆ spmap_overwrite_config_get_param()

static int spmap_overwrite_config_get_param ( void * element,
struct yac_param ** param_ptr )
static

Generates the configuration parameter for accessing the spmap overwrite configuration.

Parameters
[in]elementPointer to a overwrite configuration element.
[out]param_ptrPointer to a parameter handle.
Returns
int Returns 0 on success, or a negative value on failure.

Definition at line 2534 of file interp_method_spmap.c.

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

◆ spread_src_data()

static void spread_src_data ( struct yac_interp_grid * interp_grid,
struct yac_interp_spmap_basic_config const * basic_config,
struct yac_spmap_scale_config const * scale_config,
size_t num_src_points,
size_t ** src_points_,
size_t ** tgt_result_points_,
double ** weights_,
size_t * total_num_weights_ )
static

Applies spreading of source data based on initial search results (single target per source)

Parameters
[in]interp_grid
[in]basic_config
[in]scale_config
[in]num_src_pointsnumber of source points
[in,out]src_points_local ids of all source points, will be inflated to the total number of links and contain duplication of the source points (each source points is repeated by the number of links associated with it)
[in,out]tgt_result_points_local ids of initial target search results (one target per source), will be updated by this routine and then contain multiple targets per source
[out]weights_weights for all links
[out]total_num_weights_total number of links

Definition at line 802 of file interp_method_spmap.c.

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

◆ src_point_selection_apply()

static void src_point_selection_apply ( struct yac_point_selection const * src_point_selection,
size_t * src_points,
size_t num_src_points,
yac_coordinate_pointer src_coords,
size_t ** selected_src_points,
size_t * num_selected_src_points,
yac_coordinate_pointer * selected_src_coords )
static

Definition at line 983 of file interp_method_spmap.c.

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

◆ yac_interp_method_config_default_spmap_new()

struct yac_interp_method_config * yac_interp_method_config_default_spmap_new ( void )

Creates a source-point-mapping interpolation method configuration with default parameters.

Returns
Pointer to the created yac_interp_method_config structure

Definition at line 2734 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ yac_interp_method_config_spmap_init_from()

static void yac_interp_method_config_spmap_init_from ( struct interp_method_spmap_config * config_spmap,
struct yac_interp_spmap_config const * ext )
static

Definition at line 2295 of file interp_method_spmap.c.

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

◆ yac_interp_method_config_spmap_new_()

static struct yac_interp_method_config_spmap * yac_interp_method_config_spmap_new_ ( void )
static

Definition at line 2715 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_interp_method_config_spmap_unpack()

struct yac_interp_method_config * yac_interp_method_config_spmap_unpack ( void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )

Unpacks a spmap interpolation method configuration from a buffer.

Parameters
[in]bufferBuffer containing the packed configuration data
[in]buffer_sizeSize of the buffer
[in,out]positionCurrent position in the buffer (will be updated)
[in]commMPI communicator for parallel unpacking
Returns
Pointer to the unpacked yac_interp_method_config structure

Definition at line 2741 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ yac_interp_method_spmap_new()

struct interp_method * yac_interp_method_spmap_new ( struct yac_interp_spmap_config const * default_config,
struct yac_spmap_overwrite_config const *const * overwrite_configs )

Constructor for an interpolation method of type interp_method_spmap
This method searches for each unmasked source point the closest unmasked target point.
If the maximum search distance is > 0.0, only target points that are within this distance from the source points are being considered. If spread_distance is > 0.0, the method uses the previously found target points as a starting point. Around each starting point, a bounding circle is generated. Afterwards for each starting point all target cells whose bounding circles intersect with the generated one are put into a list. Out of this list all target cells connected directly or indirectly through other cells from this list to the target cell of the starting are selected for the interpolation. Then a weighting method is applied to the selected target cells to generate the weights. Afterwards the weights are scaled.
The default configuration can be overwritten for selected source cells. An arbitrary number of alternative configuration along with selection criteria can be provided. These configurations will be processed one-by-one starting with the first entry in the array. Any source cell which has already been processed previously will be ignored by any further configuration. Once all alternative configurations are processed the default configuration is applied to the remaining source points.

Parameters
[in]default_configdefault configuration
[in]overwrite_configsalternative configurations along with source cell selection criteria
Remarks
* the unit for the spread and maximum search distance is Radian
  • if (overwrite_configs != NULL) the last entry in the array has to be NULL

Definition at line 1258 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_basic_config_compare()

static int yac_interp_spmap_basic_config_compare ( struct yac_interp_spmap_basic_config const * a,
struct yac_interp_spmap_basic_config const * b )
static

Definition at line 1661 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_interp_spmap_config_compare()

int yac_interp_spmap_config_compare ( struct yac_interp_spmap_config const * a,
struct yac_interp_spmap_config const * b )

Definition at line 1722 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_config_copy()

struct yac_interp_spmap_config * yac_interp_spmap_config_copy ( struct yac_interp_spmap_config const * spmap_config)

Definition at line 1212 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_config_delete()

void yac_interp_spmap_config_delete ( struct yac_interp_spmap_config * spmap_config)

Destructor for a Source to Target mapping configuration object

Parameters
[in]spmap_configSource to Target mapping configuration object

Definition at line 1563 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_config_get_max_search_distance()

double yac_interp_spmap_config_get_max_search_distance ( struct yac_interp_spmap_config const * spmap_config)

Returns maximum search distance distance of Source to Target mapping configuration object

Parameters
[in]spmap_configSource to Target mapping configuration object
Returns
maximum search distance

Definition at line 1581 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_interp_spmap_config_get_pack_size()

size_t yac_interp_spmap_config_get_pack_size ( struct yac_interp_spmap_config const * spmap_config,
MPI_Comm comm )

Definition at line 1791 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_config_get_scale_config()

struct yac_spmap_scale_config const * yac_interp_spmap_config_get_scale_config ( struct yac_interp_spmap_config const * spmap_config)

Returns scaling configuration of Source to Target mapping configuration object

Parameters
[in]spmap_configSource to Target mapping configuration object
Returns
scaling configuration

Definition at line 1597 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_interp_spmap_config_get_spread_distance()

double yac_interp_spmap_config_get_spread_distance ( struct yac_interp_spmap_config const * spmap_config)

Returns spread distance of Source to Target mapping configuration object

Parameters
[in]spmap_configSource to Target mapping configuration object
Returns
spread distance

Definition at line 1573 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_interp_spmap_config_get_weight_type()

enum yac_interp_spmap_weight_type yac_interp_spmap_config_get_weight_type ( struct yac_interp_spmap_config const * spmap_config)

Returns weight type of Source to Target mapping configuration object

Parameters
[in]spmap_configSource to Target mapping configuration object
Returns
spread distance

Definition at line 1589 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_interp_spmap_config_new()

struct yac_interp_spmap_config * yac_interp_spmap_config_new ( double spread_distance,
double max_search_distance,
enum yac_interp_spmap_weight_type weight_type,
struct yac_spmap_scale_config const * scale_config )

Constructs a Source to Target mapping configuration object

Parameters
[in]spread_distancespread distance
[in]max_search_distancemaximum search distance
[in]weight_typeweightening type
[in]scale_configscaling configuration
Returns
Source to Target mapping configuration object
Remarks
see Source to Target mapping for more information

Definition at line 1510 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_config_new_f2c()

struct yac_interp_spmap_config * yac_interp_spmap_config_new_f2c ( double spread_distance,
double max_search_distance,
int weight_type,
struct yac_spmap_scale_config * scale_config )

Definition at line 1547 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ yac_interp_spmap_config_pack()

void yac_interp_spmap_config_pack ( struct yac_interp_spmap_config const * spmap_config,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )

Definition at line 1893 of file interp_method_spmap.c.

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

◆ yac_interp_spmap_config_unpack()

void yac_interp_spmap_config_unpack ( void * buffer,
int buffer_size,
int * position,
struct yac_interp_spmap_config ** spmap_config,
MPI_Comm comm )

Definition at line 2014 of file interp_method_spmap.c.

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

◆ yac_spmap_cell_area_config_compare()

static int yac_spmap_cell_area_config_compare ( struct yac_spmap_cell_area_config const * a,
struct yac_spmap_cell_area_config const * b )
static

Definition at line 1686 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_copy()

static struct yac_spmap_cell_area_config * yac_spmap_cell_area_config_copy ( struct yac_spmap_cell_area_config const * cell_area_config,
char const * desc )
static

Definition at line 1182 of file interp_method_spmap.c.

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

◆ yac_spmap_cell_area_config_delete()

void yac_spmap_cell_area_config_delete ( struct yac_spmap_cell_area_config * cell_area_config)

Destructor for a Source to Target mapping cell area configuration object

Parameters
[in]cell_area_configSource to Target mapping cell area configuration object

Definition at line 1333 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_file_new()

struct yac_spmap_cell_area_config * yac_spmap_cell_area_config_file_new ( char const * filename,
char const * varname,
yac_int min_global_id )

Constructs a Source to Target mapping cell area configuration object

This type enable reading of cell areas from a netCDF file.

Parameters
[in]filenamename of the file containing the cell areas
[in]varnamename of the variable containing the cell areas
[in]min_global_idminimum global cell id (usually "0" or "1")
Returns
Source to Target mapping cell area configuration object
Remarks
Cell area for cell with global id X is assumed to be at (using C indexing; starting at "0"): varname[X-min_global_id]

Definition at line 1292 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_file_new_f2c()

struct yac_spmap_cell_area_config * yac_spmap_cell_area_config_file_new_f2c ( char const * filename,
char const * varname,
int min_global_id )

Definition at line 1318 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ yac_spmap_cell_area_config_get_filename()

char const * yac_spmap_cell_area_config_get_filename ( struct yac_spmap_cell_area_config const * cell_area_config)

Gets the file name of a cell area configuration object

Parameters
[in]cell_area_configcell area configuration object
Returns
file name
Remarks
this call is only valid for cell area configuration objects of type YAC_INTERP_SPMAP_CELL_AREA_FILE

Definition at line 1378 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_get_min_global_id()

yac_int yac_spmap_cell_area_config_get_min_global_id ( struct yac_spmap_cell_area_config const * cell_area_config)

Gets the minimum global id of a cell area configuration object

Parameters
[in]cell_area_configcell area configuration object
Returns
minimum global id
Remarks
this call is only valid for cell area configuration objects of type YAC_INTERP_SPMAP_CELL_AREA_FILE

Definition at line 1406 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_get_pack_size()

static size_t yac_spmap_cell_area_config_get_pack_size ( struct yac_spmap_cell_area_config const * cell_area_config,
MPI_Comm comm )
static

Definition at line 1745 of file interp_method_spmap.c.

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

◆ yac_spmap_cell_area_config_get_sphere_radius()

double yac_spmap_cell_area_config_get_sphere_radius ( struct yac_spmap_cell_area_config const * cell_area_config)

Gets the sphere radius of a cell area configuration object

Parameters
[in]cell_area_configcell area configuration object
Returns
sphere radius
Remarks
this call is only valid for cell area configuration objects of type YAC_INTERP_SPMAP_CELL_AREA_YAC

Definition at line 1364 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_get_type()

enum yac_interp_spmap_cell_area_provider yac_spmap_cell_area_config_get_type ( struct yac_spmap_cell_area_config const * cell_area_config)

Gets the type of a cell area configuration object

Parameters
[in]cell_area_configcell area configuration object
Returns
cell area configuration type

Definition at line 1356 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_get_varname()

char const * yac_spmap_cell_area_config_get_varname ( struct yac_spmap_cell_area_config const * cell_area_config)

Gets the variable name of a cell area configuration object

Parameters
[in]cell_area_configcell area configuration object
Returns
variable name
Remarks
this call is only valid for cell area configuration objects of type YAC_INTERP_SPMAP_CELL_AREA_FILE

Definition at line 1392 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_cell_area_config_pack()

static void yac_spmap_cell_area_config_pack ( struct yac_spmap_cell_area_config const * cell_area_config,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )
static

Definition at line 1838 of file interp_method_spmap.c.

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

◆ yac_spmap_cell_area_config_unpack()

static void yac_spmap_cell_area_config_unpack ( void * buffer,
int buffer_size,
int * position,
struct yac_spmap_cell_area_config ** cell_area_config,
MPI_Comm comm )
static

Definition at line 1956 of file interp_method_spmap.c.

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

◆ yac_spmap_cell_area_config_yac_new()

struct yac_spmap_cell_area_config * yac_spmap_cell_area_config_yac_new ( double sphere_radius)

Constructs a Source to Target mapping cell area configuration object

This type enable internal computation of cell areas.

Parameters
[in]sphere_radiussets sphere radius to be used for area computation
Returns
Source to Target mapping cell area configuration object

Definition at line 1275 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_overwrite_config_compare()

int yac_spmap_overwrite_config_compare ( struct yac_spmap_overwrite_config const * a,
struct yac_spmap_overwrite_config const * b )

Definition at line 1733 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ yac_spmap_overwrite_config_copy()

struct yac_spmap_overwrite_config * yac_spmap_overwrite_config_copy ( struct yac_spmap_overwrite_config const * overwrite_config)

Definition at line 1225 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_config_delete()

void yac_spmap_overwrite_config_delete ( struct yac_spmap_overwrite_config * overwrite_config)

Destructor for an alternative Source to Target mapping configuration

Parameters
[in]overwrite_configAlternative Source to Target mapping configuration

Definition at line 1621 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_config_get_pack_size()

size_t yac_spmap_overwrite_config_get_pack_size ( struct yac_spmap_overwrite_config const * overwrite_config,
MPI_Comm comm )

Definition at line 1805 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_config_get_spmap_config()

struct yac_interp_spmap_config const * yac_spmap_overwrite_config_get_spmap_config ( struct yac_spmap_overwrite_config const * overwrite_config)

Gets the configuration of an alternative Source to Target mapping configuration

Parameters
[in]overwrite_configAlternative Source to Target mapping configurations
Returns
configuration

Definition at line 1650 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_overwrite_config_get_src_point_selection()

struct yac_point_selection const * yac_spmap_overwrite_config_get_src_point_selection ( struct yac_spmap_overwrite_config const * overwrite_config)

Gets the source point selection method of an alternative Source to Target mapping configuration

Parameters
[in]overwrite_configAlternative Source to Target mapping configurations
Returns
source point selection method

Definition at line 1641 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_overwrite_config_new()

struct yac_spmap_overwrite_config * yac_spmap_overwrite_config_new ( struct yac_point_selection const * src_point_selection,
struct yac_interp_spmap_config const * config )

Constructs an alternative Source to Target mapping configuration

Parameters
[in]src_point_selectionSpecifies source points the alternative configuration is to be appied to
[in]configAlternative configuration to be used

Definition at line 1605 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_config_pack()

static void yac_spmap_overwrite_config_pack ( struct yac_spmap_overwrite_config const * overwrite_config,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )
static

Definition at line 1914 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_config_unpack()

static struct yac_spmap_overwrite_config * yac_spmap_overwrite_config_unpack ( void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )
static

Definition at line 2040 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_configs_copy()

struct yac_spmap_overwrite_config ** yac_spmap_overwrite_configs_copy ( struct yac_spmap_overwrite_config const *const * overwrite_configs)

Definition at line 1239 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_configs_delete()

void yac_spmap_overwrite_configs_delete ( struct yac_spmap_overwrite_config ** overwrite_configs)

Destructor for an array of alternative Source to Target mapping configurations

Parameters
[in]overwrite_configsArray of alternative Source to Target mapping configurations

Definition at line 1631 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_configs_get_pack_size()

size_t yac_spmap_overwrite_configs_get_pack_size ( struct yac_spmap_overwrite_config const *const * overwrite_configs,
MPI_Comm comm )

Definition at line 1820 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_configs_pack()

void yac_spmap_overwrite_configs_pack ( struct yac_spmap_overwrite_config const *const * overwrite_configs,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )

Definition at line 1937 of file interp_method_spmap.c.

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

◆ yac_spmap_overwrite_configs_unpack()

void yac_spmap_overwrite_configs_unpack ( void * buffer,
int buffer_size,
int * position,
struct yac_spmap_overwrite_config *** overwrite_configs,
MPI_Comm comm )

Definition at line 2069 of file interp_method_spmap.c.

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

◆ yac_spmap_scale_config_compare()

int yac_spmap_scale_config_compare ( struct yac_spmap_scale_config const * a,
struct yac_spmap_scale_config const * b )

Definition at line 1711 of file interp_method_spmap.c.

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

◆ yac_spmap_scale_config_delete()

void yac_spmap_scale_config_delete ( struct yac_spmap_scale_config * scale_config)

Destructor for a Source to Target mapping scaling configuration object

Parameters
[in]scale_configscaling configuration

Definition at line 1473 of file interp_method_spmap.c.

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

◆ yac_spmap_scale_config_get_pack_size()

size_t yac_spmap_scale_config_get_pack_size ( struct yac_spmap_scale_config const * scale_config,
MPI_Comm comm )

Definition at line 1780 of file interp_method_spmap.c.

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

◆ yac_spmap_scale_config_get_src_cell_area_config()

struct yac_spmap_cell_area_config const * yac_spmap_scale_config_get_src_cell_area_config ( struct yac_spmap_scale_config const * scale_config)

Gets source cell area configuration of a Source to Target mapping scaling configuration object

Parameters
[in]scale_configscaling configuration
Returns
source cell area configuration

Definition at line 1493 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_scale_config_get_tgt_cell_area_config()

struct yac_spmap_cell_area_config const * yac_spmap_scale_config_get_tgt_cell_area_config ( struct yac_spmap_scale_config const * scale_config)

Gets target cell area configuration of a Source to Target mapping scaling configuration object

Parameters
[in]scale_configscaling configuration
Returns
target cell area configuration

Definition at line 1502 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_scale_config_get_type()

enum yac_interp_spmap_scale_type yac_spmap_scale_config_get_type ( struct yac_spmap_scale_config const * scale_config)

Gets type of a Source to Target mapping scaling configuration object

Parameters
[in]scale_configscaling configuration
Returns
scaling configuration type

Definition at line 1484 of file interp_method_spmap.c.

Here is the caller graph for this function:

◆ yac_spmap_scale_config_new()

struct yac_spmap_scale_config * yac_spmap_scale_config_new ( enum yac_interp_spmap_scale_type scale_type,
struct yac_spmap_cell_area_config const * source_cell_area_config,
struct yac_spmap_cell_area_config const * target_cell_area_config )

Constructs a Source to Target mapping scaling configuration object

Parameters
[in]scale_typescaling type
[in]source_cell_area_configsource cell area configuration
[in]target_cell_area_configtarget cell area configuration
Returns
Source to Target mapping scaling configuration object
Remarks
see Source to Target mapping for more information

Definition at line 1429 of file interp_method_spmap.c.

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

◆ yac_spmap_scale_config_new_f2c()

struct yac_spmap_scale_config * yac_spmap_scale_config_new_f2c ( int scale_type,
struct yac_spmap_cell_area_config * source_cell_area_config,
struct yac_spmap_cell_area_config * target_cell_area_config )

Definition at line 1454 of file interp_method_spmap.c.

Here is the call graph for this function:

◆ yac_spmap_scale_config_pack()

void yac_spmap_scale_config_pack ( struct yac_spmap_scale_config const * scale_config,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )

Definition at line 1878 of file interp_method_spmap.c.

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

◆ yac_spmap_scale_config_unpack()

void yac_spmap_scale_config_unpack ( void * buffer,
int buffer_size,
int * position,
struct yac_spmap_scale_config * scale_config,
MPI_Comm comm )

Definition at line 1997 of file interp_method_spmap.c.

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

Variable Documentation

◆ cell_area_config_default

struct yac_spmap_cell_area_config cell_area_config_default
static
Initial value:
=
@ YAC_INTERP_SPMAP_CELL_AREA_YAC
#define YAC_INTERP_SPMAP_SPHERE_RADIUS_DEFAULT

Definition at line 80 of file interp_method_spmap.c.

◆ interp_method_spmap_vtable

struct interp_method_vtable interp_method_spmap_vtable
static
Initial value:
= {
.do_search = do_search_spmap,
.delete = delete_spmap
}
static void delete_spmap(struct interp_method *method)
static size_t do_search_spmap(struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, struct yac_interp_weights *weights, int *interpolation_complete)
basic routine for the computation of the interpolation weights

Definition at line 45 of file interp_method_spmap.c.

◆ overwrite_config_default

struct yac_spmap_overwrite_config overwrite_config_default
static
Initial value:
=
{.src_point_selection = NULL,
.config = {
}}
#define YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT
#define YAC_INTERP_SPMAP_WEIGHTED_DEFAULT
#define YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT

Definition at line 121 of file interp_method_spmap.c.

◆ spmap_config_default

struct yac_interp_spmap_config spmap_config_default
static
Initial value:
=
{.basic = {
},
.scale_config = {.type = YAC_INTERP_SPMAP_SCALE_TYPE_DEFAULT,
#define YAC_INTERP_SPMAP_CELL_AREA_CONFIG_DEFAULT
#define YAC_INTERP_SPMAP_SCALE_TYPE_DEFAULT

Definition at line 106 of file interp_method_spmap.c.

◆ spmap_scale_config_default

struct yac_spmap_scale_config spmap_scale_config_default
static
Initial value:
=
.src = NULL,
.tgt = NULL}

Definition at line 90 of file interp_method_spmap.c.

◆ yac_interp_method_config_vtable_spmap

struct yac_interp_method_config_vtable yac_interp_method_config_vtable_spmap
static
Initial value:
= {
.get_pack_size = config_spmap_get_pack_size,
.get_type = config_spmap_get_type,
.generate = config_spmap_generate,
.get_param = config_spmap_get_param,
}
static struct yac_param * config_spmap_get_param(struct yac_interp_method_config const *config)
Generates the parameter object for accessing the provided spmap configuration object.
static size_t config_spmap_get_pack_size(struct yac_interp_method_config const *config, MPI_Comm comm)
static enum yac_interpolation_list config_spmap_get_type(void)
static struct interp_method * config_spmap_generate(struct yac_interp_method_config const *config)
static int config_spmap_compare(void const *a_, void const *b_)
static struct yac_interp_method_config * config_spmap_copy(struct yac_interp_method_config const *config)
static void config_spmap_pack(struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static void config_spmap_delete(struct yac_interp_method_config *config)

Definition at line 2703 of file interp_method_spmap.c.