Skip to content

Add the "lambda affine augmentation", the one from Jiang et al 2017

Sacha Duverger requested to merge add/lambda_aa into custom_cbgeo

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:

total_energy_normalized

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 (B, D, and gV) to the CSV files, and maybe take the opportunity to remove useless columns of 0s there. DONE, but 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 variable particle_data, which contains data for all particles, not just one. So there is no issue after all).
  • merge the compute_acceleration_velocity* functions, to avoid duplicated code. DONE
  • improve the extraction of the value of \lambda: it is currently re-extracted at each iteration. However, I see no difference in the execution time as is. USELESS
  • add AFLIPX-lambda, which should be easy now that I added the split_string function, although this strategy shouldn't be very useful. USELESS
Edited by Sacha Duverger

Merge request reports