YetAnotherCoupler 3.2.0_a
|
#include "config.h"
#include <float.h>
#include <string.h>
#include "interp_method_internal.h"
#include "interp_method_spmap.h"
#include "ensure_array_size.h"
#include "area.h"
Go to the source code of this file.
Data Structures | |
struct | interp_method_spmap |
Macros | |
#define | COMPUTE_CELL_AREA(PREFIX, IDX) |
#define | NO_COMPUTE_CELL_AREA(PREFIX, IDX) |
#define | SCALE_WEIGHTS(COMPUTE_SRC_CELL_AREA, COMPUTE_TGT_CELL_AREA, SRC_CELL_AREA, TGT_CELL_AREA) |
Functions | |
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) |
static void | delete_spmap (struct interp_method *method) |
static int | compare_size_t (const void *a, const void *b) |
static int | lists_overlap (size_t *list_a, size_t count_a, size_t *list_b, size_t count_b) |
static void | merge_lists (size_t *list, size_t *list_size, size_t *insert, size_t insert_size) |
static void | check_spread_distance (yac_const_coordinate_pointer tgt_field_coords, double max_distance, size_t tgt_start_point, size_t *tgt_points, size_t *count) |
static void | remove_disconnected_points (struct yac_interp_grid *interp_grid, size_t tgt_start_point, size_t *from_tgt_points, size_t *to_tgt_points, size_t *count, int *flag, size_t *temp_cell_edges, size_t **edges_buffer, size_t *edges_buffer_array_size) |
static size_t | check_tgt_result_points (struct yac_interp_grid *interp_grid, double 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 void | check_max_search_distance (struct yac_interp_grid *interp_grid, double max_search_distance, size_t *num_src_points_, size_t *src_points, yac_coordinate_pointer src_coords, size_t *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 spread_tgt_result_points) |
static void | scale_weights (struct yac_interp_grid *interp_grid, enum yac_interp_spmap_scale_type scale_type, double src_area_scale, double tgt_area_scale, size_t num_src_points, size_t const *src_points, size_t const *num_tgt_per_src, size_t const *tgt_points, double *weights) |
static void | spread_src_data (struct yac_interp_grid *interp_grid, double spread_distance, enum yac_interp_spmap_weight_type weight_type, enum yac_interp_spmap_scale_type scale_type, double src_area_scale, double tgt_area_scale, size_t num_src_points, size_t **src_points_, size_t **tgt_result_points_, double **weights_, size_t *total_num_weights_) |
struct interp_method * | yac_interp_method_spmap_new (double spread_distance, double max_search_distance, enum yac_interp_spmap_weight_type weight_type, enum yac_interp_spmap_scale_type scale_type, double src_sphere_radius, double tgt_sphere_radius) |
Variables | |
static struct interp_method_vtable | interp_method_spmap_vtable |
#define COMPUTE_CELL_AREA | ( | PREFIX, | |
IDX | |||
) |
#define NO_COMPUTE_CELL_AREA | ( | PREFIX, | |
IDX | |||
) |
#define SCALE_WEIGHTS | ( | COMPUTE_SRC_CELL_AREA, | |
COMPUTE_TGT_CELL_AREA, | |||
SRC_CELL_AREA, | |||
TGT_CELL_AREA | |||
) |
|
static |
Definition at line 240 of file interp_method_spmap.c.
|
static |
Definition at line 87 of file interp_method_spmap.c.
|
static |
Definition at line 176 of file interp_method_spmap.c.
|
inlinestatic |
|
static |
Definition at line 265 of file interp_method_spmap.c.
|
static |
Definition at line 670 of file interp_method_spmap.c.
|
static |
|
static |
|
static |
Definition at line 66 of file interp_method_spmap.c.
|
static |
Definition at line 104 of file interp_method_spmap.c.
|
static |
Definition at line 339 of file interp_method_spmap.c.
|
static |
Definition at line 412 of file interp_method_spmap.c.
struct interp_method * yac_interp_method_spmap_new | ( | double | spread_distance, |
double | max_search_distance, | ||
enum yac_interp_spmap_weight_type | weight_type, | ||
enum yac_interp_spmap_scale_type | scale_type, | ||
double | src_sphere_radius, | ||
double | tgt_sphere_radius | ||
) |
Constructor for a 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.
[in] | spread_distance | spreading distance |
[in] | max_search_distance | maximum search distance |
[in] | weight_type | weighting type |
[in] | scale_type | scaling type |
[in] | src_sphere_radius | sphere radius used for source cell area computation |
[in] | tgt_sphere_radius | sphere radius used for target cell area computation |
Definition at line 631 of file interp_method_spmap.c.
|
static |
Definition at line 25 of file interp_method_spmap.c.