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

added get/set functionality

parent b0206597
...@@ -363,6 +363,12 @@ namespace AMDiS { ...@@ -363,6 +363,12 @@ namespace AMDiS {
return timestepNumber; return timestepNumber;
} }
/// Sets \ref timestepNumber.
inline void setTimestepNumber(int num)
{
timestepNumber = AMDiS::min(nTimesteps,num);
}
/// Returns \ref nTimesteps. /// Returns \ref nTimesteps.
inline int getNumberOfTimesteps() inline int getNumberOfTimesteps()
{ {
...@@ -372,7 +378,7 @@ namespace AMDiS { ...@@ -372,7 +378,7 @@ namespace AMDiS {
/// Sets \ref nTimesteps. /// Sets \ref nTimesteps.
inline void setNumberOfTimesteps(int num) inline void setNumberOfTimesteps(int num)
{ {
nTimesteps = num; nTimesteps = AMDiS::max(0,num);
} }
/// Increments \ref timestepNumber by 1; /// Increments \ref timestepNumber by 1;
...@@ -550,7 +556,7 @@ namespace AMDiS { ...@@ -550,7 +556,7 @@ namespace AMDiS {
{ {
return maxTimestep; return maxTimestep;
} }
/// Gets \ref &timestep /// Gets \ref &timestep
inline double *getTimestepPtr() inline double *getTimestepPtr()
{ {
...@@ -756,7 +762,7 @@ namespace AMDiS { ...@@ -756,7 +762,7 @@ namespace AMDiS {
/// Maximal step size /// Maximal step size
double maxTimestep; double maxTimestep;
/// Number of current time step /// Number of current time step
int timestepNumber; int timestepNumber;
......
...@@ -311,7 +311,6 @@ namespace AMDiS { ...@@ -311,7 +311,6 @@ namespace AMDiS {
for (di = dofIndexedList.begin(); di != end; ++di) for (di = dofIndexedList.begin(); di != end; ++di)
(*di)->compressDOFIndexed(first, last, new_dof); (*di)->compressDOFIndexed(first, last, new_dof);
std::list<DOFContainer*>::iterator dc; std::list<DOFContainer*>::iterator dc;
std::list<DOFContainer*>::iterator endc = dofContainerList.end(); std::list<DOFContainer*>::iterator endc = dofContainerList.end();
for (dc = dofContainerList.begin(); dc != endc; ++dc) for (dc = dofContainerList.begin(); dc != endc; ++dc)
......
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