|
YAC 3.18.0
Yet Another Coupler
|
#include <stddef.h>#include "couple_config_component.h"#include "couple_config_field.h"#include "couple_config.h"

Go to the source code of this file.
Data Structures | |
| struct | yac_couple_config_field_couple |
Functions | |
| void | yac_couple_config_field_couple_free (struct yac_couple_config_field_couple *field_couple) |
| void | yac_couple_config_field_couples_merge (size_t *num_field_couples, struct yac_couple_config_field_couple **field_couples, MPI_Comm comm) |
| struct yac_couple_config_field_couple * | yac_couple_config_field_couple_find (size_t num_field_couples, struct yac_couple_config_field_couple *field_couples, struct yac_couple_config_field_couple const *field_couple) |
| void | yac_couple_config_field_couple_merge (struct yac_couple_config_field_couple *a, struct yac_couple_config_field_couple *b, MPI_Comm comm) |
| int | yac_couple_config_field_couple_compare (struct yac_couple_config_field_couple const *a, struct yac_couple_config_field_couple const *b) |
| int | yac_couple_config_field_couple_has_target (struct yac_couple_config const *couple_config, struct yac_couple_config_field_couple const *field_couple, char const *field_name, char const *grid_name, char const *component_name) |
| int | yac_couple_config_field_couple_get_field_role_from_field_idx (struct yac_couple_config_field_couple const *field_couple, size_t component_idx, size_t field_idx) |
| void | yac_couple_config_field_couple_update_component_indices (struct yac_couple_config_field_couple *field_couple, size_t const *old_to_new_idx) |
| void | yac_couple_config_field_couple_init (struct yac_couple_config_field_couple *field_couple, size_t src_comp_idx, size_t src_field_idx, int src_lag, size_t tgt_comp_idx, size_t tgt_field_idx, int tgt_lag, const char *coupling_period, enum yac_reduction_type time_reduction, struct yac_interp_stack_config *interp_stack, int mapping_on_source, const char *weight_file_name, double scale_factor, double scale_summand, enum yac_weight_file_on_existing weight_file_on_existing, size_t num_src_mask_names, char const *const *src_mask_names, char const *tgt_mask_name, const char *yaxt_exchanger_name, struct yac_collection_selection const *collection_selection, int use_raw_exchange) |
| int yac_couple_config_field_couple_compare | ( | struct yac_couple_config_field_couple const * | a, |
| struct yac_couple_config_field_couple const * | b ) |
Compare basic components of two field couples.
Compares source and target component and field indices.
| [in] | a | First field couple. |
| [in] | b | Second field couple. |
< 0 if a < b,0 if a == b,> 0 if a > b. Definition at line 307 of file couple_config_field_couple.c.

| struct yac_couple_config_field_couple * yac_couple_config_field_couple_find | ( | size_t | num_field_couples, |
| struct yac_couple_config_field_couple * | field_couples, | ||
| struct yac_couple_config_field_couple const * | field_couple ) |
Search for a matching field couple in an array.
| [in] | num_field_couples | Number of field couples. |
| [in] | field_couples | Array of field couples to search in. |
| [in] | field_couple | Field couple to search for. |
Definition at line 472 of file couple_config_field_couple.c.


| void yac_couple_config_field_couple_free | ( | struct yac_couple_config_field_couple * | field_couple | ) |
Free all dynamic data owned by a field couple.
| [in,out] | field_couple | Field couple. |
Definition at line 173 of file couple_config_field_couple.c.


| int yac_couple_config_field_couple_get_field_role_from_field_idx | ( | struct yac_couple_config_field_couple const * | field_couple, |
| size_t | component_idx, | ||
| size_t | field_idx ) |
Check if field couple matches given field indices and return field role.
If any of the source/target fields of the couple is not DEFINED, the field role is set to YAC_EXCHANGE_TYPE_NONE, even if the field couple matches the given field and component idx.
Returns YAC_EXCHANGE_TYPE_INVALID if the given field index pair matches both source and target of the same field couple.
| [in] | field_couple | Field couple. |
| [in] | component_idx | Component index. |
| [in] | field_idx | Field index. |
Definition at line 595 of file couple_config_field_couple.c.

