From b5572d3f7f1774cc1e56da73c3c2836f25a93b9c Mon Sep 17 00:00:00 2001 From: Hamidreza Norouzi Date: Mon, 3 Apr 2023 05:48:54 -0700 Subject: [PATCH] bug fix for push_back --- DEMSystems/domainDistribute/domainDistribute.cpp | 4 ++-- src/phasicFlow/containers/VectorHD/VectorDual.hpp | 6 +++++- src/phasicFlow/containers/VectorHD/VectorSingle.hpp | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/DEMSystems/domainDistribute/domainDistribute.cpp b/DEMSystems/domainDistribute/domainDistribute.cpp index b888f2d6..b6985243 100644 --- a/DEMSystems/domainDistribute/domainDistribute.cpp +++ b/DEMSystems/domainDistribute/domainDistribute.cpp @@ -52,11 +52,13 @@ bool pFlow::domainDistribute::locateParticles( range activeRange = mask.activeRange(); + for(int32 di=0; di::type push_back(const T& val) { - if(size_ == capacity_) changeSize(capacity_); + if(size_ == capacity_) + { + changeSize(evalCapacity(capacity_), true); + } data()[size_++] = val; subViewUpdated_ = false; }