YetAnotherCoupler 3.4.0
Loading...
Searching...
No Matches
event.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 EVENT_H
6#define EVENT_H
7
8#include "mtime_datetime.h"
9#include "mtime_timedelta.h"
10#include "mtime_eventHandling.h"
11#include "couple_config.h"
12
28
29extern int yac_number_of_events;
30struct event;
31
36struct event * yac_event_new();
37
49void yac_event_add ( struct event * event,
50 char const *model_time_step,
51 char const *coupling_time_step,
52 int lag,
54 const char * start_date,
55 const char * stop_date);
56
61void yac_event_delete ( struct event * event );
62
68
73void yac_event_update ( struct event * event );
74
79int yac_get_event_lag ( struct event * event );
80
86
93 struct event * event, char * timedelta_str );
94
101 struct event * event, char * timedelta_str );
102
112 struct event * event, char * datetime_str);
113
120char const * yac_time_to_ISO(
121 char const * time, enum yac_time_unit_type time_unit);
122
123#endif
yac_reduction_type
yac_time_unit_type
char * yac_get_event_model_timestep(struct event *event, char *timedelta_str)
Definition event.c:304
char * yac_get_event_coupling_timestep(struct event *event, char *timedelta_str)
Definition event.c:291
int yac_get_event_lag(struct event *event)
Definition event.c:277
void yac_event_delete(struct event *event)
Definition event.c:258
char * yac_get_event_current_datetime(struct event *event, char *datetime_str)
Definition event.c:314
struct event * yac_event_new()
Definition event.c:36
char const * yac_time_to_ISO(char const *time, enum yac_time_unit_type time_unit)
Definition event.c:329
int yac_get_event_time_operation(struct event *event)
Definition event.c:284
int yac_number_of_events
Definition event.c:16
yac_action_type
Definition event.h:17
@ REDUCTION
Definition event.h:19
@ COUPLING
Definition event.h:20
@ RESTART
Definition event.h:21
@ OUT_OF_BOUND
Definition event.h:26
@ GET_FOR_CHECKPOINT
Definition event.h:24
@ NONE
Definition event.h:18
@ PUT_FOR_RESTART
Definition event.h:23
@ GET_FOR_RESTART
Definition event.h:22
@ PUT_FOR_CHECKPOINT
Definition event.h:25
void yac_event_add(struct event *event, char const *model_time_step, char const *coupling_time_step, int lag, enum yac_reduction_type time_operation, const char *start_date, const char *stop_date)
Definition event.c:55
enum yac_action_type yac_event_check(struct event *event)
Definition event.c:182
void yac_event_update(struct event *event)
Definition event.c:170
Definition event.c:18
enum yac_time_unit_type time_unit
Definition event.c:26
enum yac_reduction_type time_operation
Definition event.c:24
struct _timedelta * model_time_step
Definition event.c:20
int lag
Definition event.c:23
struct _timedelta * coupling_time_step
Definition event.c:21