YAC 3.21.0
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
18
19// forward declaration
20
21struct coupling_field;
23struct yac_pak;
24
25// generation of a field
26
38struct coupling_field *
39yac_coupling_field_new(char const * field_name, char const * component_name,
41 unsigned num_interp_fields, size_t collection_size, const char* timestep);
42
50 struct coupling_field * field);
51
60 struct coupling_field * field);
61
67const char * yac_get_coupling_field_name(struct coupling_field * field);
68
74char const * yac_get_coupling_field_comp_name(struct coupling_field * field);
75
82 struct coupling_field * field);
83
90enum yac_location
92 struct coupling_field * field, size_t interp_field_idx);
93
101 struct coupling_field * field);
102
109
117 struct coupling_field * field, enum yac_location location);
118
126
135unsigned yac_get_coupling_field_num_puts(struct coupling_field * field);
136
148 struct coupling_field * field, unsigned put_idx);
149
160struct yac_interpolation *
162 unsigned put_idx);
163
177 struct coupling_field * field, unsigned put_idx);
178
191double ***
193 unsigned put_idx);
194
207double ***
209 unsigned put_idx);
210
222void
224 unsigned put_idx,
225 double init_value);
226
238void
240 unsigned put_idx,
241 double init_value);
242
253int
255 unsigned put_idx);
256
267void
269 unsigned put_idx,
270 int count);
271
279int
281 unsigned put_idx);
282
290 struct coupling_field * field);
291
298
305
315 struct coupling_field * field);
316
325struct yac_interpolation *
327
335 struct coupling_field * field);
336
345 struct coupling_field * cpl_field);
346
358 struct coupling_field * field);
359
371 struct coupling_field * field);
372
384 struct coupling_field * field, size_t * num_src_fields,
385 size_t const ** src_field_buffer_sizes);
386
396 struct coupling_field * field, struct event * event,
397 struct yac_interpolation * interpolation);
398
408 struct coupling_field * field, struct event * event,
409 struct yac_interpolation_exchange * interpolation_exchange);
410
420 struct coupling_field * field, struct event * event,
421 struct yac_interpolation * interpolation);
422
434 struct coupling_field * field, struct event * event,
435 struct yac_interpolation_exchange * interpolation_exchange,
437
445 struct coupling_field * cpl_field);
446
453int yac_coupling_field_get_action(struct coupling_field * cpl_field);
454
466 struct coupling_field * cpl_field);
467
468// destruction of fields
469void yac_coupling_field_delete(struct coupling_field * cpl_field);
470
478 struct coupling_field * cpl_field);
479
486 struct coupling_field * cpl_field, struct yac_pak * pak);
487
488#endif // FIELDS_H
struct yac_interpolation_exchange * yac_get_coupling_field_put_op_interpolation_exchange(struct coupling_field *field, unsigned put_idx)
Definition fields.c:409
void yac_set_coupling_field_put_op(struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
Definition fields.c:581
unsigned yac_get_coupling_field_collection_size(struct coupling_field *field)
Definition fields.c:100
yac_field_exchange_type
Definition fields.h:12
@ SOURCE
Definition fields.h:15
@ TARGET
Definition fields.h:16
@ NOTHING
Definition fields.h:14
@ INVALID
Definition fields.h:13
const char * yac_get_coupling_field_timestep(struct coupling_field *field)
Definition fields.c:105
unsigned yac_get_coupling_field_num_puts(struct coupling_field *field)
Definition fields.c:448
void yac_set_coupling_field_get_op(struct coupling_field *field, struct event *event, struct yac_interpolation *interpolation)
Definition fields.c:617
char const * yac_get_coupling_field_comp_name(struct coupling_field *field)
Definition fields.c:133
int yac_get_coupling_field_put_op_time_accumulation_count(struct coupling_field *field, unsigned put_idx)
Definition fields.c:421
struct yac_pak * yac_coupling_field_get_pak(struct coupling_field *cpl_field)
Definition fields.c:765
int yac_coupling_field_get_action(struct coupling_field *cpl_field)
Definition fields.c:689
double *** yac_get_coupling_field_put_op_send_frac_mask_acc(struct coupling_field *field, unsigned put_idx)
Definition fields.c:224
struct yac_basic_grid * yac_coupling_field_get_basic_grid(struct coupling_field *field)
Definition fields.c:127
size_t yac_coupling_field_get_num_interp_fields(struct coupling_field *field)
Definition fields.c:110
struct yac_interpolation * yac_get_coupling_field_put_op_interpolation(struct coupling_field *field, unsigned put_idx)
Definition fields.c:396
enum yac_location yac_get_coupling_field_get_interp_field_location(struct coupling_field *field, size_t interp_field_idx)
Definition fields.c:116
struct event * yac_get_coupling_field_get_op_event(struct coupling_field *field)
Definition fields.c:455
void yac_set_coupling_field_put_op_raw(struct coupling_field *field, struct event *event, struct yac_interpolation_exchange *interpolation_exchange)
Definition fields.c:589
size_t yac_coupling_field_get_data_size(struct coupling_field *field, enum yac_location location)
Definition fields.c:152
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:67
int * yac_get_coupling_field_get_mask(struct coupling_field *field)
Definition fields.c:322
struct event * yac_get_coupling_field_put_op_event(struct coupling_field *field, unsigned put_idx)
Definition fields.c:386
char * yac_coupling_field_get_datetime(struct coupling_field *cpl_field)
Definition fields.c:673
void yac_init_coupling_field_put_op_send_field_acc(struct coupling_field *field, unsigned put_idx, double init_value)
Definition fields.c:356
struct yac_interpolation * yac_get_coupling_field_get_op_interpolation(struct coupling_field *field)
Definition fields.c:480
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:532
void yac_set_coupling_field_put_op_time_accumulation_count(struct coupling_field *field, unsigned put_idx, int count)
Definition fields.c:439
int yac_get_coupling_field_get_op_use_raw_exchange(struct coupling_field *field)
Definition fields.c:463
char * yac_coupling_field_get_prev_datetime(struct coupling_field *cpl_field)
Definition fields.c:681
struct yac_interpolation_exchange * yac_get_coupling_field_get_op_interpolation_exchange(struct coupling_field *field)
Definition fields.c:492
enum yac_field_exchange_type yac_get_coupling_field_exchange_type(struct coupling_field *field)
Definition fields.c:141
void yac_coupling_field_set_pak(struct coupling_field *cpl_field, struct yac_pak *pak)
Definition fields.c:771
const char * yac_get_coupling_field_name(struct coupling_field *field)
Definition fields.c:122
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:645
struct yac_interp_field const * yac_coupling_field_get_interp_fields(struct coupling_field *field)
Definition fields.c:654
void yac_coupling_field_delete(struct coupling_field *cpl_field)
Definition fields.c:694
int ** yac_get_coupling_field_put_mask(struct coupling_field *field)
Definition fields.c:280
struct yac_interp_weights_data yac_get_coupling_field_get_op_interp_weights_data(struct coupling_field *field)
Definition fields.c:504
void yac_init_coupling_field_put_op_send_frac_mask_acc(struct coupling_field *field, unsigned put_idx, double init_value)
Definition fields.c:371
double *** yac_get_coupling_field_put_op_send_field_acc(struct coupling_field *field, unsigned put_idx)
Definition fields.c:214
int yac_get_coupling_field_get_op_with_frac_mask(struct coupling_field *cpl_field)
Definition fields.c:471
int yac_get_coupling_field_put_op_use_raw_exchange(struct coupling_field *field, unsigned put_idx)
Definition fields.c:430
yac_location
Definition location.h:12
struct yac_basic_grid * grid
Definition fields.c:24
struct yac_interp_field * interp_fields
Definition fields.c:26
size_t num_interp_fields
Definition fields.c:27
char * timestep
Definition fields.c:29
char * component_name
Definition fields.c:22
Definition event.c:18
int collection_size
struct @98 field[]
int const * location