|
YAC 3.18.0
Yet Another Coupler
|
#include <stdlib.h>#include <string.h>#include <mpi.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... | |
| 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 314 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 84 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 75 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 257 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 272 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 370 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 246 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 283 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 293 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 303 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 59 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 391 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 154 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 134 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 175 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 103 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 119 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 192 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 206 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 220 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 232 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 423 of file interpolation_gen_config.c.
