Parameters.cpp File Reference

Loads parameters. More...

#include "Parameters.h"
#include "../VariousFunctions/variousFunctions.h"
#include "../Exceptions/error.h"
#include "../Logging/Output.h"
#include "../VariousFunctions/erf.h"
#include <iostream>

Include dependency graph for Parameters.cpp:

Go to the source code of this file.

Functions

template<typename T >
bool ReadFromFile (T &variable, ifstream &parameters_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.


Detailed Description

Loads parameters.

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.

Author:
Developed under supervision of the PI Yuri Shprits

Definition in file Parameters.cpp.


Function Documentation

string bool2str ( bool  b  ) 

Converting boolean to string.

Definition at line 522 of file Parameters.cpp.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool str2bool ( string  str  ) 

Converting string to boolean.

Definition at line 514 of file Parameters.cpp.

Referenced by ParamStructure::Load_parameters(), and StrToVal().

Here is the caller graph for this function:

void StrToVal ( string  input,
bool &  place 
)

Converting string to bool.

Definition at line 505 of file Parameters.cpp.

References str2bool().

Here is the call graph for this function:

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 
)

Converting string to int.

Definition at line 489 of file Parameters.cpp.

void StrToVal ( string  input,
double &  place 
)

Converting string to double.

Definition at line 481 of file Parameters.cpp.

Referenced by ReadFromFile().

Here is the caller graph for this function:


Generated on Thu May 27 11:53:19 2010 for VERB_CODE_2.0 by  doxygen 1.5.9