Last commit for estimates.h: 0d9f0800be49834ca3f9c51a13da668fcc0e397a

Serial md code

Ramses van Zon [2016-09-27 13:53:05]
Serial md code
#ifndef ESTIMATESH
#define ESTIMATESH

/* Function to estimate how many particle this region will hold at
   most. Based on the volume of the region and its density. Must be
   larger than Nmin.  The formula uses a base of 13 particles (for no
   reason), then allows for 2% systematic variations in the density
   and for 2*sqrt(N) statistical fluctuations in the number of
   particles. */
int estimateMaxNSelf(int Nmin, double rho, double localL[DIM]);

/* Function to estimate how many particle this region will get from
   an edge neighbor as ghost particles. Based on the maximal surface
   of an edge of the region, the size of a cell, and the average
   system density.  The formula uses a base of 6 particles (for no
   reason), then allows for 55% systematic variations in the density
   and for sqrt(N) statistical fluctuations in the number of
   particles. */
int estimateMaxNGhostPerFaceNeighbor(double rho, double localL[DIM], double cellsize[DIM]);
/* Function to estimate how many particle this region will get from an
   edge neighbor as ghost particles. Based on the temperature, the
   time step, and the range of the potential, as well as the maximal
   surface of an edge of the region.  There is almost no basis to this
   formulat. It uses a base of 1200 particles, scales with temperature
   and time step as a square root, allows with sqrt dependency of the
   result.  a*a is used as an estimate of the collisional cross
   section.  This is inherently the shakiest estimate of the bunch, as
   initial conditions can lead to a large number of exchanged
   particles initially.
 */
int estimateMaxNCrossThroughFace(double rho, double localL[DIM], double T, double dt, double a);

/* Function to estimate how many particle this region will get from a
   neighbor as ghost particles. Based on the maximal length of an
   edge of the region, the size of a cell, and the average system
   density.  The formula uses a base of 6 particles (for no reason),
   then allows for 55% systematic variations in the density and for
   sqrt(N) statistical fluctuations in the number of particles. */
int estimateMaxNGhostPerEdgeNeighbor(double rho, double localL[DIM], double cellsize[DIM]);

/* Function to estimate how many particle this region will get from a
   neighbor as ghost particles. Based on the size of a cell, and the
   average system density.  The formula uses a base of 2 particles
   (for no reason), then allows for 55% systematic variations in the
   density and for sqrt(N) statistical fluctuations in the number of
   particles. */
int estimateMaxNGhostPerCornerNeighbor(double rho, double cellsize[DIM]);

/* Estimate estimate of the maximum number of particles a given
   processor will have to store at most (including ghost
   particles) */
int estimateNmax(int Nmin, double rho, double localL[DIM], double cellsize[DIM]);

/* Estimate estimate of the maximum number of interactions a given
   processor will have to compute per time step (including with ghost
   particles) */
long long estimateNpairsmax(int Nmin, double rho, double localL[DIM], double cellsize[DIM]);

#endif
ViewGit