mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
centerPoint enhanced & DEMsystem modified for id
- center points enhanced to select particle ids based on the particles located in box, sphere and cylinder - readme.md modified - DEMsystem is modified to pass id
This commit is contained in:
@ -66,12 +66,13 @@ pFlow::uniquePtr<pFlow::DEMSystem>
|
||||
word demSystemName,
|
||||
const std::vector<box>& domains,
|
||||
int argc,
|
||||
char* argv[]
|
||||
char* argv[],
|
||||
bool requireRVel
|
||||
)
|
||||
{
|
||||
if( wordvCtorSelector_.search(demSystemName) )
|
||||
{
|
||||
return wordvCtorSelector_[demSystemName] (demSystemName, domains, argc, argv);
|
||||
return wordvCtorSelector_[demSystemName] (demSystemName, domains, argc, argv, requireRVel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -71,13 +71,15 @@ public:
|
||||
word demSystemName,
|
||||
const std::vector<box>& domains,
|
||||
int argc,
|
||||
char* argv[]
|
||||
char* argv[],
|
||||
bool requireRVel
|
||||
),
|
||||
(
|
||||
demSystemName,
|
||||
domains,
|
||||
argc,
|
||||
argv
|
||||
argv,
|
||||
requireRVel
|
||||
));
|
||||
|
||||
realx3 g()const
|
||||
@ -119,7 +121,10 @@ public:
|
||||
span<const int32> parIndexInDomain(int32 domIndx)const = 0;
|
||||
|
||||
virtual
|
||||
span<real> diameter() = 0;
|
||||
span<real> diameter() = 0;
|
||||
|
||||
virtual
|
||||
span<uint32> particleId() = 0;
|
||||
|
||||
virtual
|
||||
span<real> courseGrainFactor() = 0;
|
||||
@ -176,7 +181,8 @@ public:
|
||||
word demSystemName,
|
||||
const std::vector<box>& domains,
|
||||
int argc,
|
||||
char* argv[]);
|
||||
char* argv[],
|
||||
bool requireRVel=false);
|
||||
|
||||
};
|
||||
|
||||
|
@ -163,6 +163,12 @@ pFlow::grainDEMSystem::parIndexInDomain(int32 di)const
|
||||
return particleDistribution_->particlesInDomain(di);
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::grainDEMSystem::particleId()
|
||||
{
|
||||
return span<uint32>(particleIdHost_.data(), particleIdHost_.size());
|
||||
}
|
||||
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::grainDEMSystem::diameter()
|
||||
{
|
||||
return span<real>(diameterHost_.data(), diameterHost_.size());
|
||||
@ -233,6 +239,7 @@ bool pFlow::grainDEMSystem::beforeIteration()
|
||||
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
||||
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
||||
diameterHost_ = particles_->diameter().hostView();
|
||||
particleIdHost_ = particles_->particleId().hostView();
|
||||
|
||||
if(requireRVel_)
|
||||
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
||||
|
@ -63,6 +63,8 @@ protected:
|
||||
|
||||
ViewType1D<real, HostSpace> diameterHost_;
|
||||
|
||||
ViewType1D<uint32, HostSpace> particleIdHost_;
|
||||
|
||||
bool requireRVel_ = false;
|
||||
|
||||
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
||||
@ -122,6 +124,8 @@ public:
|
||||
|
||||
span<const int32> parIndexInDomain(int32 di)const override;
|
||||
|
||||
span<uint32> particleId() override;
|
||||
|
||||
span<real> diameter() override;
|
||||
|
||||
span<real> courseGrainFactor() override;
|
||||
|
@ -165,6 +165,11 @@ pFlow::sphereDEMSystem::parIndexInDomain(int32 di)const
|
||||
return particleDistribution_->particlesInDomain(di);
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::sphereDEMSystem::particleId()
|
||||
{
|
||||
return span<uint32>();
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::diameter()
|
||||
{
|
||||
return span<real>(diameterHost_.data(), diameterHost_.size());
|
||||
@ -235,6 +240,7 @@ bool pFlow::sphereDEMSystem::beforeIteration()
|
||||
velocityHost_ = std::as_const(particles_()).velocity().hostView();
|
||||
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
|
||||
diameterHost_ = particles_->diameter().hostView();
|
||||
particleIdHost_ = particles_->particleId().hostView();
|
||||
|
||||
if(requireRVel_)
|
||||
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
|
||||
|
@ -63,6 +63,8 @@ protected:
|
||||
|
||||
ViewType1D<real, HostSpace> diameterHost_;
|
||||
|
||||
ViewType1D<uint32, HostSpace> particleIdHost_;
|
||||
|
||||
bool requireRVel_ = false;
|
||||
|
||||
ViewType1D<realx3, HostSpace> rVelocityHost_;
|
||||
@ -122,6 +124,8 @@ public:
|
||||
|
||||
span<const int32> parIndexInDomain(int32 di)const override;
|
||||
|
||||
span<uint32> particleId() override;
|
||||
|
||||
span<real> diameter() override;
|
||||
|
||||
span<real> courseGrainFactor() override;
|
||||
|
Reference in New Issue
Block a user