bug fix for max_capacity of pStruct

This commit is contained in:
hamidrezanorouzi 2023-01-18 14:20:08 +03:30
parent 55ba36cc80
commit 8f657458cc
2 changed files with 5 additions and 3 deletions

View File

@ -29,8 +29,7 @@ pFlow::empty::empty(
positionParticles(dict),
position_
(
maxNumberOfParticles_, RESERVE()
maxNumberOfParticles_, 0, RESERVE()
)
{
position_.clear();
}

View File

@ -153,7 +153,10 @@ public:
}
else
{
return position();
realx3Vector vec(position().capacity(), RESERVE());
vec.assign( position().begin(), position().end());
return std::move(vec);
}
}