VasiliBaranov / packing-generation

Hard-sphere packing generation in C++ with the Lubachevsky–Stillinger, Jodrey–Tory, and force-biased algorithms and packing post-processing.
MIT License
106 stars 43 forks source link

'WARNING: innerDiameterRatio incorrect' in the log #19

Closed vinguyen3685 closed 4 years ago

vinguyen3685 commented 4 years ago

Hi Vasili,

I am using your code to generate polydisperse packing. I was able to create the monodisperse packing without any issue. When I tried to create the polydisperse packing (using -ls), the code ran successfully with the appearance of packing.nfo and packing.xyzd. However, when I looked at the log, there were some points in the log saying that 'WARNING: innerDiameterRatio incorrect. Time: 0. Actual: 0.288589031681140, expected: 0.179275602617670. Closest pair: 601, 1225'. Could you please advise if the packing is correct despite the Warnings?

Thanks and best regards! Vi

VasiliBaranov commented 4 years ago

Hi Vi,

if it is only one or several warnings, and they are not repeated, it is fine. Also, if the final packing is generated correctly (see below), it is also fine. It happens because the program uses some heuristics to track nearest neighbors in the LS algorithm and they break at low densities.

The final packing is correct, if you do not see a message at the very end of the program like "ERROR: innerDiameterRatio XXX is not equal to min normalized distance from naive computation YYY in the pair AAA BBB" (see here https://github.com/VasiliBaranov/packing-generation/blob/master/PackingGeneration/Generation/PackingGenerators/Source/PackingGenerator.cpp#L129 ).

If you see too many warnings or the final packing is incorrect, please check the NOTE in point 1 in this section https://github.com/VasiliBaranov/packing-generation#22-program-usage-and-options-for-generation

Best, Vasili

VasiliBaranov commented 4 years ago

P.S. The sequence of commands to combine FBA and LS can be found here: https://github.com/VasiliBaranov/packing-generation#22-program-usage-and-options-for-generation

Alternatively, you can just use the FBA algorithm, it does not use this heuristics.

vinguyen3685 commented 4 years ago

Hi Vasili,

The warning happened at few points in the log not at the end). Moreover, it run faster without the warning when I combined FBA and LS.

Thank you so much for your support! Vi