YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_method_ncc.c File Reference
Include dependency graph for interp_method_ncc.c:

Go to the source code of this file.

Data Structures

struct  interp_method_ncc
 
struct  yac_interp_method_config_ncc
 Concrete implementation of yac_interp_method_config for the NCC method. More...
 

Typedefs

typedef int(* func_compute_weights) (double[3], size_t, yac_const_coordinate_pointer, int *, double *)
 

Functions

static size_t do_search_ncc (struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, struct yac_interp_weights *weights, int *interpolation_compelte)
 
static void delete_ncc (struct interp_method *method)
 
static size_t get_closest_src_corner (struct yac_const_basic_grid_data *grid_data, size_t cell, double const coord[3])
 
static int compute_weights_avg_yes (double tgt_coords[3], size_t num_src, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights)
 
static int compute_weights_avg_no (double tgt_coords[3], size_t num_src, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights)
 
static int compute_weights_dist_yes (double tgt_coords[3], size_t num_src, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights)
 
static int compute_weights_dist_no (double tgt_coords[3], size_t num_src, yac_const_coordinate_pointer src_coords, int *src_mask, double *weights)
 
static func_compute_weights select_compute_weight_routine (enum yac_interp_ncc_weight_type weight_type, int partial_coverage)
 
struct interp_methodyac_interp_method_ncc_new (enum yac_interp_ncc_weight_type weight_type, int partial_coverage)
 
static void config_ncc_delete (struct yac_interp_method_config *config)
 
static struct yac_interp_method_configconfig_ncc_copy (const struct yac_interp_method_config *config)
 
static int config_ncc_compare (void const *a_, void const *b_)
 
static size_t config_ncc_get_pack_size (struct yac_interp_method_config const *config, MPI_Comm comm)
 
static void config_ncc_pack (struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static enum yac_interpolation_list config_ncc_get_type ()
 
static struct interp_methodconfig_ncc_generate (struct yac_interp_method_config const *config)
 
static struct yac_paramconfig_ncc_get_param (struct yac_interp_method_config const *config)
 
struct yac_interp_method_configyac_interp_method_config_default_ncc_new (void)
 Creates a nearest-corner-cells interpolation method configuration with default parameters.
 
struct yac_interp_method_configyac_interp_method_config_ncc_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm)
 Unpacks a nearest-cell-centre interpolation method configuration from a buffer.
 

Variables

static struct interp_method_vtable interp_method_ncc_vtable
 
static struct yac_interp_method_config_vtable yac_interp_method_config_vtable_ncc
 

Typedef Documentation

◆ func_compute_weights

typedef int(* func_compute_weights) (double[3], size_t, yac_const_coordinate_pointer, int *, double *)

Definition at line 29 of file interp_method_ncc.c.

Function Documentation

◆ compute_weights_avg_no()

static int compute_weights_avg_no ( double tgt_coords[3],
size_t num_src,
yac_const_coordinate_pointer src_coords,
int * src_mask,
double * weights )
static

Definition at line 295 of file interp_method_ncc.c.

Here is the caller graph for this function:

◆ compute_weights_avg_yes()

static int compute_weights_avg_yes ( double tgt_coords[3],
size_t num_src,
yac_const_coordinate_pointer src_coords,
int * src_mask,
double * weights )
static

Definition at line 269 of file interp_method_ncc.c.

Here is the caller graph for this function:

◆ compute_weights_dist_no()

static int compute_weights_dist_no ( double tgt_coords[3],
size_t num_src,
yac_const_coordinate_pointer src_coords,
int * src_mask,
double * weights )
static

Definition at line 372 of file interp_method_ncc.c.

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

◆ compute_weights_dist_yes()

static int compute_weights_dist_yes ( double tgt_coords[3],
size_t num_src,
yac_const_coordinate_pointer src_coords,
int * src_mask,
double * weights )
static

Definition at line 313 of file interp_method_ncc.c.

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

◆ config_ncc_compare()

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

Definition at line 478 of file interp_method_ncc.c.

