70 using namespace descriptors;
75 if constexpr (!useCubicBounds){
76 T distToWall = solidBoundary.
getIndicator()->signedDistance(position)-radius;
81 T penetrationDepth = -distToWall;
82 f( particle, normal, penetrationDepth );
85 f( particle, normal );
96 for (
int iDim=0; iDim<PARTICLETYPE::d; ++iDim){
97 T posParticleStart = position[iDim] - radius;
98 T posParticleEnd = position[iDim] + radius;
100 T distToWallOrig = posParticleStart - origin[iDim];
101 T distToWallEnd = end[iDim] - posParticleEnd;
105 if (distToWallOrig<=0){
108 T penetrationDepth = -distToWallOrig;
109 f( particle, normal, penetrationDepth );
111 f( particle, normal );
115 }
else if (distToWallEnd<=0){
118 T penetrationDepth = -distToWallEnd;
119 f( particle, normal, penetrationDepth );
121 f( particle, normal );