|
YAC 3.18.0
Yet Another Coupler
|
#include <stdint.h>#include <string.h>#include "couple_config_internal.h"#include "couple_config_component.h"#include "couple_config_couple.h"#include "couple_config_field.h"#include "yac_mpi_common.h"#include "yac_mpi_internal.h"#include "dist_merge.h"#include "utils_core.h"
Go to the source code of this file.
Macros | |
| #define | CHECK_FIELD_IDX(COMPONENT, FIELD_IDX, ROUTINE) |
Variables | |
| static struct yac_dist_merge_vtable | dist_merge_vtable_component |
| #define CHECK_FIELD_IDX | ( | COMPONENT, | |
| FIELD_IDX, | |||
| ROUTINE ) |
Definition at line 360 of file couple_config_component.c.
|
static |
Definition at line 158 of file couple_config_component.c.


| 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).
| [in,out] | components | Component array pointer. |
| [in,out] | num_components | Array length. |
| [in] | name | Component name. |
Definition at line 104 of file couple_config_component.c.


|
static |
Append a new field to a component.
| [in,out] | component | Component to append to. |
| [in] | field_name | Field name. |
| [in] | grid_idx | Grid index. |
| [in] | timestep | Timestep string. |
| [in] | collection_size | Collection size. |
Definition at line 326 of file couple_config_component.c.


|
static |
Definition at line 55 of file couple_config_component.c.
| int yac_couple_config_component_field_is_valid | ( | struct yac_couple_config_component const * | component, |
| size_t | field_idx ) |
Check whether a field identified by index is fully defined (has a timestep and a collection size).
| [in] | component | Component. |
| [in] | field_idx | Field index. |
Definition at line 394 of file couple_config_component.c.


| 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 ) |
Search for a field by grid index and name within a component.
| [in] | component | Component to search in. |
| [in] | grid_idx | Grid index of the field. |
| [in] | field_name | Name of the field. |
Definition at line 342 of file couple_config_component.c.


|
static |
Definition at line 128 of file couple_config_component.c.


|
static |
|
static |
Return the field identified by grid index and field name.
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
Definition at line 257 of file couple_config_component.c.


| 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.
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
Definition at line 305 of file couple_config_component.c.


| 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.
| [in] | component | Component. |
| [in] | field_idx | Field index. |
Definition at line 406 of file couple_config_component.c.


| 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.
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
Definition at line 285 of file couple_config_component.c.


| 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.
| [in] | component | Component. |
| [in] | field_idx | Field index. |
Definition at line 417 of file couple_config_component.c.


| size_t yac_couple_config_component_get_field_grid_idx | ( | struct yac_couple_config_component const * | component, |
| size_t | field_idx ) |
Return the grid index of a field identified by index.
| [in] | component | Component. |
| [in] | field_idx | Field index. |
Definition at line 375 of file couple_config_component.c.

| 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.
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
Definition at line 275 of file couple_config_component.c.


| char const * yac_couple_config_component_get_field_name | ( | struct yac_couple_config_component const * | component, |
| size_t | field_idx ) |
Return the name of a field identified by index.
| [in] | component | Component. |
| [in] | field_idx | Field index. |
Definition at line 366 of file couple_config_component.c.

| 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.
| [in] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
Definition at line 430 of file couple_config_component.c.


| 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.
| [in] | component | Component. |
| [in] | field_idx | Field index. |
Definition at line 439 of file couple_config_component.c.


| char const * yac_couple_config_component_get_name | ( | struct yac_couple_config_component const * | component | ) |
Return the name of a component.
| [in] | component | Component. |
Definition at line 238 of file couple_config_component.c.

|
static |
|
static |
Initialise a component with the given name and zero fields.
| [in,out] | component | Component to initialise. |
| [in] | name | Component name (will be duplicated). |
Definition at line 90 of file couple_config_component.c.

|
static |
|
static |
| 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.
| [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 295 of file couple_config_component.c.


| 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.
| [in,out] | component | Component. |
| [in] | grid_idx | Grid index. |
| [in] | field_name | Field name. |
| [in] | metadata | Metadata string (NULL clears it). |
Definition at line 449 of file couple_config_component.c.


|
static |
| void yac_couple_config_component_update_all_grid_idx | ( | struct yac_couple_config_component * | component, |
| size_t const * | old_to_new_idx ) |
Update all fields' grid indices using an old-to-new grid index mapping.
| [in,out] | component | Component. |
| [in] | old_to_new_idx | Mapping from old to new grid indices. |
Definition at line 384 of file couple_config_component.c.

| 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.
| [in,out] | component | Component. |
| [in] | field_name | Field name. |
| [in] | grid_idx | Grid index. |
| [in] | timestep | Timestep string. |
| [in] | collection_size | Collection size. |
Definition at line 459 of file couple_config_component.c.


| void yac_couple_config_components_free | ( | struct yac_couple_config_component ** | components, |
| size_t * | num_components ) |
Free all components and their dynamic data from a coupling configuration.
| [in,out] | components | Component array. |
| [in,out] | num_components | Number of components. |
Definition at line 208 of file couple_config_component.c.


| 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 ) |
Synchronize and merge all components (including their fields) across ranks in the provided communicator.
| [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 177 of file couple_config_component.c.


| void yac_couple_config_set_component_metadata_value | ( | struct yac_couple_config_component * | component, |
| char const * | metadata ) |
Set the metadata of a component.
| [in,out] | component | Component. |
| [in] | metadata | Metadata string (NULL is not allowed). |
Definition at line 219 of file couple_config_component.c.

|
static |
Definition at line 150 of file couple_config_component.c.