◆ config_ncc_copy()

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

Definition at line 468 of file interp_method_ncc.c.

◆ config_ncc_delete()

static void config_ncc_delete ( struct yac_interp_method_config * config)
static

Definition at line 463 of file interp_method_ncc.c.

◆ config_ncc_generate()

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

Definition at line 519 of file interp_method_ncc.c.

Here is the call graph for this function:

◆ config_ncc_get_pack_size()

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

Definition at line 490 of file interp_method_ncc.c.

◆ config_ncc_get_param()

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

Definition at line 528 of file interp_method_ncc.c.

Here is the call graph for this function:

◆ config_ncc_get_type()

static enum yac_interpolation_list config_ncc_get_type ( )
static

Definition at line 515 of file interp_method_ncc.c.

◆ config_ncc_pack()

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

Definition at line 500 of file interp_method_ncc.c.

◆ delete_ncc()

static void delete_ncc ( struct interp_method * method)
static

Definition at line 441 of file interp_method_ncc.c.

◆ do_search_ncc()

static size_t do_search_ncc ( struct interp_method * method,
struct yac_interp_grid * interp_grid,
size_t * tgt_points,
size_t count,
struct yac_interp_weights * weights,
int * interpolation_compelte )
static

Definition at line 78 of file interp_method_ncc.c.

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

◆ get_closest_src_corner()

static size_t get_closest_src_corner ( struct yac_const_basic_grid_data * grid_data,
size_t cell,
double const coord[3] )
static

Definition at line 45 of file interp_method_ncc.c.

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

◆ select_compute_weight_routine()

static func_compute_weights select_compute_weight_routine ( enum yac_interp_ncc_weight_type weight_type,
int partial_coverage )
static

Definition at line 409 of file interp_method_ncc.c.

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

◆ yac_interp_method_config_default_ncc_new()

struct yac_interp_method_config * yac_interp_method_config_default_ncc_new ( void )

Creates a nearest-corner-cells interpolation method configuration with default parameters.

Returns
Pointer to the created yac_interp_method_config structure

Definition at line 584 of file interp_method_ncc.c.

◆ yac_interp_method_config_ncc_unpack()

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

Unpacks a nearest-cell-centre 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 595 of file interp_method_ncc.c.

◆ yac_interp_method_ncc_new()

struct interp_method * yac_interp_method_ncc_new ( enum yac_interp_ncc_weight_type weight_type,
int partial_coverage )

Definition at line 428 of file interp_method_ncc.c.

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

Variable Documentation

◆ interp_method_ncc_vtable

struct interp_method_vtable interp_method_ncc_vtable
static
Initial value:
= {
.do_search = do_search_ncc,
.delete = delete_ncc}
static void delete_ncc(struct interp_method *method)
static size_t do_search_ncc(struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, struct yac_interp_weights *weights, int *interpolation_compelte)

Definition at line 33 of file interp_method_ncc.c.

◆ yac_interp_method_config_vtable_ncc

struct yac_interp_method_config_vtable yac_interp_method_config_vtable_ncc
static
Initial value:
= {
.delete = config_ncc_delete,
.copy = config_ncc_copy,
.compare = config_ncc_compare,
.get_pack_size = config_ncc_get_pack_size,
.pack = config_ncc_pack,
.get_type = config_ncc_get_type,
.generate = config_ncc_generate,
.get_param = config_ncc_get_param
}
static struct yac_param * config_ncc_get_param(struct yac_interp_method_config const *config)
static int config_ncc_compare(void const *a_, void const *b_)
static size_t config_ncc_get_pack_size(struct yac_interp_method_config const *config, MPI_Comm comm)
static void config_ncc_delete(struct yac_interp_method_config *config)
static struct interp_method * config_ncc_generate(struct yac_interp_method_config const *config)
static enum yac_interpolation_list config_ncc_get_type()
static struct yac_interp_method_config * config_ncc_copy(const struct yac_interp_method_config *config)
static void config_ncc_pack(struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm)

Definition at line 573 of file interp_method_ncc.c.