|
YAC 3.12.0
Yet Another Coupler
|
#include <stdlib.h>#include <string.h>#include "ppm/ppm_xfuncs.h"#include "interpolation/interp_weights.h"#include "utils_core.h"#include "interpolation/interpolation_internal.h"#include "interpolation/interpolation_gen_config_internal.h"#include "collection_selection_internal.h"#include "yac_mpi_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | yac_interpolation_gen_config |
| Configuration structure for interpolation generation. More... | |
Functions | |
| struct yac_interpolation_gen_config * | yac_interpolation_gen_config_new (void) |
| Allocate and initialise an interpolation generation configuration structure. | |
| void | yac_interpolation_gen_config_delete (struct yac_interpolation_gen_config *config) |
| Release a interpolation generation configuration structure allocated by yac_interpolation_gen_config_new. | |
| struct yac_interpolation_gen_config * | yac_interpolation_gen_config_copy (struct yac_interpolation_gen_config const *src) |
| Create a copy of an interpolation generation configuration. | |
| void | yac_interpolation_gen_config_set_reorder (struct yac_interpolation_gen_config *config, enum yac_interp_weights_reorder_type reorder) |
| Set the reordering strategy for interpolation weights. | |
| void | yac_interpolation_gen_config_set_reorder_f2c (struct yac_interpolation_gen_config *config, int reorder) |
| void | yac_interpolation_gen_config_set_collection_size (struct yac_interpolation_gen_config *config, size_t collection_size) |
| Set the number of contiguous fields (starting at "0") in the field collection. | |
| void | yac_interpolation_gen_config_set_collection_selection (struct yac_interpolation_gen_config *config, struct yac_collection_selection const *collection_selection) |
| Set the collection selection of source field in the source field collection. | |
| void | yac_interpolation_gen_config_set_frac_mask_fallback_value (struct yac_interpolation_gen_config *config, double frac_mask_fallback_value) |
| Set the fractional mask fallback value. | |
| void | yac_interpolation_gen_config_set_scaling_factor (struct yac_interpolation_gen_config *config, double scaling_factor) |
| Set the multiplicative scaling factor. | |
| void | yac_interpolation_gen_config_set_scaling_summand (struct yac_interpolation_gen_config *config, double scaling_summand) |
| Set the additive scaling summand. | |
| void | yac_interpolation_gen_config_set_yaxt_exchanger_name (struct yac_interpolation_gen_config *config, char const *name) |
| Set the name of the Yaxt exchanger. | |
| void | yac_interpolation_gen_config_set_yaxt_exchanger_name_f2c (struct yac_interpolation_gen_config *config, char const *name) |
| enum yac_interp_weights_reorder_type | yac_interpolation_gen_config_get_reorder (struct yac_interpolation_gen_config const *config) |
| Get the configured reordering strategy. | |
| struct yac_collection_selection const * | yac_interpolation_gen_config_get_collection_selection (struct yac_interpolation_gen_config const *config) |
| Get the configured collection selection. | |
| double | yac_interpolation_gen_config_get_frac_mask_fallback_value (struct yac_interpolation_gen_config const *config) |
| Get the configured fractional mask fallback value. | |
| double | yac_interpolation_gen_config_get_scaling_factor (struct yac_interpolation_gen_config const *config) |
| Get the configured scaling factor. | |
| double | yac_interpolation_gen_config_get_scaling_summand (struct yac_interpolation_gen_config const *config) |
| Get the configured scaling summand. | |
| const char * | yac_interpolation_gen_config_get_yaxt_exchanger_name (struct yac_interpolation_gen_config const *config) |
| Get the configured Yaxt exchanger name. | |
| int | yac_interpolation_gen_config_compare (struct yac_interpolation_gen_config const *a, struct yac_interpolation_gen_config const *b) |
| Compare two interpolation configuration structures. | |
| size_t | yac_interpolation_gen_config_get_pack_size (struct yac_interpolation_gen_config const *cfg, MPI_Comm comm) |
| Get the MPI packing size of an interpolation generation configuration. | |
| void | yac_interpolation_gen_config_pack (struct yac_interpolation_gen_config const *cfg, void *buffer, int buffer_size, int *position, MPI_Comm comm) |
| Pack an interpolation generation configuration into an MPI buffer. | |
| struct yac_interpolation_gen_config * | yac_interpolation_gen_config_unpack (void const *buffer, int buffer_size, int *position, MPI_Comm comm) |
| Unpack an interpolation generation configuration from an MPI buffer. | |
| int yac_interpolation_gen_config_compare | ( | struct yac_interpolation_gen_config const * | a, |
| struct yac_interpolation_gen_config const * | b ) |
Compare two interpolation configuration structures.
Compares two yac_interpolation_gen_config objects and returns an integer describing their relative order.
Rules:
0 if both configurations are equivalent or both are NULL<0 if a is considered less than b>0 if a is considered greater than bProperty: compare(a, b) == -compare(b, a)
| [in] | a | First configuration selection (may be NULL) |
| [in] | b | Second configuration selection (may be NULL) |
Definition at line 312 of file interpolation_gen_config.c.


| struct yac_interpolation_gen_config * yac_interpolation_gen_config_copy | ( | struct yac_interpolation_gen_config const * | src | ) |
Create a copy of an interpolation generation configuration.
Allocates and returns a new configuration structure containing the same parameter values as the provided source. The string pointer yaxt_exchanger_name is copied by reference (not duplicated).
The returned configuration must be released using yac_interpolation_gen_config_delete.
| [in] | src | Pointer to a valid source configuration. |
Definition at line 82 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_delete | ( | struct yac_interpolation_gen_config * | config | ) |
Release a interpolation generation configuration structure allocated by yac_interpolation_gen_config_new.
| [in,out] | config | Pointer to interpolation generation configuration structure. May be NULL. |
Definition at line 73 of file interpolation_gen_config.c.


| struct yac_collection_selection const * yac_interpolation_gen_config_get_collection_selection | ( | struct yac_interpolation_gen_config const * | config | ) |
Get the configured collection selection.
| [in] | config | Pointer to a valid configuration structure. |
Definition at line 255 of file interpolation_gen_config.c.

| double yac_interpolation_gen_config_get_frac_mask_fallback_value | ( | struct yac_interpolation_gen_config const * | config | ) |
Get the configured fractional mask fallback value.
| [in] | config | Pointer to a valid configuration structure. |
Definition at line 270 of file interpolation_gen_config.c.

| size_t yac_interpolation_gen_config_get_pack_size | ( | struct yac_interpolation_gen_config const * | config, |
| MPI_Comm | comm ) |
Get the MPI packing size of an interpolation generation configuration.
Computes the number of bytes required to pack a yac_interpolation_gen_config structure for MPI communication using yac_interpolation_gen_config_pack.
The returned size accounts for all structure members, including nested objects such as the yac_collection_selection and the optional exchanger name string.
| [in] | config | Pointer to the configuration structure (must not be NULL) |
| [in] | comm | MPI communicator used for datatype size computation |
Definition at line 368 of file interpolation_gen_config.c.

| enum yac_interp_weights_reorder_type yac_interpolation_gen_config_get_reorder | ( | struct yac_interpolation_gen_config const * | config | ) |
Get the configured reordering strategy.
| [in] | config | Pointer to a valid configuration structure. |
Definition at line 244 of file interpolation_gen_config.c.

| double yac_interpolation_gen_config_get_scaling_factor | ( | struct yac_interpolation_gen_config const * | config | ) |
Get the configured scaling factor.
| [in] | config | Pointer to a valid configuration structure. |
Definition at line 281 of file interpolation_gen_config.c.

| double yac_interpolation_gen_config_get_scaling_summand | ( | struct yac_interpolation_gen_config const * | config | ) |
Get the configured scaling summand.
| [in] | config | Pointer to a valid configuration structure. |
Definition at line 291 of file interpolation_gen_config.c.

| const char * yac_interpolation_gen_config_get_yaxt_exchanger_name | ( | struct yac_interpolation_gen_config const * | config | ) |
Get the configured Yaxt exchanger name.
| [in] | config | Pointer to a valid configuration structure. |
Definition at line 301 of file interpolation_gen_config.c.

