YetAnotherCoupler 3.2.0_a
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
5#ifndef INTERPOLATION_H
6#define INTERPOLATION_H
7
8// YAC PUBLIC HEADER START
9
38#include <yaxt.h>
39
40extern double const YAC_FRAC_MASK_NO_VALUE;
41extern double const YAC_FRAC_MASK_UNDEF;
42
44
47 double scale_factor, double scale_summand);
48
49void yac_interpolation_inc_ref_count(struct yac_interpolation * interpolation);
50
51int yac_interpolation_with_frac_mask(struct yac_interpolation * interpolation);
52
54 struct yac_interpolation * interp, double value, size_t count, size_t * pos);
55
57 struct yac_interpolation * interp, Xt_redist redist);
58
60 struct yac_interpolation * interp, Xt_redist * redists, size_t num_src_fields);
61
62/*
63 * The target points consist of the sum of a number of source points. The sum
64 * can be computed on the source or target processes.
65 */
67 struct yac_interpolation * interp, Xt_redist * halo_redists,
68 size_t tgt_count, size_t * num_src_per_tgt,
69 size_t * src_field_idx, size_t * src_idx,
70 size_t num_src_fields, Xt_redist result_redist);
71
73 struct yac_interpolation * interp, Xt_redist * src_redists,
74 size_t * tgt_pos, size_t tgt_count, size_t * num_src_per_tgt,
75 size_t * src_field_idx, size_t * src_idx,
76 size_t num_src_fields);
77
78/*
79 * The target points consist of a weighted sum of a number of source points. The
80 * operation can be expressed as a distributed Matrix-Vector-Product. This
81 * Product can be computed on the source or target processes.
82 */
84 struct yac_interpolation * interp, Xt_redist * halo_redists,
85 size_t tgt_count, size_t * num_src_per_tgt, double * weights,
86 size_t * src_field_idx, size_t * src_idx,
87 size_t num_src_fields, Xt_redist result_redist);
88
90 struct yac_interpolation * interp, Xt_redist * src_redists,
91 size_t * tgt_pos, size_t tgt_count, size_t * num_src_per_tgt,
92 double * weights, size_t * src_field_idx, size_t * src_idx,
93 size_t num_src_fields);
94
96 struct yac_interpolation * interp);
97
98// src_fields dimensions [collection_idx]
99// [field index]
100// [local_idx]
101// tgt_field dimensions [collection_idx]
102// [local_idx]
104 struct yac_interpolation * interp, double *** src_fields,
105 double ** tgt_field);
107 struct yac_interpolation * interp, double *** src_fields,
108 double *** src_frac_masks, double ** tgt_field);
109
110// src_fields dimensions [collection_idx]
111// [field index]
112// [local_idx]
114 struct yac_interpolation * interp, double *** src_fields);
116 struct yac_interpolation * interp, double *** src_fields,
117 double *** src_frac_masks);
118
119// tgt_field dimensions [collection_idx]
120// [local_idx]
122 struct yac_interpolation * interp, double ** tgt_field);
124 struct yac_interpolation * interp, double ** tgt_field);
125
128
130
131void yac_interpolation_delete(struct yac_interpolation * interp);
132
133// YAC PUBLIC HEADER STOP
134
135#endif // INTERPOLATION_H
struct @8::@9 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)
struct yac_interpolation * yac_interpolation_copy(struct yac_interpolation *interp)
void yac_interpolation_inc_ref_count(struct yac_interpolation *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)
struct yac_interpolation * yac_interpolation_new(size_t collection_size, double frac_mask_fallback_value, double scale_factor, double scale_summand)
void yac_interpolation_execute(struct yac_interpolation *interp, double ***src_fields, double **tgt_field)
int yac_interpolation_with_frac_mask(struct yac_interpolation *interpolation)
void yac_interpolation_add_direct_mf(struct yac_interpolation *interp, Xt_redist *redists, size_t num_src_fields)
void yac_interpolation_delete(struct yac_interpolation *interp)
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)
int yac_interpolation_execute_put_test(struct yac_interpolation *interp)
void yac_interpolation_add_fixed(struct yac_interpolation *interp, double value, size_t count, size_t *pos)
void yac_interpolation_execute_wait(struct yac_interpolation *interp)
void yac_interpolation_execute_frac(struct yac_interpolation *interp, double ***src_fields, double ***src_frac_masks, double **tgt_field)
void yac_interpolation_execute_get(struct yac_interpolation *interp, double **tgt_field)
void yac_interpolation_execute_get_async(struct yac_interpolation *interp, double **tgt_field)
double const YAC_FRAC_MASK_UNDEF
void yac_interpolation_add_direct(struct yac_interpolation *interp, Xt_redist redist)
void yac_interpolation_execute_put_frac(struct yac_interpolation *interp, double ***src_fields, double ***src_frac_masks)
void yac_interpolation_execute_put(struct yac_interpolation *interp, double ***src_fields)
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)
int yac_interpolation_execute_get_test(struct yac_interpolation *interp)
double const YAC_FRAC_MASK_NO_VALUE
double frac_mask_fallback_value