diff --git a/src/cuda/pcisph_kernels.cu b/src/cuda/pcisph_kernels.cu index a0dac1aaf44261bb06286921004d64a77b8a7eff..0357fd886dce0eb74fd8fade7e94814cf864d4bb 100644 --- a/src/cuda/pcisph_kernels.cu +++ b/src/cuda/pcisph_kernels.cu @@ -140,7 +140,7 @@ __global__ void updatePressures( if (idx < numParticles) { float deltaP = -density_errors[idx] / A; - pressure_increments[idx] += deltaP; + pressure_increments[idx] = deltaP; } } diff --git a/src/cuda/pcisph_update.cu b/src/cuda/pcisph_update.cu index 34a73f90a56157c030c5f45fc9d1be9a454903f7..757f723c9d566f0da06e2d11c5c1c604c865c469 100644 --- a/src/cuda/pcisph_update.cu +++ b/src/cuda/pcisph_update.cu @@ -101,7 +101,7 @@ void updateParticles(float deltaTime) // ------------ Iterative Pressure Correction Loop -------------------- - const int maxIterations = 5; + const int maxIterations = 3; for (int iter = 0; iter < maxIterations; ++iter) { // Launch the boundary correction kernel diff --git a/src/settings/constants.h b/src/settings/constants.h index ba5edf11bdc986ecc96811eef5711f3c854c0356..d34d1ebfa2c2cf106a4a7e2fafdaeca598cb6bed 100644 --- a/src/settings/constants.h +++ b/src/settings/constants.h @@ -12,7 +12,7 @@ const float h_BOUND_Z_MAX = 4.0f; const float h_GAS_CONSTANT = 0.02f; const float h_VISCOSITY = 0.04f; -const float h_PARTICLE_MASS = 0.04f; +const float h_PARTICLE_MASS = 0.01f; const float h_REST_DENSITY = 800.0f; const float h_PI = 3.14159265358979323846f;