| struct yac_interpolation_gen_config * yac_interpolation_gen_config_new | ( | void | ) |
Allocate and initialise an interpolation generation configuration structure.
The returned structure is allocated on the heap and must be released using yac_interpolation_gen_config_delete. It is initialised with default values.
Definition at line 57 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_pack | ( | struct yac_interpolation_gen_config const * | config, |
| void * | buffer, | ||
| int | buffer_size, | ||
| int * | position, | ||
| MPI_Comm | comm ) |
Pack an interpolation generation configuration into an MPI buffer.
| [in] | config | Pointer to configuration to pack (must not be NULL) |
| [in,out] | buffer | Destination buffer for packed data |
| [in] | buffer_size | Size of buffer in bytes |
| [in,out] | position | Current position in the buffer (updated) |
| [in] | comm | MPI communicator used for datatype consistency |
Definition at line 389 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_collection_selection | ( | struct yac_interpolation_gen_config * | config, |
| struct yac_collection_selection const * | collection_selection ) |
Set the collection selection of source field in the source field collection.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | collection_selection | Collection selection that must not be NULL. |
Definition at line 152 of file interpolation_gen_config.c.


| void yac_interpolation_gen_config_set_collection_size | ( | struct yac_interpolation_gen_config * | config, |
| size_t | collection_size ) |
Set the number of contiguous fields (starting at "0") in the field collection.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | collection_size | Positive collection size (> 0) that must not be equal to SIZE_MAX (reserved for "unset"). |
Definition at line 132 of file interpolation_gen_config.c.


| void yac_interpolation_gen_config_set_frac_mask_fallback_value | ( | struct yac_interpolation_gen_config * | config, |
| double | frac_mask_fallback_value ) |
Set the fractional mask fallback value.
Defines the value to be used for masked target points in fractional mask interpolations.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | frac_mask_fallback_value | Fallback value used in fractional masking. Must satisfy YAC_FRAC_MASK_VALUE_IS_VALID. |
Definition at line 173 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_reorder | ( | struct yac_interpolation_gen_config * | config, |
| enum yac_interp_weights_reorder_type | reorder ) |
Set the reordering strategy for interpolation weights.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | reorder | Reordering strategy to apply. Must be either YAC_MAPPING_ON_SRC or YAC_MAPPING_ON_TGT. |
Definition at line 101 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_reorder_f2c | ( | struct yac_interpolation_gen_config * | config, |
| int | reorder ) |
Definition at line 117 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_scaling_factor | ( | struct yac_interpolation_gen_config * | config, |
| double | scaling_factor ) |
Set the multiplicative scaling factor.
The scaling factor is applied to interpolation results. It must be a finite, normal floating-point number or 0.0.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | scaling_factor | Scaling factor to apply. |
Definition at line 190 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_scaling_summand | ( | struct yac_interpolation_gen_config * | config, |
| double | scaling_summand ) |
Set the additive scaling summand.
The summand is added to interpolation results after applying the scaling factor. It must be a finite, normal floating-point number or 0.0.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | scaling_summand | Scaling summand to apply. |
Definition at line 204 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_yaxt_exchanger_name | ( | struct yac_interpolation_gen_config * | config, |
| char const * | yaxt_exchanger_name ) |
Set the name of the Yaxt exchanger.
The provided string is stored by pointer (not copied). May be NULL to indicate that the default exchanger should be used.
| [in,out] | config | Pointer to a valid configuration structure. |
| [in] | yaxt_exchanger_name | Pointer to a yaxt exchanger name string or NULL. |
Definition at line 218 of file interpolation_gen_config.c.

| void yac_interpolation_gen_config_set_yaxt_exchanger_name_f2c | ( | struct yac_interpolation_gen_config * | config, |
| char const * | name ) |
Definition at line 230 of file interpolation_gen_config.c.

| struct yac_interpolation_gen_config * yac_interpolation_gen_config_unpack | ( | void const * | buffer, |
| int | buffer_size, | ||
| int * | position, | ||
| MPI_Comm | comm ) |
Unpack an interpolation generation configuration from an MPI buffer.
Reconstructs a newly allocated yac_interpolation_gen_config structure from a buffer previously filled by yac_interpolation_gen_config_pack.
| [in] | buffer | Source buffer containing packed data |
| [in] | buffer_size | Size of the packed buffer in bytes |
| [in,out] | position | Current position in the buffer (updated) |
| [in] | comm | MPI communicator used for datatype consistency |
Definition at line 421 of file interpolation_gen_config.c.
