YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
couple_config_couple.c File Reference
#include <limits.h>
#include "yac.h"
#include "couple_config_internal.h"
#include "couple_config_couple.h"
#include "couple_config_field_couple.h"
#include "utils_common.h"
#include "dist_merge.h"
#include "yac_mpi_common.h"
Include dependency graph for couple_config_couple.c:

Go to the source code of this file.

Macros

#define CHECK_FIELD_COUPLE_IDX(COUPLE, FIELD_COUPLE_IDX, ROUTINE)
 

Functions

static size_t yac_couple_config_couple_append_field_couple (struct yac_couple_config_couple *couple, struct yac_couple_config_field_couple const *field_couple)
 
void yac_couple_config_couple_free (struct yac_couple_config_couple *couple)
 
void yac_couple_config_couples_free (struct yac_couple_config_couple **couples, size_t *num_couples)
 
static size_t yac_couple_config_couple_get_pack_size (void *couple_, MPI_Comm comm)
 
static void yac_couple_config_couple_pack (void *couple_, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static void yac_couple_config_couple_unpack (void *buffer, int buffer_size, int *position, void *couple_, MPI_Comm comm)
 
static int yac_couple_config_couple_compare (void const *a_, void const *b_)
 
static void yac_couple_config_couple_merge (void *a_, void *b_, MPI_Comm comm)
 
static void yac_couple_config_couple_free_ (void *couple)
 
void yac_couple_config_couples_merge (struct yac_couple_config *couple_config, MPI_Comm comm)
 
static void yac_couple_config_couple_normalize_component_indices (struct yac_couple_config_couple *couple)
 
void yac_couple_config_couple_init (struct yac_couple_config_couple *couple, size_t component_idx_a, size_t component_idx_b)
 
void yac_couple_config_couple_update_component_indices (struct yac_couple_config_couple *couple, size_t const *old_to_new_idx)
 
void yac_couple_config_couple_update_field_indices (struct yac_couple_config_couple *couples, size_t num_couples, size_t comp_idx, size_t const *old_to_new_idx)
 
size_t yac_couple_config_couples_append (struct yac_couple_config *couple_config, size_t component_idx_a, size_t component_idx_b)
 
struct yac_couple_config_coupleyac_couple_config_couple_find (size_t num_couples, struct yac_couple_config_couple const *couples, struct yac_couple_config_couple const *pattern)
 
int yac_couple_config_couple_has_component (struct yac_couple_config_couple const *couple, size_t component_idx)
 
int yac_couple_config_couple_get_field_role_from_field_idx (struct yac_couple_config_couple const *couple, size_t component_idx, size_t field_idx)
 
int yac_couple_config_couple_has_field_couple (struct yac_couple_config_couple const *couple, size_t src_component_idx, size_t src_field_idx, size_t tgt_component_idx, size_t tgt_field_idx)
 
void yac_couple_config_couple_append_or_merge_field_couple (struct yac_couple_config_couple *couple, struct yac_couple_config_field_couple *field_couple)
 
void yac_couple_config_couple_append_or_merge_field_couple_from_definition (struct yac_couple_config_couple *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, char const *coupling_period, int time_reduction, struct yac_interp_stack_config *interp_stack, int mapping_on_source, const char *weight_file_name, double scale_factor, double scale_summand, int weight_file_on_existing, size_t num_src_mask_names, char const *const *src_mask_names, char const *tgt_mask_name, char const *yaxt_exchanger_name, struct yac_collection_selection const *collection_selection, int use_raw_exchange)
 
struct yac_interp_stack_configyac_couple_config_couple_get_interp_stack (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
int yac_couple_config_couple_get_mapping_on_source (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
int yac_couple_config_couple_get_source_lag (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
int yac_couple_config_couple_get_target_lag (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
char const * yac_couple_config_couple_get_coupling_period (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
enum yac_reduction_type yac_couple_config_couple_get_coupling_period_operation (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
int yac_couple_config_couple_get_enforce_write_weight_file (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
char const * yac_couple_config_couple_get_weight_file_name (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
enum yac_weight_file_on_existing yac_couple_config_couple_get_weight_file_on_existing (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
double yac_couple_config_couple_get_scale_factor (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
double yac_couple_config_couple_get_scale_summand (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
void yac_couple_config_couple_get_src_mask_names (struct yac_couple_config_couple const *couple, size_t field_couple_idx, char const *const **mask_names, size_t *num_mask_names)
 
char const * yac_couple_config_couple_get_tgt_mask_name (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
char const * yac_couple_config_couple_get_yaxt_exchanger_name (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
struct yac_collection_selection const * yac_couple_config_couple_get_collection_selection (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
int yac_couple_config_couple_get_use_raw_exchange (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
size_t yac_couple_config_couple_get_source_component_idx (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
size_t yac_couple_config_couple_get_source_field_idx (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
size_t yac_couple_config_couple_get_target_component_idx (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
size_t yac_couple_config_couple_get_target_field_idx (struct yac_couple_config_couple const *couple, size_t field_couple_idx)
 
size_t yac_couple_config_couple_find_field_couple_with_target (struct yac_couple_config_couple const *couple, struct yac_couple_config const *couple_config, char const *tgt_field_name, char const *tgt_grid_name, char const *tgt_comp_name)
 

Variables

static struct yac_dist_merge_vtable dist_merge_vtable_couple
 

Macro Definition Documentation

◆ CHECK_FIELD_COUPLE_IDX

#define CHECK_FIELD_COUPLE_IDX ( COUPLE,
FIELD_COUPLE_IDX,
ROUTINE )
Value:
(FIELD_COUPLE_IDX) < (COUPLE)->num_field_couples, \
"ERROR(%s:%d:%s): invalid field_couple_idx", \
__FILE__, __LINE__, (ROUTINE))
#define YAC_ASSERT_F(exp, format,...)
Definition yac_assert.h:30

Definition at line 386 of file couple_config_couple.c.

Function Documentation

◆ yac_couple_config_couple_append_field_couple()

static size_t yac_couple_config_couple_append_field_couple ( struct yac_couple_config_couple * couple,
struct yac_couple_config_field_couple const * field_couple )
static

Append a field couple to a couple.

Parameters
[in,out]coupleCouple to modify.
[in]field_coupleField couple to append.
Returns
Index of the appended field couple.

Definition at line 25 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_append_or_merge_field_couple()

void yac_couple_config_couple_append_or_merge_field_couple ( struct yac_couple_config_couple * couple,
struct yac_couple_config_field_couple * field_couple )

Append a field couple to a couple or merge into an existing matching one.

Parameters
[in,out]coupleCouple to modify.
[in,out]field_coupleField couple to append or merge.

Definition at line 339 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_append_or_merge_field_couple_from_definition()

void yac_couple_config_couple_append_or_merge_field_couple_from_definition ( struct yac_couple_config_couple * 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,
char const * coupling_period,
int time_reduction,
struct yac_interp_stack_config * interp_stack,
int mapping_on_source,
const char * weight_file_name,
double scale_factor,
double scale_summand,
int weight_file_on_existing,
size_t num_src_mask_names,
char const *const * src_mask_names,
char const * tgt_mask_name,
char const * yaxt_exchanger_name,
struct yac_collection_selection const * collection_selection,
int use_raw_exchange )

Construct a field couple from parameters and append/merge it into a couple.

Parameters
[in,out]coupleCouple to modify.
[in]src_comp_idxSource component index.
[in]src_field_idxSource field index.
[in]src_lagSource lag.
[in]tgt_comp_idxTarget component index.
[in]tgt_field_idxTarget field index.
[in]tgt_lagTarget lag.
[in]coupling_periodCoupling period string.
[in]time_reductionTime reduction type.
[in]interp_stackInterpolation stack.
[in]mapping_on_sourceMapping flag.
[in]weight_file_nameWeight file name.
[in]scale_factorScale factor.
[in]scale_summandScale summand.
[in]weight_file_on_existingExisting weight-file handling.
[in]num_src_mask_namesNumber of source mask names.
[in]src_mask_namesSource mask names.
[in]tgt_mask_nameTarget mask name.
[in]yaxt_exchanger_nameYAxT exchanger name.
[in]collection_selectionCollection selection.
[in]use_raw_exchangeRaw exchange flag.

Definition at line 356 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_compare()

static int yac_couple_config_couple_compare ( void const * a_,
void const * b_ )
static

Definition at line 116 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_find()

struct yac_couple_config_couple * yac_couple_config_couple_find ( size_t num_couples,
struct yac_couple_config_couple const * couples,
struct yac_couple_config_couple const * pattern )

Find the first couple whose component indices match the pattern.

Only the component_indices of pattern are compared; its other fields are ignored.

Parameters
[in]num_couplesNumber of couples in couples.
[in]couplesArray of couples to search.
[in]patternCouple with the component indices to match.
Returns
Pointer to the matching couple, or NULL if none found.

Definition at line 258 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_find_field_couple_with_target()

size_t yac_couple_config_couple_find_field_couple_with_target ( struct yac_couple_config_couple const * couple,
struct yac_couple_config const * couple_config,
char const * tgt_field_name,
char const * tgt_grid_name,
char const * tgt_comp_name )

Find a field couple within a couple whose target matches the given field, grid, and component names. Returns SIZE_MAX if no match is found.

Asserts that at most one field couple matches.

Parameters
[in]coupleCouple to search in.
[in]couple_configCoupling configuration.
[in]tgt_field_nameTarget field name.
[in]tgt_grid_nameTarget grid name.
[in]tgt_comp_nameTarget component name.
Returns
Field couple index, or SIZE_MAX if not found.

Definition at line 669 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_free()

void yac_couple_config_couple_free ( struct yac_couple_config_couple * couple)

Free a couple and all its dynamic data, including field couples.

Parameters
[in,out]coupleCouple.

Definition at line 40 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_free_()

static void yac_couple_config_couple_free_ ( void * couple)
static

Definition at line 153 of file couple_config_couple.c.

Here is the call graph for this function:

◆ yac_couple_config_couple_get_collection_selection()

struct yac_collection_selection const * yac_couple_config_couple_get_collection_selection ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get collection selection for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Collection selection.

Definition at line 586 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_coupling_period()

char const * yac_couple_config_couple_get_coupling_period ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get coupling period string for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Coupling period string.

Definition at line 444 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_coupling_period_operation()

enum yac_reduction_type yac_couple_config_couple_get_coupling_period_operation ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get coupling period reduction operation for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Reduction type.

Definition at line 457 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_enforce_write_weight_file()

int yac_couple_config_couple_get_enforce_write_weight_file ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Check whether writing a weight file is enforced for a field couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Non-zero if weight file writing is enforced.

Definition at line 471 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_field_role_from_field_idx()

int yac_couple_config_couple_get_field_role_from_field_idx ( struct yac_couple_config_couple const * couple,
size_t component_idx,
size_t field_idx )

Determine field role for a given field index pair within a couple.

Scans field couples of the given couple and returns the first non-NONE role for the provided component/field indices.

Returns YAC_EXCHANGE_TYPE_INVALID if source and target match at once within a single field couple.

Parameters
[in]coupleCouple.
[in]component_idxComponent index.
[in]field_idxField index.
Returns
Field role.

TODO: Add lower level assertion here. Until https://gitlab.dkrz.de/YAC/YAC-dev/-/issues/187 is resolved this would shadow higher-level error in couple_config.c calling this function.

Definition at line 282 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_get_interp_stack()

struct yac_interp_stack_config * yac_couple_config_couple_get_interp_stack ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get interpolation stack for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Interpolation stack configuration.

Definition at line 392 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_mapping_on_source()

int yac_couple_config_couple_get_mapping_on_source ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get mapping-on-source flag for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Mapping-on-source flag.

Definition at line 405 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_pack_size()

static size_t yac_couple_config_couple_get_pack_size ( void * couple_,
MPI_Comm comm )
static

Definition at line 60 of file couple_config_couple.c.

◆ yac_couple_config_couple_get_scale_factor()

double yac_couple_config_couple_get_scale_factor ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get scaling factor for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Scale factor.

Definition at line 517 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_scale_summand()

double yac_couple_config_couple_get_scale_summand ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get scaling summand for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Scale summand.

Definition at line 530 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_source_component_idx()

size_t yac_couple_config_couple_get_source_component_idx ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get source component index for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Source component index.

Definition at line 613 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_source_field_idx()

size_t yac_couple_config_couple_get_source_field_idx ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get source field index for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Source field index.

Definition at line 627 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_source_lag()

int yac_couple_config_couple_get_source_lag ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get source lag for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Source lag.

Definition at line 418 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_src_mask_names()

void yac_couple_config_couple_get_src_mask_names ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx,
char const *const ** mask_names,
size_t * num_mask_names )

Get source mask names for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
[out]mask_namesReturned array of source mask names.
[out]num_mask_namesReturned number of source mask names.

Definition at line 543 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_target_component_idx()

size_t yac_couple_config_couple_get_target_component_idx ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get target component index for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Target component index.

Definition at line 641 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_target_field_idx()

size_t yac_couple_config_couple_get_target_field_idx ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get target field index for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Target field index.

Definition at line 655 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_target_lag()

int yac_couple_config_couple_get_target_lag ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get target lag for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Target lag.

Definition at line 431 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_tgt_mask_name()

char const * yac_couple_config_couple_get_tgt_mask_name ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get target mask name for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Target mask name.

Definition at line 558 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_use_raw_exchange()

int yac_couple_config_couple_get_use_raw_exchange ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get raw-exchange flag for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Raw-exchange flag.

Definition at line 600 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_weight_file_name()

char const * yac_couple_config_couple_get_weight_file_name ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get weight file name for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Weight file name.

Definition at line 485 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_weight_file_on_existing()

enum yac_weight_file_on_existing yac_couple_config_couple_get_weight_file_on_existing ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get weight-file-on-existing policy for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
Weight-file-on-existing policy.

Definition at line 503 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_get_yaxt_exchanger_name()

char const * yac_couple_config_couple_get_yaxt_exchanger_name ( struct yac_couple_config_couple const * couple,
size_t field_couple_idx )

Get YAxT exchanger name for a field couple of this couple.

Parameters
[in]coupleCouple.
[in]field_couple_idxField couple index.
Returns
yaxt exchanger name.

Definition at line 571 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_has_component()

int yac_couple_config_couple_has_component ( struct yac_couple_config_couple const * couple,
size_t component_idx )

Check whether a couple contains a given component index.

Parameters
[in]coupleCouple.
[in]component_idxComponent index.
Returns
Non-zero if the component is part of the couple.

Definition at line 274 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_has_field_couple()

int yac_couple_config_couple_has_field_couple ( struct yac_couple_config_couple const * couple,
size_t src_component_idx,
size_t src_field_idx,
size_t tgt_component_idx,
size_t tgt_field_idx )

Check whether a couple contains a field couple with the given source and target

Parameters
[in]coupleCouple.
[in]src_component_idxSource component index.
[in]src_field_idxSource field index.
[in]tgt_component_idxTarget component index.
[in]tgt_field_idxTarget field index.
Returns
1 if a matching field couple is found.

Definition at line 315 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_init()

void yac_couple_config_couple_init ( struct yac_couple_config_couple * couple,
size_t component_idx_a,
size_t component_idx_b )

Initialize a couple.

The component index convention is enforced internally: component_indices[0] <= component_indices[1].

Parameters
[in,out]coupleCouple.
[in]component_idx_aFirst component index.
[in]component_idx_bSecond component index.

Definition at line 196 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_merge()

static void yac_couple_config_couple_merge ( void * a_,
void * b_,
MPI_Comm comm )
static

Definition at line 135 of file couple_config_couple.c.

Here is the call graph for this function:

◆ yac_couple_config_couple_normalize_component_indices()

static void yac_couple_config_couple_normalize_component_indices ( struct yac_couple_config_couple * couple)
static

Normalize component index order for an existing couple.

Ensures component_indices[0] <= component_indices[1] without modifying field_couples or num_field_couples.

Parameters
[in,out]coupleCouple.

Definition at line 185 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couple_pack()

static void yac_couple_config_couple_pack ( void * couple_,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )
static

Definition at line 72 of file couple_config_couple.c.

◆ yac_couple_config_couple_unpack()

static void yac_couple_config_couple_unpack ( void * buffer,
int buffer_size,
int * position,
void * couple_,
MPI_Comm comm )
static

Definition at line 93 of file couple_config_couple.c.

Here is the call graph for this function:

◆ yac_couple_config_couple_update_component_indices()

void yac_couple_config_couple_update_component_indices ( struct yac_couple_config_couple * couple,
size_t const * old_to_new_idx )

Update component indices of a couple and all contained field couples.

Parameters
[in,out]coupleCouple.
[in]old_to_new_idxMapping from old to new component index.

Definition at line 208 of file couple_config_couple.c.

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

◆ yac_couple_config_couple_update_field_indices()

void yac_couple_config_couple_update_field_indices ( struct yac_couple_config_couple * couples,
size_t num_couples,
size_t comp_idx,
size_t const * old_to_new_idx )

Update field indices of a couple and all contained field couples.

Parameters
[in,out]couplesArray of couples.
[in]num_couplesNumber of couples.
[in]comp_idxAssociated component index.
[in]old_to_new_idxMapping from old to new field index.

Definition at line 223 of file couple_config_couple.c.

Here is the caller graph for this function:

◆ yac_couple_config_couples_append()

size_t yac_couple_config_couples_append ( struct yac_couple_config * couple_config,
size_t component_idx_a,
size_t component_idx_b )

Append a new couple to the coupling configuration.

Parameters
[in,out]couple_configCoupling configuration.
[in]component_idx_aFirst component index.
[in]component_idx_bSecond component index.
Returns
Index of the appended couple.

Definition at line 243 of file couple_config_couple.c.

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

◆ yac_couple_config_couples_free()

void yac_couple_config_couples_free ( struct yac_couple_config_couple ** couples,
size_t * num_couples )

Free all couples and their dynamic data.

Parameters
[in,out]couplesArray of couples.
[in,out]num_couplesNumber of couples in couples.

Definition at line 49 of file couple_config_couple.c.

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

◆ yac_couple_config_couples_merge()

void yac_couple_config_couples_merge ( struct yac_couple_config * couple_config,
MPI_Comm comm )

Synchronize and merge all couples across ranks.

Parameters
[in,out]couple_configCoupling configuration.
[in]commMPI communicator.

Definition at line 166 of file couple_config_couple.c.

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

Variable Documentation

◆ dist_merge_vtable_couple

struct yac_dist_merge_vtable dist_merge_vtable_couple
static
Initial value:
=
static void yac_couple_config_couple_free_(void *couple)
static void yac_couple_config_couple_pack(void *couple_, void *buffer, int buffer_size, int *position, MPI_Comm comm)
static void yac_couple_config_couple_merge(void *a_, void *b_, MPI_Comm comm)
static int yac_couple_config_couple_compare(void const *a_, void const *b_)
static size_t yac_couple_config_couple_get_pack_size(void *couple_, MPI_Comm comm)
static void yac_couple_config_couple_unpack(void *buffer, int buffer_size, int *position, void *couple_, MPI_Comm comm)

Definition at line 158 of file couple_config_couple.c.