YetAnotherCoupler 3.5.2
Loading...
Searching...
No Matches
instance.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 INSTANCE_H
6#define INSTANCE_H
7
8#include <mpi.h>
9
10#include "component.h"
11#include "couple_config.h"
12
33#define YAC_INSTANCE_CONFIG_OUTPUT_REF_COMP "comp"
34#define YAC_INSTANCE_CONFIG_OUTPUT_REF_SYNC "sync"
35#define YAC_INSTANCE_CONFIG_OUTPUT_REF_ENDDEF "enddef"
36
37struct yac_instance;
46struct yac_instance * yac_instance_new(MPI_Comm comm);
47
52void yac_instance_dummy_new(MPI_Comm comm);
53
54
59void yac_instance_delete(struct yac_instance * instance);
60
68 struct yac_instance * instance, const char * start_datetime,
69 const char * end_datetime );
70
76char * yac_instance_get_start_datetime(struct yac_instance * instance);
77
83char * yac_instance_get_end_datetime(struct yac_instance * instance);
84
91 struct yac_instance * instance);
92
99 struct yac_instance * instance,
100 struct yac_couple_config * couple_config);
101
109 struct yac_instance * instance, char const ** comp_names, size_t num_comps);
110
116 struct yac_instance * instance);
117
132 struct yac_instance * instance, char const * field_name,
133 char const * comp_name, struct yac_basic_grid * grid,
135 int collection_size, char const * timestep);
136
170 struct yac_instance * instance,
171 char const * src_comp_name, char const * src_grid_name, char const * src_field_name,
172 char const * tgt_comp_name, char const * tgt_grid_name, char const * tgt_field_name,
173 char const * coupling_period, int time_reduction,
174 struct yac_interp_stack_config * interp_stack_config, int src_lag, int tgt_lag,
175 const char* weight_file_name, int mapping_on_source,
176 double scale_factor, double scale_summand, size_t num_src_mask_names,
177 char const * const * src_mask_names, char const * tgt_mask_name,
178 char const * yaxt_exchanger_name);
179
184void yac_instance_sync_def(struct yac_instance * instance);
185
194 struct yac_instance * instance, struct yac_basic_grid ** grids, size_t num_grids);
195
209 struct yac_instance * instance, struct yac_basic_grid ** grids,
210 size_t num_grids, int emit_flags);
211
220 struct yac_instance * instance,
221 char const ** comp_names, size_t num_comp_names);
222
224 struct yac_instance * instance,
225 const char* comp_name);
226
228 struct yac_instance * instance,
229 const char* comp_name);
230
231struct coupling_field* yac_instance_get_field(struct yac_instance * instance,
232 const char * comp_name, const char* grid_name, const char * field_name);
233
234#endif // INSTANCE_H
void yac_instance_delete(struct yac_instance *instance)
Definition instance.c:1356
char * yac_instance_setup_and_emit_config(struct yac_instance *instance, struct yac_basic_grid **grids, size_t num_grids, int emit_flags)
Definition instance.c:1292
int yac_instance_get_comp_rank(struct yac_instance *instance, const char *comp_name)
Definition instance.c:1322
char * yac_instance_get_start_datetime(struct yac_instance *instance)
Definition instance.c:1396
char * yac_instance_get_end_datetime(struct yac_instance *instance)
Definition instance.c:1401
void yac_instance_def_datetime(struct yac_instance *instance, const char *start_datetime, const char *end_datetime)
Definition instance.c:1388
void yac_instance_setup(struct yac_instance *instance, struct yac_basic_grid **grids, size_t num_grids)
Definition instance.c:1268
void yac_instance_sync_def(struct yac_instance *instance)
Definition instance.c:1258
struct yac_instance * yac_instance_new(MPI_Comm comm)
Definition instance.c:1331
int yac_instance_components_are_defined(struct yac_instance *instance)
Definition instance.c:1430
void yac_instance_def_couple(struct yac_instance *instance, char const *src_comp_name, char const *src_grid_name, char const *src_field_name, char const *tgt_comp_name, char const *tgt_grid_name, char const *tgt_field_name, char const *coupling_period, int time_reduction, struct yac_interp_stack_config *interp_stack_config, int src_lag, int tgt_lag, const char *weight_file_name, int mapping_on_source, double scale_factor, double scale_summand, size_t num_src_mask_names, char const *const *src_mask_names, char const *tgt_mask_name, char const *yaxt_exchanger_name)
Definition instance.c:1494
struct coupling_field * yac_instance_add_field(struct yac_instance *instance, char const *field_name, char const *comp_name, struct yac_basic_grid *grid, struct yac_interp_field *interp_fields, size_t num_interp_fields, int collection_size, char const *timestep)
Definition instance.c:1435
void yac_instance_set_couple_config(struct yac_instance *instance, struct yac_couple_config *couple_config)
Definition instance.c:1379
void yac_instance_dummy_new(MPI_Comm comm)
Definition instance.c:1350
void yac_instance_def_components(struct yac_instance *instance, char const **comp_names, size_t num_comps)
Definition instance.c:1406
struct yac_couple_config * yac_instance_get_couple_config(struct yac_instance *instance)
Definition instance.c:1373
int yac_instance_get_comp_size(struct yac_instance *instance, const char *comp_name)
Definition instance.c:1313
MPI_Comm yac_instance_get_comps_comm(struct yac_instance *instance, char const **comp_names, size_t num_comp_names)
Definition instance.c:1304
struct coupling_field * yac_instance_get_field(struct yac_instance *instance, const char *comp_name, const char *grid_name, const char *field_name)
Definition instance.c:1516
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
size_t collection_size
number of vertical levels or bundles
Definition fields.c:24
MPI_Comm comm
Definition instance.c:80
size_t num_grids
Definition yac.c:131
struct yac_basic_grid ** grids
Definition yac.c:130