YetAnotherCoupler 3.4.0
Loading...
Searching...
No Matches
yac.c File Reference
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "yac_mpi_common.h"
#include "ensure_array_size.h"
#include "event.h"
#include "yac.h"
#include "mpi_handshake.h"
#include "utils_mci.h"
#include "version.h"
#include "instance.h"
#include "fields.h"
#include "couple_config.h"
#include "config_yaml.h"
#include "geometry.h"
#include "yac_mpi.h"
#include "utils_common.h"
Include dependency graph for yac.c:

Go to the source code of this file.

Data Structures

struct  user_input_data_component
 
struct  user_input_data_points
 
struct  user_input_data_masks
 
struct  yac_ext_couple_config
 

Macros

#define NO_CHECK   (1)
 
#define PUT_CHECK   (put_mask[i][j])
 
#define SUM   +=
 
#define ASSIGN   =
 
#define AGGREGATE_FRAC(CHECK, EXTRA_CHECK, ACCU_OP)
 
#define AGGREATE_NOFRAC(CHECK, EXTRA_CHECK, ACCU_OP)
 
#define AGGREGATE(EXTRA_CHECK, ACCU_OP)
 
#define NO_CHECK   (1)
 
#define PUT_CHECK   (put_mask[i][j])
 
#define WEIGHT_ACC_(ACC, CHECK, EXTRA_CHECK)
 
#define WEIGHT_ACC(ACC, EXTRA_CHECK)
 

Enumerations

enum  { YAC_CONFIG_OUTPUT_SYNC_LOC_DEF_COMP_ = 0 , YAC_CONFIG_OUTPUT_SYNC_LOC_SYNC_DEF_ = 1 , YAC_CONFIG_OUTPUT_SYNC_LOC_ENDDEF_ = 2 }
 

Functions

static int yac_pointer_to_unique_id (void *pointer)
 
static void * yac_unique_id_to_pointer (int id, char const *id_name)
 
static int yac_lookup_pointer (void const *pointer)
 
static void yac_free_pointer_unique_lookup ()
 
static int yac_add_grid (const char *grid_name, struct yac_basic_grid_data grid_data)
 
static void yac_free_grids ()
 
static void yac_free_points ()
 
static void yac_free_masks ()
 
static void yac_free_components ()
 
static void yac_free_interp_stack_configs ()
 
static void check_default_instance_id (char const *routine_name)
 
static void yac_check_version (MPI_Comm comm)
 
void check_mpi_initialised (char const *routine_name)
 
void yac_cmpi_handshake (MPI_Comm comm, size_t n, char const **group_names, MPI_Comm *group_comms)
 
void yac_cmpi_handshake_f2c (MPI_Fint comm, int n, char const **group_names, MPI_Fint *group_comms)
 
static int yac_init (MPI_Comm comm)
 
int yac_cget_default_instance_id ()
 
void yac_cinit_comm_instance (MPI_Comm comm, int *yac_instance_id)
 
void yac_cinit_comm_instance_f2c (MPI_Fint comm, int *yac_instance_id)
 
void yac_cinit_comm (MPI_Comm comm)
 
void yac_cinit_comm_f2c (MPI_Fint comm_f)
 
void yac_cinit_instance (int *yac_instance_id)
 
void yac_cinit (void)
 
void yac_cinit_comm_dummy (MPI_Comm comm)
 
void yac_cinit_comm_dummy_f2c (MPI_Fint comm_f)
 
void yac_cinit_dummy (void)
 
int yac_cyaml_get_emitter_flag_default_c2f ()
 
int yac_cyaml_get_emitter_flag_json_c2f ()
 
void yac_cread_config_yaml_instance (int yac_instance_id, const char *yaml_filename)
 
void yac_cread_config_yaml (const char *yaml_filename)
 
void yac_cread_config_json_instance (int yac_instance_id, const char *yaml_filename)
 
void yac_cread_config_json (const char *yaml_filename)
 
void yac_cset_config_output_file_instance (int yac_instance_id, const char *filename, int fileformat, int sync_location, int include_definitions)
 
void yac_cset_config_output_file (const char *filename, int filetype, int sync_location, int include_definitions)
 
void yac_cset_grid_output_file_instance (int yac_instance_id, const char *gridname, const char *filename)
 
void yac_cset_grid_output_file (const char *gridname, const char *filename)
 
static void yac_ccleanup_instance_ (int yac_instance_id)
 
void yac_ccleanup_instance (int yac_instance_id)
 
void yac_ccleanup ()
 
static void cleanup ()
 
void yac_cfinalize_instance (int yac_instance_id)
 
void yac_cfinalize ()
 
void yac_cdef_datetime_instance (int yac_instance_id, const char *start_datetime, const char *end_datetime)
 
void yac_cdef_datetime (const char *start_datetime, const char *end_datetime)
 
void yac_cdef_calendar (int calendar)
 
int yac_cget_calendar ()
 
char * yac_cget_start_datetime_instance (int yac_instance_id)
 
char * yac_cget_start_datetime (void)
 
char * yac_cget_end_datetime_instance (int yac_instance_id)
 
char * yac_cget_end_datetime (void)
 
char * yac_cget_version (void)
 
static struct user_input_data_componentget_user_input_data_component (int comp_id, char const *routine)
 
void yac_cget_comp_comm (int comp_id, MPI_Comm *comp_comm)
 
void yac_get_comp_comm_f2c (int comp_id, MPI_Fint *comp_comm_f)
 
void yac_cget_comp_size_c2py (int comp_id, int *size)
 
void yac_cget_comp_rank_c2py (int comp_id, int *rank)
 
void yac_cget_comps_comm_instance (int yac_instance_id, char const **comp_names, int num_comps, MPI_Comm *comps_comm)
 
void yac_cget_comps_comm (const char **comp_names, int num_comps, MPI_Comm *comps_comm)
 
void yac_cget_comps_comm_instance_f2c (int yac_instance_id, char const **comp_names, int num_comps, MPI_Fint *comps_comm_f)
 
void yac_cget_comps_comm_f2c (char const **comp_names, int num_comps, MPI_Fint *comps_comm_f)
 
void yac_cpredef_comp_instance (int yac_instance_id, char const *name, int *comp_id)
 
void yac_cpredef_comp (char const *name, int *comp_id)
 
void yac_cdef_comps_instance (int yac_instance_id, char const **comp_names, int num_comps, int *comp_ids)
 
void yac_cdef_comps (char const **comp_names, int num_comps, int *comp_ids)
 
void yac_cdef_comp_instance (int yac_instance_id, char const *comp_name, int *comp_id)
 
void yac_cdef_comp (char const *comp_name, int *comp_id)
 
static int user_input_data_add_points (struct yac_basic_grid *grid, enum yac_location location, yac_coordinate_pointer coordinates)
 
static void check_x_vertices (double const *x_vertices, size_t count, char const *routine_name)
 
static void check_y_vertices (double const *y_vertices, size_t count, char const *routine_name)
 
static void check_cell_to_vertex (int *cell_to_vertex, int *num_vertices_per_cell, int nbr_cells, int nbr_vertices, char const *routine_name)
 
void yac_cdef_points_reg2d (int const grid_id, int const *nbr_points, int const located, double const *x_points, double const *y_points, int *point_id)
 
void yac_cdef_points_curve2d (int const grid_id, int const *nbr_points, int const located, double const *x_points, double const *y_points, int *point_id)
 
void yac_cdef_points_unstruct (int const grid_id, int const nbr_points, int const located, double const *x_points, double const *y_points, int *point_id)
 
static int user_input_data_add_mask (struct yac_basic_grid *grid, enum yac_location location, int const *is_valid, size_t nbr_points, char const *name)
 
void yac_cdef_mask_named (int const grid_id, int const nbr_points, int const located, int const *is_valid, char const *name, int *mask_id)
 
void yac_cdef_mask (int const grid_id, int const nbr_points, int const located, int const *is_valid, int *mask_id)
 
void yac_cset_mask (int const *is_valid, int points_id)
 
void yac_cdef_field_mask (char const *name, int const comp_id, int const *point_ids, int const *mask_ids, int const num_pointsets, int collection_size, const char *timestep, int time_unit, int *field_id)
 
void yac_cdef_field (char const *name, int const comp_id, int const *point_ids, int const num_pointsets, int collection_size, const char *timestep, int time_unit, int *field_id)
 
void yac_cenable_field_frac_mask_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name, double frac_mask_fallback_value)
 
void yac_cenable_field_frac_mask (const char *comp_name, const char *grid_name, const char *field_name, double frac_mask_fallback_value)
 
void yac_cdef_component_metadata_instance (int yac_instance_id, const char *comp_name, const char *metadata)
 
void yac_cdef_component_metadata (const char *comp_name, const char *metadata)
 
void yac_cdef_grid_metadata_instance (int yac_instance_id, const char *grid_name, const char *metadata)
 
void yac_cdef_grid_metadata (const char *grid_name, const char *metadata)
 
void yac_cdef_field_metadata_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name, const char *metadata)
 
void yac_cdef_field_metadata (const char *comp_name, const char *grid_name, const char *field_name, const char *metadata)
 
const char * yac_cget_component_metadata_instance (int yac_instance_id, const char *comp_name)
 
const char * yac_cget_component_metadata (const char *comp_name)
 
