A particle-mesh method deposits the current mass on nodes, solves for its gravitational field and samples that force back at the particles. Repeating these operations lets the changed density influence motion after crossing.
Assigning all mass to the nearest node would make the deposited field jump when a particle crossed the halfway point. Cloud-in-cell, or CIC, shares its mass between neighbouring nodes: two in one dimension and eight corners in three. The particle stays where it is; these are weights for computing a field.
Let f be the fractional distance between two nodes. The left and right weights are 1−f and f. A unit mass one-quarter of the way across deposits 0.75 and 0.25 mass units.
w0=1−f,w1=f,w0+w1=1
The weights are nonnegative and sum to one. Three-dimensional corner weights multiply the three directional factors, so their sum is still one.Original assignment diagram. The white dot is one particle; coloured circles are node masses. Arrows show mass weights for field calculation, not particle motion. At fractional positions 0.25 and 0.8, the two weights sum to one. Open the full figure
With Ng nodes per axis and Np equal-mass particles, let wgp denote the weight deposited by particle p on node g. Normalising by a grid volume gives density relative to the mean at the same epoch.
Adding all node masses must recover the original total. Check that first, then form the contrast δ=ρ/ρˉ−1. Forcing a measured mean back to unity could conceal missing periodic weights.
ρˉρg=NpNg3p∑wgp,g∑wgp=1
The expansion factors in physical cell volume and mean density cancel in the ratio. Total mass remains fixed.
Each periodic Fourier wave has an integer vector n. Its dimensionless wavenumber is ky=2πn, while the dimensional comoving wavenumber is k=2πn/L. The constant, zero mode belongs to the mean background that sets expansion.
The scaled potential obeys ∇y2U=3δ/2. A second spatial derivative of a Fourier wave contributes minus its squared wavenumber, letting us solve each mode separately. CIC deposition smooths the density, and interpolating the force applies another smoothing. The declared operator explicitly corrects those two average windows.
Define sincx=sinx/x, with continuous value one at zero. The window and retained modes appear below. FFT is a fast way to perform the discrete transform; the mesh and cutoff still determine its physical resolution.
Wn=j=1∏3sinc2(Ngπnj),Un=−2∣ky∣2Wn23δn
Use this for nonzero modes satisfying ∣n∣≤Ng/3. Other modes and the zero potential mode vanish. The low-pass force retains finite-grid errors.
After the inverse transform, force points down the potential gradient. We use a four-point central derivative along each axis, with dimensionless grid spacing h=1/Ng, then interpolate with the same CIC weights used for deposition.
For Ng=16 and L=20Mpc, nodes are 1.25Mpc apart in comoving units, and the Fourier cutoff further limits short waves. Particles can crowd much more closely than this even though the force remains coarse. Internal details of dense knots need a separate resolution study.
(∂jU)i≃12h8(Ui+1−Ui−1)−(Ui+2−Ui−2)
The Fourier potential solve and this derivative together define the actual operator. The reduced PM calculation does not add GADGET-2’s short-range tree force.
Force changes momentum and momentum advances position. Symmetric kick–drift–kick stepping first updates part of the momentum using the old force, moves the positions, solves for their new force and completes the momentum update.
For a step from a0 to a1, take am=a0a1, consistent with logarithmic spacing. The EdS background lets us integrate the expansion factors exactly. Write the drift and kick factors as D and K to distinguish them from a density growth factor.
Check the factors on an arithmetic example: a0=0.25 to a1=0.36 gives D=2(2−1/0.6)=2/3 and K=2(0.6−0.5)=0.2. Actual trajectories divide their interval into many small steps and update density and force throughout.
At fixed mesh, doubling the step count tests temporal error in the same operator. Keeping the continuous initial condition and refining particles and mesh tests spatial and sampling errors. An independent adaptive integrator checks the former; planar collapse and linear growth also supply analytic or independent-force limits.
Mass must be conserved. Kinetic plus potential energy is generally not constant in an expanding background, and symmetric stepping alone does not prove exact energy conservation. A useful readout must still be checked under the refinement and reference appropriate to it.
How does a unit mass at fractional coordinate f=0.8 split between its two nodes?
Read the explanation
The left receives 0.2 and the right 0.8, summing to one. Motion changes these weights continuously.
With 16 cells per axis and L=20Mpc, does saving 257 frames instead of 129 improve force resolution?
Read the explanation
It changes how often motion is recorded. Node spacing remains 1.25Mpc and the cutoff is unchanged. Force resolution needs an appropriate mesh and particle refinement.
Why check raw deposited mass before subtracting the mean background?
Read the explanation
It reveals lost particles or periodic weights. Removing the mean isolates gravity relative to the background; rescaling the deposit first could hide a mass error behind a correct-looking mean.
Choose An oblique web and predict how an updated force might change motion near a fold.
Overlay the displacement reference and pause late in the evolution. Compare positions and long-wave power at the same initial condition and expansion factor.
Export the full native record, inspect its saved epochs and explain the difference between denser output times and finer integration steps.
Focused reading: Section 2.1, equations 1–3; Section 3.2/3.2.1, equations 20–23; Section 4.1, equations 26–31, with original pages 3 and 11 viewed. Supplies cosmological momentum, PM windows and time-integration context. The teaching calculation specifies its own cutoff and finite gradient and adds no short-range tree force.
Original accepted kernel/linear, nonlinear and five-preset F64 calculations support the teaching figures and calibration. This small public ZIP contains only an exact current-state small-wave fixture, an independent NumPy/SciPy trajectory replay and expected output. The fixture was generated through the frozen model and canonical serializer in Node, not downloaded in a browser. Large raw preset archives remain separately retained; no Engine or source paper is included.
Keep reading
What this page links to directly
You are hereHow Mesh Gravity Follows Folding Matter