YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
fields.h File Reference
#include "component.h"
Include dependency graph for fields.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  yac_field_exchange_type { NOTHING = 0 , SOURCE = 1 , TARGET = 2 }
 

Functions

struct coupling_fieldyac_coupling_field_new (char const *field_name, char const *component_name, struct yac_basic_grid *grid, struct yac_interp_field *interp_fields, unsigned num_interp_fields, size_t collection_size, const char *timestep)
 
unsigned yac_get_coupling_field_collection_size (struct coupling_field *field)
 
const char * yac_get_coupling_field_timestep (struct coupling_field *field)
 
const char * yac_get_coupling_field_name (struct coupling_field *field)
 
char const * yac_get_coupling_field_comp_name (struct coupling_field *field)
 
struct yac_basic_gridyac_coupling_field_get_basic_grid (struct coupling_field *field)
 
enum yac_location yac_get_coupling_field_get_interp_field_location (struct coupling_field *field, size_t interp_field_idx)
 
struct yac_interp_field const * yac_coupling_field_get_interp_fields (struct coupling_field *field)
 
size_t yac_coupling_field_get_num_interp_fields (struct coupling_field *field)
 
size_t yac_coupling_field_get_data_size (struct coupling_field *field, enum yac_location location)
 
enum yac_field_exchange_type yac_get_coupling_field_exchange_type (struct coupling_field *field)
 
unsigned yac_get_coupling_field_num_puts (struct coupling_field *field)
 
struct eventyac_get_coupling_field_put_op_event (struct coupling_field *field, unsigned put_idx)
 
struct yac_interpolationyac_get_coupling_field_put_op_interpolation (struct coupling_field *field, unsigned put_idx)
 
double *** yac_get_coupling_field_put_op_send_field_acc (struct coupling_field *field, unsigned put_idx)
 
double *** yac_get_coupling_field_put_op_send_frac_mask_acc (struct coupling_field *field, unsigned put_idx)
 
void yac_init_coupling_field_put_op_send_field_acc (struct coupling_field *field, unsigned put_idx, double init_value)
 
void yac_init_coupling_field_put_op_send_frac_mask_acc (struct coupling_field *field, unsigned put_idx, double init_value)
 
int yac_get_coupling_field_put_op_time_accumulation_count (struct coupling_field *field, unsigned put_idx)
 
void yac_set_coupling_field_put_op_time_accumulation_count (struct coupling_field *field, unsigned put_idx, int count)
 
int ** yac_get_coupling_field_put_mask (struct coupling_field *field)
 
int * yac_get_coupling_field_get_mask (struct coupling_field *field)
 
struct eventyac_get_coupling_field_get_op_event (struct coupling_field *field)
 
struct yac_interpolationyac_get_coupling_field_get_op_interpolation (struct coupling_field *field)
 
