BioDynaMo / biodynamo

BioDynaMo is a high-performance and modular, agent-based simulation platform.
Apache License 2.0
95 stars 46 forks source link

Switched absolute to relative additional radius #382

Open nicogno opened 2 months ago

nicogno commented 2 months ago

Larger virtual cell radii are currently considered when an interaction force is computed. This PR suggests switching to a virtual radius that is relative to the actual cell radius. This might affect the demos where cell interaction is involved.

nicogno commented 2 months ago

WIP: adapt all the tests

vasvav commented 2 months ago

I agree with the approach you proposed @nicogno. I'd be in favour however setting the 'additional_radius_scaling' parameter as an input argument to the function. It can be let to take a default value (i.e., 1.03 as you propose in your code changes) yet permit a user to tailor the value to their needs - instead of restricting it to a fixed parameter value, isn't it?

TobiasDuswald commented 1 month ago

The force is a function so it would have to be a member variable together with some appropriate void Set[...](double val) and double Get[...](double val) functions. Optionally one could add this parameter to param.h. Either way, it would be nice if one could easily control these parameter via an interface that does not require rebuilding BDM. 👍

nicogno commented 1 month ago

Adapted tests and made the value adjustable by the user

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

TobiasDuswald commented 1 month ago

Changes look all good to me. Just wondering, have you checked if/how it affects the demos?