From c630d329c0dfb344e78270b59da2314cf5312161 Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Sun, 19 Sep 2010 14:32:12 +0000 Subject: [PATCH] added get/set functionality --- AMDiS/src/AdaptInfo.h | 12 +++++++++--- AMDiS/src/DOFAdmin.cc | 1 - 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/AMDiS/src/AdaptInfo.h b/AMDiS/src/AdaptInfo.h index 0c10da50..ca668ec1 100644 --- a/AMDiS/src/AdaptInfo.h +++ b/AMDiS/src/AdaptInfo.h @@ -363,6 +363,12 @@ namespace AMDiS { return timestepNumber; } + /// Sets \ref timestepNumber. + inline void setTimestepNumber(int num) + { + timestepNumber = AMDiS::min(nTimesteps,num); + } + /// Returns \ref nTimesteps. inline int getNumberOfTimesteps() { @@ -372,7 +378,7 @@ namespace AMDiS { /// Sets \ref nTimesteps. inline void setNumberOfTimesteps(int num) { - nTimesteps = num; + nTimesteps = AMDiS::max(0,num); } /// Increments \ref timestepNumber by 1; @@ -550,7 +556,7 @@ namespace AMDiS { { return maxTimestep; } - + /// Gets \ref ×tep inline double *getTimestepPtr() { @@ -756,7 +762,7 @@ namespace AMDiS { /// Maximal step size double maxTimestep; - + /// Number of current time step int timestepNumber; diff --git a/AMDiS/src/DOFAdmin.cc b/AMDiS/src/DOFAdmin.cc index 0d79e55e..e66f5d6e 100644 --- a/AMDiS/src/DOFAdmin.cc +++ b/AMDiS/src/DOFAdmin.cc @@ -311,7 +311,6 @@ namespace AMDiS { for (di = dofIndexedList.begin(); di != end; ++di) (*di)->compressDOFIndexed(first, last, new_dof); - std::list<DOFContainer*>::iterator dc; std::list<DOFContainer*>::iterator endc = dofContainerList.end(); for (dc = dofContainerList.begin(); dc != endc; ++dc) -- GitLab