Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Fraser <alex@phatcore.com>2013-01-11 07:06:10 +0400
committerAlex Fraser <alex@phatcore.com>2013-01-11 07:06:10 +0400
commit17c428d4df91cab78f9f77c03e7973e0e806f045 (patch)
treede981ec10bfea6ec675326c7c2f114aabf33512e /source/blender/blenkernel/intern/particle_system.c
parent61833ddd5a9ddb0d43e8b7d64ddfd90ea7f4b529 (diff)
Changing units of stiffness parameter in classical (new) SPH solver: used to be speed of sound squared; now just speed of sound.
The classical SPH solver was not in 2.65, so this change is unlikely to affect many users. But beta users who have been trying it out will need to change the stiffness parameter to sqrt(old value).
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 3d777e46442..5eac86a7e77 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2697,7 +2697,8 @@ static void sphclassical_force_cb(void *sphdata_v, ParticleKey *state, float *fo
/* 4.77 is an experimentally determined density factor */
float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.0f);
- float stiffness = fluid->stiffness_k;
+ // Use speed of sound squared
+ float stiffness = pow2(fluid->stiffness_k);
ParticleData *npa;
float vec[3];