diff --git a/docs/src/LowLevel.md b/docs/src/LowLevel.md index 11ff1588..bf3713eb 100644 --- a/docs/src/LowLevel.md +++ b/docs/src/LowLevel.md @@ -543,6 +543,14 @@ This parameter determines how fine is the mesh of cells. There is a trade-off be As a rough guide, `lcell > 1` is only worthwhile if the number of particles per cell is greater than `~200-400`. +!!! note + The number of cells in which the particles will be classified is, for each dimension `lcell*length/cutoff`. + Thus if the `length` of the box is too large relative to the `cutoff`, many cells will be created, and this + imposes a perhaps large memory requirement. Usually, it is a good practice to limit the number of cells to + be not greater than the number of particles, and for that the cutoff may have to be increased, if there is + a memory botleneck. A reasonable choice is to use `cutoff = max(real_cutoff, length/n^(1/D))` where `D` is the + number of particles and `D` is the dimension (2 or 3). With that the number of cells will be close to `n` in the worst case. + ## Output progress For long-running computations, the user might want to see the progress. A progress meter can be turned on with the `show_progress` option. For example: diff --git a/docs/src/PeriodicSystems.md b/docs/src/PeriodicSystems.md index de9d03be..deaf462b 100644 --- a/docs/src/PeriodicSystems.md +++ b/docs/src/PeriodicSystems.md @@ -611,6 +611,14 @@ Most times using `lcell=1` (default) or `lcell=2` will provide the optimal perfo dense systems, or systems for which the number of particles within the cutoff is very large, larger values of `lcell` may improve the performance. To be tested by the user. +!!! note + The number of cells in which the particles will be classified is, for each dimension `lcell*length/cutoff`. + Thus if the `length` of the box is too large relative to the `cutoff`, many cells will be created, and this + imposes a perhaps large memory requirement. Usually, it is a good practice to limit the number of cells to + be not greater than the number of particles, and for that the cutoff may have to be increased, if there is + a memory botleneck. A reasonable choice is to use `cutoff = max(real_cutoff, length/n^(1/D))` where `D` is the + number of particles and `D` is the dimension (2 or 3). With that the number of cells will be close to `n` in the worst case. + ## Complete example codes - [Simple energy computation](@ref)