YetAnotherCoupler 3.1.1
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
yac_interface.h File Reference
#include <mpi.h>
Include dependency graph for yac_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define YAC_MAX_CHARLEN   (132)
 
#define __attribute__(x)   /*NOTHING*/
 
#define TYPEDEF_YAC_FUNC_COMPUTE_WEIGHTS
 

Typedefs

typedef void(* yac_abort_func) (MPI_Comm comm, const char *msg, const char *source, int line) __attribute__((noreturn))
 
typedef void(* yac_func_compute_weights) (double const tgt_coords[3], int src_cell_id, size_t src_cell_idx, int const **global_results_points, double **result_weights, size_t *result_count, void *user_data)
 

Functions

void yac_cmpi_handshake (MPI_Comm comm, size_t n, char const **group_names, MPI_Comm *group_comms)
 
int yac_cget_default_instance_id ()
 
void yac_cinit (void)
 
void yac_cinit_instance (int *yac_instance_id)
 
void yac_cinit_comm (MPI_Comm comm)
 
void yac_cinit_comm_instance (MPI_Comm comm, int *yac_instance_id)
 
void yac_cinit_dummy (void)
 
void yac_cinit_comm_dummy (MPI_Comm comm)
 
void yac_cread_config_yaml_instance (int yac_instance_id, const char *yaml_file)
 
void yac_cread_config_yaml (const char *yaml_file)
 
void yac_cread_config_json_instance (int yac_instance_id, const char *json_file)
 
void yac_cread_config_json (const char *json_file)
 
void yac_ccleanup ()
 
void yac_ccleanup_instance (int yac_instance_id)
 
void yac_cfinalize ()
 
void yac_cfinalize_instance (int yac_instance_id)
 
void yac_cdef_datetime (const char *start_datetime, const char *end_datetime)
 
void yac_cdef_datetime_instance (int yac_instance_id, const char *start_datetime, const char *end_datetime)
 
void yac_cdef_calendar (int calendar)
 
void yac_cget_groupcomm (MPI_Comm *group_comm)
 
void yac_cget_groupcomm_instance (int yac_instance_id, MPI_Comm *group_comm)
 
void yac_cpredef_comp (char const *comp_name, int *comp_id)
 
void yac_cpredef_comp_instance (int yac_instance_id, char const *comp_name, int *comp_id)
 
void yac_cdef_comp (const char *comp_name, int *comp_id)
 
void yac_cdef_comp_instance (int yac_instance_id, const char *comp_name, int *comp_id)
 
void yac_cdef_comps (const char **comp_names, int num_comps, int *comp_ids)
 
void yac_cdef_comps_instance (int yac_instance_id, const char **comp_names, int num_comps, int *comp_ids)
 
void yac_cget_comp_comm (int comp_id, MPI_Comm *comp_comm)
 
void yac_cget_comps_comm (const char **comp_names, int num_comps, MPI_Comm *comps_comm)
 
void yac_cget_comps_comm_instance (int yac_instance_id, const char **comp_names, int num_comps, MPI_Comm *comps_comm)
 
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)
 
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)
 
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)
 
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_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)
 
void yac_cset_mask (int const *is_valid, int points_id)
 
void yac_cdef_mask (int const grid_id, int const nbr_points, int const location, int const *is_valid, int *mask_id)
 
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)
 
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)
 
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)
 
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_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_cdef_component_metadata (const char *comp_name, const char *metadata)
 
void yac_cdef_component_metadata_instance (int yac_instance_id, const char *comp_name, const char *metadata)
 
void yac_cdef_grid_metadata (const char *grid_name, const char *metadata)
 
void yac_cdef_grid_metadata_instance (int yac_instance_id, const char *grid_name, const char *metadata)
 
void yac_cdef_field_metadata (const char *comp_name, const char *grid_name, const char *field_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_cget_action (int field_id, int *action)
 
const char * yac_cget_field_datetime (int field_id)
 
void yac_cupdate (int field_id)
 
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 (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 (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 (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 (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 (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 (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, 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_ccheck_field_dimensions (int field_id, int collection_size, int num_pointsets, int const *pointset_sizes)
 
void yac_cget_ (int const field_id, int const collection_size, double *recv_field, int *info, int *ierror)
 
void yac_cget (int const field_id, int const collection_size, double **recv_field, int *info, int *ierror)
 
void yac_cget_async_ (int const field_id, int const collection_size, double *recv_field, int *info, int *ierror)
 
void yac_cget_async (int const field_id, int const collection_size, double **recv_field, int *info, int *ierror)
 
void yac_cput_ (int const field_id, int const collection_size, double *send_field, int *info, int *ierror)
 
void yac_cput (int const field_id, int const collection_size, double ***const send_field, int *info, int *ierror)
 
void yac_cput_frac_ (int const field_id, int const collection_size, double *send_field, double *send_frac_mask, int *info, int *ierror)
 
void yac_cput_frac (int const field_id, int const collection_size, double ***const send_field, double ***const send_frac_mask, int *info, int *ierror)
 
void yac_cput_ptr_ (int const field_id, int const collection_size, double **send_field, int *info, int *ierror)
 
void yac_cput_frac_ptr_ (int const field_id, int const collection_size, double **send_field, double **send_frac_mask, int *info, int *ierror)
 
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)
 
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)
 
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)
 
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)
 
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 *ierror)
 
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)
 
void yac_ctest (int field_id, int *flag)
 
void yac_cwait (int field_id)
 
void yac_csync_def (void)
 
void yac_csync_def_instance (int yac_instance_id)
 
void yac_cenddef (void)
 
void yac_cenddef_instance (int yac_instance_id)
 
void yac_cenddef_and_emit_config (int emit_flags, char **config)
 
void yac_cenddef_and_emit_config_instance (int yac_instance_id, int emit_flags, char **config)
 
char * yac_cget_start_datetime (void)
 
char * yac_cget_start_datetime_instance (int yac_instance_id)
 
char * yac_cget_end_datetime (void)
 
char * yac_cget_end_datetime_instance (int yac_instance_id)
 
char * yac_cget_version (void)
 
int yac_cget_nbr_comps (void)
 
int yac_cget_nbr_comps_instance (int yac_instance_id)
 
int yac_cget_nbr_grids ()
 
int yac_cget_nbr_grids_instance (int yac_instance_id)
 
int yac_cget_comp_nbr_grids (const char *comp_name)
 
int yac_cget_comp_nbr_grids_instance (int yac_instance_id, const char *comp_name)
 
int yac_cget_nbr_fields (const char *comp_name, const char *grid_name)
 
int yac_cget_nbr_fields_instance (int yac_instance_id, const char *comp_name, const char *grid_name)
 
void yac_cget_comp_names (int nbr_comps, const char **comp_names)
 
void yac_cget_comp_names_instance (int yac_instance_id, int nbr_comps, const char **comp_names)
 
void yac_cget_grid_names (int nbr_grids, const char **grid_names)
 
void yac_cget_grid_names_instance (int yac_instance_id, 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_comp_grid_names_instance (int yac_instance_id, const char *comp_name, int nbr_grids, const char **grid_names)
 
void yac_cget_field_names (const char *comp_name, const char *grid_name, int nbr_fields, const char **field_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)
 
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)
 
int yac_cget_field_id (const char *comp_name, const char *grid_name, const char *field_name)
 
int yac_cget_field_id_instance (int yac_instance_id, const char *comp_name, const char *grid_name, const char *field_name)
 
const char * yac_cget_component_metadata (const char *comp_name)
 
const char * yac_cget_component_metadata_instance (int yac_instance_id, const char *comp_name)
 
const char * yac_cget_grid_metadata (const char *grid_name)
 
const char * yac_cget_grid_metadata_instance (int yac_instance_id, const char *grid_name)
 
const char * yac_cget_field_metadata (const char *comp_name, const char *grid_name, const char *field_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_timestep (const char *comp_name, const char *grid_name, const char *field_name)
 
const char * yac_cget_field_timestep_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)
 
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)
 
int yac_cget_field_role (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)
 
void yac_abort (MPI_Comm comm, const char *msg, const char *source, int line) __attribute__((noreturn))
 
void yac_abort_message (char const *msg, const char *source, int line)
 
void yac_restore_default_abort_handler (void)
 
void yac_set_abort_handler (yac_abort_func custom_abort)
 
yac_abort_func yac_get_abort_handler (void)
 
yac_abort_func yac_get_default_abort_handler (void)
 
void yac_set_default_comm (MPI_Comm comm)
 
size_t yac_get_grid_size (int location, int grid_id)
 
size_t yac_get_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 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)
 
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, char const *src_grid_name, char const *tgt_grid_name)
 
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)
 

Variables

int const YAC_LOCATION_CELL
 
int const YAC_LOCATION_CORNER
 
int const YAC_LOCATION_EDGE
 
int const YAC_EXCHANGE_TYPE_NONE
 
int const YAC_EXCHANGE_TYPE_SOURCE
 
int const YAC_EXCHANGE_TYPE_TARGET
 
int const YAC_ACTION_NONE
 
int const YAC_ACTION_REDUCTION
 
int const YAC_ACTION_COUPLING
 
int const YAC_ACTION_GET_FOR_RESTART
 
int const YAC_ACTION_PUT_FOR_RESTART
 
int const YAC_ACTION_OUT_OF_BOUND
 
int const YAC_REDUCTION_TIME_NONE
 
int const YAC_REDUCTION_TIME_ACCUMULATE
 
int const YAC_REDUCTION_TIME_AVERAGE
 
int const YAC_REDUCTION_TIME_MINIMUM
 
int const YAC_REDUCTION_TIME_MAXIMUM
 
int const YAC_TIME_UNIT_MILLISECOND
 
int const YAC_TIME_UNIT_SECOND
 
int const YAC_TIME_UNIT_MINUTE
 
int const YAC_TIME_UNIT_HOUR
 
int const YAC_TIME_UNIT_DAY
 
int const YAC_TIME_UNIT_MONTH
 
int const YAC_TIME_UNIT_YEAR
 
int const YAC_TIME_UNIT_ISO_FORMAT
 
int const YAC_CALENDAR_NOT_SET
 
int const YAC_PROLEPTIC_GREGORIAN
 
int const YAC_YEAR_OF_365_DAYS
 
int const YAC_YEAR_OF_360_DAYS
 
int const YAC_AVG_ARITHMETIC
 
int const YAC_AVG_DIST
 
int const YAC_AVG_BARY
 
int const YAC_NCC_AVG
 
int const YAC_NCC_DIST
 
int const YAC_NNN_AVG
 
int const YAC_NNN_DIST
 
int const YAC_NNN_GAUSS
 
int const YAC_NNN_RBF
 
int const YAC_NNN_ZERO
 
int const YAC_CONSERV_DESTAREA
 
int const YAC_CONSERV_FRACAREA
 
int const YAC_SPMAP_AVG
 
int const YAC_SPMAP_DIST
 
int YAC_YAML_EMITTER_DEFAULT
 emit to YAML format
 
int YAC_YAML_EMITTER_JSON
 emit to JSON format
 

Macro Definition Documentation

◆ __attribute__

#define __attribute__ (   x)    /*NOTHING*/

Definition at line 2065 of file yac_interface.h.

◆ TYPEDEF_YAC_FUNC_COMPUTE_WEIGHTS

#define TYPEDEF_YAC_FUNC_COMPUTE_WEIGHTS

method signature for weight computation function used by User callback interpolation

If the field value of a target point, whose weights have been computed by this routine, is to be computed on the source process at which this routine was called, YAC would use the weights as follows (it is assumed that all required source points are available at this process):

// this routine return an index to a source field value associated to
// the provided global id
size_t global_id_2_local_idx(int src_field_idx, int global_id);
[...]
double tgt_value[collection_size];
for (int collection_idx = 0; collection_idx < collection_size;
collection_idx)
tgt_value[collection_idx] = 0.0;
// for all source fields
for (int src_field_idx = 0; src_field_idx < num_pointsets; ++src_field_idx) {
for (size_t i = 0; i < result_count[src_field_idx]; ++i) {
size_t src_field_point_idx =
global_id_2_local_idx(
src_field_idx, global_results_points[src_field_idx][i]);
double weight = result_weights[src_field_idx][src_field_point_idx];
for (int collection_idx = 0; collection_idx < collection_size;
collection_idx) {
tgt_value[collection_idx] +=
src_field[collection_idx][src_field_idx][src_field_point_idx] *
weight;
}
}
}

If one or more source points associated to the global ids return by this routine are not actually available at this process, YAC will ensure that the respective value will be available for the interpolation.

Parameters
[in]tgt_coords3D coordinates of the target point
[in]src_cell_idglobal id of the source cell matching the target point
[in]src_cell_idx(zero based) index of the source cell matching the target point
[out]global_results_pointsglobal ids of source points to be used for the interpolation of the target point
[out]result_weightsweights to be used for the interpolation of the target point
[out]result_countnumber of source points to be used for the interpolation of the target point per pointset
[in]user_datauser_data pointer provided to yac_cadd_compute_weights_callback
Remarks
The size of the first dimension of the arrays global_results_points, result_weights, and result_count has to be equal to num_pointsets provided to yac_cdef_field or yac_cdef_field_mask that was used to define the field involved in the coupling that is supposed to use this weight computation function.
3D coordinates are for a point of a unit sphere

Definition at line 2345 of file yac_interface.h.

◆ YAC_MAX_CHARLEN

#define YAC_MAX_CHARLEN   (132)

Definition at line 67 of file yac_interface.h.

Typedef Documentation

◆ yac_abort_func

typedef void(* yac_abort_func) (MPI_Comm comm, const char *msg, const char *source, int line) __attribute__((noreturn))

functions used as error handler must conform to this interface

Examples
test_abort_c.c.

Definition at line 2076 of file yac_interface.h.

◆ yac_func_compute_weights

typedef void(* yac_func_compute_weights) (double const tgt_coords[3], int src_cell_id, size_t src_cell_idx, int const **global_results_points, double **result_weights, size_t *result_count, void *user_data)

Definition at line 2348 of file yac_interface.h.

Function Documentation

◆ yac_abort()

void yac_abort ( MPI_Comm  comm,
const char *  msg,
const char *  source,
int  line 
)

Calls the currently set abort handler (yac_abort_default by default)

Parameters
[in]commMPI communicator used to call MPI_Abort
[in]msgmessage text to print
[in]sourcestring describing source file name
[in]lineline number of caller

◆ yac_abort_message()

void yac_abort_message ( char const *  msg,
const char *  source,
int  line 
)

Call the yac_abort function (providing the default communicator for the comm argument).

Parameters
msgmessage text to print
sourcestring describing source file name
lineline number of caller
Examples
test_abort_c.c.

◆ 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

Definition at line 3507 of file yac_interface.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 3345 of file yac_interface.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 3472 of file yac_interface.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

Definition at line 3402 of file yac_interface.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 3484 of file yac_interface.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 3462 of file yac_interface.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 3440 of file yac_interface.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 3364 of file yac_interface.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  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]scalescale parameter required by some reduction types

Definition at line 3382 of file yac_interface.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 
)

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

Parameters
[in]interp_stack_config_idinterpolation stack
[in]spread_distancespread distance
[in]max_search_distancemaximum search distance
[in]weight_typereduction type

Definition at line 3421 of file yac_interface.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 3494 of file yac_interface.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,
char const *  src_grid_name,
char const *  tgt_grid_name 
)

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

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

Definition at line 3449 of file yac_interface.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 1521 of file yac_interface.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

Definition at line 498 of file yac_interface.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.

Definition at line 490 of file yac_interface.c.

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

◆ yac_cdef_calendar()

void yac_cdef_calendar ( int  calendar)

Defines the calendar of the default instance

Parameters
[in]calendarThe calendar
See also
YAC_PROLEPTIC_GREGORIAN etc.

Definition at line 555 of file yac_interface.c.

Here is the caller graph for this function:

◆ 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.

Definition at line 772 of file yac_interface.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.

Definition at line 766 of file yac_interface.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

Definition at line 1112 of file yac_interface.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

Definition at line 1104 of file yac_interface.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

Definition at line 758 of file yac_interface.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

Definition at line 733 of file yac_interface.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

Definition at line 1447 of file yac_interface.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

Definition at line 1415 of file yac_interface.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

Definition at line 1400 of file yac_interface.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

Definition at line 1430 of file yac_interface.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

Definition at line 547 of file yac_interface.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

Definition at line 538 of file yac_interface.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.

Definition at line 1052 of file yac_interface.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.

Definition at line 979 of file yac_interface.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

Definition at line 1140 of file yac_interface.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

Definition at line 1131 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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
on the local order of edges: generate for each edge a tuple containing the local indices of the adjacent vertices (lowest index first) and sort this list by the vertex indices; this gives the the local order of edges
The array x_vertices and y_vertices are expected to be of size nbr_vertices[0] * nbr_vertices[1].

Definition at line 3153 of file yac_interface.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

Definition at line 1126 of file yac_interface.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

Definition at line 1117 of file yac_interface.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
on the local order of edges: generate for each edge a tuple containing the local indices of the adjacent vertices (lowest index first) and sort this list by the vertex indices; this gives the the local order of edges

Definition at line 3135 of file yac_interface.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

Definition at line 3171 of file yac_interface.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.

Definition at line 3189 of file yac_interface.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

Definition at line 951 of file yac_interface.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

Definition at line 932 of file yac_interface.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 (returned from yac_cdef_grid)
[in]nbr_pointsnumber of points
[in]locationlocation of points [edge|vertex|center]
[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[0] * nbr_points[1].

Definition at line 853 of file yac_interface.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 (returned from yac_cdef_grid)
[in]nbr_pointsnumber of points
[in]locationlocation of points [edge|vertex|center]
[in]x_pointsarray of point longitudes, in radians
[in]y_pointsarray of point latitudes, in radians
[out]point_idreturned handle to the points struct

Definition at line 822 of file yac_interface.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 (returned from yac_cdef_grid)
[in]nbr_pointsnumber of points
[in]locationlocation of points [edge|vertex|center]
[in]x_pointsarray of point longitudes, in radians
[in]y_pointsarray of point latitudes, in radians
[out]point_idreturned handle to the points struct

Definition at line 886 of file yac_interface.c.

Here is the call 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)

Definition at line 1095 of file yac_interface.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)

Definition at line 1083 of file yac_interface.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)

Definition at line 2803 of file yac_interface.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

Definition at line 2818 of file yac_interface.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 2809 of file yac_interface.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

Definition at line 2797 of file yac_interface.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

Definition at line 2767 of file yac_interface.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 2491 of file yac_interface.c.

Here is the call 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

Definition at line 2632 of file yac_interface.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 2524 of file yac_interface.c.

Here is the call 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

Definition at line 2596 of file yac_interface.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,
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]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

Definition at line 2566 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cfinalize()

void yac_cfinalize ( )

Cleans up default YAC instance (if available) and finales MPI, if it was initialised by YAC

Definition at line 526 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cfinalize_instance()

void yac_cfinalize_instance ( int  yac_instance_id)

Cleans up provided YAC instance and finales MPI, if it was initialised by YAC

Parameters
[in]yac_instance_idid of the YAC instance to be finalised

Definition at line 517 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cfree_ext_couple_config()

void yac_cfree_ext_couple_config ( int  ext_couple_config_id)

Frees an extended coupling configuration

Parameters
[in]ext_couple_config_id

Definition at line 1208 of file yac_interface.c.

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

◆ yac_cfree_interp_stack_config()

void yac_cfree_interp_stack_config ( int  interp_stack_config_id)

frees a stack trace

Parameters
[in]interp_stack_config_idinterpolation stack

Definition at line 3325 of file yac_interface.c.

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

◆ yac_cget()

void yac_cget ( int const  field_id,
int const  collection_size,
double **  recv_field,
int *  info,
int *  ierror 
)

Receiving of the coupling fields

Parameters
[in]field_id-
[in]collection_size-
[in]recv_field- receive buffer dimensions: recv_field[collection_size][nbr_points]
[out]info- returned info argument indicating the action performed
[out]ierror- returned error

Definition at line 1821 of file yac_interface.c.

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

◆ yac_cget_()

void yac_cget_ ( int const  field_id,
int const  collection_size,
double *  recv_field,
int *  info,
int *  ierror 
)

Receiving of the coupling fields

Parameters
[in]field_id-
[in]collection_size-
[in]recv_field- receive buffer (all data is stored in one contiguous part of the memory) dimensions: recv_field[collection_size][nbr_points]
[in]info- returned info argument indicating the action performed
[out]ierror- returned error

Definition at line 1803 of file yac_interface.c.

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

◆ yac_cget_action()

void yac_cget_action ( int  field_id,
int *  action 
)

Returns the action a put/get would return for the current timestep

Parameters
[in]field_idfield id returned by yac_cdef_field
[out]actionaction for the current timestep (YAC_ACTION_NONE, YAC_ACTION_REDUCTION, YAC_ACTION_COUPLING, YAC_ACTION_GET_FOR_RESTART, YAC_ACTION_PUT_FOR_RESTART, or YAC_ACTION_OUT_OF_BOUND)
Remarks
If the exchange type of the field is YAC_EXCHANGE_TYPE_NONE, this routine will return YAC_ACTION_NONE.
If this routine is called before yac_cenddef, the behaviour is undefined.

Definition at line 1582 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_async()

void yac_cget_async ( int const  field_id,
int const  collection_size,
double **  recv_field,
int *  info,
int *  ierror 
)

Receiving of the coupling fields

Parameters
[in]field_id-
[in]collection_size-
[in]recv_field- receive buffer dimensions: recv_field[collection_size][nbr_points]
[out]info- returned info argument indicating the action performed
[out]ierror- returned error
Remarks
This routine returns immediately without waiting for the receive operation to be completed. The user should not access the memory associated with recv_field until this is the case. This can be achieved by calling yac_cwait.

Definition at line 1830 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_async_()

void yac_cget_async_ ( int const  field_id,
int const  collection_size,
double *  recv_field,
int *  info,
int *  ierror 
)

Receiving of the coupling fields

Parameters
[in]field_id-
[in]collection_size-
[in]recv_field- receive buffer (all data is stored in one contiguous part of the memory) dimensions: recv_field[collection_size][nbr_points]
[in]info- returned info argument indicating the action performed
[out]ierror- returned error
Remarks
This routine returns immediately without waiting for the receive operation to be completed. The user should not access the memory associated with recv_field until this is the case. This can be achieved by calling yac_cwait.

Definition at line 1812 of file yac_interface.c.

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

◆ yac_cget_collection_size_from_field_id()

int yac_cget_collection_size_from_field_id ( int  field_id)

query routine to get the collection_size of a field for a given ID

