← Back to team overview

yade-users team mailing list archive

Compress stuff faster and better

 

I will commit soon StaticAttractionEngine (which can compress just
about anything) and derived from it StaticSpheresAttractionEngine
(which works only on isDynamic Spheres).


doxygen comment about it:

Compress stuff faster and better!

Faster compression is done by attracting everything to everything using
classical gravitational equation, related to distance. And assuming that 
everything has equal mass: 
               
              D = 1/r^2,

where D is displacement delta, and r is radius. (Units intentionally do
not add: [meter] = [1/m^2]. For unit correctness just multiply by [m^3] )

Forces are NOT used here. Only displacement value, which is normalized
afterwards, which means that ALL values of D (for each body) are <= 1.
Then all D (for all bodies) are multiplied by whatever returns the virtual
function getMaxDisplacement(MetaBody*). Function doesItApplyToThisBody(Body*)
is used to check if Body should be considered for displacement. This
function can for example check if isDynamic.

This engine should be used at the end of the loop, because it directly
changes position of bodies.

After the compression stage is over, engine should be disabled by
setting active=false;

-- 
Janek Kozicki                                                         |
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users



Follow ups