19.5 Unit Tests

There are two unit tests for the gravity unit. Poisson3 is essentially the Maclaurin spheroid problem described in Sec:SimulationMacLaurin. Because an analytical solution exists, the accuracy of the gravitational solver can be quantified. The second test, Poisson3_active is a modification of Poisson3 to test the mapping of particles in Grid_mapParticlesToMesh. Some of the mesh density is redistributed onto particles, and the particles are then mapped back to the mesh, using the analytical solution to verify completeness. This test is similar to the simulation PoisParticles discussed in Sec:SimulationPoisParticles. PoisParticles is based on the Huang-Greengard Poisson gravity test described in Sec:SimulationPoisTest.