diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-10-30 13:14:11 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-10-30 13:15:24 +0300 |
commit | 30b17e30f8f27c709efc0cefe99e0fcb9166d5dc (patch) | |
tree | 00fcc976895d7ac75f17aa08b61095fe5ebb4c9a /extern | |
parent | 57d77bd9226c33d1e8c93b2d8a2ad293680bf9a1 (diff) |
Fluid: Cleanup for APIC debug build setup
Fixes build issue
Diffstat (limited to 'extern')
-rw-r--r-- | extern/mantaflow/preprocessed/plugin/apic.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/extern/mantaflow/preprocessed/plugin/apic.cpp b/extern/mantaflow/preprocessed/plugin/apic.cpp index 100b26a4091..460c6459916 100644 --- a/extern/mantaflow/preprocessed/plugin/apic.cpp +++ b/extern/mantaflow/preprocessed/plugin/apic.cpp @@ -30,9 +30,7 @@ static inline IndexInt indexUFace(const Vec3 &pos, const MACGrid &ref) { const Vec3i f = toVec3i(pos), c = toVec3i(pos - 0.5); const IndexInt index = f.x * ref.getStrideX() + c.y * ref.getStrideY() + c.z * ref.getStrideZ(); - assertDeb(ref.isInBounds(index), - "Grid index out of bounds for particle position [" << pos.x << ", " << pos.y << ", " - << pos.z << "]"); + assertDeb(ref.isInBounds(index), "Grid index out of bounds"); return (ref.isInBounds(index)) ? index : -1; } @@ -40,9 +38,7 @@ static inline IndexInt indexVFace(const Vec3 &pos, const MACGrid &ref) { const Vec3i f = toVec3i(pos), c = toVec3i(pos - 0.5); const IndexInt index = c.x * ref.getStrideX() + f.y * ref.getStrideY() + c.z * ref.getStrideZ(); - assertDeb(ref.isInBounds(index), - "Grid index out of bounds for particle position [" << pos.x << ", " << pos.y << ", " - << pos.z << "]"); + assertDeb(ref.isInBounds(index), "Grid index out of bounds"); return (ref.isInBounds(index)) ? index : -1; } @@ -50,9 +46,7 @@ static inline IndexInt indexWFace(const Vec3 &pos, const MACGrid &ref) { const Vec3i f = toVec3i(pos), c = toVec3i(pos - 0.5); const IndexInt index = c.x * ref.getStrideX() + c.y * ref.getStrideY() + f.z * ref.getStrideZ(); - assertDeb(ref.isInBounds(index), - "Grid index out of bounds for particle position [" << pos.x << ", " << pos.y << ", " - << pos.z << "]"); + assertDeb(ref.isInBounds(index), "Grid index out of bounds"); return (ref.isInBounds(index)) ? index : -1; } @@ -63,9 +57,7 @@ static inline IndexInt indexOffset( const IndexInt dY[2] = {0, ref.getStrideY()}; const IndexInt dZ[2] = {0, ref.getStrideZ()}; const IndexInt index = gidx + dX[i] + dY[j] + dZ[k]; - assertDeb(ref.isInBounds(index), - "Grid index out of bounds for particle position [" << pos.x << ", " << pos.y << ", " - << pos.z << "]"); + assertDeb(ref.isInBounds(index), "Grid index out of bounds"); return (ref.isInBounds(index)) ? index : -1; } @@ -125,7 +117,7 @@ struct knApicMapLinearVec3ToMACGrid : public KernelBase { { // u-face const IndexInt gidx = indexUFace(pos, vg); if (gidx < 0) - return; // debug will fail + return; // debug will fail before const Vec3 gpos(f.x, c.y + 0.5, c.z + 0.5); const Real wi[2] = {Real(1) - wf.x, wf.x}; @@ -137,7 +129,7 @@ struct knApicMapLinearVec3ToMACGrid : public KernelBase { const Real w = wi[i] * wj[j] * wk[k]; const IndexInt vidx = indexOffset(gidx, i, j, k, vg); if (vidx < 0) - continue; // debug will fail + continue; // debug will fail before mg[vidx].x += w; vg[vidx].x += w * vel.x; @@ -395,7 +387,7 @@ struct knApicMapLinearMACGridToVec3 : public KernelBase { { // u-face const IndexInt gidx = indexUFace(pos, vg); if (gidx < 0) - return; // debug will fail + return; // debug will fail before const Real wx[2] = {Real(1) - wf.x, wf.x}; const Real wy[2] = {Real(1) - wc.y, wc.y}; @@ -405,7 +397,7 @@ struct knApicMapLinearMACGridToVec3 : public KernelBase { { const IndexInt vidx = indexOffset(gidx, i, j, k, vg); if (vidx < 0) - continue; // debug will fail + continue; // debug will fail before const Real vgx = vg[vidx].x; vp[idx].x += wx[i] * wy[j] * wz[k] * vgx; |