mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-07-08 03:07:03 +00:00
particles and sphereParticles classes were tested for exit boundary
This commit is contained in:
@ -36,18 +36,23 @@ class baseShapeNames
|
||||
{
|
||||
private:
|
||||
|
||||
size_t numShapes_;
|
||||
size_t numShapes_ = 0;
|
||||
|
||||
// - hashed list of spheres names
|
||||
wordHashMap<uint32> hashNames_;
|
||||
|
||||
/// list of shape names
|
||||
wordVector shapeNames_;
|
||||
wordVector shapeNames_{"shapeNames"};
|
||||
|
||||
/// hash for names
|
||||
Vector<size_t> hashes_{"hashes"};
|
||||
|
||||
bool createHashNames();
|
||||
|
||||
bool readFromDictionary1();
|
||||
|
||||
using hasher = typename wordHashMap<uint32>::hasher;
|
||||
|
||||
protected:
|
||||
|
||||
virtual
|
||||
@ -78,6 +83,12 @@ public:
|
||||
return wl;
|
||||
}
|
||||
|
||||
inline
|
||||
const auto& hashes()const
|
||||
{
|
||||
return hashes_;
|
||||
}
|
||||
|
||||
inline
|
||||
size_t numShapes()const
|
||||
{
|
||||
@ -111,6 +122,20 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool hashToIndex(const size_t& hs, uint32& idx)
|
||||
{
|
||||
for(auto i=0; i<hashes_.size(); i++)
|
||||
{
|
||||
if(hashes_[i]==hs)
|
||||
{
|
||||
idx = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
idx = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline
|
||||
bool indexValid(uint32 index)const
|
||||
{
|
||||
|
Reference in New Issue
Block a user