#include <stddef.h>
#include "yac_mpi_common.h"
Go to the source code of this file.
|
| size_t | yac_couple_config_component_append (struct yac_couple_config_component **components, size_t *num_components, char const *name) |
| |
| void | yac_couple_config_components_free (struct yac_couple_config_component **components, size_t *num_components) |
| |
| void | yac_couple_config_set_component_metadata_value (struct yac_couple_config_component *component, char const *metadata) |
| |
| void | yac_couple_config_components_merge (struct yac_couple_config_component **components, size_t *num_components, struct yac_couple_config_couple *couples, size_t num_couples, MPI_Comm comm) |
| |
| char const * | yac_couple_config_component_get_name (struct yac_couple_config_component const *component) |
| |
| char const * | yac_couple_config_component_get_field_metadata (struct yac_couple_config_component const *component, size_t grid_idx, char const *field_name) |
| |
| double | yac_couple_config_component_get_field_frac_mask_fallback_value (struct yac_couple_config_component const *component, size_t grid_idx, char const *field_name) |
| |
| void | yac_couple_config_component_set_field_frac_mask_fallback_value (struct yac_couple_config_component *component, size_t grid_idx, char const *field_name, double value) |
| |
| size_t | yac_couple_config_component_get_field_collection_size (struct yac_couple_config_component const *component, size_t grid_idx, char const *field_name) |
| |
| struct yac_couple_config_field * | yac_couple_config_component_find_field (struct yac_couple_config_component const *component, size_t grid_idx, char const *field_name) |
| |
| void | yac_couple_config_component_set_field_metadata (struct yac_couple_config_component *component, size_t grid_idx, char const *field_name, char const *metadata) |
| |
| size_t | yac_couple_config_component_update_or_append_field (struct yac_couple_config_component *component, char const *field_name, size_t grid_idx, char const *timestep, size_t collection_size) |
| |
| char const * | yac_couple_config_component_get_field_name (struct yac_couple_config_component const *component, size_t field_idx) |
| |
| size_t | yac_couple_config_component_get_field_grid_idx (struct yac_couple_config_component const *component, size_t field_idx) |
| |
| void | yac_couple_config_component_update_all_grid_idx (struct yac_couple_config_component *component, size_t const *old_to_new_idx) |
| |
| char const * | yac_couple_config_component_get_field_timestep (struct yac_couple_config_component const *component, size_t grid_idx, char const *field_name) |
| |
| char const * | yac_couple_config_component_get_field_timestep_by_idx (struct yac_couple_config_component const *component, size_t field_idx) |
| |
| int | yac_couple_config_component_field_is_valid (struct yac_couple_config_component const *component, size_t field_idx) |
| |
| size_t | yac_couple_config_component_get_field_collection_size_by_idx (struct yac_couple_config_component const *component, size_t field_idx) |
| |
| double | yac_couple_config_component_get_field_frac_mask_fallback_value_by_idx (struct yac_couple_config_component const *component, size_t field_idx) |
| |
◆ yac_couple_config_component_append()
| size_t yac_couple_config_component_append |
( |
struct yac_couple_config_component ** | components, |
|
|
size_t * | num_components, |
|
|
char const * | name ) |
Append a component with the given name to the array, or return the index of an existing component with the same name (deduplication).
- Parameters
-
| [in,out] | components | Component array pointer. |
| [in,out] | num_components | Array length. |
| [in] | name | Component name. |
- Returns
- Index of the (new or existing) component.
Definition at line 102 of file couple_config_component.c.
◆ yac_couple_config_component_field_is_valid()
Check whether a field identified by index is fully defined (has a timestep and a collection size).
- Parameters
-
| [in] | component | Component. |
| [in] | field_idx | Field index. |
- Return values
-
| Nonzero | if the field is valid |
| Zero | otherwise |
Definition at line 383 of file couple_config_component.c.
◆ yac_couple_config_component_find_field()
Search for a field by grid index and name within a component.
- Parameters
-
| [in] | component | Component to search in. |
| [in] | grid_idx | Grid index of the field. |
| [in] | field_name | Name of the field. |
- Return values
-
| field | if a match is found |
| NULL | if not found. |
Definition at line 329 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_collection_size()
| size_t yac_couple_config_component_get_field_collection_size |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | grid_idx, |
|
|
char const * | field_name ) |
Return the collection size of a field.
- Parameters
-
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
- Returns
- Collection size.
Definition at line 292 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_collection_size_by_idx()
| size_t yac_couple_config_component_get_field_collection_size_by_idx |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | field_idx ) |
Return the collection size of a field identified by index.
- Parameters
-
| [in] | component | Component. |
| [in] | field_idx | Field index. |
- Returns
- Collection size.
Definition at line 394 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_frac_mask_fallback_value()
| double yac_couple_config_component_get_field_frac_mask_fallback_value |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | grid_idx, |
|
|
char const * | field_name ) |
Return the fractional mask fallback value of a field.
- Parameters
-
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
- Returns
- Fractional mask fallback value.
Definition at line 272 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_frac_mask_fallback_value_by_idx()
| double yac_couple_config_component_get_field_frac_mask_fallback_value_by_idx |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | field_idx ) |
Return the fractional mask fallback value of a field identified by index.
- Parameters
-
| [in] | component | Component. |
| [in] | field_idx | Field index. |
- Returns
- Fractional mask fallback value.
Definition at line 403 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_grid_idx()
Return the grid index of a field identified by index.
- Parameters
-
| [in] | component | Component. |
| [in] | field_idx | Field index. |
- Returns
- Grid index.
Definition at line 365 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_metadata()
| char const * yac_couple_config_component_get_field_metadata |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | grid_idx, |
|
|
char const * | field_name ) |
Return the metadata for a field identified by grid index and field name.
- Parameters
-
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
- Return values
-
| metadata | of the field |
| NULL | if metadata is not set. |
Definition at line 262 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_name()
Return the name of a field identified by index.
- Parameters
-
| [in] | component | Component. |
| [in] | field_idx | Field index. |
- Returns
- Field name.
Definition at line 353 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_timestep()
| char const * yac_couple_config_component_get_field_timestep |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | grid_idx, |
|
|
char const * | field_name ) |
Return the timestep of a field identified by grid index and field name.
- Parameters
-
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
- Return values
-
| timestep | of the field |
| NULL | if not yet set. |
Definition at line 413 of file couple_config_component.c.
◆ yac_couple_config_component_get_field_timestep_by_idx()
| char const * yac_couple_config_component_get_field_timestep_by_idx |
( |
struct yac_couple_config_component const * | component, |
|
|
size_t | field_idx ) |
Return the timestep of a field identified by index.
- Parameters
-
| [in] | component | Component. |
| [in] | field_idx | Field index. |
- Return values
-
| timestep | of the field |
| NULL | if not yet set. |
Definition at line 422 of file couple_config_component.c.
◆ yac_couple_config_component_get_name()
◆ yac_couple_config_component_set_field_frac_mask_fallback_value()
| void yac_couple_config_component_set_field_frac_mask_fallback_value |
( |
struct yac_couple_config_component * | component, |
|
|
size_t | grid_idx, |
|
|
char const * | field_name, |
|
|
double | value ) |
Set the fractional mask fallback value of a field.
- Parameters
-
| [in,out] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
| [in] | value | Fractional mask fallback value to set. |
Definition at line 282 of file couple_config_component.c.
◆ yac_couple_config_component_set_field_metadata()
| void yac_couple_config_component_set_field_metadata |
( |
struct yac_couple_config_component * | component, |
|
|
size_t | grid_idx, |
|
|
char const * | field_name, |
|
|
char const * | metadata ) |
Set the metadata of a field identified by grid index and field name.
- Parameters
-
| [in,out] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
| [in] | metadata | Metadata string (NULL clears it). |
Definition at line 430 of file couple_config_component.c.
◆ yac_couple_config_component_update_all_grid_idx()
Update all fields' grid indices using an old-to-new grid index mapping.
- Parameters
-
| [in,out] | component | Component. |
| [in] | old_to_new_idx | Mapping from old to new grid indices. |
Definition at line 373 of file couple_config_component.c.
◆ yac_couple_config_component_update_or_append_field()
| size_t yac_couple_config_component_update_or_append_field |
( |
struct yac_couple_config_component * | component, |
|
|
char const * | field_name, |
|
|
size_t | grid_idx, |
|
|
char const * | timestep, |
|
|
size_t | collection_size ) |
Update an existing field's timestep and collection size, or append it if it does not yet exist.
- Parameters
-
| [in,out] | component | Component. |
| [in] | field_name | Field name. |
| [in] | grid_idx | Grid index. |
| [in] | timestep | Timestep string. |
| [in] | collection_size | Collection size. |
- Returns
- Index of the updated or appended field.
Definition at line 440 of file couple_config_component.c.
◆ yac_couple_config_components_free()
Free all components and their dynamic data from a coupling configuration.
- Parameters
-
| [in,out] | components | Component array. |
| [in,out] | num_components | Number of components. |
Definition at line 204 of file couple_config_component.c.
◆ yac_couple_config_components_merge()
Synchronize and merge all components (including their fields) across ranks in the provided communicator.
- Parameters
-
| [in,out] | components | Component array. |
| [in,out] | num_components | Number of components. |
| [in,out] | couples | Couple array. |
| [in] | num_couples | Number of couples. |
| [in] | comm | MPI communicator. |
Definition at line 173 of file couple_config_component.c.
◆ yac_couple_config_set_component_metadata_value()
Set the metadata of a component.
- Parameters
-
| [in,out] | component | Component. |
| [in] | metadata | Metadata string (NULL is not allowed). |
Definition at line 215 of file couple_config_component.c.