| int yac_couple_config_field_couple_has_target | ( | struct yac_couple_config const * | couple_config, |
| struct yac_couple_config_field_couple const * | field_couple, | ||
| char const * | field_name, | ||
| char const * | grid_name, | ||
| char const * | component_name ) |
Check if target of a field couple matches given field, grid, and component name.
| [in] | couple_config | Coupling configuration. |
| [in] | field_couple | Field couple. |
| [in] | field_name | Field name. |
| [in] | grid_name | Grid name. |
| [in] | component_name | Component name. |
Definition at line 574 of file couple_config_field_couple.c.


| void yac_couple_config_field_couple_init | ( | struct yac_couple_config_field_couple * | field_couple, |
| size_t | src_comp_idx, | ||
| size_t | src_field_idx, | ||
| int | src_lag, | ||
| size_t | tgt_comp_idx, | ||
| size_t | tgt_field_idx, | ||
| int | tgt_lag, | ||
| const char * | coupling_period, | ||
| enum yac_reduction_type | time_reduction, | ||
| struct yac_interp_stack_config * | interp_stack, | ||
| int | mapping_on_source, | ||
| const char * | weight_file_name, | ||
| double | scale_factor, | ||
| double | scale_summand, | ||
| enum yac_weight_file_on_existing | weight_file_on_existing, | ||
| size_t | num_src_mask_names, | ||
| char const *const * | src_mask_names, | ||
| char const * | tgt_mask_name, | ||
| const char * | yaxt_exchanger_name, | ||
| struct yac_collection_selection const * | collection_selection, | ||
| int | use_raw_exchange ) |
Initialize a field couple.
| [in,out] | field_couple | Field couple. |
| [in] | src_comp_idx | Source component index. |
| [in] | src_field_idx | Source field index. |
| [in] | src_lag | Source lag. |
| [in] | tgt_comp_idx | Target component index. |
| [in] | tgt_field_idx | Target field index. |
| [in] | tgt_lag | Target lag. |
| [in] | coupling_period | Coupling period string. |
| [in] | time_reduction | Time reduction type. |
| [in] | interp_stack | Interpolation stack. |
| [in] | mapping_on_source | Mapping flag. |
| [in] | weight_file_name | Weight file name. |
| [in] | scale_factor | Scale factor. |
| [in] | scale_summand | Scale summand. |
| [in] | weight_file_on_existing | Existing weight-file handling. |
| [in] | num_src_mask_names | Number of source mask names. |
| [in] | src_mask_names | Source mask names. |
| [in] | tgt_mask_name | Target mask name. |
| [in] | yaxt_exchanger_name | YAxT exchanger name. |
| [in] | collection_selection | Collection selection. |
| [in] | use_raw_exchange | Raw exchange flag. |
Definition at line 488 of file couple_config_field_couple.c.


| void yac_couple_config_field_couple_merge | ( | struct yac_couple_config_field_couple * | a, |
| struct yac_couple_config_field_couple * | b, | ||
| MPI_Comm | comm ) |
Merge field couple b into field couple a and validate consistency.
| [in,out] | a | Destination field couple. |
| [in,out] | b | Source field couple. |
| [in] | comm | MPI communicator. |
Definition at line 331 of file couple_config_field_couple.c.


| void yac_couple_config_field_couple_update_component_indices | ( | struct yac_couple_config_field_couple * | field_couple, |
| size_t const * | old_to_new_idx ) |
Update source/target component indices using a remapping table.
| [in,out] | field_couple | Field couple. |
| [in] | old_to_new_idx | Mapping from old to new component index. |
Definition at line 623 of file couple_config_field_couple.c.

| void yac_couple_config_field_couples_merge | ( | size_t * | num_field_couples, |
| struct yac_couple_config_field_couple ** | field_couples, | ||
| MPI_Comm | comm ) |
Synchronize and merge field couples across ranks.
| [in,out] | num_field_couples | Number of field couples. |
| [in,out] | field_couples | Array of field couples. |
| [in] | comm | MPI communicator. |
Definition at line 460 of file couple_config_field_couple.c.

