YAC 3.12.0
Yet Another Coupler
Loading...
Searching...
No Matches
Interpolation Operators

Collection of constructors for interpolation operators . More...

Functions

struct yac_interp_operatoryac_interp_operator_direct_new (struct yac_collection_selection const *collection_selection, Xt_redist redist)
 Create a direct redistribution interpolation operator.
 
struct yac_interp_operatoryac_interp_operator_direct_mf_new (struct yac_collection_selection const *collection_selection, Xt_redist *redists, size_t num_src_fields)
 Create a direct redistribution operator for multiple source fields.
 
struct yac_interp_operatoryac_interp_operator_fixed_new (struct yac_collection_selection const *collection_selection, double value, size_t count, size_t const *pos)
 Create a fixed-value interpolation operator.
 
struct yac_interp_operatoryac_interp_operator_sum_mvp_at_src_new (struct yac_collection_selection const *collection_selection, 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 with_frac_mask)
 Create a sum (weighted or unweighted) interpolation operator computed on the source processes.
 
struct yac_interp_operatoryac_interp_operator_sum_mvp_at_tgt_new (struct yac_collection_selection const *collection_selection, 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, int with_frac_mask)
 Create a sum (weighted or unweighted) interpolation operator computed on the target processes.
 

Detailed Description

Collection of constructors for interpolation operators .

This group contains all public interpolation operator constructors that can be used to create interpolation objects for distributed data remapping. Operators include:

These operators can be combined to build complex interpolation objects, which can then be executed with yac_interpolation_execute or its variants.

Function Documentation

◆ yac_interp_operator_direct_mf_new()

struct yac_interp_operator * yac_interp_operator_direct_mf_new ( struct yac_collection_selection const * collection_selection,
Xt_redist * redists,
size_t num_src_fields )

Create a direct redistribution operator for multiple source fields.

Each source field in redists is redistributed to the corresponding target field. This is equivalent to multiple single-field direct redistributions applied in sequence.

Parameters
[in]collection_selectionSelection of field collections to which this operator applies.
[in]redistsArray of redistribution handles, one per source field.
[in]num_src_fieldsNumber of source fields (length of redists).
Returns
Newly allocated interpolation operator of type "direct_mf".

Definition at line 103 of file interp_operator_direct_mf.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_operator_direct_new()

struct yac_interp_operator * yac_interp_operator_direct_new ( struct yac_collection_selection const * collection_selection,
Xt_redist redist )

Create a direct redistribution interpolation operator.

The operator applies the yaxt redistribution redist to move data from source to target points. This is the simplest form of interpolation, essentially performing a reindexing or copy between fields.

Parameters
[in]collection_selectionSelection of field collections to which this operator applies.
[in]redistRedistribution handle from yaxt.
Returns
Newly allocated interpolation operator of type "direct".

Definition at line 94 of file interp_operator_direct.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_operator_fixed_new()

struct yac_interp_operator * yac_interp_operator_fixed_new ( struct yac_collection_selection const * collection_selection,
double value,
size_t count,
size_t const * pos )

Create a fixed-value interpolation operator.

This operator sets all selected target points to the constant value specified by value.

Parameters
[in]collection_selectionSelection of field collections to which this operator applies.
[in]valueFixed value to assign.
[in]countNumber of target positions.
[in]posArray of target indices of length count.
Returns
Newly allocated interpolation operator of type "fixed".

Definition at line 68 of file interp_operator_fixed.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_operator_sum_mvp_at_src_new()

struct yac_interp_operator * yac_interp_operator_sum_mvp_at_src_new ( struct yac_collection_selection const * collection_selection,
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 with_frac_mask )

Create a sum (weighted or unweighted) interpolation operator computed on the source processes.

Source contributions are accumulated locally on the source ranks. Halo exchanges are applied where necessary, and results are then redistributed to the target ranks.

Parameters
[in]collection_selectionSelection of field collections to which this operator applies.
[in]halo_redistsRedistribution handles for halo exchanges.
[in]tgt_countNumber of target points.
[in]num_src_per_tgtArray giving number of source points per target (length = tgt_count).
[in]weightsInterpolation weights array, or NULL for unweighted sum.
[in]src_field_idxArray of source field indices for each source contribution.
[in]src_idxArray of source local indices for each source contribution.
[in]num_src_fieldsNumber of source fields.
[in]result_redistRedistribution handle for the accumulated results.
[in]with_frac_maskNonzero to enable fractional mask support.
Returns
Newly allocated interpolation operator of type "sum_mvp_at_src".

Definition at line 288 of file interp_operator_sum_mvp_at_src.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_operator_sum_mvp_at_tgt_new()

struct yac_interp_operator * yac_interp_operator_sum_mvp_at_tgt_new ( struct yac_collection_selection const * collection_selection,
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,
int with_frac_mask )

Create a sum (weighted or unweighted) interpolation operator computed on the target processes.

Source contributions are first redistributed to the target ranks, where the weighted (or unweighted) sum for each target point is performed locally.

Parameters
[in]collection_selectionSelection of field collections to which this operator applies.
[in]src_redistsRedistribution handles for source fields.
[in]tgt_posArray of target indices (length = tgt_count).
[in]tgt_countNumber of target points.
[in]num_src_per_tgtArray giving number of source points per target (length = tgt_count).
[in]weightsInterpolation weights array, or NULL for unweighted sum.
[in]src_field_idxArray of source field indices for each source contribution.
[in]src_idxArray of source local indices for each source contribution.
[in]num_src_fieldsNumber of source fields.
[in]with_frac_maskNonzero to enable fractional mask support.
Returns
Newly allocated interpolation operator of type "sum_mvp_at_tgt".

Definition at line 307 of file interp_operator_sum_mvp_at_tgt.c.

Here is the call graph for this function:
Here is the caller graph for this function: