YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
interp_method_spmap.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef INTERP_METHOD_SPMAP_H
6#define INTERP_METHOD_SPMAP_H
7
8#include "interp_method.h"
9
10// YAC PUBLIC HEADER START
11
17 YAC_INTERP_SPMAP_AVG = 0, // simple average
18 YAC_INTERP_SPMAP_DIST = 1, // distance weighted
19};
20
33
35 YAC_INTERP_SPMAP_CELL_AREA_FILE = 0, // read cell areas from file
36 YAC_INTERP_SPMAP_CELL_AREA_YAC = 1, // YAC computes the cell areas
37};
38
43 double sphere_radius; // used for computing the cell areas
45 char const * filename;
46 char const * varname;
48 } file_config; // used for read the cell areas from file
49 } src, tgt;
50};
51
52#define YAC_INTERP_SPMAP_SPREAD_DISTANCE_DEFAULT (0.0)
53#define YAC_INTERP_SPMAP_MAX_SEARCH_DISTANCE_DEFAULT (0.0)
54#define YAC_INTERP_SPMAP_WEIGHTED_DEFAULT (YAC_INTERP_SPMAP_AVG)
55#define YAC_INTERP_SPMAP_SCALE_TYPE_DEFAULT (YAC_INTERP_SPMAP_NONE)
56#define YAC_INTERP_SPMAP_SPHERE_RADIUS_DEFAULT (1.0)
57#define YAC_INTERP_SPMAP_FILENAME_DEFAULT (NULL)
58#define YAC_INTERP_SPMAP_VARNAME_DEFAULT (NULL)
59#define YAC_INTERP_SPMAP_MIN_GLOBAL_ID_DEFAULT (0)
60#define YAC_INTERP_SPMAP_CELL_AREA_CONFIG_DEFAULT \
61 ((struct yac_spmap_cell_area_config) { \
62 .cell_area_provider = YAC_INTERP_SPMAP_CELL_AREA_YAC, \
63 .sphere_radius = YAC_INTERP_SPMAP_SPHERE_RADIUS_DEFAULT, \
64 .file_config.filename = YAC_INTERP_SPMAP_FILENAME_DEFAULT, \
65 .file_config.varname = YAC_INTERP_SPMAP_VARNAME_DEFAULT, \
66 .file_config.min_global_id = YAC_INTERP_SPMAP_MIN_GLOBAL_ID_DEFAULT})
67#define YAC_INTERP_SPMAP_SCALE_CONFIG_DEFAULT \
68 ((struct yac_spmap_scale_config){ \
69 .type = YAC_INTERP_SPMAP_SCALE_TYPE_DEFAULT, \
70 .src = YAC_INTERP_SPMAP_CELL_AREA_CONFIG_DEFAULT, \
71 .tgt = YAC_INTERP_SPMAP_CELL_AREA_CONFIG_DEFAULT})
72
94 double spread_distance, double max_search_distance,
96 struct yac_spmap_scale_config scale_config);
97
98// YAC PUBLIC HEADER STOP
99
100#endif // INTERP_METHOD_SPMAP_H
enum yac_interp_ncc_weight_type weight_type
yac_interp_spmap_scale_type
@ YAC_INTERP_SPMAP_NONE
weights are not scaled
@ YAC_INTERP_SPMAP_INVTGTAREA
@ YAC_INTERP_SPMAP_SRCAREA
@ YAC_INTERP_SPMAP_FRACAREA
yac_interp_spmap_cell_area_provider
@ YAC_INTERP_SPMAP_CELL_AREA_FILE
@ YAC_INTERP_SPMAP_CELL_AREA_YAC
yac_interp_spmap_weight_type
@ YAC_INTERP_SPMAP_AVG
@ YAC_INTERP_SPMAP_DIST
struct interp_method * yac_interp_method_spmap_new(double spread_distance, double max_search_distance, enum yac_interp_spmap_weight_type weight_type, struct yac_spmap_scale_config scale_config)
struct yac_spmap_scale_config::yac_spmap_cell_area_config::yac_spmap_cell_area_file_config file_config
enum yac_interp_spmap_cell_area_provider cell_area_provider
struct yac_spmap_scale_config::yac_spmap_cell_area_config src
struct yac_spmap_scale_config::yac_spmap_cell_area_config tgt
enum yac_interp_spmap_scale_type type
Xt_int yac_int
Definition yac_types.h:15