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

Go to the source code of this file.

Data Structures

struct  interp_method_file
 
struct  link_data
 
struct  fixed_data
 
struct  temp_fixed_data
 
struct  temp_result
 
struct  yac_interp_method_config_file
 Concrete implementation of yac_interp_method_config for the file method. More...
 

Functions

static size_t do_search_file (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_file (struct interp_method *method)
 
static void read_weight_file (char const *weight_file_name, MPI_Comm comm, char const *src_grid_name, char const *tgt_grid_name, enum yac_location *src_locations, enum yac_location tgt_location, size_t num_src_fields, struct link_data **links, size_t *num_links, struct fixed_data **fixed, size_t *num_fixed)
 
static int compute_bucket (yac_int value, int comm_size)
 
static int get_tgt_pack_size (MPI_Comm comm)
 
static int get_link_pack_size (MPI_Comm comm)
 
static int get_fixed_pack_size (MPI_Comm comm)
 
static void pack_tgt (yac_int global_tgt_id, void *buffer, int buffer_size, MPI_Comm comm)
 
static void pack_link (struct link_data *link, void *buffer, int buffer_size, MPI_Comm comm)
 
static void pack_fixed (double fixed_value, yac_int global_tgt_id, void *buffer, int buffer_size, MPI_Comm comm)
 
static void unpack_tgt (void *buffer, int buffer_size, yac_int *global_tgt_id, MPI_Comm comm)
 
static void unpack_link (void *buffer, int buffer_size, struct link_data *link, MPI_Comm comm)
 
static void unpack_fixed (void *buffer, int buffer_size, struct temp_fixed_data *fixed, MPI_Comm comm)
 
static int compare_temp_result_tgt (void const *a, void const *b)
 
static int compare_link_data_tgt (void const *a, void const *b)
 
static int compare_temp_result_type (void const *a, void const *b)
 
static int compare_temp_result_fixed (void const *a, void const *b)
 
static int compare_temp_result_reorder_idx (void const *a, void const *b)
 
static int compare_temp_fixed_data_tgt (void const *a, void const *b)
 
static int get_temp_result_pack_size (struct temp_result *result, MPI_Comm comm)
 
static void pack_temp_result (struct temp_result *result, void *buffer, int buffer_size, MPI_Comm comm)
 
static void unpack_temp_result (void *buffer, int buffer_size, struct temp_result *result, MPI_Comm comm)
 
static void redist_weight_file_data (struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t tgt_count, size_t *num_interpolated_points, struct link_data **links, size_t *num_links, struct fixed_data **fixed, size_t *num_fixed)
 
static int compare_link_data_field_idx_src (void const *a, void const *b)
 
static int compare_link_data_tgt_src_mask (void const *a, void const *b)
 
static int compare_link_data_tgt_src_field_src_id (void const *a, void const *b)
 
struct interp_methodyac_interp_method_file_new (char const *weight_file_name, enum yac_interp_file_on_missing_file on_missing_file, enum yac_interp_file_on_success on_success)
 
static void config_file_delete (struct yac_interp_method_config *config)
 
static struct yac_interp_method_configconfig_file_copy (const struct yac_interp_method_config *config)
 
static int config_file_compare (void const *a_, void const *b_)
 
static enum yac_interpolation_list config_file_get_type ()
 
static struct interp_methodconfig_file_generate (struct yac_interp_method_config const *config)
 
static struct yac_paramconfig_file_get_param (struct yac_interp_method_config const *config)
 
struct yac_interp_method_configyac_interp_method_config_default_file_new (void)
 Creates a file-based interpolation method configuration with default parameters.
 

Variables

static struct interp_method_vtable interp_method_file_vtable
 
static struct yac_interp_method_config_vtable yac_interp_method_config_vtable_file
 

Function Documentation

◆ compare_link_data_field_idx_src()

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

Definition at line 1206 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_link_data_tgt()

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

Definition at line 609 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_link_data_tgt_src_field_src_id()

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

Definition at line 1239 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_link_data_tgt_src_mask()

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

Definition at line 1221 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_temp_fixed_data_tgt()

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

Definition at line 644 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_temp_result_fixed()

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

Definition at line 626 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_temp_result_reorder_idx()

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

Definition at line 635 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_temp_result_tgt()

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

Definition at line 600 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compare_temp_result_type()

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

Definition at line 618 of file interp_method_file.c.

Here is the caller graph for this function:

◆ compute_bucket()

static int compute_bucket ( yac_int value,
int comm_size )
inlinestatic

Definition at line 472 of file interp_method_file.c.

Here is the caller graph for this function:

◆ config_file_compare()

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

Definition at line 1658 of file interp_method_file.c.

◆ config_file_copy()

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

Definition at line 1646 of file interp_method_file.c.

◆ config_file_delete()

static void config_file_delete ( struct yac_interp_method_config * config)
static

Definition at line 1638 of file interp_method_file.c.

◆ config_file_generate()

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

Definition at line 1676 of file interp_method_file.c.

Here is the call graph for this function:

◆ config_file_get_param()

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

Definition at line 1686 of file interp_method_file.c.

Here is the call graph for this function:

◆ config_file_get_type()

static enum yac_interpolation_list config_file_get_type ( )
static

Definition at line 1672 of file interp_method_file.c.

◆ delete_file()

static void delete_file ( struct interp_method * method)
static

Definition at line 1613 of file interp_method_file.c.

◆ do_search_file()

static size_t do_search_file ( 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

Definition at line 1262 of file interp_method_file.c.

Here is the call graph for this function:

◆ get_fixed_pack_size()

static int get_fixed_pack_size ( MPI_Comm comm)
static

Definition at line 500 of file interp_method_file.c.

Here is the caller graph for this function:

◆ get_link_pack_size()

static int get_link_pack_size ( MPI_Comm comm)
static

Definition at line 483 of file interp_method_file.c.

Here is the caller graph for this function:

◆ get_temp_result_pack_size()

static int get_temp_result_pack_size ( struct temp_result * result,
MPI_Comm comm )
static

Definition at line 653 of file interp_method_file.c.

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

◆ get_tgt_pack_size()

static int get_tgt_pack_size ( MPI_Comm comm)
static

Definition at line 476 of file interp_method_file.c.

Here is the caller graph for this function:

◆ pack_fixed()

static void pack_fixed ( double fixed_value,
yac_int global_tgt_id,
void * buffer,
int buffer_size,
MPI_Comm comm )
static

Definition at line 545 of file interp_method_file.c.

Here is the caller graph for this function:

◆ pack_link()

static void pack_link ( struct link_data * link,
void * buffer,
int buffer_size,
MPI_Comm comm )
static

Definition at line 525 of file interp_method_file.c.

Here is the caller graph for this function:

◆ pack_temp_result()

static void pack_temp_result ( struct temp_result * result,
void * buffer,
int buffer_size,
MPI_Comm comm )
static

Definition at line 700 of file interp_method_file.c.

Here is the caller graph for this function:

◆ pack_tgt()

static void pack_tgt ( yac_int global_tgt_id,
void * buffer,
int buffer_size,
MPI_Comm comm )
static

Definition at line 516 of file interp_method_file.c.

Here is the caller graph for this function:

◆ read_weight_file()

static void read_weight_file ( char const * weight_file_name,
MPI_Comm comm,
char const * src_grid_name,
char const * tgt_grid_name,
enum yac_location * src_locations,
enum yac_location tgt_location,
size_t num_src_fields,
struct link_data ** links,
size_t * num_links,
struct fixed_data ** fixed,
size_t * num_fixed )
static

Definition at line 91 of file interp_method_file.c.

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

◆ redist_weight_file_data()

static void redist_weight_file_data ( struct yac_interp_grid * interp_grid,
size_t * tgt_points,
size_t tgt_count,
size_t * num_interpolated_points,
struct link_data ** links,
size_t * num_links,
struct fixed_data ** fixed,
size_t * num_fixed )
static

Definition at line 821 of file interp_method_file.c.

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

◆ unpack_fixed()

static void unpack_fixed ( void * buffer,
int buffer_size,
struct temp_fixed_data * fixed,
MPI_Comm comm )
static

Definition at line 587 of file interp_method_file.c.

Here is the caller graph for this function:

◆ unpack_link()

static void unpack_link ( void * buffer,
int buffer_size,
struct link_data * link,
MPI_Comm comm )
static

Definition at line 567 of file interp_method_file.c.

Here is the caller graph for this function:

◆ unpack_temp_result()

static void unpack_temp_result ( void * buffer,
int buffer_size,
struct temp_result * result,
MPI_Comm comm )
static

Definition at line 755 of file interp_method_file.c.

Here is the caller graph for this function:

◆ unpack_tgt()

static void unpack_tgt ( void * buffer,
int buffer_size,
yac_int * global_tgt_id,
MPI_Comm comm )
static

Definition at line 558 of file interp_method_file.c.

Here is the caller graph for this function:

◆ yac_interp_method_config_default_file_new()

struct yac_interp_method_config * yac_interp_method_config_default_file_new ( void )

Creates a file-based interpolation method configuration with default parameters.

Returns
Pointer to the created yac_interp_method_config structure

Definition at line 1761 of file interp_method_file.c.

◆ yac_interp_method_file_new()

struct interp_method * yac_interp_method_file_new ( char const * weight_file_name,
enum yac_interp_file_on_missing_file on_missing_file,
enum yac_interp_file_on_success on_success )

Construtor for an interpolation method that reads in a weight file

Parameters
[in]weight_file_namename of the weight file
[in]on_missing_filespecifies how YAC should behave if no file was found
[in]on_successspecifies how YAC should behave in case a weight file was successfully read

Definition at line 1595 of file interp_method_file.c.

Here is the caller graph for this function:

Variable Documentation

◆ interp_method_file_vtable

struct interp_method_vtable interp_method_file_vtable
static
Initial value:
= {
.do_search = do_search_file,
.delete = delete_file}
static size_t do_search_file(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_file(struct interp_method *method)

Definition at line 32 of file interp_method_file.c.

◆ yac_interp_method_config_vtable_file

struct yac_interp_method_config_vtable yac_interp_method_config_vtable_file
static
Initial value:
= {
.delete = config_file_delete,
.compare = config_file_compare,
.get_type = config_file_get_type,
.generate = config_file_generate,
.get_param = config_file_get_param
}
static int config_file_compare(void const *a_, void const *b_)
static struct yac_param * config_file_get_param(struct yac_interp_method_config const *config)
static struct yac_interp_method_config * config_file_copy(const struct yac_interp_method_config *config)
static enum yac_interpolation_list config_file_get_type()
static void config_file_delete(struct yac_interp_method_config *config)
static struct interp_method * config_file_generate(struct yac_interp_method_config const *config)

Definition at line 1752 of file interp_method_file.c.