YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
couple_config_field.h File Reference
#include <stddef.h>
#include "yac_mpi_common.h"
Include dependency graph for couple_config_field.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yac_couple_config_field
 

Functions

void yac_couple_config_field_free (struct yac_couple_config_field *field)
 
void yac_couple_config_fields_merge (size_t *num_fields, struct yac_couple_config_field **fields, MPI_Comm comm, size_t **old_to_new_idx)
 
struct yac_couple_config_field * yac_couple_config_field_find (size_t num_fields, struct yac_couple_config_field *fields, struct yac_couple_config_field const *field)
 
void yac_couple_config_field_init (struct yac_couple_config_field *field, char const *name, size_t grid_idx, char const *timestep, size_t collection_size)
 
void yac_couple_config_field_set_timestep (struct yac_couple_config_field *field, char const *timestep)
 
char const * yac_couple_config_field_get_timestep (struct yac_couple_config_field const *field)
 
void yac_couple_config_field_set_collection_size (struct yac_couple_config_field *field, size_t collection_size)
 
size_t yac_couple_config_field_get_collection_size (struct yac_couple_config_field const *field)
 
void yac_couple_config_set_field_metadata_value (struct yac_couple_config_field *field, char const *metadata)
 
char const * yac_couple_config_field_get_metadata (struct yac_couple_config_field const *field)
 
void yac_couple_config_field_set_frac_mask_fallback_value (struct yac_couple_config_field *field, double value)
 
double yac_couple_config_field_get_frac_mask_fallback_value (struct yac_couple_config_field const *field)
 
int yac_couple_config_field_has_valid_definition (struct yac_couple_config_field const *field)
 

Function Documentation

◆ yac_couple_config_field_find()

struct yac_couple_config_field * yac_couple_config_field_find ( size_t num_fields,
struct yac_couple_config_field * fields,
struct yac_couple_config_field const * field )

Search for a matching field in an array.

Parameters
[in]num_fieldsNumber of fields.
[in]fieldsArray of fields to search in.
[in]fieldField to search for.
Return values
fieldif a match is found
NULLif not found.

Definition at line 373 of file couple_config_field.c.

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

◆ yac_couple_config_field_free()

void yac_couple_config_field_free ( struct yac_couple_config_field * field)

Free all dynamic data owned by a field.

Parameters
[in,out]fieldField.

Definition at line 340 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_get_collection_size()

size_t yac_couple_config_field_get_collection_size ( struct yac_couple_config_field const * field)

Return the collection size of a field.

Parameters
[in]fieldField.
Returns
Collection size.

Definition at line 126 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_get_frac_mask_fallback_value()

double yac_couple_config_field_get_frac_mask_fallback_value ( struct yac_couple_config_field const * field)

Return the fractional mask fallback value of a field.

Parameters
[in]fieldField.
Returns
Fractional mask fallback value.

Definition at line 96 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_get_metadata()

char const * yac_couple_config_field_get_metadata ( struct yac_couple_config_field const * field)

Return the metadata of a field.

Parameters
[in]fieldField.
Return values
metadataof the field
NULLif metadata is not set.

Definition at line 90 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_get_timestep()

char const * yac_couple_config_field_get_timestep ( struct yac_couple_config_field const * field)

Return the timestep of a field.

Parameters
[in]fieldField.
Return values
timestepof the field
NULLif timestep is not set.

Definition at line 50 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_has_valid_definition()

int yac_couple_config_field_has_valid_definition ( struct yac_couple_config_field const * field)

Check if a field has a valid definition.

A field has a valid definition if it has a defined timestep and collection size.

Parameters
[in]fieldField.
Return values
Nonzeroif the field has a valid definition
Zerootherwise

Definition at line 388 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_init()

void yac_couple_config_field_init ( struct yac_couple_config_field * field,
char const * name,
size_t grid_idx,
char const * timestep,
size_t collection_size )

Initialize a yac_couple_config_field.

Parameters
[in,out]fieldField.
[in]nameField name.
[in]grid_idxGrid index.
[in]timestepTimestep string.
[in]collection_sizeCollection size.

Definition at line 18 of file couple_config_field.c.

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

◆ yac_couple_config_field_set_collection_size()

void yac_couple_config_field_set_collection_size ( struct yac_couple_config_field * field,
size_t collection_size )

Set or validate the collection size of a field.

Parameters
[in,out]fieldField.
[in]collection_sizeCollection size.

Definition at line 55 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_set_frac_mask_fallback_value()

void yac_couple_config_field_set_frac_mask_fallback_value ( struct yac_couple_config_field * field,
double value )

Set the fractional mask fallback value of a field.

Parameters
[in,out]fieldField.
[in]valueFractional mask fallback value to set.

Definition at line 110 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_field_set_timestep()

void yac_couple_config_field_set_timestep ( struct yac_couple_config_field * field,
char const * timestep )

Set or validate the timestep of a field.

Parameters
[in,out]fieldField.
[in]timestepTimestep string.

Definition at line 34 of file couple_config_field.c.

Here is the caller graph for this function:

◆ yac_couple_config_fields_merge()

void yac_couple_config_fields_merge ( size_t * num_fields,
struct yac_couple_config_field ** fields,
MPI_Comm comm,
size_t ** old_to_new_idx )

Synchronize and merge fields across ranks.

Parameters
[in,out]num_fieldsNumber of fields.
[in,out]fieldsArray of fields.
[in]commMPI communicator.
[out]old_to_new_idxMapping from old to new field indices.

Definition at line 362 of file couple_config_field.c.

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

◆ yac_couple_config_set_field_metadata_value()

void yac_couple_config_set_field_metadata_value ( struct yac_couple_config_field * field,
char const * metadata )

Set or validate the metadata of a field.

Parameters
[in,out]fieldField.
[in]metadataMetadata string (NULL is not allowed).

Definition at line 72 of file couple_config_field.c.

Here is the caller graph for this function: