Commit 3ee08357 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* Small bugfixes

parent ab01d678
......@@ -88,6 +88,22 @@ namespace AMDiS {
feSpaces.empty();
}
int addMemoryUsage(FiniteElemSpace* feSpace) {
memoryUsage += feSpace->getMesh()->calcMemoryUsage();
}
int addMemoryUsage(std::vector<FiniteElemSpace*> feSpaces) {
// Is used to determine equal meshes for different components.
std::vector<Mesh*> meshes;
for (int i = 0; i < static_cast<int>(feSpaces.size()); i++) {
if (find(meshes.begin(), meshes.end(), feSpaces[i]->getMesh()) != meshes.end()) {
memoryUsage += feSpaces[i]->getMesh()->calcMemoryUsage();
meshes.push_back(feSpaces[i]->getMesh());
}
}
}
/** \brief
* Deletes all pointers and empties all internal vectors.
*/
......
......@@ -36,8 +36,7 @@ namespace AMDiS {
fixedFESpace = true;
feSpaces.push_back(feSpace);
std::cout << "MESH = " << static_cast<double>(feSpace[0]->getMesh()->calcMemoryUsage()) / (1024.0 * 1024.0) << std::endl;
WAIT_REALLY;
addMemoryUsage(feSpace);
}
template<typename T>
......
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