void yac_set_coupling_field_put_op (struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
 
void yac_set_coupling_field_get_op (struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
 
char * yac_coupling_field_get_datetime (struct coupling_field *cpl_field)
 
void yac_coupling_field_delete (struct coupling_field *cpl_field)
 

Enumeration Type Documentation

◆ yac_field_exchange_type

Enumerator
NOTHING 
SOURCE 
TARGET 

Definition at line 12 of file fields.h.

Function Documentation

◆ yac_coupling_field_delete()

void yac_coupling_field_delete ( struct coupling_field * cpl_field)

Definition at line 532 of file fields.c.

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

◆ yac_coupling_field_get_basic_grid()

struct yac_basic_grid * yac_coupling_field_get_basic_grid ( struct coupling_field * field)

gets the grid_data of the coupling field

Parameters
[in]field
Returns
basic grid data of the coupling field

Definition at line 113 of file fields.c.

Here is the caller graph for this function:

◆ yac_coupling_field_get_data_size()

size_t yac_coupling_field_get_data_size ( struct coupling_field * field,
enum yac_location location )

gets the number of points in the grids associated with the coupling field

Parameters
[in]field
[in]location
Returns
number of grid points

Definition at line 136 of file fields.c.

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

◆ yac_coupling_field_get_datetime()

char * yac_coupling_field_get_datetime ( struct coupling_field * cpl_field)

get the current datetime of the coupling field

Parameters
[in]cpl_field
Returns
the datetime string

Definition at line 515 of file fields.c.

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

◆ yac_coupling_field_get_interp_fields()

struct yac_interp_field const * yac_coupling_field_get_interp_fields ( struct coupling_field * field)

gets the interpolation fields of the coupling field

Parameters
[in]field
Returns
interpolation fields
Remarks
dimensions: [point set idx]

Definition at line 509 of file fields.c.

Here is the caller graph for this function:

◆ yac_coupling_field_get_num_interp_fields()

size_t yac_coupling_field_get_num_interp_fields ( struct coupling_field * field)

gets the number of interpolation fields of the coupling field

Parameters
[in]field
Returns
number of interpolation fields

Definition at line 96 of file fields.c.

Here is the caller graph for this function:

◆ yac_coupling_field_new()

struct coupling_field * yac_coupling_field_new ( char const * field_name,
char const * component_name,
struct yac_basic_grid * grid,
struct yac_interp_field * interp_fields,
unsigned num_interp_fields,
size_t collection_size,
const char * timestep )

Constructs a coupling field

Parameters
[in]field_namename of the coupling field
[in]component_namecomponent name
[in]gridgrid
[in]interp_fieldsinterpolation fields
[in]num_interp_fieldsnumber of entries in interp_fields
[in]collection_size
[in]timestep

Definition at line 54 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_collection_size()

unsigned yac_get_coupling_field_collection_size ( struct coupling_field * field)

gets the number of vertical levels or bundles for a field.

Parameters
[in]field
Returns
collection size of the field

Definition at line 86 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_comp_name()

char const * yac_get_coupling_field_comp_name ( struct coupling_field * field)

gets the component name of the coupling field

Parameters
[in]field
Returns
component name

Definition at line 119 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_exchange_type()

enum yac_field_exchange_type yac_get_coupling_field_exchange_type ( struct coupling_field * field)

gets the exchange type of the coupling field

Parameters
[in]field
Returns
exchange type of the coupling field

Definition at line 125 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_get_interp_field_location()

enum yac_location yac_get_coupling_field_get_interp_field_location ( struct coupling_field * field,
size_t interp_field_idx )

get interpolation field data location

Parameters
[in]field
[in]interp_field_idxindex of interpolation field
Returns
data location of requested interpolation field

Definition at line 102 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_get_mask()

int * yac_get_coupling_field_get_mask ( struct coupling_field * field)

gets a combined core and field mask

Parameters
[in]field
Returns
combined core and field mask

Definition at line 310 of file fields.c.

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

◆ yac_get_coupling_field_get_op_event()

struct event * yac_get_coupling_field_get_op_event ( struct coupling_field * field)

gets the event of the get operation

Parameters
[in]field
Returns
event of the get operation
Remarks
calling this routine for a coupling field that has a different exchange type than TARGET yields undefined results

Definition at line 446 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_get_op_interpolation()

struct yac_interpolation * yac_get_coupling_field_get_op_interpolation ( struct coupling_field * field)

gets the field interpolation of the get operation

Parameters
[in]field
Returns
field interpolation of the get operation
Remarks
calling this routine for a coupling field that has a different exchange type than TARGET yields undefined results

Definition at line 456 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_name()

const char * yac_get_coupling_field_name ( struct coupling_field * field)

gets the name of the coupling field

Parameters
[in]field
Returns
name of the coupling field

Definition at line 108 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_num_puts()

unsigned yac_get_coupling_field_num_puts ( struct coupling_field * field)

gets the number of put operations of the coupling field

Parameters
[in]field
Returns
number of put operations of the coupling field
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results

Definition at line 438 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_put_mask()

int ** yac_get_coupling_field_put_mask ( struct coupling_field * field)

gets a combined core and field mask

Parameters
[in]field
Returns
combined core and field mask

Definition at line 265 of file fields.c.

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

◆ yac_get_coupling_field_put_op_event()

struct event * yac_get_coupling_field_put_op_event ( struct coupling_field * field,
unsigned put_idx )

gets the event of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
Returns
event of specified put operation
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
See also
get_coupling_field_num_puts

Definition at line 389 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_put_op_interpolation()

struct yac_interpolation * yac_get_coupling_field_put_op_interpolation ( struct coupling_field * field,
unsigned put_idx )

gets the field interpolation of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
Returns
field interpolation of specified put operation
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
See also
get_coupling_field_num_puts

Definition at line 401 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_put_op_send_field_acc()

double *** yac_get_coupling_field_put_op_send_field_acc ( struct coupling_field * field,
unsigned put_idx )

gets the send field accumulator of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
Returns
send field accumulator of specified put operation
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
when this routine is called the first time for a put operation it will be allocated and initialised with zeros
See also
get_coupling_field_num_puts

Definition at line 199 of file fields.c.

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

◆ yac_get_coupling_field_put_op_send_frac_mask_acc()

double *** yac_get_coupling_field_put_op_send_frac_mask_acc ( struct coupling_field * field,
unsigned put_idx )

gets the fractional mask accumulator of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
Returns
fractional mask accumulator of specified put operation
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
when this routine is called the first time for a put operation it will be allocated and initialised with zeros
See also
get_coupling_field_num_puts

Definition at line 209 of file fields.c.

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

◆ yac_get_coupling_field_put_op_time_accumulation_count()

int yac_get_coupling_field_put_op_time_accumulation_count ( struct coupling_field * field,
unsigned put_idx )

gets the time accumulation count of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
Returns
time accumulation count of specified put operation
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
See also
get_coupling_field_num_puts

Definition at line 413 of file fields.c.

Here is the caller graph for this function:

◆ yac_get_coupling_field_timestep()

const char * yac_get_coupling_field_timestep ( struct coupling_field * field)

gets the timestep or bundles for a field.

Parameters
[in]field
Returns
timestep

Definition at line 91 of file fields.c.

Here is the caller graph for this function:

◆ yac_init_coupling_field_put_op_send_field_acc()

void yac_init_coupling_field_put_op_send_field_acc ( struct coupling_field * field,
unsigned put_idx,
double init_value )

initialises the send field accumulator of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
[in]init_valuevalue that is to be used for the initialisation of the send field accumulator
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
See also
get_coupling_field_num_puts

Definition at line 347 of file fields.c.

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

◆ yac_init_coupling_field_put_op_send_frac_mask_acc()

void yac_init_coupling_field_put_op_send_frac_mask_acc ( struct coupling_field * field,
unsigned put_idx,
double init_value )

initialises the fractional mask accumulator of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
[in]init_valuevalue that is to be used for the initialisation of the fractional mask accumulator
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
See also
get_coupling_field_num_puts

Definition at line 368 of file fields.c.

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

◆ yac_set_coupling_field_get_op()

void yac_set_coupling_field_get_op ( struct coupling_field * field,
struct event * event,
struct yac_interpolation * interpolation )

set the get operation for the coupling field

Parameters
[in,out]field
[in]eventevent of the operation
[in]interpolationinterpolation to be executed
Remarks
the coupling field takes control of the input data, it will be free/deleted by the coupling field

Definition at line 494 of file fields.c.

Here is the caller graph for this function:

◆ yac_set_coupling_field_put_op()

void yac_set_coupling_field_put_op ( struct coupling_field * field,
struct event * event,
struct yac_interpolation * interpolation )

sets the put operation for the coupling field

Parameters
[in,out]field
[in]eventevent of the operation
[in]interpolationinterpolation to be executed
Remarks
the coupling field takes control of the input data, it will be free/deleted by the coupling field

Definition at line 464 of file fields.c.

Here is the caller graph for this function:

◆ yac_set_coupling_field_put_op_time_accumulation_count()

void yac_set_coupling_field_put_op_time_accumulation_count ( struct coupling_field * field,
unsigned put_idx,
int count )

sets the time accumulation count of a specified put operation

Parameters
[in]field
[in]put_idxindex of the put operation
[in]countnew time accumulation count
Remarks
calling this routine for a coupling field that has a different exchange type than SOURCE yields undefined results
See also
get_coupling_field_num_puts

Definition at line 426 of file fields.c.

Here is the caller graph for this function: