Add the "lambda affine augmentation", the one from Jiang et al 2017
This MR adds what I call in the code comments the "lambda affine augmentation", which is the second formulation of the affine augmentation proposed by Jiang et al in their 2017 paper.
Similarly to FLIPX
, the user can use this formulation by setting the motion integration strategy (named velocity_update
in the code, I should rename it) to APIC-lambda
(replacing lambda
with its actual value, which should be within [0,1]). For instance, here are some valid values for velocity_update
: APIC-0
, APIC-0.5
, AFLIP-1
, AFLIP-0.2
. Note that the -
is important since it distinguishes the lambda
from the X
in AFLIPX
.
Bouncing cube results
I ran some bouncing cube simulations with different values of \lambda
, there is no difference compared to the initial formulation of the affine augmentation:
I checked that the code goes through the "lambda affine augmentation"-specific parts, so maybe I should check with a rotating cube simulation now (we should see a difference there).
What remains to do
-
add the motion integration related matrices (. DONE,B
,D
, andgV
) to the CSV files, and maybe take the opportunity to remove useless columns of 0s therebut I noticed that the CSV file are in fact completely overwritten at each new line, I should improve that.(After looking at it again months later, I think I got confused with the singular form of the variableparticle_data
, which contains data for all particles, not just one. So there is no issue after all). -
merge theDONEcompute_acceleration_velocity*
functions, to avoid duplicated code. -
improve the extraction of the value ofUSELESS\lambda
: it is currently re-extracted at each iteration. However, I see no difference in the execution time as is. -
addUSELESSAFLIPX-lambda
, which should be easy now that I added thesplit_string
function, although this strategy shouldn't be very useful.