YetAnotherCoupler  2.4.2
Macros | Functions | Variables
yac_interface.h File Reference

C User Interface. More...

#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)
 

Functions

void yac_cinit (const char *xml_filename, const char *schema_filename)
 
void yac_cinit_instance (const char *xml_filename, const char *schema_filename, int *yac_instance_id)
 
void yac_cinit_comm (const char *xml_filename, const char *schema_filename, MPI_Comm comm)
 
void yac_cinit_comm_instance (const char *xml_filename, const char *schema_filename, MPI_Comm comm, int *yac_instance_id)
 
void yac_cinit_dummy ()
 
void yac_cinit_comm_dummy (MPI_Comm comm)
 
void yac_ccleanup ()
 
void yac_ccleanup_instance (int yac_instance_id)
 
void yac_cfinalize ()
 
void yac_cfinalize_instance ()
 
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_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_cset_comp_io_proc_step (int comp_id, int io_proc_step)
 
void yac_cget_comp_io_proc_step (int comp_id, int *io_proc_step)
 
void yac_cget_localcomm (MPI_Comm *local_communicator, int comp_id)
 
void yac_cget_pair_rootcomm (MPI_Comm *local_communicator, const char *comp_name1, const char *comp_name2)
 
void yac_cget_pair_rootcomm_instance (int yac_instance_id, MPI_Comm *local_communicator, const char *comp_name1, const char *comp_name2)
 
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_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_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_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_field (char const *field_name, int const component_id, int const *point_ids, int const num_pointsets, 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 *field_id)
 
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_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_ptr_ (int const field_id, int const collection_size, double **send_field, 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_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_csearch (int *ierror)
 
void yac_csearch_instance (int yac_instance_id, int *ierror)
 
char * yac_cget_start_datetime ()
 
char * yac_cget_start_datetime_instance (int yac_instance_id)
 
char * yac_cget_end_datetime ()
 
char * yac_cget_end_datetime_instance (int yac_instance_id)
 
char * yac_cget_version ()
 
void yac_cget_nbr_fields (int *nbr_fields)
 
void yac_cget_nbr_fields_instance (int yac_instance_id, int *nbr_fields)
 
void yac_cget_field_ids (int nbr_fields, int *field_ids)
 
void yac_cget_field_ids_instance (int yac_instance_id, int nbr_fields, int *field_ids)
 
void yac_cget_field_id_from_name (const char *field_name, int *field_id)
 
void yac_cget_field_id_from_name_instance (int yac_instance_id, const char *field_name, int *field_id)
 
void yac_cget_field_name_from_id (int field_id, char *field_name)
 
void yac_cget_role_of_field_by_name (char const *field_name, int *role)
 
void yac_cget_role_of_field_by_name_instance (int yac_instance_id, char const *field_name, int *role)
 
void yac_cget_role_of_field_by_id (int field_id, int *role)
 
void yac_cget_coupling_timestep_name (const char *field_name, char *timestep_string)
 
void yac_cget_coupling_timestep_name_instance (int yac_instance_id, const char *field_name, char *timestep_string)
 
void yac_cget_coupling_timestep_id (const int field_id, char *timestep_string)
 
void yac_cget_model_timestep_name (const char *field_name, char *timestep_string)
 
void yac_cget_model_timestep_name_instance (int yac_instance_id, const char *field_name, char *timestep_string)
 
void yac_cget_model_timestep_id (int field_id, char *timestep_string)
 
void yac_redirstdout (const char *filestem, int lenstr, int parallel, int my_pe, int npes)
 
size_t yac_get_grid_size (int location, int grid_id)
 
size_t yac_get_points_size (int points_id)
 

Variables

int const YAC_LOCATION_CELL
 
int const YAC_LOCATION_CORNER
 
int const YAC_LOCATION_EDGE
 

Detailed Description

C User Interface.

An overview of the C User Interface can be found here. For a detailed description of the Fortran interface please see mo_yac_finterface.f90 and yac_finterface.f90

Author
Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Rene Redler rene..nosp@m.redl.nosp@m.er@mp.nosp@m.imet.nosp@m..mpg..nosp@m.de Teresa Holfeld teres.nosp@m.a.ho.nosp@m.lfeld.nosp@m.@zma.nosp@m.w.de
Warranty

This code has been tested up to a certain level. Defects and weaknesses, which may be included in the code, do not establish any warranties by the authors. The authors do not make any warranty, express or implied, or assume any liability or responsibility for the use, acquisition or application of this software.

C User API

For a detailed description of the C interface please see The C interface (yac_interface.h). Information on the Fortran interface can be found here The Fortran interface (yac_finterface.f90 and mo_yac_finterface.f90).

Definition in file yac_interface.h.

Macro Definition Documentation

◆ YAC_MAX_CHARLEN

#define YAC_MAX_CHARLEN   (132)

Definition at line 74 of file yac_interface.h.

Function Documentation

◆ 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 328 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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 320 of file yac_interface.c.

Here is the call graph for this function:
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
[in]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

Definition at line 554 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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
[in]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

Definition at line 548 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
[in]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 541 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
[in]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 520 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 377 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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 369 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 *  field_id 
)

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

Parameters
[in]field_name- character string providing the name of the coupling field
[in]component_id- component ID
[in]point_ids- point IDs
[in]num_pointsets- number of pointsets per grid
[in]field_id- returned field_id which has to be used to identify coupling fields in yac_cput and yac_cget.

Definition at line 749 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 *  field_id 
)

Definition of the coupling field

Parameters
[in]field_name- character string providing the name of the coupling field
[in]component_id- component ID
[in]point_ids- point IDs
[in]mask_ids- mask IDs
[in]num_pointsets- number of pointsets per grid
[in]field_id- returned field_id which has to be used to identify coupling fields in yac_cput and yac_cget.

Definition at line 685 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]y_verticesarray of vertex latitudes
[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 1582 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]y_verticesarray of vertex latitudes
[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 1597 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
[in]mask_idreturned handle to the mask struct

Definition at line 650 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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]y_pointsarray of point latitudes
[in]point_idreturned handle to the points struct

Definition at line 581 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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]y_pointsarray of point latitudes
[in]point_idreturned handle to the points struct

Definition at line 607 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]
[in]send_info- returned send info
[in]recv_info- returned recv info
[in]ierror- returned error

Definition at line 1250 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]
[in]send_info- returned send info
[in]recv_info- returned recv info
[in]ierror- returned error

Definition at line 1195 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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]
[in]send_info- returned send info
[in]recv_info- returned recv info
[in]ierror- returned error

Definition at line 1224 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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 356 of file yac_interface.c.

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

◆ yac_cfinalize_instance()

void yac_cfinalize_instance ( )

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

◆ 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]
[in]info- returned info argument indicating the action performed
[in]ierror- returned error

Definition at line 882 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
[in]ierror- returned error

Definition at line 802 of file yac_interface.c.

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

◆ yac_cget_comp_io_proc_step()

void yac_cget_comp_io_proc_step ( int  comp_id,
int *  io_proc_step 
)

Getting io_proc_step from a component.

Parameters
[in]comp_id- component Id
[out]io_proc_step- stride between component processes doing io (e.g. writing weight files)

Definition at line 463 of file yac_interface.c.

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

◆ yac_cget_coupling_timestep_id()

void yac_cget_coupling_timestep_id ( const int  field_id,
char *  timestep_string 
)

query routine to get coupling interval for a given field id

Parameters
[in]field_idfield ID (as representative for a field name)
[in]timestep_stringcoupling time step as iso8601 string

Definition at line 1508 of file yac_interface.c.

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

◆ yac_cget_coupling_timestep_name()

void yac_cget_coupling_timestep_name ( const char *  field_name,
char *  timestep_string 
)

query routine to get coupling interval for a given field name of the default YAC instance

Parameters
[in]field_namefield name as set in yac_cdef_field
[in]timestep_stringcoupling time step as iso8601 string

Definition at line 1498 of file yac_interface.c.

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

◆ yac_cget_coupling_timestep_name_instance()

void yac_cget_coupling_timestep_name_instance ( int  yac_instance_id,
const char *  field_name,
char *  timestep_string 
)

query routine to get coupling interval for a given field name

Parameters
[in]yac_instance_idid of the YAC instance
[in]field_namefield name as set in yac_cdef_field
[in]timestep_stringcoupling time step as iso8601 string

Definition at line 1488 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 ( )

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

Definition at line 409 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_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 402 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_from_name()

void yac_cget_field_id_from_name ( const char *  field_name,
int *  field_id 
)

query routine to get the field name for a given ID of the default YAC instance

Parameters
[in]field_namefield name that has been given to yac_cdef_field
[in]field_idID as it has been provided by yac_cdef_field

Definition at line 1434 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_from_name_instance()

void yac_cget_field_id_from_name_instance ( int  yac_instance_id,
const char *  field_name,
int *  field_id 
)

query routine to get the field name for a given ID of the default YAC instance

Parameters
[in]yac_instance_idid of the YAC instance
[in]field_namefield name that has been given to yac_cdef_field
[in]field_idID as it has been provided by yac_cdef_field

Definition at line 1407 of file yac_interface.c.

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

◆ yac_cget_field_ids()

void yac_cget_field_ids ( int  nbr_fields,
int *  field_ids 
)

query routine to get the list of field IDs for defined fields of the default YAC instance

Parameters
[in]nbr_fieldsnumber of fields defined on the calling process
[in]field_idslist of delivered field IDs

Definition at line 1399 of file yac_interface.c.

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

◆ yac_cget_field_ids_instance()

void yac_cget_field_ids_instance ( int  yac_instance_id,
int  nbr_fields,
int *  field_ids 
)

query routine to get the list of field IDs for defined fields

Parameters
[in]yac_instance_idid of the YAC instance
[in]nbr_fieldsnumber of fields defined on the calling process
[in]field_idslist of delivered field IDs

Definition at line 1378 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_id()

void yac_cget_field_name_from_id ( int  field_id,
char *  field_name 
)

query routine to get the field name for a given ID of the default YAC instance

Parameters
[in]field_idID as provided by yac_cdef_field
[in]field_namefield name that has been given to yac_cdef_field

Definition at line 1444 of file yac_interface.c.

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

◆ yac_cget_localcomm()

void yac_cget_localcomm ( MPI_Comm *  local_communicator,
int  comp_id 
)

Providing the local MPI communicator

Parameters
[in]comp_id- local component ID (from yac_cdef_comp), handle to the component struct
[in]local_communicator- returned local communicator

Definition at line 428 of file yac_interface.c.

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

◆ yac_cget_model_timestep_id()

void yac_cget_model_timestep_id ( int  field_id,
char *  timestep_string 
)

query routine to get model time step for a given field id

Parameters
[in]field_id- field ID (as representative for a field name)
[in]timestep_string- model time step as iso8601 string

Definition at line 1554 of file yac_interface.c.

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

◆ yac_cget_model_timestep_name()

void yac_cget_model_timestep_name ( const char *  field_name,
char *  timestep_string 
)

query routine to get model time step for a given field name of the default YAC instance

Parameters
[in]field_namefield name as set in yac_cdef_field
[in]timestep_stringmodel time step as iso8601 string

Definition at line 1544 of file yac_interface.c.

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

◆ yac_cget_model_timestep_name_instance()

void yac_cget_model_timestep_name_instance ( int  yac_instance_id,
const char *  field_name,
char *  timestep_string 
)

query routine to get model time step for a given field name

Parameters
[in]yac_instance_idid of the YAC instance
[in]field_namefield name as set in yac_cdef_field
[in]timestep_stringmodel time step as iso8601 string

Definition at line 1534 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()

void yac_cget_nbr_fields ( int *  nbr_fields)

query routine for number of coupling fields defined of the default YAC instance

Parameters
[in]nbr_fields- number of fields defined on the calling process

Definition at line 1370 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_instance()

void yac_cget_nbr_fields_instance ( int  yac_instance_id,
int *  nbr_fields 
)

query routine for number of coupling fields defined

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

Definition at line 1360 of file yac_interface.c.

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

◆ yac_cget_pair_rootcomm()

void yac_cget_pair_rootcomm ( MPI_Comm *  local_communicator,
const char *  comp_name1,
const char *  comp_name2 
)

Providing a MPI communicator for communication between the component root processes

Parameters
[in]local_communicatorreturned local communicator
[in]comp_name1name of the first component
[in]comp_name2name of the second component
Remarks
the components have to defined in the default YAC instance

