/*------------------------------- phasicFlow --------------------------------- O C enter of O O E ngineering and O O M ultiscale modeling of OOOOOOO F luid flow ------------------------------------------------------------------------------ Copyright (C): www.cemf.ir email: hamid.r.norouzi AT gmail.com ------------------------------------------------------------------------------ Licence: This file is part of phasicFlow code. It is a free software for simulating granular and multiphase flows. You can redistribute it and/or modify it under the terms of GNU General Public License v3 or any other later versions. phasicFlow is distributed to help others in their research in the field of granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -----------------------------------------------------------------------------*/ #ifndef __domainDistribute_hpp__ #define __domainDistribute_hpp__ #include "box.hpp" #include "Vectors.hpp" #include "VectorSingles.hpp" #include "pointStructure.hpp" namespace pFlow { class domainDistribute { protected: // protected members int32 numDomains_; VectorSingle extDomains_; Vector> particlesInDomains_; int32Vector_H numParInDomain_; real maxBoundingBoxSize_; real domainExtension_ = 1.0; using includeMask = typename pointStructure::activePointsHost; void clcDomains(const std::vector& domains); public: domainDistribute( const Vector& domains, real maxBoundingBox); ~domainDistribute()=default; domainDistribute(const domainDistribute&)=delete; domainDistribute& operator=(const domainDistribute&)=delete; int32 numDomains()const { return numDomains_; } int32 numParInDomain(int32 di)const { return numParInDomain_[di]; } span particlesInDomain(int32 di)const { return span( particlesInDomains_[di].hostVectorAll().data(), numParInDomain_[di] ); } bool changeDomainsSize(const std::vector& domains); //template bool locateParticles( ViewType1D points, includeMask mask); }; } // pFlow::coupling #endif //__domainDistribute_hpp__