Merge pull request #135 from PhasicFlow/develop
DEMSystem updated for version 1.0
This commit is contained in:
commit
809d4ca617
|
@ -1,9 +1,11 @@
|
|||
|
||||
set(SourceFiles
|
||||
DEMSystem/DEMSystem.cpp
|
||||
sphereDEMSystem/sphereDEMSystem.cpp
|
||||
sphereDEMSystem/sphereFluidParticles.cpp
|
||||
domainDistribute/domainDistribute.cpp
|
||||
DEMSystem/DEMSystem.cpp
|
||||
sphereDEMSystem/sphereFluidParticles.cpp
|
||||
#sphereDEMSystem/sphereDEMSystem.cpp
|
||||
#
|
||||
|
||||
)
|
||||
|
||||
set(link_libs Kokkos::kokkos phasicFlow Particles Geometry Property Interaction Interaction Utilities)
|
||||
|
|
|
@ -34,13 +34,13 @@ pFlow::DEMSystem::DEMSystem(
|
|||
{
|
||||
|
||||
REPORT(0)<<"Initializing host/device execution spaces . . . \n";
|
||||
REPORT(1)<<"Host execution space is "<< greenText(DefaultHostExecutionSpace::name())<<endREPORT;
|
||||
REPORT(1)<<"Device execution space is "<<greenText(DefaultExecutionSpace::name())<<endREPORT;
|
||||
REPORT(1)<<"Host execution space is "<< Green_Text(DefaultHostExecutionSpace::name())<<END_REPORT;
|
||||
REPORT(1)<<"Device execution space is "<<Green_Text(DefaultExecutionSpace::name())<<END_REPORT;
|
||||
|
||||
// initialize Kokkos
|
||||
Kokkos::initialize( argc, argv );
|
||||
|
||||
REPORT(0)<<"\nCreating Control repository . . ."<<endREPORT;
|
||||
REPORT(0)<<"\nCreating Control repository . . ."<<END_REPORT;
|
||||
Control_ = makeUnique<systemControl>(
|
||||
ControlDict_.startTime(),
|
||||
ControlDict_.endTime(),
|
||||
|
@ -87,4 +87,3 @@ pFlow::uniquePtr<pFlow::DEMSystem>
|
|||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ Licence:
|
|||
|
||||
#include "types.hpp"
|
||||
#include "span.hpp"
|
||||
#include "box.hpp"
|
||||
#include "virtualConstructor.hpp"
|
||||
#include "uniquePtr.hpp"
|
||||
#include "systemControl.hpp"
|
||||
|
@ -111,19 +112,31 @@ public:
|
|||
int32 numParInDomain(int32 di)const = 0;
|
||||
|
||||
virtual
|
||||
std::vector<int32> numParInDomain()const = 0;
|
||||
std::vector<int32> numParInDomains()const = 0;
|
||||
|
||||
virtual
|
||||
span<const int32> parIndexInDomain(int32 di)const = 0;
|
||||
span<const int32> parIndexInDomain(int32 domIndx)const = 0;
|
||||
|
||||
virtual
|
||||
span<real> parDiameter() = 0;
|
||||
|
||||
virtual
|
||||
span<realx3> parVelocity() = 0;
|
||||
span<realx3> acceleration()=0;
|
||||
|
||||
virtual
|
||||
span<realx3> parPosition() = 0;
|
||||
span<realx3> velocity() = 0;
|
||||
|
||||
virtual
|
||||
span<realx3> position() = 0;
|
||||
|
||||
virtual
|
||||
span<realx3> rAcceleration()=0;
|
||||
|
||||
virtual
|
||||
span<realx3> rVelocity() = 0;
|
||||
|
||||
virtual
|
||||
span<realx3> rPosition() = 0;
|
||||
|
||||
virtual
|
||||
span<realx3> parFluidForce() = 0;
|
||||
|
@ -153,7 +166,6 @@ public:
|
|||
bool iterate(real upToTime) = 0;
|
||||
|
||||
|
||||
|
||||
static
|
||||
uniquePtr<DEMSystem>
|
||||
create(
|
||||
|
@ -162,8 +174,6 @@ public:
|
|||
int argc,
|
||||
char* argv[]);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -47,10 +47,10 @@ maxBoundingBoxSize_(maxBoundingBox)
|
|||
}
|
||||
|
||||
bool pFlow::domainDistribute::locateParticles(
|
||||
ViewType1D<realx3,HostSpace> points, includeMask mask)
|
||||
ViewType1D<realx3,HostSpace> points, const pFlagTypeHost& mask)
|
||||
{
|
||||
|
||||
range activeRange = mask.activeRange();
|
||||
const rangeU32 activeRange = mask.activeRange();
|
||||
|
||||
|
||||
for(int32 di=0; di<numDomains_; di++)
|
||||
|
@ -59,7 +59,7 @@ bool pFlow::domainDistribute::locateParticles(
|
|||
}
|
||||
|
||||
|
||||
for(int32 i=activeRange.first; i<activeRange.second; i++)
|
||||
for(int32 i=activeRange.start(); i<activeRange.end(); i++)
|
||||
{
|
||||
if(mask(i))
|
||||
{
|
||||
|
|
|
@ -43,13 +43,10 @@ protected:
|
|||
|
||||
int32Vector_H numParInDomain_;
|
||||
|
||||
|
||||
real maxBoundingBoxSize_;
|
||||
|
||||
real domainExtension_ = 1.0;
|
||||
|
||||
using includeMask = typename pointStructure::activePointsHost;
|
||||
|
||||
void clcDomains(const std::vector<box>& domains);
|
||||
|
||||
public:
|
||||
|
@ -78,7 +75,7 @@ public:
|
|||
{
|
||||
return
|
||||
span<const int32>(
|
||||
particlesInDomains_[di].hostVectorAll().data(),
|
||||
particlesInDomains_[di].hostViewAll().data(),
|
||||
numParInDomain_[di]
|
||||
);
|
||||
}
|
||||
|
@ -91,7 +88,7 @@ public:
|
|||
|
||||
//template<typename includeMask>
|
||||
bool locateParticles(
|
||||
ViewType1D<realx3,HostSpace> points, includeMask mask);
|
||||
ViewType1D<realx3,HostSpace> points, const pFlagTypeHost& mask);
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue