7.0
general documentation
cs_time_control.h File Reference
#include <stdarg.h>
#include "cs_defs.h"
#include "cs_time_step.h"
+ Include dependency graph for cs_time_control.h:

Go to the source code of this file.

Data Structures

struct  cs_time_control_t
 

Typedefs

typedef bool() cs_time_control_func_t(const cs_time_step_t *ts, void *input)
 Function pointer to a time control function. More...
 

Enumerations

enum  cs_time_control_type_t { CS_TIME_CONTROL_TIME_STEP, CS_TIME_CONTROL_TIME, CS_TIME_CONTROL_FUNCTION }
 

Functions

bool cs_time_control_is_active (cs_time_control_t *tc, const cs_time_step_t *ts)
 
void cs_time_control_init_by_time_step (cs_time_control_t *tc, int nt_start, int nt_end, int nt_interval, bool at_start, bool at_end)
 
void cs_time_control_init_by_time (cs_time_control_t *tc, double t_start, double t_end, double t_interval, bool at_start, bool at_end)
 
void cs_time_control_init_by_func (cs_time_control_t *tc, cs_time_control_func_t *control_func, void *control_input, bool at_start, bool at_end)
 
void cs_time_control_get_description (const cs_time_control_t *tc, char *desc, size_t desc_size)
 

Typedef Documentation

◆ cs_time_control_func_t

typedef bool() cs_time_control_func_t(const cs_time_step_t *ts, void *input)

Function pointer to a time control function.

Each function of this sort may be used to determine whether a given set of operations (such as variable or property updates) should be done at the current time step.

Remarks
: if the input pointer is non-NULL, it must point to valid data when the control function is called, so that value or structure should not be temporary (i.e. local);
Parameters
[in]tscurrent time step structure
[in]inputpointer to optional (untyped) value or structure, or NULL.
Returns
true if active at given time step, false oltherwise

Enumeration Type Documentation

◆ cs_time_control_type_t

Enumerator
CS_TIME_CONTROL_TIME_STEP 

control based on time step

CS_TIME_CONTROL_TIME 

control based on simulated time

CS_TIME_CONTROL_FUNCTION 

control based on function

Function Documentation

◆ cs_time_control_get_description()

void cs_time_control_get_description ( const cs_time_control_t tc,
char *  desc,
size_t  desc_size 
)

◆ cs_time_control_init_by_func()

void cs_time_control_init_by_func ( cs_time_control_t tc,
cs_time_control_func_t control_func,
void *  control_input,
bool  at_start,
bool  at_end 
)

◆ cs_time_control_init_by_time()

void cs_time_control_init_by_time ( cs_time_control_t tc,
double  t_start,
double  t_end,
double  t_interval,
bool  at_start,
bool  at_end 
)

◆ cs_time_control_init_by_time_step()

void cs_time_control_init_by_time_step ( cs_time_control_t tc,
int  nt_start,
int  nt_end,
int  nt_interval,
bool  at_start,
bool  at_end 
)

◆ cs_time_control_is_active()

bool cs_time_control_is_active ( cs_time_control_t tc,
const cs_time_step_t ts 
)