const char * yac_cget_grid_metadata_instance (int yac_instance_id, const char *grid_name)
 
const char * yac_cget_grid_metadata (const char *grid_name)
 
const char * yac_cget_field_metadata_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
const char * yac_cget_field_metadata (const char *comp_name, const char *grid_name, const char *field_name)
 
static void init_ext_couple_config (struct yac_ext_couple_config *ext_couple_config)
 
void yac_cget_ext_couple_config (int *ext_couple_config_id)
 
void yac_cfree_ext_couple_config (int ext_couple_config_id)
 
void yac_cset_ext_couple_config_weight_file_ (struct yac_ext_couple_config *ext_couple_config, char const *weight_file)
 
void yac_cset_ext_couple_config_weight_file (int ext_couple_config_id, char const *weight_file)
 
void yac_cget_ext_couple_config_weight_file (int ext_couple_config_id, char const **weight_file)
 
void yac_cset_ext_couple_config_mapping_side_ (struct yac_ext_couple_config *ext_couple_config, int mapping_side)
 
void yac_cset_ext_couple_config_mapping_side (int ext_couple_config_id, int mapping_side)
 
void yac_cget_ext_couple_config_mapping_side (int ext_couple_config_id, int *mapping_side)
 
void yac_cset_ext_couple_config_scale_factor_ (struct yac_ext_couple_config *ext_couple_config, double scale_factor)
 
void yac_cset_ext_couple_config_scale_factor (int ext_couple_config_id, double scale_factor)
 
void yac_cget_ext_couple_config_scale_factor (int ext_couple_config_id, double *scale_factor)
 
void yac_cset_ext_couple_config_scale_summand_ (struct yac_ext_couple_config *ext_couple_config, double scale_summand)
 
void yac_cset_ext_couple_config_scale_summand (int ext_couple_config_id, double scale_summand)
 
void yac_cget_ext_couple_config_scale_summand (int ext_couple_config_id, double *scale_summand)
 
void yac_cset_ext_couple_config_src_mask_names_ (struct yac_ext_couple_config *ext_couple_config, size_t num_src_mask_names, char const *const *src_mask_names)
 
void yac_cset_ext_couple_config_src_mask_names (int ext_couple_config_id, size_t num_src_mask_names, char const *const *src_mask_names)
 
void yac_cget_ext_couple_config_src_mask_names (int ext_couple_config_id, size_t *num_src_mask_names, char const *const **src_mask_names)
 
void yac_cset_ext_couple_config_tgt_mask_name_ (struct yac_ext_couple_config *ext_couple_config, char const *tgt_mask_name)
 
void yac_cset_ext_couple_config_tgt_mask_name (int ext_couple_config_id, char const *tgt_mask_name)
 
void yac_cget_ext_couple_config_mask_name (int ext_couple_config_id, char const **tgt_mask_name)
 
void yac_cdef_couple_custom_instance_ (int yac_instance_id, char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, struct yac_ext_couple_config *ext_couple_config)
 
void yac_cdef_couple_custom_instance (int yac_instance_id, char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, int ext_couple_config_id)
 
void yac_cdef_couple_custom (char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, int ext_couple_config_id)
 
void yac_cdef_couple_instance (int yac_instance_id, char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag)
 
void yac_cdef_couple (char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag)
 
void yac_cdef_couple_instance_ (int yac_instance_id, char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, char const *weight_file, int mapping_side, double scale_factor, double scale_summand, int num_src_mask_names, char const *const *src_mask_names, char const *tgt_mask_name)
 
void yac_cdef_couple_ (char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_timestep, int time_unit, int time_reduction, int interp_stack_config_id, int src_lag, int tgt_lag, char const *weight_file, int mapping_side, double scale_factor, double scale_summand, int num_src_mask_names, char const *const *src_mask_names, char const *tgt_mask_name)
 
void yac_ccheck_field_dimensions (int field_id, int collection_size, int num_interp_fields, int const *interp_field_sizes)
 
void yac_cget_action (int field_id, int *action)
 
const char * yac_cget_field_datetime (int field_id)
 
static void yac_cupdate_ (struct coupling_field *cpl_field, struct event *event, int is_source)
 
void yac_cupdate (int field_id)
 
static double ** get_recv_field_pointers (int const field_id, int const collection_size, double *recv_field)
 
static struct yac_interpolationyac_cget_pre_processing (int const field_id, int collection_size, int *info, int *ierr)
 
static void yac_get (int const field_id, int collection_size, double **recv_field, int is_async, int *info, int *ierr)
 
void yac_get_ (int const field_id, int const collection_size, double *recv_field, int is_async, int *info, int *ierr)
 
void yac_cget_ (int const field_id, int const collection_size, double *recv_field, int *info, int *ierr)
 
void yac_cget_async_ (int const field_id, int const collection_size, double *recv_field, int *info, int *ierr)
 
void yac_cget (int const field_id, int collection_size, double **recv_field, int *info, int *ierr)
 
void yac_cget_async (int const field_id, int collection_size, double **recv_field, int *info, int *ierr)
 
static void get_send_field_pointers (int const field_id, int const collection_size, double *send_field, double *send_frac_mask, double ****send_field_, double ****send_frac_mask_)
 
void yac_cput_ (int const field_id, int const collection_size, double *send_field, int *info, int *ierr)
 
void yac_cput_frac_ (int const field_id, int const collection_size, double *send_field, double *send_frac_mask, int *info, int *ierr)
 
static void get_send_field_pointers_ptr_ (int const field_id, int const collection_size, double **send_field, double **send_frac_mask, double ****send_field_, double ****send_frac_mask_)
 
void yac_cput_ptr_ (int const field_id, int const collection_size, double **send_field, int *info, int *ierr)
 
void yac_cput_frac_ptr_ (int const field_id, int const collection_size, double **send_field, double **send_frac_mask, int *info, int *ierr)
 
void yac_ctest (int field_id, int *flag)
 
void yac_cwait (int field_id)
 
void * yac_get_field_put_mask_c2f (int field_id)
 
void * yac_get_field_get_mask_c2f (int field_id)
 
static struct yac_interpolationyac_cput_pre_processing (struct coupling_field *cpl_field, unsigned put_idx, int const collection_size, double ***send_field, double ****send_field_acc_, double ***send_frac_mask, double ****send_frac_mask_acc_, int *info, int *ierr)
 
void yac_cput_frac (int const field_id, int const collection_size, double ***const send_field, double ***const send_frac_mask, int *info, int *ierr)
 
void yac_cput (int const field_id, int const collection_size, double ***const send_field, int *info, int *ierr)
 
void yac_cexchange_ (int const send_field_id, int const recv_field_id, int const collection_size, double *send_field, double *recv_field, int *send_info, int *recv_info, int *ierr)
 
void yac_cexchange_frac_ (int const send_field_id, int const recv_field_id, int const collection_size, double *send_field, double *send_frac_mask, double *recv_field, int *send_info, int *recv_info, int *ierr)
 
void yac_cexchange_ptr_ (int const send_field_id, int const recv_field_id, int const collection_size, double **send_field, double **recv_field, int *send_info, int *recv_info, int *ierr)
 
void yac_cexchange_frac_ptr_ (int const send_field_id, int const recv_field_id, int const collection_size, double **send_field, double **send_frac_mask, double **recv_field, int *send_info, int *recv_info, int *ierr)
 
void yac_cexchange_frac (int const send_field_id, int const recv_field_id, int const collection_size, double ***const send_field, double ***const send_frac_mask, double **recv_field, int *send_info, int *recv_info, int *ierr)
 
void yac_cexchange (int const send_field_id, int const recv_field_id, int const collection_size, double ***const send_field, double **recv_field, int *send_info, int *recv_info, int *ierr)
 
void yac_csync_def_instance (int yac_instance_id)
 
void yac_csync_def (void)
 
void yac_cenddef_instance (int yac_instance_id)
 
void yac_cenddef (void)
 
void yac_cenddef_and_emit_config_instance (int yac_instance_id, int emit_flags, char **config)
 
void yac_cenddef_and_emit_config (int emit_flags, char **config)
 
int yac_cget_field_id_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_field_id (const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_nbr_comps_instance (int yac_instance_id)
 
int yac_cget_nbr_comps (void)
 
int yac_cget_nbr_grids_instance (int yac_instance_id)
 
int yac_cget_nbr_grids ()
 
int yac_cget_comp_nbr_grids_instance (int yac_instance_id, const char *comp_name)
 
int yac_cget_comp_nbr_grids (const char *comp_name)
 
int yac_cget_nbr_fields_instance (int yac_instance_id, const char *comp_name, const char *grid_name)
 
int yac_cget_nbr_fields (const char *comp_name, const char *grid_name)
 
void yac_cget_comp_names_instance (int yac_instance_id, int nbr_comps, const char **comp_names)
 
void yac_cget_comp_names (int nbr_comps, const char **comp_names)
 
void yac_cget_grid_names_instance (int yac_instance_id, int nbr_grids, const char **grid_names)
 
void yac_cget_grid_names (int nbr_grids, const char **grid_names)
 
void yac_cget_comp_grid_names_instance (int yac_instance_id, const char *comp_name, int nbr_grids, const char **grid_names)
 
void yac_cget_comp_grid_names (const char *comp_name, int nbr_grids, const char **grid_names)
 
void yac_cget_field_names_instance (int yac_instance_id, const char *comp_name, const char *grid_name, int nbr_fields, const char **field_names)
 
void yac_cget_field_names (const char *comp_name, const char *grid_name, int nbr_fields, const char **field_names)
 
const char * yac_cget_component_name_from_field_id (int field_id)
 
const char * yac_cget_grid_name_from_field_id (int field_id)
 
const char * yac_cget_field_name_from_field_id (int field_id)
 
const char * yac_cget_timestep_from_field_id (int field_id)
 
int yac_cget_collection_size_from_field_id (int field_id)
 
int yac_cget_role_from_field_id (int field_id)
 
const char * yac_cget_field_timestep_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
const char * yac_cget_field_timestep (const char *comp_name, const char *grid_name, const char *field_name)
 
double yac_cget_field_frac_mask_fallback_value_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_field_collection_size_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
double yac_cget_field_frac_mask_fallback_value (const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_field_collection_size (const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_field_role_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_field_role (const char *comp_name, const char *grid_name, const char *field_name)
 
void yac_cdef_grid_reg2d (const char *grid_name, int nbr_vertices[2], int cyclic[2], double *x_vertices, double *y_vertices, int *grid_id)
 
void yac_cdef_grid_curve2d (const char *grid_name, int nbr_vertices[2], int cyclic[2], double *x_vertices, double *y_vertices, int *grid_id)
 
void yac_cdef_grid_unstruct (const char *grid_name, int nbr_vertices, int nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex, int *grid_id)
 
void yac_cdef_grid_unstruct_ll (const char *grid_name, int nbr_vertices, int nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex, int *grid_id)
 
void yac_cdef_grid_cloud (const char *grid_name, int nbr_points, double *x_points, double *y_points, int *grid_id)
 
void yac_cset_global_index (int const *global_index, int location, int grid_id)
 
void yac_cset_core_mask (int const *is_core, int location, int grid_id)
 
size_t yac_cget_grid_size (int located, int grid_id)
 
void yac_ccompute_grid_cell_areas (int grid_id, double *cell_areas)
 
size_t yac_cget_points_size (int points_id)
 
void yac_cget_interp_stack_config (int *interp_stack_config_id)
 
void yac_cfree_interp_stack_config (int interp_stack_config_id)
 
void yac_cadd_interp_stack_config_average (int interp_stack_config_id, int reduction_type, int partial_coverage)
 
void yac_cadd_interp_stack_config_ncc (int interp_stack_config_id, int weight_type, int partial_coverage)
 
void yac_cadd_interp_stack_config_nnn (int interp_stack_config_id, int type, size_t n, double max_search_distance, double scale)
 
void yac_cadd_interp_stack_config_conservative (int interp_stack_config_id, int order, int enforced_conserv, int partial_coverage, int normalisation)
 
void yac_cadd_interp_stack_config_spmap (int interp_stack_config_id, double spread_distance, double max_search_distance, int weight_type, int scale_type, double src_sphere_radius, double tgt_sphere_radius)
 
void yac_cadd_interp_stack_config_hcsbb (int interp_stack_config_id)
 
void yac_cadd_interp_stack_config_user_file (int interp_stack_config_id, char const *filename)
 
void yac_cadd_interp_stack_config_fixed (int interp_stack_config_id, double value)
 
void yac_cadd_interp_stack_config_check (int interp_stack_config_id, char const *constructor_key, char const *do_search_key)
 
void yac_cadd_interp_stack_config_creep (int interp_stack_config_id, int creep_distance)
 
void yac_cadd_interp_stack_config_user_callback (int interp_stack_config_id, char const *func_compute_weights_key)
 
void yac_cadd_compute_weights_callback (yac_func_compute_weights compute_weights_callback, void *user_data, char const *key)
 
static int yac_cget_interp_stack_config_from_string (char const *interp_stack_config, int parse_flags)
 
void yac_cget_interp_stack_config_from_string_yaml (char const *interp_stack_config, int *interp_stack_config_id)
 
void yac_cget_interp_stack_config_from_string_json (char const *interp_stack_config, int *interp_stack_config_id)
 

Variables

int const YAC_LOCATION_CELL = YAC_LOC_CELL
 
int const YAC_LOCATION_CORNER = YAC_LOC_CORNER
 
int const YAC_LOCATION_EDGE = YAC_LOC_EDGE
 
int const YAC_EXCHANGE_TYPE_NONE = NOTHING
 
int const YAC_EXCHANGE_TYPE_SOURCE = SOURCE
 
int const YAC_EXCHANGE_TYPE_TARGET = TARGET
 
int const YAC_ACTION_NONE = NONE
 no data exchanges
 
int const YAC_ACTION_REDUCTION = REDUCTION
 data reduction, but data exchange
 
int const YAC_ACTION_COUPLING = COUPLING
 data exchange
 
int const YAC_ACTION_RESTART = RESTART
 
int const YAC_ACTION_GET_FOR_RESTART = GET_FOR_RESTART
 last valid get
 
int const YAC_ACTION_PUT_FOR_RESTART = PUT_FOR_RESTART
 last valid put
 
int const YAC_ACTION_GET_FOR_CHECKPOINT = GET_FOR_CHECKPOINT
 
int const YAC_ACTION_PUT_FOR_CHECKPOINT = PUT_FOR_CHECKPOINT
 
int const YAC_ACTION_OUT_OF_BOUND = OUT_OF_BOUND
 put/get is outside of the valid range
 
int const YAC_REDUCTION_TIME_NONE = TIME_NONE
 
int const YAC_REDUCTION_TIME_ACCUMULATE = TIME_ACCUMULATE
 
int const YAC_REDUCTION_TIME_AVERAGE = TIME_AVERAGE
 
int const YAC_REDUCTION_TIME_MINIMUM = TIME_MINIMUM
 
int const YAC_REDUCTION_TIME_MAXIMUM = TIME_MAXIMUM
 
int const YAC_TIME_UNIT_MILLISECOND = C_MILLISECOND
 
int const YAC_TIME_UNIT_SECOND = C_SECOND
 
int const YAC_TIME_UNIT_MINUTE = C_MINUTE
 
int const YAC_TIME_UNIT_HOUR = C_HOUR
 
int const YAC_TIME_UNIT_DAY = C_DAY
 
int const YAC_TIME_UNIT_MONTH = C_MONTH
 
int const YAC_TIME_UNIT_YEAR = C_YEAR
 
int const YAC_TIME_UNIT_ISO_FORMAT = C_ISO_FORMAT
 
int const YAC_CALENDAR_NOT_SET = CALENDAR_NOT_SET
 
int const YAC_PROLEPTIC_GREGORIAN = PROLEPTIC_GREGORIAN
 
int const YAC_YEAR_OF_365_DAYS = YEAR_OF_365_DAYS
 
int const YAC_YEAR_OF_360_DAYS = YEAR_OF_360_DAYS
 
int const YAC_AVG_ARITHMETIC = YAC_INTERP_AVG_ARITHMETIC
 
int const YAC_AVG_DIST = YAC_INTERP_AVG_DIST
 
int const YAC_AVG_BARY = YAC_INTERP_AVG_BARY
 
int const YAC_NCC_AVG = YAC_INTERP_NCC_AVG
 
int const YAC_NCC_DIST = YAC_INTERP_NCC_DIST
 
int const YAC_NNN_AVG = YAC_INTERP_NNN_AVG
 
int const YAC_NNN_DIST = YAC_INTERP_NNN_DIST
 
int const YAC_NNN_GAUSS = YAC_INTERP_NNN_GAUSS
 
int const YAC_NNN_RBF = YAC_INTERP_NNN_RBF
 
int const YAC_NNN_ZERO = YAC_INTERP_NNN_ZERO
 
int const YAC_CONSERV_DESTAREA = YAC_INTERP_CONSERV_DESTAREA
 
int const YAC_CONSERV_FRACAREA = YAC_INTERP_CONSERV_FRACAREA
 
int const YAC_SPMAP_AVG = YAC_INTERP_SPMAP_AVG
 
int const YAC_SPMAP_DIST = YAC_INTERP_SPMAP_DIST
 
int const YAC_SPMAP_NONE = YAC_INTERP_SPMAP_NONE
 
int const YAC_SPMAP_SRCAREA = YAC_INTERP_SPMAP_SRCAREA
 
int const YAC_SPMAP_INVTGTAREA = YAC_INTERP_SPMAP_INVTGTAREA
 
int const YAC_SPMAP_FRACAREA = YAC_INTERP_SPMAP_FRACAREA
 
int const YAC_CONFIG_OUTPUT_FORMAT_YAML = YAC_TEXT_FILETYPE_YAML
 
int const YAC_CONFIG_OUTPUT_FORMAT_JSON = YAC_TEXT_FILETYPE_JSON
 
int const YAC_CONFIG_OUTPUT_SYNC_LOC_DEF_COMP
 
int const YAC_CONFIG_OUTPUT_SYNC_LOC_SYNC_DEF
 
int const YAC_CONFIG_OUTPUT_SYNC_LOC_ENDDEF
 
static int default_instance_id = INT_MAX
 
static int yac_instance_count = 0
 
void ** pointer_lookup_table = NULL
 
static int pointer_lookup_table_size = 0
 
struct yac_basic_grid ** grids = NULL
 
size_t num_grids = 0
 
static struct user_input_data_component ** components = NULL
 
static size_t num_components = 0
 
static struct user_input_data_points ** points = NULL
 
static size_t num_points = 0
 
static struct user_input_data_masks ** masks = NULL
 
static size_t num_masks = 0
 
static struct yac_interp_stack_config ** interp_stack_configs = NULL
 
static size_t num_interp_stack_configs = 0
 

Macro Definition Documentation

◆ AGGREATE_NOFRAC

#define AGGREATE_NOFRAC ( CHECK,
EXTRA_CHECK,
ACCU_OP )
Value:
{ \
{ \
YAC_OMP_FOR \
for (size_t j = 0; j < num_points; ++j) {\
double send_field_value = send_field[h][i][j]; \
if (CHECK && (EXTRA_CHECK)) \
send_field_acc[h][i][j] ACCU_OP send_field_value; \
} \
} \
}
#define YAC_OMP_PARALLEL
static size_t num_points
Definition yac.c:137

◆ AGGREGATE

#define AGGREGATE ( EXTRA_CHECK,
ACCU_OP )
Value:
{ \
for (int h = 0; h < collection_size; h++) { \
for (size_t i = 0; i < num_interp_fields; i++) { \
size_t num_points = \
yac_coupling_field_get_data_size( \
cpl_field, \
yac_coupling_field_get_interp_fields(cpl_field)[i].location); \
if (with_frac_mask) { \
if (put_mask) AGGREGATE_FRAC(PUT_CHECK, EXTRA_CHECK, ACCU_OP) \
else AGGREGATE_FRAC(NO_CHECK, EXTRA_CHECK, ACCU_OP) \
} else { \
if (put_mask) AGGREATE_NOFRAC(PUT_CHECK, EXTRA_CHECK, ACCU_OP) \
else AGGREATE_NOFRAC(NO_CHECK, EXTRA_CHECK, ACCU_OP) \
} \
} \
} \
break; \
}
struct yac_interp_field const * yac_coupling_field_get_interp_fields(struct coupling_field *cpl_field)
Definition fields.c:509
#define AGGREATE_NOFRAC(CHECK, EXTRA_CHECK, ACCU_OP)
#define NO_CHECK
#define AGGREGATE_FRAC(CHECK, EXTRA_CHECK, ACCU_OP)
#define PUT_CHECK

◆ AGGREGATE_FRAC

#define AGGREGATE_FRAC ( CHECK,
EXTRA_CHECK,
ACCU_OP )
Value:
{ \
{ \
YAC_OMP_FOR \
for (size_t j = 0; j < num_points; ++j) { \
double frac_mask = send_frac_mask[h][i][j]; \
double send_field_value = send_field[h][i][j] * frac_mask; \
if (CHECK && (EXTRA_CHECK)) { \
if (frac_mask != 0.0) { \
send_field_acc[h][i][j] ACCU_OP send_field_value; \
send_frac_mask_acc[h][i][j] ACCU_OP frac_mask; \
} \
} \
} \
} \
}

◆ ASSIGN

#define ASSIGN   =

◆ NO_CHECK [1/2]

#define NO_CHECK   (1)

◆ NO_CHECK [2/2]

#define NO_CHECK   (1)

◆ PUT_CHECK [1/2]

#define PUT_CHECK   (put_mask[i][j])

◆ PUT_CHECK [2/2]

#define PUT_CHECK   (put_mask[i][j])

◆ SUM

#define SUM   +=

◆ WEIGHT_ACC

#define WEIGHT_ACC ( ACC,
EXTRA_CHECK )
Value:
{ \
if (put_mask) WEIGHT_ACC_(ACC, PUT_CHECK, EXTRA_CHECK) \
else WEIGHT_ACC_(ACC, NO_CHECK, EXTRA_CHECK) \
}
#define WEIGHT_ACC_(ACC, CHECK, EXTRA_CHECK)

◆ WEIGHT_ACC_

#define WEIGHT_ACC_ ( ACC,
CHECK,
EXTRA_CHECK )
Value:
{ \
for (size_t j = 0; j < num_points; j++) \
if (CHECK && (EXTRA_CHECK)) ACC[h][i][j] *= weight; \
}

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YAC_CONFIG_OUTPUT_SYNC_LOC_DEF_COMP_ 
YAC_CONFIG_OUTPUT_SYNC_LOC_SYNC_DEF_ 
YAC_CONFIG_OUTPUT_SYNC_LOC_ENDDEF_ 

Definition at line 92 of file yac.c.

Function Documentation

◆ check_cell_to_vertex()

static void check_cell_to_vertex ( int * cell_to_vertex,
int * num_vertices_per_cell,
int nbr_cells,
int nbr_vertices,
char const * routine_name )
static

Definition at line 932 of file yac.c.

Here is the caller graph for this function:

◆ check_default_instance_id()

static void check_default_instance_id ( char const * routine_name)
static

Definition at line 297 of file yac.c.

Here is the caller graph for this function:

◆ check_mpi_initialised()

void check_mpi_initialised ( char const * routine_name)

Definition at line 332 of file yac.c.

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

◆ check_x_vertices()

static void check_x_vertices ( double const * x_vertices,
size_t count,
char const * routine_name )
static

Definition at line 911 of file yac.c.

Here is the caller graph for this function:

◆ check_y_vertices()

static void check_y_vertices ( double const * y_vertices,
size_t count,
char const * routine_name )
static

Definition at line 921 of file yac.c.

Here is the caller graph for this function:

◆ cleanup()

static void cleanup ( )
static

Definition at line 598 of file yac.c.

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

◆ get_recv_field_pointers()

static double ** get_recv_field_pointers ( int const field_id,
int const collection_size,
double * recv_field )
static

Definition at line 1821 of file yac.c.

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

◆ get_send_field_pointers()

static void get_send_field_pointers ( int const field_id,
int const collection_size,
double * send_field,
double * send_frac_mask,
double **** send_field_,
double **** send_frac_mask_ )
static

Definition at line 1981 of file yac.c.

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

◆ get_send_field_pointers_ptr_()

static void get_send_field_pointers_ptr_ ( int const field_id,
int const collection_size,
double ** send_field,
double ** send_frac_mask,
double **** send_field_,
double **** send_frac_mask_ )
static

Definition at line 2081 of file yac.c.

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

◆ get_user_input_data_component()

static struct user_input_data_component * get_user_input_data_component ( int comp_id,
char const * routine )
static

Definition at line 709 of file yac.c.

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

◆ init_ext_couple_config()

static void init_ext_couple_config ( struct yac_ext_couple_config * ext_couple_config)
static

Definition at line 1331 of file yac.c.

Here is the caller graph for this function:

◆ user_input_data_add_mask()

static int user_input_data_add_mask ( struct yac_basic_grid * grid,
enum yac_location location,
int const * is_valid,
size_t nbr_points,
char const * name )
static

Definition at line 1055 of file yac.c.

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

◆ user_input_data_add_points()

static int user_input_data_add_points ( struct yac_basic_grid * grid,
enum yac_location location,
yac_coordinate_pointer coordinates )
static

Definition at line 891 of file yac.c.

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

◆ yac_add_grid()

static int yac_add_grid ( const char * grid_name,
struct yac_basic_grid_data grid_data )
static

Definition at line 221 of file yac.c.

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

◆ yac_cadd_compute_weights_callback()

void yac_cadd_compute_weights_callback ( yac_func_compute_weights compute_weights_callback,
void * user_data,
char const * key )

registers a callback routine for the computation of weights by the interpolation method user_callback

Parameters
[in]compute_weights_callbackpointer to a weight computation routine
[in]user_datadata pointer that will be passed to compute_weights_callback
[in]keykey for identifying the callback routine
Remarks
the callback has to be set on all source processes taking part in respective coupling
the key has to match the one provided in coupling configuration
Examples
test_instance_parallel1.c.

Definition at line 3757 of file yac.c.

Here is the call graph for this function:

◆ yac_cadd_interp_stack_config_average()

void yac_cadd_interp_stack_config_average ( int interp_stack_config_id,
int reduction_type,
int partial_coverage )

adds average interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]reduction_typereduction type
[in]partial_coverageallow partial coverage

Definition at line 3585 of file yac.c.

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

◆ yac_cadd_interp_stack_config_check()

void yac_cadd_interp_stack_config_check ( int interp_stack_config_id,
char const * constructor_key,
char const * do_search_key )

adds fixed interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]constructor_keykey provided to yac_interp_method_check_add_constructor_callback for a constructor callback routine
[in]do_search_keykey provided to yac_interp_method_check_add_do_search_callback for a do_search callback routine

Definition at line 3722 of file yac.c.

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

◆ yac_cadd_interp_stack_config_conservative()

void yac_cadd_interp_stack_config_conservative ( int interp_stack_config_id,
int order,
int enforced_conserv,
int partial_coverage,
int normalisation )

adds conservative interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]orderfirst or second order
[in]enforced_conservenforce local conservation
[in]partial_coverageallow partial coverage
[in]normalisationnormalisation type
Examples
test_restart_c.c.

Definition at line 3643 of file yac.c.

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

◆ yac_cadd_interp_stack_config_creep()

void yac_cadd_interp_stack_config_creep ( int interp_stack_config_id,
int creep_distance )

adds creep interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]creep_distancecreep distance

Definition at line 3734 of file yac.c.

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

◆ yac_cadd_interp_stack_config_fixed()

void yac_cadd_interp_stack_config_fixed ( int interp_stack_config_id,
double value )

adds fixed interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]valuefixed value

Definition at line 3712 of file yac.c.

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

◆ yac_cadd_interp_stack_config_hcsbb()

void yac_cadd_interp_stack_config_hcsbb ( int interp_stack_config_id)

adds HCSBB interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack

Definition at line 3692 of file yac.c.

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

◆ yac_cadd_interp_stack_config_ncc()

void yac_cadd_interp_stack_config_ncc ( int interp_stack_config_id,
int weight_type,
int partial_coverage )

adds nearest corner cells interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]weight_typereduction type
[in]partial_coverageallow partial coverage

Definition at line 3604 of file yac.c.

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

◆ yac_cadd_interp_stack_config_nnn()

void yac_cadd_interp_stack_config_nnn ( int interp_stack_config_id,
int type,
size_t n,
double max_search_distance,
double scale )

adds n-nearest-neighbour interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]typereduction type
[in]nnumber of nearest neighbour points
[in]max_search_distancemaximum search distance for each point
[in]scalescale parameter required by some reduction types
Remarks
a max_search_distance of 0.0 results in the search distance not being restricted
Examples
test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_multithreading.c, and test_restart2.c.

Definition at line 3622 of file yac.c.

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

◆ yac_cadd_interp_stack_config_spmap()

void yac_cadd_interp_stack_config_spmap ( int interp_stack_config_id,
double spread_distance,
double max_search_distance,
int weight_type,
int scale_type,
double src_sphere_radius,
double tgt_sphere_radius )

adds source point mapping interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]spread_distancespread distance (in rad)
[in]max_search_distancemaximum search distance (in rad)
[in]weight_typereduction type
[in]scale_typescaling type
[in]src_sphere_radiussphere radius used for source cell area computation
[in]tgt_sphere_radiussphere radius used for target cell area computation

Definition at line 3662 of file yac.c.

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

◆ yac_cadd_interp_stack_config_user_callback()

void yac_cadd_interp_stack_config_user_callback ( int interp_stack_config_id,
char const * func_compute_weights_key )

adds user callback interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]func_compute_weights_keykey provided to yac_cadd_compute_weights_callback for a compute_weights callback routine

Definition at line 3744 of file yac.c.

Here is the call graph for this function:

◆ yac_cadd_interp_stack_config_user_file()

void yac_cadd_interp_stack_config_user_file ( int interp_stack_config_id,
char const * filename )

adds user weight file interpolation to the bottom of a interpolation stack

Parameters
[in]interp_stack_config_idinterpolation stack
[in]filenameweight file name
Remarks
YAC will read the weight file in parallel. This parallel output can be configured as described here: Configuration of parallel IO in YAC

Definition at line 3701 of file yac.c.

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

◆ yac_ccheck_field_dimensions()

void yac_ccheck_field_dimensions ( int field_id,
int collection_size,
int num_pointsets,
int const * pointset_sizes )

Checks whether the field dimensions match with field definition and aborts if there is a mismatch

Parameters
[in]field_id
[in]collection_sizecollection size
[in]num_pointsetsnumber of pointsets
[in]pointset_sizessize of each pointset
Remarks
if num_pointsets is -1, its value will not be checked
if pointset_sizes is NULL, its values will not be checked

Definition at line 1659 of file yac.c.

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

◆ yac_ccleanup()

void yac_ccleanup ( )

Clean-up YAC (same as yac_cfinalize but without MPI_Finalize; see Restarting YAC)

Remarks
In case the user initialised yaxt himself, he has to finalise it after yac_ccleanup in order to be able to call yac_cinit again.
cleans up default YAC instance
Examples
test_dummy_coupling8_c.c, and test_restart_c.c.

Definition at line 589 of file yac.c.

Here is the call graph for this function:

◆ yac_ccleanup_instance()

void yac_ccleanup_instance ( int yac_instance_id)

Clean-up YAC (same as yac_cfinalize_instance but without MPI_Finalize; see Restarting YAC)

Parameters
[in]yac_instance_idid of the YAC instance to be cleaned up
Remarks
In case the user initialised yaxt himself, he has to finalise it after yac_ccleanup in order to be able to call yac_cinit again.
Examples
test_dummy_coupling3_c.c, test_dummy_coupling6_c.c, and test_dummy_coupling7_c.c.

Definition at line 581 of file yac.c.

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

◆ yac_ccleanup_instance_()

static void yac_ccleanup_instance_ ( int yac_instance_id)
static

Definition at line 562 of file yac.c.

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

◆ yac_ccompute_grid_cell_areas()

void yac_ccompute_grid_cell_areas ( int grid_id,
double * cell_areas )

computes the areas of all cells in a grid (an earth radius of 1.0 is assumed)

Parameters
[in]grid_id
[out]cell_areas
Examples
test_dummy_coupling_c.c.

Definition at line 3530 of file yac.c.

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

◆ yac_cdef_calendar()

◆ yac_cdef_comp()

void yac_cdef_comp ( const char * comp_name,
int * comp_id )

Elementary definition of the component for the default YAC instance

Parameters
[in]comp_namename of the component
[out]comp_idcomponent Id
Remarks
this call is collective for all processes that initialised the default YAC instance
components can only be defined once in the initialisation phase of a YAC instance. If you want to predefine a component, please use yac_cpredef_comp.
Examples
test_dummy_coupling2_c.c, test_dummy_coupling4_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_dummy_coupling_c.c, test_multithreading.c, test_query_routines_c.c, test_restart2.c, and test_restart_c.c.

Definition at line 884 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_comp_instance()

void yac_cdef_comp_instance ( int yac_instance_id,
const char * comp_name,
int * comp_id )

Elementary definition of the component.

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namename of the component
[out]comp_idcomponent Id
Remarks
this call is collective for all processes that initialised the provided YAC instance
components can only be defined once in the initialisation phase of a YAC instance. If you want to predefine a component, please use yac_cpredef_comp_instance.
Examples
test_dummy_coupling3_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, and test_query_routines_c.c.

Definition at line 878 of file yac.c.

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

◆ yac_cdef_component_metadata()

void yac_cdef_component_metadata ( const char * comp_name,
const char * metadata )

Define metadata for a component

Parameters
[in]comp_name
[in]metadata
Examples
test_query_routines_c.c.

Definition at line 1254 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_component_metadata_instance()

void yac_cdef_component_metadata_instance ( int yac_instance_id,
const char * comp_name,
const char * metadata )

Define metadata for a component

Parameters
[in]yac_instance_id
[in]comp_name
[in]metadata
Examples
test_query_routines_c.c.

Definition at line 1246 of file yac.c.

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

◆ yac_cdef_comps()

void yac_cdef_comps ( const char ** comp_names,
int num_comps,
int * comp_ids )

Elementary definition of the components for the default YAC instance

Parameters
[in]comp_namesnames of the components
[in]num_compsnumber of components
[out]comp_idscomponent Id's
Remarks
this call is collective for all processes that initialised the default YAC instance
components can only be defined once in the initialisation phase of a YAC instance
Examples
test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, and test_query_routines_c.c.

Definition at line 870 of file yac.c.

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

◆ yac_cdef_comps_instance()

void yac_cdef_comps_instance ( int yac_instance_id,
const char ** comp_names,
int num_comps,
int * comp_ids )

Elementary definition of the components.

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namesnames of the components
[in]num_compsnumber of components
[out]comp_idscomponent Id's
Remarks
this call is collective for all processes that initialised the provided YAC instance
components can only be defined once in the initialisation phase of a YAC instance
Examples
test_dummy_coupling3_c.c, test_dummy_coupling5_c.c, and test_query_routines_c.c.

Definition at line 845 of file yac.c.

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

◆ yac_cdef_couple()

void yac_cdef_couple ( char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag )

Define couple in the default yac instance

Parameters
[in]src_comp_namecomponent name of the source component
[in]src_grid_namegrid name of the source grid
[in]src_field_namefield name of the source field
[in]tgt_comp_namecomponent name of the target component
[in]tgt_grid_namegrid name of the target grid
[in]tgt_field_namefield name of the target field
[in]coupling_timesteptime step for the coupling given in the defined timestep unit
[in]time_unitunit of coupling_timestep argument
[in]time_reductiontype for reducing multiple timesteps
See also
YAC_REDUCTION_TIME_NONE etc.
Parameters
[in]interp_stack_config_idid of the interpolation stack config to be used
[in]src_laglag for this couple on the source component
[in]tgt_laglag for this couple on the target component
Examples
test_dummy_coupling8_c.c, test_multithreading.c, test_restart2.c, and test_restart_c.c.

Definition at line 1585 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_couple_()

void yac_cdef_couple_ ( char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag,
char const * weight_file,
int mapping_side,
double scale_factor,
double scale_summand,
int num_src_mask_names,
char const *const * src_mask_names,
char const * tgt_mask_name )

Definition at line 1637 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_couple_custom()

void yac_cdef_couple_custom ( char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag,
int ext_couple_config_id )

Define couple in the default yac instance using an extended coupling configuration

Parameters
[in]src_comp_namecomponent name of the source component
[in]src_grid_namegrid name of the source grid
[in]src_field_namefield name of the source field
[in]tgt_comp_namecomponent name of the target component
[in]tgt_grid_namegrid name of the target grid
[in]tgt_field_namefield name of the target field
[in]coupling_timesteptime step for the coupling given in the defined timestep unit
[in]time_unitunit of coupling_timestep argument
[in]time_reductiontype for reducing multiple timesteps
See also
YAC_REDUCTION_TIME_NONE etc.
Parameters
[in]interp_stack_config_idid of the interpolation stack config to be used
[in]src_laglag for this couple on the source component
[in]tgt_laglag for this couple on the target component
[in]ext_couple_config_idextended coupling configuration
Examples
test_dummy_coupling9_c.c.

Definition at line 1553 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_couple_custom_instance()

void yac_cdef_couple_custom_instance ( int yac_instance_id,
char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag,
int ext_couple_config_id )

Define couple using an extended coupling configuration

Parameters
[in]yac_instance_idid of the YAC instance for that the couple should be defined
[in]src_comp_namecomponent name of the source component
[in]src_grid_namegrid name of the source grid
[in]src_field_namefield name of the source field
[in]tgt_comp_namecomponent name of the target component
[in]tgt_grid_namegrid name of the target grid
[in]tgt_field_namefield name of the target field
[in]coupling_timesteptime step for the coupling
[in]time_unitunit of coupling_timestep argument
[in]time_reductiontype for reducing multiple timesteps
See also
YAC_REDUCTION_TIME_NONE etc.
Parameters
[in]interp_stack_config_idid of the interpolation stack config to be used
[in]src_laglag for this couple on the source component
[in]tgt_laglag for this couple on the target component
[in]ext_couple_config_idextended coupling configuration
Examples
test_dummy_coupling7_c.c.

Definition at line 1538 of file yac.c.

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

◆ yac_cdef_couple_custom_instance_()

void yac_cdef_couple_custom_instance_ ( int yac_instance_id,
char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag,
struct yac_ext_couple_config * ext_couple_config )

Definition at line 1510 of file yac.c.

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

◆ yac_cdef_couple_instance()

void yac_cdef_couple_instance ( int yac_instance_id,
char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag )

Define couple

Parameters
[in]yac_instance_idid of the YAC instance for that the couple should be defined
[in]src_comp_namecomponent name of the source component
[in]src_grid_namegrid name of the source grid
[in]src_field_namefield name of the source field
[in]tgt_comp_namecomponent name of the target component
[in]tgt_grid_namegrid name of the target grid
[in]tgt_field_namefield name of the target field
[in]coupling_timesteptime step for the coupling
[in]time_unitunit of coupling_timestep argument
[in]time_reductiontype for reducing multiple timesteps
See also
YAC_REDUCTION_TIME_NONE etc.
Parameters
[in]interp_stack_config_idid of the interpolation stack config to be used
[in]src_laglag for this couple on the source component
[in]tgt_laglag for this couple on the target component
Examples
test_dummy_coupling7_c.c.

Definition at line 1568 of file yac.c.

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

◆ yac_cdef_couple_instance_()

void yac_cdef_couple_instance_ ( int yac_instance_id,
char const * src_comp_name,
char const * src_grid_name,
char const * src_field_name,
char const * tgt_comp_name,
char const * tgt_grid_name,
char const * tgt_field_name,
char const * coupling_timestep,
int time_unit,
int time_reduction,
int interp_stack_config_id,
int src_lag,
int tgt_lag,
char const * weight_file,
int mapping_side,
double scale_factor,
double scale_summand,
int num_src_mask_names,
char const *const * src_mask_names,
char const * tgt_mask_name )

Definition at line 1599 of file yac.c.

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

◆ yac_cdef_datetime()

void yac_cdef_datetime ( const char * start_datetime,
const char * end_datetime )

Definition of job start and end datetime for the default YAC instance

Parameters
[in]start_datetimecalendar job start datetime
[in]end_datetimecalendar job end datetime
Examples
test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_multithreading.c, test_restart2.c, and test_restart_c.c.

Definition at line 638 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_datetime_instance()

void yac_cdef_datetime_instance ( int yac_instance_id,
const char * start_datetime,
const char * end_datetime )

Definition of job start and end datetime

Parameters
[in]yac_instance_idid of the YAC instance
[in]start_datetimecalendar job start datetime
[in]end_datetimecalendar job end datetime
Examples
test_dummy_coupling7_c.c.

Definition at line 629 of file yac.c.

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

◆ yac_cdef_field()

void yac_cdef_field ( char const * field_name,
int const component_id,
int const * point_ids,
int const num_pointsets,
int collection_size,
const char * timestep,
int time_unit,
int * field_id )

Definition of the coupling field (using default mask, if defined)

Parameters
[in]field_namecharacter string providing the name of the coupling field
[in]component_idcomponent ID
[in]point_idspoint IDs
[in]num_pointsetsnumber of pointsets per grid
[in]collection_sizecollection size
[in]timesteptimestep
[in]time_unittime unit
[out]field_idreturned field_id which has to be used to identify coupling fields in yac_cput and yac_cget.
Remarks
A calendar has to be defined before this routine is called. This can be done by a call to yac_cdef_calendar, by reading of configuration file that defines a calendar, or by synchronizing with other processes that already have defined a calendar using yac_csync_def.
Examples
test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, test_dummy_coupling4_c.c, test_dummy_coupling5_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_dummy_coupling_c.c, test_multithreading.c, test_query_routines_c.c, test_restart2.c, and test_restart_c.c.

Definition at line 1194 of file yac.c.

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

◆ yac_cdef_field_mask()

void yac_cdef_field_mask ( char const * field_name,
int const component_id,
int const * point_ids,
int const * mask_ids,
int const num_pointsets,
int collection_size,
const char * timestep,
int time_unit,
int * field_id )

Definition of the coupling field

Parameters
[in]field_namecharacter string providing the name of the coupling field
[in]component_idcomponent ID
[in]point_idspoint IDs
[in]mask_idsmask IDs
[in]num_pointsetsnumber of pointsets per grid
[in]collection_sizecollection size
[in]timesteptimestep
[in]time_unit
[out]field_idreturned field_id which has to be used to identify coupling fields in yac_cput and yac_cget.
Remarks
A calendar has to be defined before this routine is called. This can be done by a call to yac_cdef_calendar, by reading of configuration file that defines a calendar, or by synchronizing with other processes that already have defined a calendar using yac_csync_def.
Examples
test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling9_c.c, and test_dummy_coupling_c.c.

Definition at line 1121 of file yac.c.

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

◆ yac_cdef_field_metadata()

void yac_cdef_field_metadata ( const char * comp_name,
const char * grid_name,
const char * field_name,
const char * metadata )

Define metadata for a field

Parameters
[in]comp_name
[in]grid_name
[in]field_name
[in]metadata
Examples
test_query_routines_c.c.

Definition at line 1282 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_field_metadata_instance()

void yac_cdef_field_metadata_instance ( int yac_instance_id,
const char * comp_name,
const char * grid_name,
const char * field_name,
const char * metadata )

Define metadata for a field

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
[in]metadata
Examples
test_query_routines_c.c.

Definition at line 1273 of file yac.c.

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

◆ yac_cdef_grid_cloud()

void yac_cdef_grid_cloud ( const char * grid_name,
int nbr_points,
double * x_points,
double * y_points,
int * grid_id )

Definition of grid consisting of a cloud of points

Parameters
[in]grid_namename of the grid
[in]nbr_pointsnumber of points
[in]x_pointsarray of point longitudes, in radians
[in]y_pointsarray of point latitudes, in radians
[out]grid_idid of generated grid
Examples
test_dummy_coupling7_c.c.

Definition at line 3422 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_grid_curve2d()

void yac_cdef_grid_curve2d ( const char * grid_name,
int nbr_vertices[2],
int cyclic[2],
double * x_vertices,
double * y_vertices,
int * grid_id )

Definition of a 2d curvilinear grid

Parameters
[in]grid_namename of the grid
[in]nbr_vertices2d array containing the number of vertices in each dimension
[in]cyclic2d array containing information about cyclic behaviour in each dimension
[in]x_verticesarray of vertex longitudes, in radians
[in]y_verticesarray of vertex latitudes, in radians
[out]grid_idid of generated grid
Remarks
  • The array x_vertices and y_vertices are expected to be of size nbr_vertices[0] * nbr_vertices[1].
  • This call generate a grid with the following basic grid data:
    size_t internal_nbr_cells_2d[2];
    size_t internal_nbr_vertices_2d[2];
    if (cyclic[0]) {
    internal_nbr_cells_2d[0] = nbr_vertices[0];
    internal_nbr_cells_2d[1] = nbr_vertices[1] - 1;
    internal_nbr_vertices_2d[0] = nbr_vertices[0] + 1;
    internal_nbr_vertices_2d[1] = nbr_vertices[1];
    } else {
    internal_nbr_cells_2d[0] = nbr_vertices[0] - 1;
    internal_nbr_cells_2d[1] = nbr_vertices[1] - 1;
    internal_nbr_vertices_2d[0] = nbr_vertices[0];
    internal_nbr_vertices_2d[1] = nbr_vertices[1];
    }
    size_t internal_nbr_cells =
    internal_nbr_cells_2d[0] * internal_nbr_cells_2d[1];
    size_t internal_nbr_vertices =
    internal_nbr_vertices_2d[0] * internal_nbr_vertices_2d[1];
    size_t internal_nbr_edges =
    (internal_nbr_cells_2d[0] + 1) * internal_nbr_cells_2d[1] +
    internal_nbr_cells_2d[0] * (internal_nbr_cells_2d[1] + 1);
    double * internal_x_vertices =
    malloc(internal_nbr_vertices * sizeof(*internal_x_vertices));
    double * internal_y_vertices =
    malloc(internal_nbr_vertices * sizeof(*internal_y_vertices));
    for (size_t i = 0; i < internal_nbr_vertices; ++i) {
    internal_x_vertices[i] = x_vertices[i];
    internal_y_vertices[i] = y_vertices[i];
    }
  • The edges of the grid follow great circles.
  • See Ordering of edges
Examples
test_dummy_coupling6_c.c.

Definition at line 3362 of file yac.c.

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

◆ yac_cdef_grid_metadata()

void yac_cdef_grid_metadata ( const char * grid_name,
const char * metadata )

Define metadata for a grid for the default YAC instance

Parameters
[in]grid_name
[in]metadata
Examples
test_query_routines_c.c.

Definition at line 1268 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_grid_metadata_instance()

void yac_cdef_grid_metadata_instance ( int yac_instance_id,
const char * grid_name,
const char * metadata )

Define metadata for a grid

Parameters
[in]yac_instance_id
[in]grid_name
[in]metadata
Examples
test_query_routines_c.c.

Definition at line 1259 of file yac.c.

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

◆ yac_cdef_grid_reg2d()

void yac_cdef_grid_reg2d ( const char * grid_name,
int nbr_vertices[2],
int cyclic[2],
double * x_vertices,
double * y_vertices,
int * grid_id )

Definition of a 2d regular grid

Parameters
[in]grid_namename of the grid
[in]nbr_vertices2d array containing the number of vertices in each dimension
[in]cyclic2d array containing information about cyclic behaviour in each dimension
[in]x_verticesarray of vertex longitudes, in radians
[in]y_verticesarray of vertex latitudes, in radians
[out]grid_idid of generated grid
Remarks
  • This call generate a grid with the following basic grid data:
    size_t internal_nbr_cells_2d[2];
    size_t internal_nbr_vertices_2d[2];
    if (cyclic[0]) {
    internal_nbr_cells_2d[0] = nbr_vertices[0];
    internal_nbr_cells_2d[1] = nbr_vertices[1] - 1;
    internal_nbr_vertices_2d[0] = nbr_vertices[0];
    internal_nbr_vertices_2d[1] = nbr_vertices[1];
    } else {
    internal_nbr_cells_2d[0] = nbr_vertices[0] - 1;
    internal_nbr_cells_2d[1] = nbr_vertices[1] - 1;
    internal_nbr_vertices_2d[0] = nbr_vertices[0];
    internal_nbr_vertices_2d[1] = nbr_vertices[1];
    }
    size_t internal_nbr_cells =
    internal_nbr_cells_2d[0] * internal_nbr_cells_2d[1];
    size_t internal_nbr_vertices =
    internal_nbr_vertices_2d[0] * internal_nbr_vertices_2d[1];
    size_t internal_nbr_edges =
    internal_nbr_cells_2d[1] * internal_nbr_vertices_2d[0] +
    internal_nbr_cells_2d[0] * internal_nbr_vertices_2d[1];
    double * internal_x_vertices =
    malloc(internal_nbr_vertices * sizeof(*internal_x_vertices));
    double * internal_y_vertices =
    malloc(internal_nbr_vertices * sizeof(*internal_y_vertices));
    for (size_t i = 0, k = 0; i < nbr_vertices[1]; ++i) {
    for (size_t j = 0; j < nbr_vertices[0]; ++j, ++k) {
    internal_x_vertices[k] = x_vertices[j];
    internal_y_vertices[k] = y_vertices[i];
    }
    }
  • The edges of the grid either follow circles of longitude or latitude.
  • See Ordering of edges
Examples
test_dummy_coupling3_c.c, test_dummy_coupling4_c.c, test_dummy_coupling5_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_multithreading.c, and test_query_routines_c.c.

Definition at line 3344 of file yac.c.

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

◆ yac_cdef_grid_unstruct()

void yac_cdef_grid_unstruct ( const char * grid_name,
int nbr_vertices,
int nbr_cells,
int * num_vertices_per_cell,
double * x_vertices,
double * y_vertices,
int * cell_to_vertex,
int * grid_id )

Definition of an unstructured grid

Parameters
[in]grid_namename of the grid
[in]nbr_verticesnumber of vertices
[in]nbr_cellsnumber of cells
[in]num_vertices_per_cellarray containing the number of vertices for each cell
[in]x_verticesarray of vertex longitudes, in radians
[in]y_verticesarray of vertex latitudes, in radians
[in]cell_to_vertexconnectivity of vertices belonging to cells
(the vertex indices per cell have to be in clockwise or counterclockwise ordering)
[out]grid_idid of generated grid
Remarks
Examples
test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling_c.c, test_restart2.c, and test_restart_c.c.

Definition at line 3380 of file yac.c.

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

◆ yac_cdef_grid_unstruct_ll()

void yac_cdef_grid_unstruct_ll ( const char * grid_name,
int nbr_vertices,
int nbr_cells,
int * num_vertices_per_cell,
double * x_vertices,
double * y_vertices,
int * cell_to_vertex,
int * grid_id )

Definition of an unstructured grid with lon-lat edges

Parameters
[in]grid_namename of the grid
[in]nbr_verticesnumber of vertices
[in]nbr_cellsnumber of cells
[in]num_vertices_per_cellarray containing the number of vertices for each cell
[in]x_verticesarray of vertex longitudes, in radians
[in]y_verticesarray of vertex latitudes, in radians
[in]cell_to_vertexconnectivity of vertices belonging to cells
(the vertex indices per cell have to be in clockwise or counterclockwise ordering)
[out]grid_idid of generated grid
Remarks
  • YAC will check all edges of the grid and determine whether they are on circles of longitudes (same x coordinate) or latitudes (same y coordinate). An edge that does not fulfill this condition will cause an error.
  • See Ordering of edges
YAC will check all edges of the grid and determine whether they are on circles of longitudes (same x coordinate) or latitudes (same y coordinate). An edge that does not fulfill this condition will cause an error.

Definition at line 3401 of file yac.c.

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

◆ yac_cdef_mask()

void yac_cdef_mask ( int const grid_id,
int const nbr_points,
int const location,
int const * is_valid,
int * mask_id )

define a mask for a grid

Parameters
[in]grid_idgrid ID
[in]nbr_pointsnumber of points
[in]locationcell/vertex/edge
[in]is_valid0 for points that are masked out, 1 for valid points
[out]mask_idreturned handle to the mask struct
Examples
test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling9_c.c, and test_dummy_coupling_c.c.

Definition at line 1093 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_mask_named()

void yac_cdef_mask_named ( int const grid_id,
int const nbr_points,
int const location,
int const * is_valid,
char const * name,
int * mask_id )

define a named mask for a grid

Parameters
[in]grid_idgrid ID
[in]nbr_pointsnumber of points
[in]locationcell/vertex/edge
[in]is_valid0 for points that are masked out, 1 for valid points
[in]namename of the mask
[out]mask_idreturned handle to the mask struct
Examples
test_dummy_coupling9_c.c.

Definition at line 1074 of file yac.c.

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

◆ yac_cdef_points_curve2d()

void yac_cdef_points_curve2d ( int const grid_id,
int const * nbr_points,
int const location,
double const * x_points,
double const * y_points,
int * point_id )

Definition of a set of points for 2D curvilinear grids.

Parameters
[in]grid_idhandle to the grid struct
[in]nbr_pointsnumber of points
[in]locationlocation of points
[in]x_pointsarray of point longitudes, in radians
[in]y_pointsarray of point latitudes, in radians
[out]point_idreturned handle to the points struct
Remarks
  • This routine supports points defined on cells or vertices. For edges use yac_cdef_points_unstruct instead.
  • The array x_points and y_points are expected to be of size nbr_points[0] * nbr_points[1].
  • See yac_cdef_grid_curve2d on how the coordinates are being interpreted.
Examples
test_dummy_coupling6_c.c.

Definition at line 990 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_points_reg2d()

void yac_cdef_points_reg2d ( int const grid_id,
int const * nbr_points,
int const location,
double const * x_points,
double const * y_points,
int * point_id )

Definition of a set of points for 2D regular grids.

Parameters
[in]grid_idhandle to the grid struct
[in]nbr_pointsnumber of points
[in]locationlocation of points
[in]x_pointsarray of point longitudes, in radians
[in]y_pointsarray of point latitudes, in radians
[out]point_idreturned handle to the points struct
Remarks
  • This routine supports points defined on cells or vertices. For edges use yac_cdef_points_unstruct instead.
  • The array x_points and y_points are expected to be of size nbr_points[0] and nbr_points[1] respectively.
  • See yac_cdef_grid_reg2d on how the coordinates are being interpreted.
Examples
test_dummy_coupling3_c.c, test_dummy_coupling4_c.c, test_dummy_coupling5_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_multithreading.c, and test_query_routines_c.c.

Definition at line 954 of file yac.c.

Here is the call graph for this function:

◆ yac_cdef_points_unstruct()

void yac_cdef_points_unstruct ( int const grid_id,
int const nbr_points,
int const location,
double const * x_points,
double const * y_points,
int * point_id )

Definition of a set of points for 2D unstructured grids.

Parameters
[in]grid_idhandle to the grid struct
[in]nbr_pointsnumber of points
[in]locationlocation of points
[in]x_pointsarray of point longitudes, in radians
[in]y_pointsarray of point latitudes, in radians
[out]point_idreturned handle to the points struct
Remarks
The array x_points and y_points are expected to be of size nbr_points.
See also
yac_cdef_grid_unstruct
Examples
test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling_c.c, test_restart2.c, and test_restart_c.c.

Definition at line 1028 of file yac.c.

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

◆ yac_cenable_field_frac_mask()

void yac_cenable_field_frac_mask ( const char * comp_name,
const char * grid_name,
const char * field_name,
double frac_mask_fallback_value )

Enables fractional masking for a coupling field and sets the fallback value

Parameters
[in]comp_name
[in]grid_name
[in]field_name
[in]frac_mask_fallback_valuefractional mask fallback value
Remarks
If this field is used as a source in couple, the user will have to provide a fractional mask for all source points along with the source field values in all put/exchange operations of this field. (see Dynamic fractional masking)
Examples
test_dummy_coupling7_c.c, and test_dummy_coupling8_c.c.

Definition at line 1237 of file yac.c.

Here is the call graph for this function:

◆ yac_cenable_field_frac_mask_instance()

void yac_cenable_field_frac_mask_instance ( int yac_instance_id,
const char * comp_name,
const char * grid_name,
const char * field_name,
double frac_mask_fallback_value )

Enables fractional masking for a coupling field and sets the fallback value

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
[in]frac_mask_fallback_valuefractional mask fallback value
Remarks
If this field is used as a source in couple, the user will have to provide a fractional mask for all source points along with the source field values in all put/exchange operations of this field. (see Dynamic fractional masking)
Examples
test_dummy_coupling7_c.c.

Definition at line 1225 of file yac.c.

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

◆ yac_cenddef()

void yac_cenddef ( void )

End of the definition phase for the default YAC instance and setup of internal data structures for coupling (communication matrices and interpolation weights)

Examples
test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, test_dummy_coupling4_c.c, test_dummy_coupling6_c.c, test_dummy_coupling7_c.c, test_dummy_coupling8_c.c, test_dummy_coupling9_c.c, test_dummy_coupling_c.c, test_multithreading.c, test_restart2.c, and test_restart_c.c.

Definition at line 2953 of file yac.c.

Here is the call graph for this function:

◆ yac_cenddef_and_emit_config()

void yac_cenddef_and_emit_config ( int emit_flags,
char ** config )

End of the definition phase for the default YAC instance, invocation of the search and setup of internal data structures for coupling (communication matrices and interpolation weights). In addition, the collected coupling configuration from all processes is emitted.

Parameters
[in]emit_flagsflags for configuring the generated coupling configuration output (YAC_YAML_EMITTER_DEFAULT or YAC_YAML_EMITTER_JSON)
[out]configcoupling configuration
Remarks
the user is responsible for freeing the returned coupling configuration
Examples
test_restart_c.c.

Definition at line 2968 of file yac.c.

Here is the call graph for this function:

◆ yac_cenddef_and_emit_config_instance()

void yac_cenddef_and_emit_config_instance ( int yac_instance_id,
int emit_flags,
char ** config )

End of the definition phase, invocation of the search and setup of internal data structures for coupling (communication matrices and interpolation weights). In addition, the collected coupling configuration from all processes is emitted.

Parameters
[in]yac_instance_idid of the YAC instance
[in]emit_flagsflags for configuring the generated coupling configuration output (YAC_YAML_EMITTER_DEFAULT or YAC_YAML_EMITTER_JSON)
[out]configcoupling configuration
Remarks
the user is responsible for freeing the returned coupling configuration

Definition at line 2959 of file yac.c.

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

◆ yac_cenddef_instance()

void yac_cenddef_instance ( int yac_instance_id)

End of the definition phase, invocation of the search and setup of internal data structures for coupling (communication matrices and interpolation weights)

Parameters
[in]yac_instance_idid of the YAC instance
Examples
test_dummy_coupling3_c.c, test_dummy_coupling5_c.c, test_dummy_coupling6_c.c, and test_dummy_coupling7_c.c.

Definition at line 2946 of file yac.c.

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

◆ yac_cexchange()

void yac_cexchange ( int const send_field_id,
int const recv_field_id,
int const collection_size,
double ***const send_field,
double ** recv_field,
int * send_info,
int * recv_info,
int * ierror )

Exchange of the coupling fields

Parameters
[in]send_field_id-
[in]recv_field_id-
[in]collection_size-
[in]send_field- send buffer dimensions send_field[collection_size] [nbr_fields] [nbr_points]
[in]recv_field- receive buffer dimensions: recv_field[collection_size][nbr_points]
[out]send_info- returned send info
[out]recv_info- returned recv info
[out]ierror- returned error
Examples
test_dummy_coupling2_c.c, test_dummy_coupling3_c.c, test_dummy_coupling5_c.c, test_dummy_coupling6_c.c, and test_dummy_coupling7_c.c.

Definition at line 2916 of file yac.c.

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

◆ yac_cexchange_()

void yac_cexchange_ ( int const send_field_id,
int const recv_field_id,
int const collection_size,
double * send_field,
double * recv_field,
int * send_info,
int * recv_info,
int * ierror )

Exchange of the coupling fields

Parameters
[in]send_field_id-
[in]recv_field_id-
[in]collection_size-
[in]send_field- send buffer (all data is stored in one contiguous part of the memory) dimensions send_field[collection_size] [nbr_fields] [nbr_points]
[in]recv_field- receive buffer (all data is stored in one contiguous part of the memory) dimensions: recv_field[collection_size][nbr_points]
[out]send_info- returned send info
[out]recv_info- returned recv info
[out]ierror- returned error

Definition at line 2639 of file yac.c.

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

◆ yac_cexchange_frac()

void yac_cexchange_frac ( int const send_field_id,
int const recv_field_id,
int const collection_size,
double ***const send_field,
double ***const send_frac_mask,
double ** recv_field,
int * send_info,
int * recv_info,
int * ierror )

Exchange of the coupling fields

Parameters
[in]send_field_id-
[in]recv_field_id-
[in]collection_size-
[in]send_field- send buffer dimensions send_field[collection_size] [nbr_fields] [nbr_points]
[in]send_frac_mask- send fractional mask dimensions send_frac_mask[collection_size] [nbr_fields] [nbr_points]
[in]recv_field- receive buffer dimensions: recv_field[collection_size][nbr_points]
[out]send_info- returned send info
[out]recv_info- returned recv info
[out]ierror- returned error
Examples
test_dummy_coupling7_c.c.

Definition at line 2780 of file yac.c.

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

◆ yac_cexchange_frac_()

void yac_cexchange_frac_ ( int const send_field_id,
int const recv_field_id,
int const collection_size,
double * send_field,
double * send_frac_mask,
double * recv_field,
int * send_info,
int * recv_info,
int * ierror )

Exchange of the coupling fields

Parameters
[in]send_field_id-
[in]recv_field_id-
[in]collection_size-
[in]send_field- send buffer (all data is stored in one contiguous part of the memory) dimensions send_field[collection_size] [nbr_fields] [nbr_points]
[in]send_frac_mask- send fractional mask (all data is stored in one contiguous part of the memory) dimensions send_frac_mask[collection_size] [nbr_fields] [nbr_points]
[in]recv_field- receive buffer (all data is stored in one contiguous part of the memory) dimensions: recv_field[collection_size][nbr_points]
[out]send_info- returned send info
[out]recv_info- returned recv info
[out]ierror- returned error

Definition at line 2672 of file yac.c.

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

◆ yac_cexchange_frac_ptr_()

void yac_cexchange_frac_ptr_ ( int const send_field_id,
int const recv_field_id,
int const collection_size,
double ** send_field,
double ** send_frac_mask,
double ** recv_field,
int * send_info,
int * recv_info,
int * ierror )

Sending of the coupling fields

Parameters
[in]send_field_id-
[in]recv_field_id-
[in]collection_size-
[in]send_field- send buffer dimensions send_field[collection_size * nbr_fields] [nbr_points]
[in]send_frac_mask- send buffer dimensions send_frac_mask[collection_size * nbr_fields] [nbr_points]
[in]recv_field- receive buffer dimensions: recv_field[collection_size][nbr_points]
[out]send_info- returned send info
[out]recv_info- returned recv info
[out]ierror- returned error
Examples
test_dummy_coupling7_c.c.

Definition at line 2744 of file yac.c.

Here is the call graph for this function:

◆ yac_cexchange_ptr_()

void yac_cexchange_ptr_ ( int const send_field_id,
int const recv_field_id,
int const collection_size,
double ** send_field,