|
YAC 3.20.0
Yet Another Coupler
|
#include "config.h"#include <string.h>#include "interpolation/methods/interp_method_internal.h"#include "interpolation/methods/interp_method_utils.h"#include "interpolation/methods/interp_method_config_internal.h"#include "parameter/param_bool.h"#include "parameter/param_enum.h"#include "parameter/param_struct.h"#include "grids/grid_cell.h"#include "interpolation/methods/interp_method_avg.h"#include "yac_lapack_interface.h"#include "yac_mpi_common.h"
Go to the source code of this file.
Data Structures | |
| struct | interp_method_avg |
| struct | yac_interp_method_config_avg |
| Concrete implementation of yac_interp_method_config for the AVG method. More... | |
Macros | |
| #define | IS_GC(x) (((x) == YAC_GREAT_CIRCLE_EDGE) || ((x) == YAC_LON_CIRCLE_EDGE)) |
| #define | IS_LON_LAT(x) (((x) == YAC_LAT_CIRCLE_EDGE) || ((x) == YAC_LON_CIRCLE_EDGE)) |
Typedefs | |
| typedef int(* | func_compute_weights) (double[3], size_t, yac_const_coordinate_pointer, int *, double *, enum yac_cell_type cell_type) |
Functions | |
| static size_t | do_search_avg (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) |
| static void | delete_avg (struct interp_method *method) |
| static int | check_src_field_cell (double *point, size_t field_cell, size_t cell_size, size_t const *vertex_to_cell, size_t const *vertex_to_cell_offsets, yac_const_coordinate_pointer field_coordinates, struct yac_grid_cell *cell_buffer) |
| static enum yac_cell_type | determine_cell_type (enum yac_edge_type const *edge_types, size_t const *edge_indices, size_t num_edges) |
| static int | compute_weights_avg_yes (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type) |
| static int | compute_weights_avg_no (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type) |
| static int | compute_weights_dist_yes (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type) |
| static int | compute_weights_dist_no (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type) |
| static int | compute_barycentric_coords (double *barycentric_coords, size_t triangle_indices[3], yac_const_coordinate_pointer grid_coords, char const *caller) |
| static int | get_lat_edge_ordering (double const *a, double const *b) |
| static void | get_cell_lon_lat_bounds (yac_const_coordinate_pointer coords, double lon[2], double lat[2], int reorder[4]) |
| static void | get_point_lon_lat (double point_coord[3], double cell_lon[2], double cell_lat[2], double *point_lon, double *point_lat) |
| static int | determine_triangle_idx (double point_lon, double point_lat, double cell_lon[2], double cell_lat[2]) |
| static void | compute_weights_bary_reg (double tgt_coords[3], yac_const_coordinate_pointer src_coords, double *weights) |
| static int | compute_weights_bary_check_weights (double *weights, int num_weights, int *src_mask, int partial_coverage) |
| static int | compute_weights_bary (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type, int partial_coverage) |
| Computes barycentric weights for interpolation. | |
| static int | compute_weights_bary_yes (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type) |
| Computes barycentric weights for interpolation allowing partial coverage. | |
| static int | compute_weights_bary_no (double tgt_coords[3], size_t num_vertices, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights, enum yac_cell_type cell_type) |
| Computes barycentric weights for interpolation not allowing partial coverage. | |
| static func_compute_weights | select_compute_weight_routine (enum yac_interp_avg_weight_type weight_type, int partial_coverage) |
| struct interp_method * | yac_interp_method_avg_new (enum yac_interp_avg_weight_type weight_type, int partial_coverage) |
| static void | config_avg_delete (struct yac_interp_method_config *config) |
| static struct yac_interp_method_config * | config_avg_copy (const struct yac_interp_method_config *config) |
| static int | config_avg_compare (void const *a_, void const *b_) |
| static size_t | config_avg_get_pack_size (struct yac_interp_method_config const *config, MPI_Comm comm) |
| static void | config_avg_pack (struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm) |
| static enum yac_interpolation_list | config_avg_get_type () |
| static struct interp_method * | config_avg_generate (struct yac_interp_method_config const *config) |
| static struct yac_param * | config_avg_get_param (struct yac_interp_method_config const *config) |
| struct yac_interp_method_config * | yac_interp_method_config_default_avg_new (void) |
| Creates an average interpolation method configuration with default parameters. | |
| struct yac_interp_method_config * | yac_interp_method_config_avg_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm) |
| Unpacks an average interpolation method configuration from a buffer. | |
Variables | |
| static struct interp_method_vtable | interp_method_avg_vtable |
| static struct yac_interp_method_config_vtable | yac_interp_method_config_vtable_avg |
| #define IS_GC | ( | x | ) | (((x) == YAC_GREAT_CIRCLE_EDGE) || ((x) == YAC_LON_CIRCLE_EDGE)) |
Definition at line 82 of file interp_method_avg.c.
| #define IS_LON_LAT | ( | x | ) | (((x) == YAC_LAT_CIRCLE_EDGE) || ((x) == YAC_LON_CIRCLE_EDGE)) |
Definition at line 83 of file interp_method_avg.c.
| typedef int(* func_compute_weights) (double[3], size_t, yac_const_coordinate_pointer, int *, double *, enum yac_cell_type cell_type) |
Definition at line 30 of file interp_method_avg.c.
|
static |
Definition at line 45 of file interp_method_avg.c.


