YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions | Variables
interp_method_callback.c File Reference
#include "config.h"
#include <string.h>
#include "interp_method_internal.h"
#include "utils_core.h"
#include "yac_mpi_internal.h"
#include "ensure_array_size.h"
#include "interp_method_callback.h"
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
 

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)
 
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_get_compute_weights_callback (char const *key, yac_func_compute_weights *compute_weights_callback, void **user_data)
 

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
 

Typedef Documentation

◆ func_dummy

typedef void(* func_dummy) (void)

Definition at line 450 of file interp_method_callback.c.

Function Documentation

◆ delete_callback()

static void delete_callback ( struct interp_method method)
static

Definition at line 446 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 
)
static

Definition at line 122 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 42 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 90 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 67 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 459 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 483 of file interp_method_callback.c.

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 a 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
Examples
test_interp_method_callback_parallel.c.

Definition at line 434 of file interp_method_callback.c.

Here is the caller graph for this function:

Variable Documentation

◆ callback

Definition at line 452 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 456 of file interp_method_callback.c.

◆ callback_lookup_table_size

size_t callback_lookup_table_size = 0
static

Definition at line 457 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 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)
static void delete_callback(struct interp_method *method)

Definition at line 31 of file interp_method_callback.c.

◆ key

char* key

Definition at line 454 of file interp_method_callback.c.

◆ user_data

void* user_data