Commit b810b92a authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

parameter-initialization sourced out from contructor to init() method

parent 9fa45563
......@@ -145,17 +145,7 @@ namespace AMDiS {
deserialized(false),
rosenbrockMode(false)
{
Parameters::get( name_ + "->start time", startTime);
time = startTime;
Parameters::get(name_ + "->timestep", timestep);
Parameters::get(name_ + "->end time", endTime);
Parameters::get(name_ + "->max iteration", maxSpaceIteration);
Parameters::get(name_ + "->max timestep iteration", maxTimestepIteration);
Parameters::get(name_ + "->max time iteration", maxTimeIteration);
Parameters::get(name_ + "->min timestep", minTimestep);
Parameters::get(name_ + "->max timestep", maxTimestep);
Parameters::get(name_ + "->number of timesteps", nTimesteps);
init();
char number[5];
for (int i = 0; i < size; i++) {
sprintf(number, "[%d]", i);
......@@ -170,6 +160,22 @@ namespace AMDiS {
delete scalContents[i];
}
/// Sets initial values to time/timestep variables
inline void init()
{
Parameters::get(name + "->start time", startTime);
time = startTime;
Parameters::get(name + "->timestep", timestep);
Parameters::get(name + "->end time", endTime);
Parameters::get(name + "->max iteration", maxSpaceIteration);
Parameters::get(name + "->max timestep iteration", maxTimestepIteration);
Parameters::get(name + "->max time iteration", maxTimeIteration);
Parameters::get(name + "->min timestep", minTimestep);
Parameters::get(name + "->max timestep", maxTimestep);
Parameters::get(name + "->number of timesteps", nTimesteps);
}
/// Resets all variables to zero (or something equivalent)
inline void reset()
{
spaceIteration = -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment