Streamer fluid modeling - An overview of ARCoS
1.0
|
Function prototypes for configuration functions. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <libconfig.h>
#include "cstream.h"
#include "parameters.h"
#include "species.h"
#include "reaction.h"
Go to the source code of this file.
Classes | |
struct | array_name |
Macros | |
#define | COMPARE_LIMIT 100 |
#define | NO_PARAMETERS 100 |
Typedefs | |
typedef struct array_name | ARRAY_NAME |
Functions | |
bool | change_cfg_integer (const char *name, const char *type, const char *comment, const char *sstring, int *par, int value, int count, bool *change, config_setting_t *setting_default, int i) |
Looks in a libconfig file *.cfg for a parameter of type 'int', with name 'sstring' and add its value to the global variable with the same name. If already initialized, its value will be overwritten. | |
bool | change_cfg_double (const char *name, const char *type, const char *comment, const char *sstring, double *par, double value, int count, bool *change, config_setting_t *setting_default, int i) |
Looks in a libconfig file *.cfg for a parameter of type 'double', with name 'sstring' and add its value to the global variable with the same name. If already initialized, its value will be overwritten. | |
bool | change_cfg_string (const char *name, const char *type, const char *comment, const char *sstring, char **par, char *value, int count, bool *change, config_setting_t *setting_default, int i) |
Looks in a libconfig file *.cfg for a parameter of type 'string', with name 'sstring' and add its value to the global variable with the same name. If already initialized, its value will be overwritten. | |
void | change_cfg_parameters (const char *name, const char *type, const char *comment, int ii, int ivalue, double dvalue, bool bbool, const char *astring, config_setting_t *setting, int count, bool *change) |
File that searches for all parameters in configuration file connected to setting. | |
bool | read_parameter (config_setting_t *setting1, config_setting_t *setting2, int ii, int count, bool *change) |
bool | read_specie (config_setting_t *setting, int ii, species_t *temp_s) |
bool | read_seed (config_setting_t *setting, int ii, seed_t *temp_se) |
bool | read_reaction (config_setting_t *setting, int ii, reaction_t *temp_r) |
Variables | |
ARRAY_NAME | parameter_names [NO_PARAMETERS] |
Function prototypes for configuration functions.
Definition in file configuration.h.
#define COMPARE_LIMIT 100 |
Definition at line 48 of file configuration.h.
#define NO_PARAMETERS 100 |
Definition at line 49 of file configuration.h.
typedef struct array_name ARRAY_NAME |
bool change_cfg_integer | ( | const char * | name, |
const char * | type, | ||
const char * | comment, | ||
const char * | sstring, | ||
int * | par, | ||
int | value, | ||
int | count, | ||
bool * | change, | ||
config_setting_t * | setting_default, | ||
int | i | ||
) |
Looks in a libconfig file *.cfg for a parameter of type 'int', with name 'sstring' and add its value to the global variable with the same name. If already initialized, its value will be overwritten.
[in] | name | name of the parameter (see e.g., input file default.cfg) |
[in] | type | type of parameter (see e.g., input file default.cfg) |
[in] | comment | comment to be added (see e.g., input file default.cfg) |
[in] | sstring | name to be found |
[out] | *par | global 'int' variable named 'name'; on return *par will have value 'value' |
[in] | value | of type 'int' |
[in] | count | number of elements in array 'parameter_names' to examine |
[in] | *change | if TRUE then value in setting_default will be changed |
[in] | setting_default | related to default configuration file |
[out] | i | position in global array 'parameter_names' defined in configuration.h |
Definition at line 57 of file configuration.c.
bool change_cfg_double | ( | const char * | name, |
const char * | type, | ||
const char * | comment, | ||
const char * | sstring, | ||
double * | par, | ||
double | value, | ||
int | count, | ||
bool * | change, | ||
config_setting_t * | setting_default, | ||
int | i | ||
) |
Looks in a libconfig file *.cfg for a parameter of type 'double', with name 'sstring' and add its value to the global variable with the same name. If already initialized, its value will be overwritten.
[in] | name | name of the parameter (see e.g., input file default.cfg) |
[in] | type | type of parameter (see e.g., input file default.cfg) |
[in] | comment | comment to be added to name (see e.g., input file default.cfg) |
[in] | sstring | name to be found |
[out] | *par | global 'double' variable named 'name'; on return *par will have value 'value' |
[in] | value | of type 'double' |
[in] | count | number of elements in array 'parameter_names' to examine |
[in] | change | if TRUE then value in setting_default will be changed |
[in] | setting_default | related to default configuration file |
[out] | i | position in global array 'parameter_names' defined in configuration.h |
Definition at line 121 of file configuration.c.
bool change_cfg_string | ( | const char * | name, |
const char * | type, | ||
const char * | comment, | ||
const char * | sstring, | ||
char ** | par, | ||
char * | value, | ||
int | count, | ||
bool * | change, | ||
config_setting_t * | setting_default, | ||
int | i | ||
) |
Looks in a libconfig file *.cfg for a parameter of type 'string', with name 'sstring' and add its value to the global variable with the same name. If already initialized, its value will be overwritten.
[in] | name | name of the parameter (see e.g., input file default.cfg) |
[in] | type | type of parameter (see e.g., input file default.cfg) |
[in] | comment | comment to be added to name (see e.g., input file default.cfg) |
[in] | sstring | name to be found |
[out] | par | global variable named 'name'; on return par will have value 'value' |
[in] | value | of type 'string' |
[in] | count | number of elements in array 'parameter_names' to examine |
[in] | change | if TRUE then value in setting_default will be changed |
[in] | setting_default | related to default configuration file |
[out] | i | position in global array 'parameter_names' defined in configuration.h |
Definition at line 187 of file configuration.c.
void change_cfg_parameters | ( | const char * | name, |
const char * | type, | ||
const char * | comment, | ||
int | ii, | ||
int | ivalue, | ||
double | dvalue, | ||
bool | bbool, | ||
const char * | astring, | ||
config_setting_t * | setting, | ||
int | count, | ||
bool * | change | ||
) |
File that searches for all parameters in configuration file connected to setting.
Calls for each parameter the right change_cfg_... function
Definition at line 252 of file configuration.c.
bool read_parameter | ( | config_setting_t * | setting1, |
config_setting_t * | setting2, | ||
int | ii, | ||
int | count, | ||
bool * | change | ||
) |
Definition at line 644 of file configuration.c.
bool read_specie | ( | config_setting_t * | setting, |
int | ii, | ||
species_t * | temp_s | ||
) |
Definition at line 696 of file configuration.c.
bool read_seed | ( | config_setting_t * | setting, |
int | ii, | ||
seed_t * | temp_se | ||
) |
Definition at line 722 of file configuration.c.
bool read_reaction | ( | config_setting_t * | setting, |
int | ii, | ||
reaction_t * | temp_r | ||
) |
Definition at line 775 of file configuration.c.
ARRAY_NAME parameter_names[NO_PARAMETERS] |
Definition at line 55 of file configuration.h.