#include "Parameters.h"
#include "../VariousFunctions/variousFunctions.h"
#include "../Exceptions/error.h"
#include "../Logging/Output.h"
#include "../VariousFunctions/erf.h"
#include <iostream>
Go to the source code of this file.
Functions | |
template<typename T > | |
bool | ReadFromFile (T &variable, ifstream ¶meters_file, string variable_name, string default_value="") |
Read each parameter from parameters file. | |
void | StrToVal (string input, double &place) |
Converting string to double. | |
void | StrToVal (string input, int &place) |
Converting string to int. | |
void | StrToVal (string input, string &place) |
Converting string to string. | |
void | StrToVal (string input, bool &place) |
Converting string to bool. | |
bool | str2bool (string str) |
Converting string to boolean. | |
string | bool2str (bool b) |
Converting boolean to string. | |
void | load_1d (Matrix1D< double > &var, string filename, double dt, int var_size) |
Read 1d matrix_array from txt-file and interpolate to out time-axis. |
Loads parameters from file into map, then use parameters-structure related functions to get parameters values from the map and store them into the parameters structures.
Definition in file Parameters.cpp.
string bool2str | ( | bool | b | ) |
void load_1d | ( | Matrix1D< double > & | var, | |
string | filename, | |||
double | dt, | |||
int | var_size | |||
) |
Read 1d matrix_array from txt-file and interpolate to out time-axis.
Definition at line 529 of file Parameters.cpp.
References Matrix1D< T >::AllocateMemory(), i, and Matrix1D< T >::size_x.
Referenced by ParamStructure::Load_parameters().
bool ReadFromFile | ( | T & | variable, | |
ifstream & | parameters_file, | |||
string | variable_name, | |||
string | default_value = "" | |||
) | [inline] |
Read each parameter from parameters file.
Definition at line 24 of file Parameters.cpp.
References Output::echo(), and StrToVal().
Referenced by DiffusionCoefficientParamStructure::Load_dxx_parameters(), and ParamStructure::Load_parameters().
bool str2bool | ( | string | str | ) |
Converting string to boolean.
Definition at line 514 of file Parameters.cpp.
Referenced by ParamStructure::Load_parameters(), and StrToVal().
void StrToVal | ( | string | input, | |
bool & | place | |||
) |
Converting string to bool.
Definition at line 505 of file Parameters.cpp.
References str2bool().
void StrToVal | ( | string | input, | |
string & | place | |||
) |
Converting string to string.
Function StrToVal is used in template, so we need thad function to make template function works in case of string.
Definition at line 497 of file Parameters.cpp.
void StrToVal | ( | string | input, | |
int & | place | |||
) |
void StrToVal | ( | string | input, | |
double & | place | |||
) |
Converting string to double.
Definition at line 481 of file Parameters.cpp.
Referenced by ReadFromFile().