Parameters
[in]field_idID as provided by yac_cdef_field
Returns
collection_size

Definition at line 3044 of file yac_interface.c.

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

◆ yac_cget_comp_comm()

void yac_cget_comp_comm ( int  comp_id,
MPI_Comm *  comp_comm 
)

Providing the component MPI communicator

Parameters
[in]comp_idlocal component ID (from yac_cdef_comp), handle to the component struct
[out]comp_commcomponent communicator

Definition at line 631 of file yac_interface.c.

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

◆ yac_cget_comp_grid_names()

void yac_cget_comp_grid_names ( const char *  comp_name,
int  nbr_grids,
const char **  grid_names 
)

query routine to get the list of grid names of a given component that are referenced by at least one defined field or have metadata assigned to it

Parameters
[in]comp_namename of the component
[in]nbr_gridsnumber of grids
[out]grid_nameslist of grid names

Definition at line 2976 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_comp_grid_names_instance()

void yac_cget_comp_grid_names_instance ( int  yac_instance_id,
const char *  comp_name,
int  nbr_grids,
const char **  grid_names 
)

query routine to get the list of grid names of a given component that are referenced by at least one defined field or have metadata assigned to it

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namename of the component
[in]nbr_gridsnumber of grids
[out]grid_nameslist of grid names

Definition at line 2957 of file yac_interface.c.

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

◆ yac_cget_comp_names()

void yac_cget_comp_names ( int  nbr_comps,
const char **  comp_names 
)

query routine to get the list of component names for defined the default YAC instance.

Parameters
[in]nbr_compsnumber of components
[out]comp_nameslist of component names

Definition at line 2935 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_comp_names_instance()

void yac_cget_comp_names_instance ( int  yac_instance_id,
int  nbr_comps,
const char **  comp_names 
)

query routine to get the list of component names for defined

Parameters
[in]yac_instance_idid of the YAC instance
[in]nbr_compsnumber of components
[out]comp_nameslist of component names

Definition at line 2924 of file yac_interface.c.

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

◆ yac_cget_comp_nbr_grids()

int yac_cget_comp_nbr_grids ( const char *  comp_name)

query routine for number of grids defined in the default YAC instance for a given components that is referenced by at least one defined field.

Parameters
[in]comp_name
Returns
number of components

Definition at line 2894 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_comp_nbr_grids_instance()

int yac_cget_comp_nbr_grids_instance ( int  yac_instance_id,
const char *  comp_name 
)

query routine for number of grids defined for a given components that is referenced by at least one defined field.

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_name
Returns
number of components

Definition at line 2876 of file yac_interface.c.

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

◆ yac_cget_component_metadata()

const char * yac_cget_component_metadata ( const char *  comp_name)

Get metadata for a component

Parameters
[in]comp_name
Returns
metadata (NULL if no metadata is defined)

Definition at line 1155 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_component_metadata_instance()

const char * yac_cget_component_metadata_instance ( int  yac_instance_id,
const char *  comp_name 
)

Get metadata for a component

Parameters
[in]yac_instance_id
[in]comp_name
Returns
metadata (NULL if no metadata is defined)

Definition at line 1147 of file yac_interface.c.

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

◆ yac_cget_component_name_from_field_id()

const char * yac_cget_component_name_from_field_id ( int  field_id)

query routine to get the component name for a given ID

Parameters
[in]field_idID as provided by yac_cdef_field
Returns
comp_name component name of the fields component. (array of length YAC_MAX_CHARLEN)

Definition at line 3015 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_comps_comm()

void yac_cget_comps_comm ( const char **  comp_names,
int  num_comps,
MPI_Comm *  comps_comm 
)

Generates an MPI communicator that contains all processes of the provided components

Parameters
[in]comp_namesname of components
[in]num_compsnumber of components
[out]comps_commgenerated communicator
Remarks
the components have to defined in the default YAC instance
the local process has to be in at least one of the provided components
this call is collective for all processes in the provided components

Definition at line 665 of file yac_interface.c.

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

◆ yac_cget_comps_comm_instance()

void yac_cget_comps_comm_instance ( int  yac_instance_id,
const char **  comp_names,
int  num_comps,
MPI_Comm *  comps_comm 
)

Generates an MPI communicator that contains all processes of the provided components

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namesname of components
[in]num_compsnumber of components
[out]comps_commgenerated communicator
Remarks
the local process has to be in at least one of the provided components
this call is collective for all processes in the provided components

Definition at line 655 of file yac_interface.c.

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

◆ yac_cget_default_instance_id()

int yac_cget_default_instance_id ( )

Getter function for the default instance

Returns the instance id of the default instance.

Remarks
The default instance needs to be initialised before calling this function
Returns
The instance id of the default instance

Definition at line 352 of file yac_interface.c.

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

◆ yac_cget_end_datetime()

char * yac_cget_end_datetime ( void  )

query routine for the end datetime of the job of the default YAC instance

Definition at line 596 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_end_datetime_instance()

char * yac_cget_end_datetime_instance ( int  yac_instance_id)

query routine for the end datetime of the job

Parameters
[in]yac_instance_idid of the YAC instance

Definition at line 589 of file yac_interface.c.

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

◆ yac_cget_ext_couple_config()

void yac_cget_ext_couple_config ( int *  ext_couple_config_id)

Get an extended coupling configuration (all parameters are set to the default values)

Parameters
[out]ext_couple_config_idextended coupling configuration

Definition at line 1200 of file yac_interface.c.

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

◆ yac_cget_ext_couple_config_mapping_side()

void yac_cget_ext_couple_config_mapping_side ( int  ext_couple_config_id,
int *  mapping_side 
)

Gets the mapping side

Parameters
[in]ext_couple_config_idextended coupling configuration
[out]mapping_sidemapping side

Definition at line 1260 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_ext_couple_config_mask_name()

void yac_cget_ext_couple_config_mask_name ( int  ext_couple_config_id,
char const **  tgt_mask_name 
)

Gets target mask name

Parameters
[in]ext_couple_config_idextended coupling configuration
[out]tgt_mask_nametarget mask name

Definition at line 1365 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_ext_couple_config_scale_factor()

void yac_cget_ext_couple_config_scale_factor ( int  ext_couple_config_id,
double *  scale_factor 
)

Gets the scale factor

Parameters
[in]ext_couple_config_idextended coupling configuration
[out]scale_factorscale_factor

Definition at line 1283 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_ext_couple_config_scale_summand()

void yac_cget_ext_couple_config_scale_summand ( int  ext_couple_config_id,
double *  scale_summand 
)

Gets the scale summand

Parameters
[in]ext_couple_config_idextended coupling configuration
[out]scale_summandscale_summand

Definition at line 1306 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_ext_couple_config_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 
)

Gets source mask names

Parameters
[in]ext_couple_config_idextended coupling configuration
[out]num_src_mask_namesnumber of source mask names
[out]src_mask_namessource mask names

Definition at line 1341 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_ext_couple_config_weight_file()

void yac_cget_ext_couple_config_weight_file ( int  ext_couple_config_id,
char const **  weight_file 
)

Gets the weight file name

Parameters
[in]ext_couple_config_idextended coupling configuration
[out]weight_filename of the weight file, if it is set; NULL otherwise

Definition at line 1234 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_collection_size()

