YAC 3.20.0
Yet Another Coupler
Loading...
Searching...
No Matches
interpolation.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
24#ifndef INTERPOLATION_H
25#define INTERPOLATION_H
26
27// YAC PUBLIC HEADER START
28
29typedef struct Xt_redist_ *Xt_redist;
30
31#include <math.h>
32
33extern double const YAC_FRAC_MASK_NO_VALUE;
35
38
73
79void yac_interpolation_inc_ref_count(struct yac_interpolation * interpolation);
80
88 struct yac_interpolation * interpolation);
89
99 struct yac_interpolation * interp, double value, size_t count, size_t * pos);
100
101
109 struct yac_interpolation * interp, Xt_redist redist);
110
120 struct yac_interpolation * interp, Xt_redist * redists, size_t num_src_fields);
121
136 struct yac_interpolation * interp, Xt_redist * halo_redists,
137 size_t tgt_count, size_t * num_src_per_tgt,
138 size_t * src_field_idx, size_t * src_idx,
139 size_t num_src_fields, Xt_redist result_redist);
140
155 struct yac_interpolation * interp, Xt_redist * src_redists,
156 size_t * tgt_pos, size_t tgt_count, size_t * num_src_per_tgt,
157 size_t * src_field_idx, size_t * src_idx,
158 size_t num_src_fields);
159
160
176 struct yac_interpolation * interp, Xt_redist * halo_redists,
177 size_t tgt_count, size_t * num_src_per_tgt, double * weights,
178 size_t * src_field_idx, size_t * src_idx,
179 size_t num_src_fields, Xt_redist result_redist);
180
181
197 struct yac_interpolation * interp, Xt_redist * src_redists,
198 size_t * tgt_pos, size_t tgt_count, size_t * num_src_per_tgt,
199 double * weights, size_t * src_field_idx, size_t * src_idx,
200 size_t num_src_fields);
201
209 struct yac_interpolation * interp);
210
221 struct yac_interpolation * interp, double *** src_fields,
222 double ** tgt_field);
223
237 struct yac_interpolation * interp, double *** src_fields,
238 double *** src_frac_masks, double ** tgt_field);
239
249 struct yac_interpolation * interp, double *** src_fields);
250
263 struct yac_interpolation * interp, double *** src_fields,
264 double *** src_frac_masks);
265
274 struct yac_interpolation * interp, double ** tgt_field);
275
287 struct yac_interpolation * interp, double ** tgt_field);
288
296
304
314
320void yac_interpolation_delete(struct yac_interpolation * interp);
321
322// YAC PUBLIC HEADER STOP
323
324#endif // INTERPOLATION_H
struct @23::@24 value
void yac_interpolation_add_sum_at_src(struct yac_interpolation *interp, Xt_redist *halo_redists, size_t tgt_count, size_t *num_src_per_tgt, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields, Xt_redist result_redist)
Add a sum operator where accumulation occurs on source processes.
struct yac_interpolation * yac_interpolation_copy(struct yac_interpolation *interp)
Create a deep copy of an interpolation object.
void yac_interpolation_inc_ref_count(struct yac_interpolation *interpolation)
Increase the reference count of an interpolation.
void yac_interpolation_add_weight_sum_mvp_at_tgt(struct yac_interpolation *interp, Xt_redist *src_redists, size_t *tgt_pos, size_t tgt_count, size_t *num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields)
Add a weighted sum operator (distributed matrix-vector product), which computes the product at the ta...
void yac_interpolation_execute(struct yac_interpolation *interp, double ***src_fields, double **tgt_field)
Execute interpolation synchronously and write results to the target field.
int yac_interpolation_with_frac_mask(struct yac_interpolation *interpolation)
Query whether interpolation uses fractional masks.
void yac_interpolation_add_direct_mf(struct yac_interpolation *interp, Xt_redist *redists, size_t num_src_fields)
Add a direct redistribution operator for multiple source fields.
void yac_interpolation_delete(struct yac_interpolation *interp)
Free an interpolation object and release all resources.
void yac_interpolation_add_sum_at_tgt(struct yac_interpolation *interp, Xt_redist *src_redists, size_t *tgt_pos, size_t tgt_count, size_t *num_src_per_tgt, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields)
Add a sum operator where accumulation occurs on target processes.
int yac_interpolation_execute_put_test(struct yac_interpolation *interp)
Test whether the asynchronous put phase has completed.
void yac_interpolation_add_fixed(struct yac_interpolation *interp, double value, size_t count, size_t *pos)
Add a fixed-value operator to an interpolation.
void yac_interpolation_execute_wait(struct yac_interpolation *interp)
Wait for completion of pending asynchronous interpolation operations.
void yac_interpolation_execute_frac(struct yac_interpolation *interp, double ***src_fields, double ***src_frac_masks, double **tgt_field)
Execute interpolation with fractional masks and write results to the target field.
void yac_interpolation_execute_get(struct yac_interpolation *interp, double **tgt_field)
Complete interpolation and write results to the target field (get phase).
void yac_interpolation_execute_get_async(struct yac_interpolation *interp, double **tgt_field)
Complete interpolation asynchronously and write results to the target field (get phase).
void yac_interpolation_add_direct(struct yac_interpolation *interp, Xt_redist redist)
Add a direct redistribution operator.
struct yac_interpolation * yac_interpolation_new(struct yac_collection_selection const *collection_selection, double frac_mask_fallback_value, double scale_factor, double scale_summand)
Create a new interpolation object.
void yac_interpolation_execute_put_frac(struct yac_interpolation *interp, double ***src_fields, double ***src_frac_masks)
Provide source field data with fractional masks and start asynchronous execution of interpolation (pu...
void yac_interpolation_execute_put(struct yac_interpolation *interp, double ***src_fields)
Provide source field data and start asynchronous execution of interpolation (put phase).
void yac_interpolation_add_weight_sum_mvp_at_src(struct yac_interpolation *interp, Xt_redist *halo_redists, size_t tgt_count, size_t *num_src_per_tgt, double *weights, size_t *src_field_idx, size_t *src_idx, size_t num_src_fields, Xt_redist result_redist)
Add a weighted sum operator (distributed matrix-vector product), which computes the productes at the ...
int yac_interpolation_execute_get_test(struct yac_interpolation *interp)
Test whether the asynchronous get phase has completed.
struct Xt_redist_ * Xt_redist
double const YAC_FRAC_MASK_NO_VALUE
double frac_mask_fallback_value
struct yac_collection_selection * collection_selection
Selection of field collections to which this interpolation applies.