bug fix for cudaRun in indexContainer

This commit is contained in:
hamidrezanorouzi 2023-03-16 21:22:24 +03:30
parent ef1e3c1e33
commit 80647e5103
4 changed files with 16 additions and 8 deletions

View File

@ -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_(),

View File

@ -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;
} }

View File

@ -73,7 +73,10 @@ 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);
} }
@ -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;

View File

@ -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);
} }