bug fix for cudaRun in indexContainer
This commit is contained in:
parent
ef1e3c1e33
commit
80647e5103
|
@ -75,9 +75,11 @@ pFlow::sphereDEMSystem::sphereDEMSystem(
|
||||||
REPORT(0)<< "\nCreating surface geometry for sphereDEMSystem . . . "<<endREPORT;
|
REPORT(0)<< "\nCreating surface geometry for sphereDEMSystem . . . "<<endREPORT;
|
||||||
geometry_ = geometry::create(Control(), Property());
|
geometry_ = geometry::create(Control(), Property());
|
||||||
|
|
||||||
|
|
||||||
REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
|
REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
|
||||||
particles_ = makeUnique<sphereFluidParticles>(Control(), Property());
|
particles_ = makeUnique<sphereFluidParticles>(Control(), Property());
|
||||||
|
|
||||||
|
|
||||||
insertion_ = makeUnique<sphereInsertion>(
|
insertion_ = makeUnique<sphereInsertion>(
|
||||||
Control().caseSetup().path()+insertionFile__,
|
Control().caseSetup().path()+insertionFile__,
|
||||||
particles_(),
|
particles_(),
|
||||||
|
|
|
@ -56,8 +56,9 @@ pFlow::sphereFluidParticles::sphereFluidParticles(
|
||||||
|
|
||||||
bool pFlow::sphereFluidParticles::beforeIteration()
|
bool pFlow::sphereFluidParticles::beforeIteration()
|
||||||
{
|
{
|
||||||
return sphereParticles::beforeIteration();
|
sphereParticles::beforeIteration();
|
||||||
|
zeroFluidForce_H();
|
||||||
|
zeroFluidTorque_H();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,11 @@ bool pFlow::sphereParticles::diameterMassInertiaPropId
|
||||||
|
|
||||||
bool pFlow::sphereParticles::initializeParticles()
|
bool pFlow::sphereParticles::initializeParticles()
|
||||||
{
|
{
|
||||||
|
|
||||||
int32IndexContainer indices(0, shapeName_.size());
|
int32IndexContainer indices(
|
||||||
|
0,
|
||||||
|
static_cast<int32>(shapeName_.size()));
|
||||||
|
|
||||||
return insertSphereParticles(shapeName_, indices);
|
return insertSphereParticles(shapeName_, indices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +151,7 @@ bool pFlow::sphereParticles::insertSphereParticles(
|
||||||
}
|
}
|
||||||
|
|
||||||
auto len = names.size();
|
auto len = names.size();
|
||||||
|
|
||||||
realVector diamVec(len, RESERVE());
|
realVector diamVec(len, RESERVE());
|
||||||
realVector massVec(len, RESERVE());
|
realVector massVec(len, RESERVE());
|
||||||
realVector IVec(len, RESERVE());
|
realVector IVec(len, RESERVE());
|
||||||
|
@ -160,6 +163,7 @@ bool pFlow::sphereParticles::insertSphereParticles(
|
||||||
|
|
||||||
ForAll(i, names )
|
ForAll(i, names )
|
||||||
{
|
{
|
||||||
|
|
||||||
if (diameterMassInertiaPropId(names[i], d, m, I, pId))
|
if (diameterMassInertiaPropId(names[i], d, m, I, pId))
|
||||||
{
|
{
|
||||||
diamVec.push_back(d);
|
diamVec.push_back(d);
|
||||||
|
@ -297,7 +301,6 @@ pFlow::sphereParticles::sphereParticles(
|
||||||
fatalExit;
|
fatalExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(rVelIntegration_->needSetInitialVals())
|
if(rVelIntegration_->needSetInitialVals())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -320,6 +323,7 @@ pFlow::sphereParticles::sphereParticles(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!initializeParticles())
|
if(!initializeParticles())
|
||||||
{
|
{
|
||||||
fatalExit;
|
fatalExit;
|
||||||
|
|
|
@ -26,6 +26,7 @@ Licence:
|
||||||
#include "KokkosUtilities.hpp"
|
#include "KokkosUtilities.hpp"
|
||||||
#include "ViewAlgorithms.hpp"
|
#include "ViewAlgorithms.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace pFlow
|
namespace pFlow
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -79,8 +80,8 @@ public:
|
||||||
size_(end-begin),
|
size_(end-begin),
|
||||||
views_("indexContainer", size_)
|
views_("indexContainer", size_)
|
||||||
{
|
{
|
||||||
pFlow::fillSequence(views_.d_view, 0, size_, min_);
|
pFlow::fillSequence(views_.h_view, 0, size_, min_);
|
||||||
copy(views_.h_view, views_.d_view);
|
copy(views_.d_view, views_.h_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue