Skip to content
Snippets Groups Projects
Commit 16452db7 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* ?

parent 988bfc8d
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,12 @@ namespace AMDiS { ...@@ -50,6 +50,12 @@ namespace AMDiS {
ERROR_EXIT("Not yet\n"); ERROR_EXIT("Not yet\n");
} }
// If pop was the last operation, cleanup and reset the data storage.
if (poped) {
clear();
poped = false;
}
std::vector<FiniteElemSpace*> feSpace(solution->getFESpaces().size()); std::vector<FiniteElemSpace*> feSpace(solution->getFESpaces().size());
for (int i = 0; i < feSpace.size(); i++) { for (int i = 0; i < feSpace.size(); i++) {
feSpace[i] = NEW FiniteElemSpace(); feSpace[i] = NEW FiniteElemSpace();
...@@ -65,12 +71,6 @@ namespace AMDiS { ...@@ -65,12 +71,6 @@ namespace AMDiS {
vec->interpol(solution, 1.0); vec->interpol(solution, 1.0);
memoryUsage += vec->calcMemoryUsage(); memoryUsage += vec->calcMemoryUsage();
// If pop was the last operation, cleanup and reset the data storage.
if (poped) {
clear();
poped = false;
}
solutions.push_back(vec); solutions.push_back(vec);
timestamps.push_back(timestamp); timestamps.push_back(timestamp);
...@@ -97,7 +97,7 @@ namespace AMDiS { ...@@ -97,7 +97,7 @@ namespace AMDiS {
template<typename T> template<typename T>
void SolutionDataStorage<T>::clear() void SolutionDataStorage<T>::clear()
{ {
for (int i = 1; i < static_cast<int>(solutions.size()); i++) { for (int i = 0; i < static_cast<int>(solutions.size()); i++) {
DELETE solutions[i]; DELETE solutions[i];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment