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;
geometry_ = geometry::create(Control(), Property());
REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
particles_ = makeUnique<sphereFluidParticles>(Control(), Property());
insertion_ = makeUnique<sphereInsertion>(
Control().caseSetup().path()+insertionFile__,
particles_(),

View File

@ -56,8 +56,9 @@ pFlow::sphereFluidParticles::sphereFluidParticles(
bool pFlow::sphereFluidParticles::beforeIteration()
{
return sphereParticles::beforeIteration();
sphereParticles::beforeIteration();
zeroFluidForce_H();
zeroFluidTorque_H();
return true;
}

View File

@ -72,8 +72,11 @@ bool pFlow::sphereParticles::diameterMassInertiaPropId
bool pFlow::sphereParticles::initializeParticles()
{
int32IndexContainer indices(0, shapeName_.size());
int32IndexContainer indices(
0,
static_cast<int32>(shapeName_.size()));
return insertSphereParticles(shapeName_, indices);
}
@ -148,7 +151,7 @@ bool pFlow::sphereParticles::insertSphereParticles(
}
auto len = names.size();
realVector diamVec(len, RESERVE());
realVector massVec(len, RESERVE());
realVector IVec(len, RESERVE());
@ -160,6 +163,7 @@ bool pFlow::sphereParticles::insertSphereParticles(
ForAll(i, names )
{
if (diameterMassInertiaPropId(names[i], d, m, I, pId))
{
diamVec.push_back(d);
@ -297,7 +301,6 @@ pFlow::sphereParticles::sphereParticles(
fatalExit;
}
if(rVelIntegration_->needSetInitialVals())
{
@ -320,6 +323,7 @@ pFlow::sphereParticles::sphereParticles(
}
if(!initializeParticles())
{
fatalExit;

View File

@ -26,6 +26,7 @@ Licence:
#include "KokkosUtilities.hpp"
#include "ViewAlgorithms.hpp"
namespace pFlow
{
@ -79,8 +80,8 @@ public:
size_(end-begin),
views_("indexContainer", size_)
{
pFlow::fillSequence(views_.d_view, 0, size_, min_);
copy(views_.h_view, views_.d_view);
pFlow::fillSequence(views_.h_view, 0, size_, min_);
copy(views_.d_view, views_.h_view);
}