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

Go to the source code of this file.

Data Structures

struct  tgt_request_data
 
struct  interp_method_callback
 
struct  yac_interp_method_config_callback
 Concrete implementation of yac_interp_method_config for the callback method. More...
 

Typedefs

typedef void(* func_dummy) (void)
 

Functions

static size_t do_search_callback (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_callback (struct interp_method *method)
 
static void get_orig_data (struct remote_point const *remote_point, int *owner_rank, size_t *orig_pos)
 
static MPI_Datatype yac_get_request_data_mpi_datatype (MPI_Comm comm)
 
static size_t get_valid_results (size_t *src_cells, size_t count, size_t *tgt_points)
 
struct interp_methodyac_interp_method_callback_new (yac_func_compute_weights compute_weights_callback, void *user_data)
 
void yac_interp_method_callback_add_compute_weights_callback (yac_func_compute_weights compute_weights_callback, void *user_data, char const *key)
 
void yac_interp_method_callback_buf_free ()
 
void yac_interp_method_callback_get_compute_weights_callback (char const *key, yac_func_compute_weights *compute_weights_callback, void **user_data)
 
static void config_callback_delete (struct yac_interp_method_config *config)
 
static struct yac_interp_method_configconfig_callback_copy (const struct yac_interp_method_config *config)
 
static int config_callback_compare (void const *a_, void const *b_)
 
static size_t config_callback_get_pack_size (struct yac_interp_method_config const *config, MPI_Comm comm)
 
static void config_callback_pack (struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static enum yac_interpolation_list config_callback_get_type ()
 
static struct interp_methodconfig_callback_generate (struct yac_interp_method_config const *config)
 
static struct yac_paramconfig_callback_get_param (struct yac_interp_method_config const *config)
 
struct yac_interp_method_configyac_interp_method_config_default_callback_new (void)
 Creates a callback interpolation method configuration with default parameters.
 
struct yac_interp_method_configyac_interp_method_config_callback_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm)
 Unpacks a callback interpolation method configuration from a buffer.
 

Variables

static struct interp_method_vtable interp_method_callback_vtable
 
struct { 
 
   yac_func_compute_weights   callback 
 
   void *   user_data 
 
   char *   key 
 
} * callback_lookup_table = NULL 
 
static size_t callback_lookup_table_array_size = 0
 
static size_t callback_lookup_table_size = 0
 
static struct yac_interp_method_config_vtable yac_interp_method_config_vtable_callback
 

Typedef Documentation

◆ func_dummy

typedef void(* func_dummy) (void)

Definition at line 467 of file interp_method_callback.c.

Function Documentation

◆ config_callback_compare()

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

Definition at line 583 of file interp_method_callback.c.

◆ config_callback_copy()

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

Definition at line 571 of file interp_method_callback.c.

◆ config_callback_delete()

static void config_callback_delete ( struct yac_interp_method_config * config)
static

Definition at line 563 of file interp_method_callback.c.

◆ config_callback_generate()

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

Definition at line 618 of file interp_method_callback.c.

Here is the call graph for this function:

◆ config_callback_get_pack_size()

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

Definition at line 593 of file interp_method_callback.c.

Here is the call graph for this function:

◆ config_callback_get_param()

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

Definition at line 631 of file interp_method_callback.c.

Here is the call graph for this function:

◆ config_callback_get_type()

static enum yac_interpolation_list config_callback_get_type ( )
static

Definition at line 614 of file interp_method_callback.c.

◆ config_callback_pack()

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

Definition at line 602 of file interp_method_callback.c.

Here is the call graph for this function:

◆ delete_callback()

static void delete_callback ( struct interp_method * method)
static

Definition at line 463 of file interp_method_callback.c.

◆ do_search_callback()

static size_t do_search_callback ( 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 133 of file interp_method_callback.c.

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

◆ get_orig_data()

static void get_orig_data ( struct remote_point const * remote_point,
int * owner_rank,
size_t * orig_pos )
static

Definition at line 48 of file interp_method_callback.c.

Here is the caller graph for this function:

◆ get_valid_results()

static size_t get_valid_results ( size_t * src_cells,
size_t count,
size_t * tgt_points )
static

Definition at line 101 of file interp_method_callback.c.

Here is the caller graph for this function:

◆ yac_get_request_data_mpi_datatype()

static MPI_Datatype yac_get_request_data_mpi_datatype ( MPI_Comm comm)
static

Definition at line 78 of file interp_method_callback.c.

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

◆ yac_interp_method_callback_add_compute_weights_callback()

void yac_interp_method_callback_add_compute_weights_callback ( yac_func_compute_weights compute_weights_callback,
void * user_data,
char const * key )

sets a weight computation routine that can afterwards be retrieved by yac_interp_method_callback_get_compute_weights_callback

Parameters
[in]compute_weights_callbackpointer to a weight computation routine
[in]user_datadata pointer that will be passed to compute_weights_callback
[in]keykey that can afterwards be used to retrieve the provided pointers

Definition at line 476 of file interp_method_callback.c.

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

◆ yac_interp_method_callback_buf_free()

void yac_interp_method_callback_buf_free ( )

free internal array with provided pointers to callback routines

Definition at line 514 of file interp_method_callback.c.

Here is the caller graph for this function:

◆ yac_interp_method_callback_get_compute_weights_callback()

void yac_interp_method_callback_get_compute_weights_callback ( char const * key,
yac_func_compute_weights * compute_weights_callback,
void ** user_data )

retrieves a compute_weights_callback pointer that was set by yac_interp_method_callback_add_compute_weights_callback

Parameters
[in]keykey that identifies the pointers that are to be retrieved
[out]compute_weights_callbackpointer to a weight computation routine
[out]user_datadata pointer that was provided together with the function pointer

Definition at line 524 of file interp_method_callback.c.

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

◆ yac_interp_method_callback_new()

struct interp_method * yac_interp_method_callback_new ( yac_func_compute_weights compute_weights_callback,
void * user_data )

constructor for an interpolation method of type interp_method_callback

Parameters
[in]compute_weights_callbackpointer to routine that is used by YAC to compute the weights
[in]user_datadata pointer associated to the function pointer
Returns
returns a pointer to an interpolation method

Definition at line 451 of file interp_method_callback.c.

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

◆ yac_interp_method_config_callback_unpack()

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

Unpacks a callback 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 692 of file interp_method_callback.c.

Here is the call graph for this function:

◆ yac_interp_method_config_default_callback_new()

struct yac_interp_method_config * yac_interp_method_config_default_callback_new ( void )

Creates a callback interpolation method configuration with default parameters.

Returns
Pointer to the created yac_interp_method_config structure

Definition at line 679 of file interp_method_callback.c.

Variable Documentation

◆ callback

Definition at line 469 of file interp_method_callback.c.

◆ [struct]

struct { ... } * callback_lookup_table

◆ callback_lookup_table_array_size

size_t callback_lookup_table_array_size = 0
static

Definition at line 473 of file interp_method_callback.c.

◆ callback_lookup_table_size

size_t callback_lookup_table_size = 0
static

Definition at line 474 of file interp_method_callback.c.

◆ interp_method_callback_vtable

struct interp_method_vtable interp_method_callback_vtable
static
Initial value:
= {
.do_search = do_search_callback,
.delete = delete_callback}
static void delete_callback(struct interp_method *method)
static size_t do_search_callback(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)

Definition at line 37 of file interp_method_callback.c.

◆ key

char* key

Definition at line 471 of file interp_method_callback.c.

◆ user_data

void* user_data

Definition at line 470 of file interp_method_callback.c.

◆ yac_interp_method_config_vtable_callback

struct yac_interp_method_config_vtable yac_interp_method_config_vtable_callback
static
Initial value:
= {
}
static void config_callback_delete(struct yac_interp_method_config *config)
static int config_callback_compare(void const *a_, void const *b_)
static struct interp_method * config_callback_generate(struct yac_interp_method_config const *config)
static void config_callback_pack(struct yac_interp_method_config const *config, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static struct yac_interp_method_config * config_callback_copy(const struct yac_interp_method_config *config)
static enum yac_interpolation_list config_callback_get_type()
static struct yac_param * config_callback_get_param(struct yac_interp_method_config const *config)
static size_t config_callback_get_pack_size(struct yac_interp_method_config const *config, MPI_Comm comm)

Definition at line 668 of file interp_method_callback.c.