|
static |
Definition at line 530 of file interp_method_avg.c.


|
static |
|
static |
|
static |
Computes barycentric weights for interpolation.
This function calculates barycentric coordinates/weights for a target point with respect to source vertices of a cell. The weights can be used for interpolation purposes in the averaging interpolation method.
| [in] | tgt_coords | Target point coordinates |
| [in] | num_vertices | Number of source point |
| [in] | src_coords | Source point coordinates |
| [in] | src_mask | Source point mask |
| [out] | weights | Computed weights |
| [in] | cell_type | Type of the cell (supported: YAC_LON_LAT_CELL, YAC_GREAT_CIRCLE_CELL) |
| [in] | partial_coverage | If 0, partial coverage of source vertices by the source mask is not supported. All other values enable it. |
Definition at line 787 of file interp_method_avg.c.


|
static |
|
static |
Computes barycentric weights for interpolation not allowing partial coverage.
This function calculates barycentric coordinates/weights for a target point with respect to source vertices of a cell. The weights can be used for interpolation purposes in the averaging interpolation method.
| [in] | tgt_coords | Target point coordinates |
| [in] | num_vertices | Number of source cell vertices |
| [in] | src_coords | Source vertex coordinates |
| [in] | src_mask | Source vertex mask |
| [out] | weights | Computed weights |
| [in] | cell_type | Type of the cell (supported: YAC_LON_LAT_CELL, YAC_GREAT_CIRCLE_CELL) |
Definition at line 962 of file interp_method_avg.c.


|
static |
Definition at line 665 of file interp_method_avg.c.


|
static |
Computes barycentric weights for interpolation allowing partial coverage.
This function calculates barycentric coordinates/weights for a target point with respect to source vertices of a cell. The weights can be used for interpolation purposes in the averaging interpolation method.
| [in] | tgt_coords | Target point coordinates |
| [in] | num_vertices | Number of source cell vertices |
| [in] | src_coords | Source vertex coordinates |
| [in] | src_mask | Source vertex mask |
| [out] | weights | Computed weights |
| [in] | cell_type | Type of the cell (supported: YAC_LON_LAT_CELL, YAC_GREAT_CIRCLE_CELL) |
Definition at line 932 of file interp_method_avg.c.


|
static |
Definition at line 487 of file interp_method_avg.c.


|
static |
Definition at line 425 of file interp_method_avg.c.


|
static |
Definition at line 1047 of file interp_method_avg.c.
|
static |
Definition at line 1036 of file interp_method_avg.c.
|
static |
Definition at line 1031 of file interp_method_avg.c.
|
static |
|
static |
Definition at line 1058 of file interp_method_avg.c.
|
static |
|
static |
Definition at line 1084 of file interp_method_avg.c.
|
static |
Definition at line 1068 of file interp_method_avg.c.
|
static |
Definition at line 1010 of file interp_method_avg.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 584 of file interp_method_avg.c.


|
inlinestatic |
|
static |
Definition at line 638 of file interp_method_avg.c.


|
static |
Definition at line 974 of file interp_method_avg.c.


| struct interp_method * yac_interp_method_avg_new | ( | enum yac_interp_avg_weight_type | weight_type, |
| int | partial_coverage ) |
Definition at line 997 of file interp_method_avg.c.


| struct yac_interp_method_config * yac_interp_method_config_avg_unpack | ( | void * | buffer, |
| int | buffer_size, | ||
| int * | position, | ||
| MPI_Comm | comm ) |
Unpacks an average interpolation method configuration from a buffer.
| [in] | buffer | Buffer containing the packed configuration data |
| [in] | buffer_size | Size of the buffer |
| [in,out] | position | Current position in the buffer (will be updated) |
| [in] | comm | MPI communicator for parallel unpacking |
Definition at line 1167 of file interp_method_avg.c.
| struct yac_interp_method_config * yac_interp_method_config_default_avg_new | ( | void | ) |
Creates an average interpolation method configuration with default parameters.
Definition at line 1155 of file interp_method_avg.c.
|
static |
Definition at line 35 of file interp_method_avg.c.
|
static |
Definition at line 1144 of file interp_method_avg.c.