YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_method_utils.c File Reference
#include "config.h"
#include <math.h>
#include "interpolation/methods/interp_method_utils.h"
#include "geometry.h"
#include "yac_assert.h"
#include "yac_lapack_interface.h"
Include dependency graph for interp_method_utils.c:

Go to the source code of this file.

Macros

#define GAUSS_WEIGHT_SUM_TOL   (1e-9)
 

Functions

void yac_interp_compute_weights_avg (double tgt_coord[3], yac_const_coordinate_pointer src_coords, size_t const n, double *weights, double const dummy)
 
void yac_interp_compute_weights_dist (double tgt_coord[3], yac_const_coordinate_pointer src_coords, size_t const n, double *weights, double const dummy)
 
void yac_interp_compute_weights_gauss (double tgt_coord[3], yac_const_coordinate_pointer src_coords, size_t const n, double *weights, double const gauss_scale)
 
static void inverse (double *A, size_t n)
 
void yac_interp_compute_weights_rbf (double tgt_coord[3], yac_const_coordinate_pointer src_coords, size_t const n, double *weights, double const rbf_scale)
 

Macro Definition Documentation

◆ GAUSS_WEIGHT_SUM_TOL

#define GAUSS_WEIGHT_SUM_TOL   (1e-9)

Definition at line 17 of file interp_method_utils.c.

Function Documentation

◆ inverse()

static void inverse ( double * A,
size_t n )
static

Definition at line 121 of file interp_method_utils.c.

Here is the caller graph for this function:

◆ yac_interp_compute_weights_avg()

void yac_interp_compute_weights_avg ( double tgt_coord[3],
yac_const_coordinate_pointer src_coords,
size_t const n,
double * weights,
double const dummy )

Computes equal weights (simple average)

Parameters
[in]tgt_coordtarget coordinate (unused)
[in]src_coordssource coordinates (unused)
[in]nnumber of source points
[out]weightsweights array (size n)
[in]dummydummy parameter (unused)

Definition at line 19 of file interp_method_utils.c.

Here is the caller graph for this function:

◆ yac_interp_compute_weights_dist()

void yac_interp_compute_weights_dist ( double tgt_coord[3],
yac_const_coordinate_pointer src_coords,
size_t const n,
double * weights,
double const dummy )

Computes inverse distance weighted average

Parameters
[in]tgt_coordtarget coordinate
[in]src_coordssource coordinates
[in]nnumber of source points
[out]weightsweights array (size n)
[in]dummydummy parameter (unused)

Definition at line 31 of file interp_method_utils.c.

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

◆ yac_interp_compute_weights_gauss()

void yac_interp_compute_weights_gauss ( double tgt_coord[3],
yac_const_coordinate_pointer src_coords,
size_t const n,
double * weights,
double const gauss_scale )

Computes Gauss weighted average

Parameters
[in]tgt_coordtarget coordinate
[in]src_coordssource coordinates
[in]nnumber of source points
[out]weightsweights array (size n)
[in]gauss_scalescale factor for Gauss weighting

Definition at line 59 of file interp_method_utils.c.

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

◆ yac_interp_compute_weights_rbf()

void yac_interp_compute_weights_rbf ( double tgt_coord[3],
yac_const_coordinate_pointer src_coords,
size_t const n,
double * weights,
double const rbf_scale )

Computes radial basis function (RBF) weighted average

Parameters
[in]tgt_coordtarget coordinate
[in]src_coordssource coordinates
[in]nnumber of source points
[out]weightsweights array (size n)
[in]rbf_scalescale factor for RBF weighting

Definition at line 160 of file interp_method_utils.c.

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