YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_method_dnn.h File Reference
Include dependency graph for interp_method_dnn.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yac_interp_method_dnn_config_search_distance
 
struct  yac_interp_method_dnn_config
 

Macros

#define YAC_INTERP_DNN_DUMMY_SCALE   (0.0)
 
#define YAC_INTERP_DNN_GAUSS_SCALE_DEFAULT   (0.1)
 
#define YAC_INTERP_DNN_RBF_SCALE_DEFAULT   (1.487973e+01)
 
#define YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED_DEFAULT   (0.0)
 
#define YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT   (1.0)
 
#define YAC_INTERP_DNN_WEIGHT_DEFAULT   (YAC_INTERP_DNN_WEIGHT_DIST)
 
#define YAC_INTERP_DNN_SEARCH_DISTANCE_TYPE_DEFAULT   (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA)
 
#define YAC_INTERP_DNN_SEARCH_DISTANCE_DEFAULT   (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT)
 
#define YAC_INTERP_DNN_SCALE_DEFAULT   (YAC_INTERP_DNN_DUMMY_SCALE)
 

Enumerations

enum  yac_interp_dnn_weight_type { YAC_INTERP_DNN_WEIGHT_AVG = 0 , YAC_INTERP_DNN_WEIGHT_DIST = 1 , YAC_INTERP_DNN_WEIGHT_GAUSS = 2 , YAC_INTERP_DNN_WEIGHT_RBF = 3 }
 
enum  yac_interp_dnn_search_distance_type { YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED = 0 , YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA = 1 , YAC_INTERP_DNN_SEARCH_DISTANCE_UNDEFINED = 2 }
 

Functions

struct interp_methodyac_interp_method_dnn_new (struct yac_interp_method_dnn_config config)
 
struct yac_interp_method_configyac_interp_method_config_dnn_unpack (void *buffer, int buffer_size, int *position, MPI_Comm comm)
 Unpacks a distance-to-nearest-neighbor interpolation method configuration from a buffer.
 
struct yac_interp_method_configyac_interp_method_config_default_dnn_new (void)
 Creates a distance-nearest-neighbour (DNN) interpolation method configuration with default parameters.
 

Macro Definition Documentation

◆ YAC_INTERP_DNN_DUMMY_SCALE

#define YAC_INTERP_DNN_DUMMY_SCALE   (0.0)

Definition at line 37 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_GAUSS_SCALE_DEFAULT

#define YAC_INTERP_DNN_GAUSS_SCALE_DEFAULT   (0.1)

Definition at line 40 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_RBF_SCALE_DEFAULT

#define YAC_INTERP_DNN_RBF_SCALE_DEFAULT   (1.487973e+01)

Definition at line 41 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_SCALE_DEFAULT

#define YAC_INTERP_DNN_SCALE_DEFAULT   (YAC_INTERP_DNN_DUMMY_SCALE)

Definition at line 52 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT

#define YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT   (1.0)

Definition at line 44 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_SEARCH_DISTANCE_DEFAULT

#define YAC_INTERP_DNN_SEARCH_DISTANCE_DEFAULT   (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT)

Definition at line 51 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED_DEFAULT

#define YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED_DEFAULT   (0.0)

Definition at line 43 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_SEARCH_DISTANCE_TYPE_DEFAULT

#define YAC_INTERP_DNN_SEARCH_DISTANCE_TYPE_DEFAULT   (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA)

Definition at line 50 of file interp_method_dnn.h.

◆ YAC_INTERP_DNN_WEIGHT_DEFAULT

#define YAC_INTERP_DNN_WEIGHT_DEFAULT   (YAC_INTERP_DNN_WEIGHT_DIST)

Definition at line 49 of file interp_method_dnn.h.

Enumeration Type Documentation

◆ yac_interp_dnn_search_distance_type

Method for determining the search distance

Enumerator
YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED 

use a fixed search distance (in radians)

YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA 

compute search distance from target cell area: polar angle of a spherical cap with the same area as the target cell, multiplied by a scale factor

YAC_INTERP_DNN_SEARCH_DISTANCE_UNDEFINED 

undefined search distance type

Definition at line 25 of file interp_method_dnn.h.

◆ yac_interp_dnn_weight_type

Weighting type for distance-nearest-neighbour interpolation

Enumerator
YAC_INTERP_DNN_WEIGHT_AVG 

average of source points within search distance

YAC_INTERP_DNN_WEIGHT_DIST 

distance weighted average of source points

YAC_INTERP_DNN_WEIGHT_GAUSS 

Gauss weighted average of source points.

YAC_INTERP_DNN_WEIGHT_RBF 

radial basis function weighted average

Definition at line 15 of file interp_method_dnn.h.

Function Documentation

◆ yac_interp_method_config_default_dnn_new()

struct yac_interp_method_config * yac_interp_method_config_default_dnn_new ( void )

Creates a distance-nearest-neighbour (DNN) interpolation method configuration with default parameters.

Returns
Pointer to the created yac_interp_method_config structure

Definition at line 793 of file interp_method_dnn.c.

◆ yac_interp_method_config_dnn_unpack()

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

Unpacks a distance-to-nearest-neighbor 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 854 of file interp_method_dnn.c.

Here is the call graph for this function:

◆ yac_interp_method_dnn_new()

struct interp_method * yac_interp_method_dnn_new ( struct yac_interp_method_dnn_config config)

Creates a distance-nearest-neighbour (DNN) interpolation method.

DNN interpolates target points using all source points located within a given search distance (bounding circle) around each target point.

The search distance can be either:

  • A fixed value in radians (YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED)
  • Computed from the target cell area (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA): The polar angle of a spherical cap with the same area as the target cell, multiplied by search_distance_scale.
Parameters
[in]configconfiguration for the interpolation method
Returns
interpolation method
Remarks
Target points for which no source points are found within the search distance will not be interpolated by this method.
When using YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA, the target field location must be YAC_LOC_CELL.

Definition at line 301 of file interp_method_dnn.c.

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