YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_method_dnn.h
Go to the documentation of this file.
1// Copyright (c) 2026 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef INTERP_METHOD_DNN_H
6#define INTERP_METHOD_DNN_H
7
9
10// YAC PUBLIC HEADER START
11
21
34
35// Default scaling values to be used if weight type is neither GAUSS nor RBF,
36// to avoid uninitialized values in the config struct
37#define YAC_INTERP_DNN_DUMMY_SCALE (0.0)
38
39// Default scale values for gauss and rbf weight method
40#define YAC_INTERP_DNN_GAUSS_SCALE_DEFAULT (0.1)
41#define YAC_INTERP_DNN_RBF_SCALE_DEFAULT (1.487973e+01)
42
43#define YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED_DEFAULT (0.0)
44#define YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT (1.0)
45
46// by default a single source point within the search distance is sufficient
47// to interpolate a target point
48#define YAC_INTERP_DNN_N_MIN_DEFAULT (1)
49
50// Cell area is the default search distance type, because there is no fixed
51// search distance that works well for all cases. The cell area-based search distance adapts to
52// the local grid resolution.
53#define YAC_INTERP_DNN_WEIGHT_DEFAULT (YAC_INTERP_DNN_WEIGHT_DIST)
54#define YAC_INTERP_DNN_SEARCH_DISTANCE_TYPE_DEFAULT (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA)
55#define YAC_INTERP_DNN_SEARCH_DISTANCE_DEFAULT (YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA_DEFAULT)
56#define YAC_INTERP_DNN_SCALE_DEFAULT (YAC_INTERP_DNN_DUMMY_SCALE)
57
70
88
112
113// YAC PUBLIC HEADER STOP
114
115// Modular config constructor for vtable-based config system
116
123
124#endif // INTERP_METHOD_DNN_H
Defines the interface of the interpolation method "base class" in YAC.
struct interp_method * yac_interp_method_dnn_new(struct yac_interp_method_dnn_config config)
yac_interp_dnn_weight_type
@ 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
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...
yac_interp_dnn_search_distance_type
@ YAC_INTERP_DNN_SEARCH_DISTANCE_UNDEFINED
undefined search distance type
@ YAC_INTERP_DNN_SEARCH_DISTANCE_FIXED
use a fixed search distance (in radians)
@ YAC_INTERP_DNN_SEARCH_DISTANCE_CELL_AREA
union yac_interp_method_dnn_config_search_distance::@28 search_distance
enum yac_interp_dnn_search_distance_type type
method for determining the search distance
enum yac_interp_dnn_weight_type type
weighting type
struct yac_interp_method_dnn_config_search_distance * search_distance
double gauss_scale
scale factor for Gauss weighting
double rbf_scale
scale factor for RBF weighting
static struct yac_interp_method_config * config