commit
9f546aebdd
|
@ -29,8 +29,7 @@ pFlow::empty::empty(
|
||||||
positionParticles(dict),
|
positionParticles(dict),
|
||||||
position_
|
position_
|
||||||
(
|
(
|
||||||
maxNumberOfParticles_, RESERVE()
|
maxNumberOfParticles_, 0, RESERVE()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
position_.clear();
|
|
||||||
}
|
}
|
|
@ -98,9 +98,23 @@ pFlow::positionParticles::positionParticles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pFlow::realx3Vector pFlow::positionParticles::getFinalPosition()
|
||||||
|
{
|
||||||
|
if(mortonSorting_)
|
||||||
|
{
|
||||||
|
return sortByMortonCode(position());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
realx3Vector vec(position().capacity(), RESERVE());
|
||||||
|
vec.assign( position().begin(), position().end());
|
||||||
|
|
||||||
|
return std::move(vec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pFlow::uniquePtr<pFlow::positionParticles> pFlow::positionParticles::create(const dictionary & dict)
|
pFlow::uniquePtr<pFlow::positionParticles>
|
||||||
|
pFlow::positionParticles::create(const dictionary & dict)
|
||||||
{
|
{
|
||||||
|
|
||||||
word method = dict.getVal<word>("method");
|
word method = dict.getVal<word>("method");
|
||||||
|
|
|
@ -145,21 +145,11 @@ public:
|
||||||
// - access to position
|
// - access to position
|
||||||
virtual realx3Vector& position() = 0;
|
virtual realx3Vector& position() = 0;
|
||||||
|
|
||||||
virtual realx3Vector getFinalPosition()
|
virtual realx3Vector getFinalPosition();
|
||||||
{
|
|
||||||
if(mortonSorting_)
|
|
||||||
{
|
|
||||||
return sortByMortonCode(position());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return position();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
uniquePtr<positionParticles> create(const dictionary & dict);
|
uniquePtr<positionParticles> create(const dictionary & dict);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue