Calculate the number density of clusters with different sizes. The cluster number density is defined as \begin{equation} n(s,p) = \sum_{\text{MC-samples}} \frac{\text{number of clusters with size }s} {L^2\cdot\text{number of MC-samples}}. \end{equation} Direct calculations will usually give bad results, as there will be very few clusters with large sizes compared to the numbers of clusters with small sizes. This is circumvented by doing logarithmic binning and averaging, i.e. \begin{equation} n\left([s+\Delta s),p\right) = \sum_{\text{MC-samples}} \frac{\text{number of clusters with size }s \in[s,s+\Delta s)} {\Delta s\cdot L^2\cdot\text{number of MC-samples}}, \label{eq:nsp} \end{equation} where \(\Delta s\) are logarithmically distributed. After execution, bin_mids will contain the centres of the bins.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | p | Probability for a given site to allow transport. |
||
integer, | intent(in) | :: | L | Percolating systems will be \(L\times L\). |
||
integer, | intent(in) | :: | num_samples | Results will be averaged over this number of Monte Carlo-samples. Sampling is parallelised. |
||
real(kind=dp), | intent(out), | dimension(:), allocatable | :: | bin_mids | Centres of bins. |
|
real(kind=dp), | intent(out), | dimension(:), allocatable | :: | results | Cluster number density in \eqref{eq:nsp}. |
|
real(kind=dp), | intent(in), | optional | :: | binsize_base | The edges of the logarithmically distributed bins will be integer powers of this number. Default: 1.5. |