Definition at line 487 of file yac_interface.c.

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

◆ yac_cget_pair_rootcomm_instance()

void yac_cget_pair_rootcomm_instance ( int  yac_instance_id,
MPI_Comm *  local_communicator,
const char *  comp_name1,
const char *  comp_name2 
)

Providing a MPI communicator for communication between the component root processes

Parameters
[in]yac_instance_idid of the YAC instance
[in]local_communicatorreturned local communicator
[in]comp_name1name of the first component
[in]comp_name2name of the second component

Definition at line 478 of file yac_interface.c.

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

◆ yac_cget_role_of_field_by_id()

void yac_cget_role_of_field_by_id ( int  field_id,
int *  role 
)

query routine to get the requested send/recv operation for a given field ID

Parameters
[in]field_id- ID as provided by yac_cdef_field
[in]role- NOTHING (0) || 1 SOURCE (1) || TARGET (2)

Definition at line 1456 of file yac_interface.c.

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

◆ yac_cget_role_of_field_by_name()

void yac_cget_role_of_field_by_name ( char const *  field_name,
int *  role 
)

query routine to get the requested send/recv operation for a given field ID of the default YAC instance

Parameters
[in]field_namefield name as provided by yac_cdef_field
[in]roleNOTHING (0) || 1 SOURCE (1) || TARGET (2)
Remarks
the role is set by the call to yac_csearch or yac_csearch_instance

Definition at line 1479 of file yac_interface.c.

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

◆ yac_cget_role_of_field_by_name_instance()

void yac_cget_role_of_field_by_name_instance ( int  yac_instance_id,
char const *  field_name,
int *  role 
)

query routine to get the requested send/recv operation for a given field ID

Parameters
[in]yac_instance_idid of the YAC instance
[in]field_namefield name as provided by yac_cdef_field
[in]roleNOTHING (0) || 1 SOURCE (1) || TARGET (2)
Remarks
the role is set by the call to yac_csearch or yac_csearch_instance

Definition at line 1467 of file yac_interface.c.

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

◆ yac_cget_start_datetime()

char* yac_cget_start_datetime ( )

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

Definition at line 394 of file yac_interface.c.

Here is the call graph for this function:
Here is the caller 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 387 of file yac_interface.c.

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

◆ yac_cget_version()

char* yac_cget_version ( )

query routine for the yac version

Definition at line 420 of file yac_interface.c.

Here is the caller graph for this function:

◆ yac_cinit()

void yac_cinit ( const char *  xml_filename,
const char *  schema_filename 
)

Elementary initialisation of the whole system

Parameters
[in]xml_filenamecoupling xml configuration
[in]schema_filenamecorresponding ml schema file
Remarks
this call initialises the default YAC instance
this call is collective for all processes in MPI_COMM_WORLD
In case a process in MPI_COMM_WORLD does not wish to initialise YAC, it can call yac_cinit_dummy instead.

Definition at line 288 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 ( const char *  xml_filename,
const char *  schema_filename,
MPI_Comm  comm 
)

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

Parameters
[in]xml_filenamecoupling xml configuration
[in]schema_filenamecorresponding ml schema file
[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
In case a process in comm does not wish to initialise YAC, it can call yac_cinit_comm_dummy instead.

Definition at line 261 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 293 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 ( const char *  xml_filename,
const char *  schema_filename,
MPI_Comm  comm,
int *  yac_instance_id 
)

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

Parameters
[in]xml_filenamecoupling xml configuration
[in]schema_filenamecorresponding ml schema file
[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.
In case a process in comm does not wish to initialise YAC, it can call yac_cinit_comm_dummy instead.

Definition at line 241 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 ( )

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 305 of file yac_interface.c.

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

◆ yac_cinit_instance()

void yac_cinit_instance ( const char *  xml_filename,
const char *  schema_filename,
int *  yac_instance_id 
)

Elementary initialisation of the whole system

Parameters
[in]xml_filenamecoupling xml configuration
[in]schema_filenamecorresponding ml schema file
[out]yac_instance_idid of the YAC instance initialised by this call
Remarks
this call is collective for all processes in MPI_COMM_WORLD
In case a process in MPI_COMM_WORLD does not wish to initialise YAC, it can call yac_cinit_dummy instead.

Definition at line 280 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]
[in]info- returned info
[in]ierror- returned error

Definition at line 1124 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]
[in]info- returned info
[in]ierror- returned error

