YAC 3.6.2
Yet Another Coupler
Loading...
Searching...
No Matches
interp_weights.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_WEIGHTS_H
6#define INTERP_WEIGHTS_H
7
8#include "yac_types.h"
9#include "location.h"
10#include "interpolation.h"
11
12// YAC PUBLIC HEADER START
13
15
16 double frac_mask_fallback_value; // user-defined fractional mask fallback value
17 double scaling_factor; // user-defined scaling factor
18 double scaling_summand; // user-defined scaling summand
19
20 size_t num_fixed_values; // number of fixed values
21 double * fixed_values; // fixed values
22 size_t * num_tgt_per_fixed_value; // number of target points per fixed value
23 size_t * tgt_idx_fixed; // local ids of fixed target points
24
25 size_t num_wgt_tgt; // number of target points that receive a
26 // weighted sum of source points
27 size_t * wgt_tgt_idx; // local ids of weighted target points
28 size_t * num_src_per_tgt; // number of source points per target
29 double * weights; // weights
30 size_t * src_field_idx; // source field index for each source point
31 size_t * src_idx; // index of source points in source field
32 // buffer
33 size_t num_src_fields; // number of source fields
34 size_t * src_field_buffer_size; // buffer sizes required for receiving all
35 // required source data
36 // (array size is num_src_fields)
37};
38
40
49
51
61 MPI_Comm comm, enum yac_location tgt_location,
63
78 struct yac_interp_weights * weights, char const * filename,
79 char const * src_grid_name, char const * tgt_grid_name,
80 size_t src_grid_size, size_t tgt_grid_size);
81
105 struct yac_interp_weights * weights,
108 double scaling_factor, double scaling_summand,
109 char const * yaxt_exchanger_name);
110
134 struct yac_interp_weights * weights,
136 double scaling_factor, double scaling_summand,
137 char const * yaxt_exchanger_name,
138 struct yac_interpolation_exchange ** interpolation_exchange,
139 struct yac_interp_weights_data * interp_weights_data);
140
147 struct yac_interp_weights * weights);
148
156 struct yac_interp_weights * weights);
157
162void yac_interp_weights_delete(struct yac_interp_weights * weights);
163
169 struct yac_interp_weights_data * interp_weights_data);
170
177 struct yac_interp_weights_data interp_weights_data);
178
186 struct yac_interp_weights_data interp_weights_data);
187
188// YAC PUBLIC HEADER STOP
189
190#endif // INTERP_WEIGHTS_H
struct yac_interp_weights_data yac_interp_weights_data_copy(struct yac_interp_weights_data interp_weights_data)
void yac_interp_weights_data_init(struct yac_interp_weights_data *interp_weights_data)
void yac_interp_weights_delete(struct yac_interp_weights *weights)
void yac_interp_weights_data_free(struct yac_interp_weights_data interp_weights_data)
void yac_interp_weights_get_interpolation_raw(struct yac_interp_weights *weights, size_t collection_size, double frac_mask_fallback_value, double scaling_factor, double scaling_summand, char const *yaxt_exchanger_name, struct yac_interpolation_exchange **interpolation_exchange, struct yac_interp_weights_data *interp_weights_data)
yac_int * yac_interp_weights_get_interp_tgt(struct yac_interp_weights *weights)
void yac_interp_weights_write_to_file(struct yac_interp_weights *weights, char const *filename, char const *src_grid_name, char const *tgt_grid_name, size_t src_grid_size, size_t tgt_grid_size)
struct yac_interpolation * yac_interp_weights_get_interpolation(struct yac_interp_weights *weights, enum yac_interp_weights_reorder_type reorder, size_t collection_size, double frac_mask_fallback_value, double scaling_factor, double scaling_summand, char const *yaxt_exchanger_name)
yac_interp_weights_reorder_type
@ YAC_MAPPING_ON_TGT
weights will be applied at target processes
@ YAC_MAPPING_ON_SRC
weights will be applied at source processes
struct yac_interp_weights * yac_interp_weights_new(MPI_Comm comm, enum yac_location tgt_location, enum yac_location *src_locations, size_t num_src_fields)
size_t yac_interp_weights_get_interp_count(struct yac_interp_weights *weights)
yac_location
Definition location.h:12
enum yac_location tgt_location
enum yac_location * src_locations
double frac_mask_fallback_value
Xt_int yac_int
Definition yac_types.h:15