Skip to content

Commit 095de32

Browse files
committed
fix compilation (cuda with sph)
1 parent db156bb commit 095de32

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void ParticlesRepulsionForceField<gpu::cuda::CudaVec3fTypes>::addDForce(const co
9090
Real kFactor = (Real)sofa::core::mechanicalparams::kFactorIncludingRayleighDamping(mparams,this->rayleighStiffness.getValue());
9191
Real bFactor = (Real)sofa::core::mechanicalparams::bFactor(mparams);
9292

93-
const VecCoord& x = this->mstate->read(core::ConstVecCoordId::position())->getValue();
93+
const VecCoord& x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
9494
GPURepulsion3f repulsion;
9595
repulsion.d = distance.getValue();
9696
repulsion.d2 = repulsion.d*repulsion.d;
@@ -142,7 +142,7 @@ void ParticlesRepulsionForceField<gpu::cuda::CudaVec3dTypes>::addDForce(const co
142142
Real kFactor = (Real)sofa::core::mechanicalparams::kFactorIncludingRayleighDamping(mparams,this->rayleighStiffness.getValue());
143143
Real bFactor = (Real)sofa::core::mechanicalparams::bFactor(mparams);
144144

145-
const VecCoord& x = this->mstate->read(core::ConstVecCoordId::position())->getValue();
145+
const VecCoord& x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
146146
GPURepulsion3d repulsion;
147147
repulsion.d = distance.getValue();
148148
repulsion.d2 = repulsion.d*repulsion.d;

applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void SPHFluidForceField<gpu::cuda::CudaVec3fTypes>::draw(const core::visual::Vis
234234
if (!vparams->displayFlags().getShowForceFields()) return;
235235
//if (m_grid != NULL)
236236
// grid->draw(vparams);
237-
helper::ReadAccessor<VecCoord> x = this->mstate->read(core::ConstVecCoordId::position())->getValue();
237+
helper::ReadAccessor<VecCoord> x = this->mstate->read(sofa::core::vec_id::read_access::position)->getValue();
238238
helper::ReadAccessor<gpu::cuda::CudaVector<type::Vec4f> > pos4 = this->data.pos4;
239239
if (pos4.empty()) return;
240240
glDisable(GL_LIGHTING);

0 commit comments

Comments
 (0)