Definition at line 933 of file yac_interface.c.

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

◆ yac_cput_ptr_()

void yac_cput_ptr_ ( 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 dimensions send_field[collection_size * nbr_fields] [nbr_points]
[in]info- returned info
[in]ierror- returned error

Definition at line 985 of file yac_interface.c.

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

◆ yac_csearch()

void yac_csearch ( int *  ierror)

End of the definition phase for the default YAC instance, invocation of the search

Parameters
[out]ierrorreturned error

Definition at line 1350 of file yac_interface.c.

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

◆ yac_csearch_instance()

void yac_csearch_instance ( int  yac_instance_id,
int *  ierror 
)

End of the definition phase, invocation of the search

Parameters
[in]yac_instance_idid of the YAC instance
[out]ierrorreturned error

Definition at line 1343 of file yac_interface.c.

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

◆ yac_cset_comp_io_proc_step()

void yac_cset_comp_io_proc_step ( int  comp_id,
int  io_proc_step 
)

Setting io_proc_step for a component.

Parameters
[in]comp_id- component Id
[in]io_proc_step- stride between component processes doing io (e.g. writing weight files)

Definition at line 451 of file yac_interface.c.

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

◆ yac_cset_core_mask()

void yac_cset_core_mask ( int const *  is_core,
int  location,
int  grid_id 
)

Set core mask for a grid

Parameters
[in]is_core0 for cells/vertices/edges that are halos, 1 for cells/vertices/edges that are core
[in]locationcell/vertex/edge
[in]grid_idgrid id
Remarks
cells/vertices/edges who are halos are not used or set in a put or get operation
core mask values are to be provided in the local order of their respective cells/vertices/edges

Definition at line 1650 of file yac_interface.c.

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

◆ yac_cset_global_index()

void yac_cset_global_index ( int const *  global_index,
int  location,
int  grid_id 
)

Set global ids for a grid

Parameters
[in]global_indexarray of global indices
[in]locationcell/vertex/edge
[in]grid_idgrid id
Remarks
global indices are to be provided in the local order of their respective cells/vertices/edges

◆ yac_cset_mask()

void yac_cset_mask ( int const *  is_valid,
int  points_id 
)

Set the default mask for points

Parameters
[in]is_valid0 for points that are masked out, 1 for valid points
[in]points_idid of points/cells

Definition at line 667 of file yac_interface.c.

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

◆ yac_get_grid_size()

size_t yac_get_grid_size ( int  location,
int  grid_id 
)

query routine to get the number of points in a grid

Parameters
[in]location
[in]grid_id

Definition at line 1688 of file yac_interface.c.

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

◆ yac_get_points_size()

size_t yac_get_points_size ( int  points_id)

query routine to get the number of points in a pointset

Parameters
[in]points_id

Definition at line 1698 of file yac_interface.c.

Here is the call graph for this function:

◆ yac_redirstdout()

void yac_redirstdout ( const char *  filestem,
int  lenstr,
int  parallel,
int  my_pe,
int  npes 
)

redirect stderr and stdout into files with names depending on the process ID

The original version was part of the OASIS4 coupler and has been adjusted to work for yac.

Parameters
[in]filestembasename of stdout/stderr files
[in]lenstrsignificant length (without \0) of "filestem"
[in]parallelflag for direction of output parallel = 1 : Create single output files for each process otherwise : Create output files only for process 0. The output of other processes is not redirected.
[in]my_pelocal rank
[in]npestotal number of processes in set
Examples
test_redirstdout_c.c.

Definition at line 73 of file yac_redirstdout.c.

Here is the caller graph for this function:

Variable Documentation

◆ YAC_LOCATION_CELL

int const YAC_LOCATION_CELL
extern

Definition at line 66 of file yac_interface.c.

◆ YAC_LOCATION_CORNER

int const YAC_LOCATION_CORNER
extern

Definition at line 67 of file yac_interface.c.

◆ YAC_LOCATION_EDGE

int const YAC_LOCATION_EDGE
extern

Definition at line 68 of file yac_interface.c.