int yac_cget_field_collection_size ( const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the collection_size of a field

Parameters
[in]comp_name
[in]grid_name
[in]field_name
Returns
collection_size

Definition at line 3108 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_collection_size_instance()

int yac_cget_field_collection_size_instance ( int  yac_instance_id,
const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the collection_size of a field

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
Returns
collection_size

Definition at line 3090 of file yac_interface.c.

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

◆ yac_cget_field_datetime()

const char * yac_cget_field_datetime ( int  field_id)

Returns the current datetime of the field

Parameters
[in]field_id
Returns
current datetime of the field

Definition at line 1625 of file yac_interface.c.

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

◆ yac_cget_field_frac_mask_fallback_value()

double yac_cget_field_frac_mask_fallback_value ( const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the fractional mask fallback value of a field

Parameters
[in]comp_name
[in]grid_name
[in]field_name
Returns
frac_mask_fallback_value
Remarks
if YAC_FRAC_MASK_NO_VALUE is returned, then no fractional mask fallback value is defined for this field

Definition at line 3100 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_frac_mask_fallback_value_instance()

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 
)

query routine to get the fractional mask fallback value of a field

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
Returns
frac_mask_fallback_value
Remarks
if YAC_FRAC_MASK_NO_VALUE is returned, then no fractional mask fallback value is defined for this field

Definition at line 3079 of file yac_interface.c.

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

◆ yac_cget_field_id()

int yac_cget_field_id ( const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the field_id from component, grid and field name (if defined on this process)

Parameters
[in]comp_namecomponent name
[in]grid_namegrid name
[in]field_namefield name
Returns
field_id

Definition at line 2842 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_id_instance()

int yac_cget_field_id_instance ( int  yac_instance_id,
const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the field_id from component, grid and field name (if defined on this process)

Parameters
[in]yac_instance_id
[in]comp_namecomponent name
[in]grid_namegrid name
[in]field_namefield name
Returns
field_id

Definition at line 2829 of file yac_interface.c.

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

◆ yac_cget_field_metadata()

const char * yac_cget_field_metadata ( const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

Get metadata for a field

Parameters
[in]comp_name
[in]grid_name
[in]field_name
Returns
metadata (NULL if no metadata is defined)

Definition at line 1182 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_metadata_instance()

const char * yac_cget_field_metadata_instance ( int  yac_instance_id,
const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

Get metadata for a field

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
Returns
metadata (NULL if no metadata is defined)

Definition at line 1173 of file yac_interface.c.

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

◆ yac_cget_field_name_from_field_id()

const char * yac_cget_field_name_from_field_id ( int  field_id)

query routine to get the field name for a given ID

Parameters
[in]field_idID as provided by yac_cdef_field
Returns
field_name field name that has been given to yac_cdef_field. (array of length YAC_MAX_CHARLEN)

Definition at line 3030 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_names()

void yac_cget_field_names ( const char *  comp_name,
const char *  grid_name,
int  nbr_fields,
const char **  field_names 
)

query routine to get the list of field names defined on the given component and grid for the default YAC instance.

Parameters
[in]comp_namecomponent name
[in]grid_namegrid name
[in]nbr_fieldsnumber of fields
[out]field_nameslist of field names

Definition at line 3008 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_names_instance()

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 
)

query routine to get the list of field names on the given component and grid

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namecomponent name
[in]grid_namegrid name
[in]nbr_fieldsnumber of fields
[out]field_nameslist of grid names

Definition at line 2982 of file yac_interface.c.

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

◆ yac_cget_field_role()

int yac_cget_field_role ( const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the role of a field for a given ID

Parameters
[in]comp_name
[in]grid_name
[in]field_name
Returns
role exchange type of the field
(YAC_EXCHANGE_TYPE_NONE, YAC_EXCHANGE_TYPE_SOURCE, or YAC_EXCHANGE_TYPE_TARGET)
Remarks
the role is set by the call to yac_cenddef or yac_cenddef_instance

Definition at line 3126 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_role_instance()

int yac_cget_field_role_instance ( int  yac_instance_id,
const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the role of a field for a given ID

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
Returns
role exchange type of the field
(YAC_EXCHANGE_TYPE_NONE, YAC_EXCHANGE_TYPE_SOURCE, or YAC_EXCHANGE_TYPE_TARGET)
Remarks
the role is set by the call to yac_cenddef or yac_cenddef_instance

Definition at line 3115 of file yac_interface.c.

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

◆ yac_cget_field_timestep()

const char * yac_cget_field_timestep ( const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the timestep of a field

Parameters
[in]comp_name
[in]grid_name
[in]field_name
Returns
timestep timestep that has been given to yac_cdef_field iso8601 string (array of length YAC_MAX_CHARLEN)

Definition at line 3072 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_field_timestep_instance()

const char * yac_cget_field_timestep_instance ( int  yac_instance_id,
const char *  comp_name,
const char *  grid_name,
const char *  field_name 
)

query routine to get the timestep of a field

Parameters
[in]yac_instance_id
[in]comp_name
[in]grid_name
[in]field_name
Returns
timestep timestep that has been given to yac_cdef_field iso8601 string (array of length YAC_MAX_CHARLEN)

Definition at line 3060 of file yac_interface.c.

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

◆ yac_cget_grid_metadata()

const char * yac_cget_grid_metadata ( const char *  grid_name)

Get metadata for a grid

Parameters
[in]grid_name
Returns
metadata (NULL if no metadata is defined)

Definition at line 1168 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_grid_metadata_instance()

const char * yac_cget_grid_metadata_instance ( int  yac_instance_id,
const char *  grid_name 
)

Get metadata for a grid

Parameters
[in]yac_instance_id
[in]grid_name
Returns
metadata (NULL if no metadata is defined)

Definition at line 1160 of file yac_interface.c.

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

◆ yac_cget_grid_name_from_field_id()

const char * yac_cget_grid_name_from_field_id ( int  field_id)

query routine to get the grid name for a given ID

Parameters
[in]field_idID as provided by yac_cdef_field
Returns
grid_name grid name of the fields grid. (array of length YAC_MAX_CHARLEN)

Definition at line 3022 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_grid_names()

void yac_cget_grid_names ( int  nbr_grids,
const char **  grid_names 
)

query routine to get the list of grid names of the default YAC instance that are referenced by at least one defined field or have metadata assigned to it

Parameters
[in]nbr_gridsnumber of grids
[out]grid_nameslist of grid names

Definition at line 2952 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_grid_names_instance()

void yac_cget_grid_names_instance ( int  yac_instance_id,
int  nbr_grids,
const char **  grid_names 
)

query routine to get the list of grid names that are referenced by at least one defined field or have metadata assigned to it

Parameters
[in]yac_instance_idid of the YAC instance
[in]nbr_gridsnumber of grids
[out]grid_nameslist of grid names

Definition at line 2941 of file yac_interface.c.

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

◆ yac_cget_groupcomm()

void yac_cget_groupcomm ( MPI_Comm *  group_comm)

Providing a group communicator for the default YAC instance

Parameters
[out]group_commcommunicator containing all processes that passed the same group name to the init-routine or MPI_COMM_NULL if not group name was provided.

◆ yac_cget_groupcomm_instance()

void yac_cget_groupcomm_instance ( int  yac_instance_id,
MPI_Comm *  group_comm 
)

Providing a group communicator

Parameters
[in]yac_instance_idid of the YAC instance
[out]group_commcommunicator containing all processes that passed the same group name to the init-routine or MPI_COMM_NULL if not group name was provided.

◆ yac_cget_interp_stack_config()

void yac_cget_interp_stack_config ( int *  interp_stack_config_id)

gets an empty stack trace

Parameters
[out]interp_stack_config_idinterpolation stack

Definition at line 3311 of file yac_interface.c.

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

◆ yac_cget_nbr_comps()

int yac_cget_nbr_comps ( void  )

query routine for number of components defined in the default YAC instance

Returns
number of components

Definition at line 2858 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_nbr_comps_instance()

int yac_cget_nbr_comps_instance ( int  yac_instance_id)

query routine for number of components

Parameters
[in]yac_instance_idid of the YAC instance
Returns
number of components

Definition at line 2850 of file yac_interface.c.

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

◆ yac_cget_nbr_fields()

int yac_cget_nbr_fields ( const char *  comp_name,
const char *  grid_name 
)

query routine for number of coupling fields defined in the given component and grids of the default YAC instance

Parameters
[in]comp_namename of the component
[in]grid_namename of the grid
Returns
number of fields defined on the calling process

Definition at line 2919 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_nbr_fields_instance()

int yac_cget_nbr_fields_instance ( int  yac_instance_id,
const char *  comp_name,
const char *  grid_name 
)

query routine for number of coupling fields defined in the given component and grids

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namename of the component
[in]grid_namename of the grid
Returns
number of fields defined on the calling process

Definition at line 2899 of file yac_interface.c.

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

◆ yac_cget_nbr_grids()

int yac_cget_nbr_grids ( )

query routine for number of grids defined in the default YAC instance that are referenced by at least one defined field or have metadata assigned to it

Returns
number of fields defined on the calling process

Definition at line 2871 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_nbr_grids_instance()

int yac_cget_nbr_grids_instance ( int  yac_instance_id)

query routine for number of grids that are referenced by at least one defined field or have metadata assigned to it

Parameters
[in]yac_instance_idid of the YAC instance
Returns
number of fields defined on the calling process

Definition at line 2863 of file yac_interface.c.

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

◆ yac_cget_role_from_field_id()

int yac_cget_role_from_field_id ( int  field_id)

query routine to get the role of a field for a given ID

Parameters
[in]field_idID as provided by yac_cdef_field
Returns
role exchange type of the field
(YAC_EXCHANGE_TYPE_NONE, YAC_EXCHANGE_TYPE_SOURCE, or YAC_EXCHANGE_TYPE_TARGET)
Remarks
the role is set by the call to yac_cenddef or yac_cenddef_instance

Definition at line 3051 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_start_datetime()

char * yac_cget_start_datetime ( void  )

query routine for the start datetime of the job of the default YAC instance

Definition at line 581 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_start_datetime_instance()

char * yac_cget_start_datetime_instance ( int  yac_instance_id)

query routine for the start datetime of the job

Parameters
[in]yac_instance_idid of the YAC instance

Definition at line 574 of file yac_interface.c.

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

◆ yac_cget_timestep_from_field_id()

const char * yac_cget_timestep_from_field_id ( int  field_id)

query routine to get the timestep of a field for a given ID

Parameters
[in]field_idID as provided by yac_cdef_field
Returns
timestep timestep that has been given to yac_cdef_field iso8601 string. (array of length YAC_MAX_CHARLEN)

Definition at line 3037 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cget_version()

char * yac_cget_version ( void  )

query routine for the yac version

Definition at line 607 of file yac_interface.c.

Here is the caller graph for this function:

◆ yac_cinit()

void yac_cinit ( void  )

Elementary initialisation of the whole system

Remarks
this call initialises the default YAC instance
This call executes a MPI handshake (MPI handshake algorithm) on MPI_COMM_WORLD with the group name "yac" and uses the created communicator for the initialization. If you don't want to execute a MPI Handshake on MPI_COMM_WORLD you can call yac_cinit_comm with MPI_COMM_WORLD directly.

Definition at line 395 of file yac_interface.c.

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

◆ yac_cinit_comm()

void yac_cinit_comm ( MPI_Comm  comm)

Elementary initialisation of the whole system using a user-provided MPI communicator

Parameters
[in]commMPI communicator
Remarks
this call initialises the default YAC instance
the MPI communicator provided to this routine has to contain all processes that will take part in the coupling
this call is collective for all processes in comm

Definition at line 369 of file yac_interface.c.

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

◆ yac_cinit_comm_dummy()

void yac_cinit_comm_dummy ( MPI_Comm  comm)

Dummy initialisation of the whole system using a user-provided MPI world communicator

Parameters
[in]commMPI communicator
Remarks
This routine can be called instead of yac_cinit_comm or yac_cinit_comm_instance, if the local process does not wish to initialise a YAC instance.

Definition at line 405 of file yac_interface.c.

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

◆ yac_cinit_comm_instance()

void yac_cinit_comm_instance ( MPI_Comm  comm,
int *  yac_instance_id 
)

Elementary initialisation of the whole system using a user-provided MPI communicator

Parameters
[in]commMPI communicator
[out]yac_instance_idid of the YAC instance initialised by this call
Remarks
In case the user has multiple YAC instances in parallel, he has to initialise YAXT himself.

Definition at line 357 of file yac_interface.c.

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

◆ yac_cinit_dummy()

void yac_cinit_dummy ( void  )

Dummy for initialisation of the whole system

Remarks
This routine can be called instead of yac_cinit or yac_cinit_instance, if the local process does not wish to initialise a YAC instance.

Definition at line 421 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cinit_instance()

void yac_cinit_instance ( int *  yac_instance_id)

Elementary initialisation of the whole system

Parameters
[out]yac_instance_idid of the YAC instance initialised by this call
Remarks
This call executes a MPI handshake (MPI handshake algorithm) on MPI_COMM_WORLD with the group name "yac" and uses the created communicator for the initialization. If you don't want to execute a MPI Handshake on MPI_COMM_WORLD you can call yac_cinit_comm_instance with MPI_COMM_WORLD directly.

Definition at line 383 of file yac_interface.c.

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

◆ yac_cmpi_handshake()

void yac_cmpi_handshake ( MPI_Comm  comm,
size_t  n,
char const **  group_names,
MPI_Comm *  group_comms 
)

MPI Handshake (MPI handshake algorithm)

Splits the provided communicator into group communicators. Each group communicator contains all processes of the provided communicator that provided the same group name. The order of the group names can be arbitrary on each process. A process can be part of multiple groups.

Parameters
[in]commMPI communicator
[in]nnumber of group communicators to be generated
[in]group_namesgroup names
[out]group_commsgroup communicators
Remarks
This call is collective for processes in comm.
yac_cinit will call this routine for MPI_COMM_WORLD and provided the group name "yac" to build its internal communicator.
If a process does not wish to use yac but is part of a communicator (e.g. MPI_COMM_WORLD) that is used by other processes that actually do use yac. This routine can be called, while not providing the group name "yac, to exclude a process from later collective yac-calls.

Definition at line 320 of file yac_interface.c.

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

◆ yac_cpredef_comp()

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

Non-blocking pre-definition of a component for the default YAC instance.

Parameters
[in]comp_namename of the component
[out]comp_idcomponent Id
Remarks
this call does not finish the component definition phase. I.e. the component communicators are not set up after this call.

Definition at line 728 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_cpredef_comp_instance()

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

Non-blocking pre-definition of a component.

Parameters
[in]yac_instance_idid of the YAC instance
[in]comp_namename of the component
[out]comp_idcomponent Id
Remarks
this call does not finish the component definition phase. I.e. the component communicators are not set up after this call.

Definition at line 695 of file yac_interface.c.

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

◆ yac_cput()

void yac_cput ( int const  field_id,
int const  collection_size,
double ***const  send_field,
int *  info,
int *  ierror 
)

Sending of the coupling fields

Parameters
[in]field_id-
[in]collection_size-
[in]send_field- send buffer dimensions send_field[collection_size] [nbr_fields] [nbr_points]
[out]info- returned info
[out]ierror- returned error

Definition at line 2477 of file yac_interface.c.

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

◆ yac_cput_()

void yac_cput_ ( int const  field_id,
int const  collection_size,
double *  send_field,
int *  info,
int *  ierror 
)

Sending of the coupling fields

Parameters
[in]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]
[out]info- returned info
[out]ierror- returned error

Definition at line 1888 of file yac_interface.c.

Here is the call graph for this function: