YAC 3.7.1
Yet Another Coupler
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
174 struct coupling_field * field, unsigned put_idx);
175
188double ***
190 unsigned put_idx);
191
204double ***
206 unsigned put_idx);
207
219void
221 unsigned put_idx,
222 double init_value);
223
235void
237 unsigned put_idx,
238 double init_value);
239
250int
252 unsigned put_idx);
253
264void
266 unsigned put_idx,
267 int count);
268
275int
277 unsigned put_idx);
278
285 struct coupling_field * field);
286
293
300
310 struct coupling_field * field);
311
320struct yac_interpolation *
322
329 struct coupling_field * field);
330
338 struct coupling_field * cpl_field);
339
351 struct coupling_field * field);
352
364 struct coupling_field * field);
365
377 struct coupling_field * field, size_t * num_src_fields,
378 size_t const ** src_field_buffer_sizes);
379
389 struct coupling_field * field, struct event * event,
390 struct yac_interpolation * interpolation);
391
401 struct coupling_field * field, struct event * event,
402 struct yac_interpolation_exchange * interpolation_exchange);
403
413 struct coupling_field * field, struct event * event,
414 struct yac_interpolation * interpolation);
415
427 struct coupling_field * field, struct event * event,
428 struct yac_interpolation_exchange * interpolation_exchange,
430
438 struct coupling_field * cpl_field);
439
440// destruction of fields
441void yac_coupling_field_delete(struct coupling_field * cpl_field);
442
443#endif // FIELDS_H
444
struct yac_interpolation_exchange * yac_get_coupling_field_put_op_interpolation_exchange(struct coupling_field *field, unsigned put_idx)
Definition fields.c:432
void yac_set_coupling_field_put_op(struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
Definition fields.c:666
unsigned yac_get_coupling_field_collection_size(struct coupling_field *field)
Definition fields.c:93
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:98
unsigned yac_get_coupling_field_num_puts(struct coupling_field *field)
Definition fields.c:501
void yac_set_coupling_field_get_op(struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
Definition fields.c:703
char const * yac_get_coupling_field_comp_name(struct coupling_field *field)
Definition fields.c:126
int yac_get_coupling_field_put_op_time_accumulation_count(struct coupling_field *field, unsigned put_idx)
Definition fields.c:453
double *** yac_get_coupling_field_put_op_send_frac_mask_acc(struct coupling_field *field, unsigned put_idx)
Definition fields.c:216
struct yac_basic_grid * yac_coupling_field_get_basic_grid(struct coupling_field *field)
Definition fields.c:120
size_t yac_coupling_field_get_num_interp_fields(struct coupling_field *field)
Definition fields.c:103
struct yac_interpolation * yac_get_coupling_field_put_op_interpolation(struct coupling_field *field, unsigned put_idx)
Definition fields.c:410
enum yac_location yac_get_coupling_field_get_interp_field_location(struct coupling_field *field, size_t interp_field_idx)
Definition fields.c:109
struct event * yac_get_coupling_field_get_op_event(struct coupling_field *field)
Definition fields.c:510
void yac_set_coupling_field_put_op_raw(struct coupling_field *field, struct event *event, struct yac_interpolation_exchange *interpolation_exchange)
Definition fields.c:674
size_t yac_coupling_field_get_data_size(struct coupling_field *field, enum yac_location location)
Definition fields.c:143
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:61
int * yac_get_coupling_field_get_mask(struct coupling_field *field)
Definition fields.c:317
struct event * yac_get_coupling_field_put_op_event(struct coupling_field *field, unsigned put_idx)
Definition fields.c:396
char * yac_coupling_field_get_datetime(struct coupling_field *cpl_field)
Definition fields.c:746
void yac_init_coupling_field_put_op_send_field_acc(struct coupling_field *field, unsigned put_idx, double init_value)
Definition fields.c:354
struct yac_interpolation * yac_get_coupling_field_get_op_interpolation(struct coupling_field *field)
Definition fields.c:544
void yac_coupling_field_get_src_field_buffer_sizes(struct coupling_field *field, size_t *num_src_fields, size_t const **src_field_buffer_sizes)
Definition fields.c:611
void yac_set_coupling_field_put_op_time_accumulation_count(struct coupling_field *field, unsigned put_idx, int count)
Definition fields.c:485
int yac_get_coupling_field_get_op_use_raw_exchange(struct coupling_field *field)
Definition fields.c:521
struct yac_interpolation_exchange * yac_get_coupling_field_get_op_interpolation_exchange(struct coupling_field *field)
Definition fields.c:561
enum yac_field_exchange_type yac_get_coupling_field_exchange_type(struct coupling_field *field)
Definition fields.c:132
const char * yac_get_coupling_field_name(struct coupling_field *field)
Definition fields.c:115
void yac_set_coupling_field_get_op_raw(struct coupling_field *field, struct event *event, struct yac_interpolation_exchange *interpolation_exchange, struct yac_interp_weights_data interp_weights_data)
Definition fields.c:731
struct yac_interp_field const * yac_coupling_field_get_interp_fields(struct coupling_field *field)
Definition fields.c:740
void yac_coupling_field_delete(struct coupling_field *cpl_field)
Definition fields.c:763
int ** yac_get_coupling_field_put_mask(struct coupling_field *field)
Definition fields.c:272
struct yac_interp_weights_data yac_get_coupling_field_get_op_interp_weights_data(struct coupling_field *field)
Definition fields.c:578
void yac_init_coupling_field_put_op_send_frac_mask_acc(struct coupling_field *field, unsigned put_idx, double init_value)
Definition fields.c:375
double *** yac_get_coupling_field_put_op_send_field_acc(struct coupling_field *field, unsigned put_idx)
Definition fields.c:206
int yac_get_coupling_field_get_op_with_frac_mask(struct coupling_field *cpl_field)
Definition fields.c:532
int yac_get_coupling_field_put_op_use_raw_exchange(struct coupling_field *field, unsigned put_idx)
Definition fields.c:469
yac_location
Definition location.h:12
struct yac_basic_grid * grid
Definition fields.c:22
struct yac_interp_field * interp_fields
Definition fields.c:24
size_t num_interp_fields
Definition fields.c:25
char * timestep
Definition fields.c:27
char * component_name
Definition fields.c:20
Definition event.c:18
int collection_size
struct @84 field[]
int const * location