Streamer fluid modeling - An overview of ARCoS  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
configuration.c File Reference

Module for input/output of parameters. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <libconfig.h>
#include <cstream.h>
#include <parameters.h>
#include <configuration.h>
#include <reaction.h>
#include <species.h>
Include dependency graph for configuration.c:

Go to the source code of this file.

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)
 

Detailed Description

Module for input/output of parameters.

Definition in file configuration.c.

Function Documentation

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.

Parameters
[in]namename of the parameter (see e.g., input file default.cfg)
[in]typetype of parameter (see e.g., input file default.cfg)
[in]commentcomment to be added (see e.g., input file default.cfg)
[in]sstringname to be found
[out]*parglobal 'int' variable named 'name'; on return *par will have value 'value'
[in]valueof type 'int'
[in]countnumber of elements in array 'parameter_names' to examine
[in]*changeif TRUE then value in setting_default will be changed
[in]setting_defaultrelated to default configuration file
[out]iposition in global array 'parameter_names' defined in configuration.h

Definition at line 57 of file configuration.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
[in]namename of the parameter (see e.g., input file default.cfg)
[in]typetype of parameter (see e.g., input file default.cfg)
[in]commentcomment to be added to name (see e.g., input file default.cfg)
[in]sstringname to be found
[out]*parglobal 'double' variable named 'name'; on return *par will have value 'value'
[in]valueof type 'double'
[in]countnumber of elements in array 'parameter_names' to examine
[in]changeif TRUE then value in setting_default will be changed
[in]setting_defaultrelated to default configuration file
[out]iposition in global array 'parameter_names' defined in configuration.h

Definition at line 121 of file configuration.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
[in]namename of the parameter (see e.g., input file default.cfg)
[in]typetype of parameter (see e.g., input file default.cfg)
[in]commentcomment to be added to name (see e.g., input file default.cfg)
[in]sstringname to be found
[out]parglobal variable named 'name'; on return par will have value 'value'
[in]valueof type 'string'
[in]countnumber of elements in array 'parameter_names' to examine
[in]changeif TRUE then value in setting_default will be changed
[in]setting_defaultrelated to default configuration file
[out]iposition in global array 'parameter_names' defined in configuration.h

Definition at line 187 of file configuration.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

bool read_specie ( config_setting_t setting,
int  ii,
species_t temp_s 
)

Definition at line 696 of file configuration.c.

Here is the call graph for this function:

Here is the caller graph for this function:

bool read_seed ( config_setting_t setting,
int  ii,
seed_t temp_se 
)

Definition at line 722 of file configuration.c.

Here is the call graph for this function:

Here is the caller graph for this function:

bool read_reaction ( config_setting_t setting,
int  ii,
reaction_t temp_r 
)

Definition at line 775 of file configuration.c.

Here is the call graph for this function:

Here is the caller graph for this function: