YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
fields.h
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef FIELDS_H
6#define FIELDS_H
7
8#include "component.h"
9
10// general coupling field struct
11
17
18// forward declaration
19
20struct coupling_field;
22
23// generation of a field
24
36struct coupling_field *
37yac_coupling_field_new(char const * field_name, char const * component_name,
39 unsigned num_interp_fields, size_t collection_size, const char* timestep);
40
48 struct coupling_field * field);
49
57 struct coupling_field * field);
58
64const char * yac_get_coupling_field_name(struct coupling_field * field);
65
71char const * yac_get_coupling_field_comp_name(struct coupling_field * field);
72
79 struct coupling_field * field);
80
87enum yac_location
89 struct coupling_field * field, size_t interp_field_idx);
90
98 struct coupling_field * field);
99
106
114 struct coupling_field * field, enum yac_location location);
115
123
132unsigned yac_get_coupling_field_num_puts(struct coupling_field * field);
133
145 struct coupling_field * field, unsigned put_idx);
146
157struct yac_interpolation *
159 unsigned put_idx);
160
173double ***
175 unsigned put_idx);
176
189double ***
191 unsigned put_idx);
192
204void
206 unsigned put_idx,
207 double init_value);
208
220void
222 unsigned put_idx,
223 double init_value);
224
235int
237 unsigned put_idx);
238
249void
251 unsigned put_idx,
252 int count);
253
260
267
277 struct coupling_field * field);
278
287struct yac_interpolation *
289
299 struct coupling_field * field, struct event * event,
300 struct yac_interpolation * interpolation);
301
311 struct coupling_field * field, struct event * event,
312 struct yac_interpolation * interpolation);
313
314
322 struct coupling_field * cpl_field);
323
324// destruction of fields
325void yac_coupling_field_delete(struct coupling_field * cpl_field);
326
327#endif // FIELDS_H
328
void yac_set_coupling_field_put_op(struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
Definition fields.c:464
unsigned yac_get_coupling_field_collection_size(struct coupling_field *field)
Definition fields.c:86
yac_field_exchange_type
Definition fields.h:12
@ SOURCE
Definition fields.h:14
@ TARGET
Definition fields.h:15
@ NOTHING
Definition fields.h:13
const char * yac_get_coupling_field_timestep(struct coupling_field *field)
Definition fields.c:91
unsigned yac_get_coupling_field_num_puts(struct coupling_field *field)
Definition fields.c:438
void yac_set_coupling_field_get_op(struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
Definition fields.c:494
char const * yac_get_coupling_field_comp_name(struct coupling_field *field)
Definition fields.c:119
int yac_get_coupling_field_put_op_time_accumulation_count(struct coupling_field *field, unsigned put_idx)
Definition fields.c:413
double *** yac_get_coupling_field_put_op_send_frac_mask_acc(struct coupling_field *field, unsigned put_idx)
Definition fields.c:209
struct yac_basic_grid * yac_coupling_field_get_basic_grid(struct coupling_field *field)
Definition fields.c:113
size_t yac_coupling_field_get_num_interp_fields(struct coupling_field *field)
Definition fields.c:96
struct yac_interpolation * yac_get_coupling_field_put_op_interpolation(struct coupling_field *field, unsigned put_idx)
Definition fields.c:401
enum yac_location yac_get_coupling_field_get_interp_field_location(struct coupling_field *field, size_t interp_field_idx)
Definition fields.c:102
struct event * yac_get_coupling_field_get_op_event(struct coupling_field *field)
Definition fields.c:446
size_t yac_coupling_field_get_data_size(struct coupling_field *field, enum yac_location location)
Definition fields.c:136
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)
Definition fields.c:54
int * yac_get_coupling_field_get_mask(struct coupling_field *field)
Definition fields.c:310
struct event * yac_get_coupling_field_put_op_event(struct coupling_field *field, unsigned put_idx)
Definition fields.c:389
char * yac_coupling_field_get_datetime(struct coupling_field *cpl_field)
Definition fields.c:515
void yac_init_coupling_field_put_op_send_field_acc(struct coupling_field *field, unsigned put_idx, double init_value)
Definition fields.c:347
struct yac_interpolation * yac_get_coupling_field_get_op_interpolation(struct coupling_field *field)
Definition fields.c:456
void yac_set_coupling_field_put_op_time_accumulation_count(struct coupling_field *field, unsigned put_idx, int count)
Definition fields.c:426
enum yac_field_exchange_type yac_get_coupling_field_exchange_type(struct coupling_field *field)
Definition fields.c:125
const char * yac_get_coupling_field_name(struct coupling_field *field)
Definition fields.c:108
struct yac_interp_field const * yac_coupling_field_get_interp_fields(struct coupling_field *field)
Definition fields.c:509
void yac_coupling_field_delete(struct coupling_field *cpl_field)
Definition fields.c:532
int ** yac_get_coupling_field_put_mask(struct coupling_field *field)
Definition fields.c:265
void yac_init_coupling_field_put_op_send_frac_mask_acc(struct coupling_field *field, unsigned put_idx, double init_value)
Definition fields.c:368
double *** yac_get_coupling_field_put_op_send_field_acc(struct coupling_field *field, unsigned put_idx)
Definition fields.c:199
yac_location
Definition location.h:12
struct yac_basic_grid * grid
Definition fields.c:20
struct yac_interp_field * interp_fields
Definition fields.c:22
size_t num_interp_fields
Definition fields.c:23
char * timestep
Definition fields.c:25
char * component_name
Definition fields.c:18
size_t collection_size
number of vertical levels or bundles
Definition fields.c:24
Definition event.c:18
enum yac_location location
Definition basic_grid.h:18