Gravity Tests

Tests for gravity methods.

Completion-Time Tests

Runs gravity method using cg solver. Outputs mesh, phi, rho, x acceleration, y acceleration image files. Tests succeed or fail based on the final completion time of the simulation.


Tests EnzoMethodGravityCg at P=1 in 2D.


Tests EnzoMethodGravityCg at P=8 in 2D.


These tests are associated with a dedicated python-script that runs a test problem with a known analytic solution.


The basic setup for this test is to initialize a 1D stable Jeans wave in a 3D box that is inclined with respect all 3 Cartesian axes. Enzo-E writes the initial snapshot to disk, evolves the wave over a complete period, and then writes the final snapshot result to disk. Then the python script computes the \(L_1\) error norm computed by comparing values in the initial and final snapshots (the analytic solution expects them to be identical) and compares it with a precomputed value.

For this test to pass, the gravity solver and hydro solver’s gravity source terms must each be implemented correctly. At this time, this test has only been defined to use the VL+CT solver (without magnetic fields) and the cg-solver. The python script invokes the test at 2 resolutions (16 cells per wavelength and 32 cells per wavelength).

To invoke this test, invoke the following command from the root directory of the repository:

python input/Gravity/ \
  --launch_cmd <path-to-enzoe-binary>

where <path-to-enzoe-binary> is replaced with the path to the Enzo-E binary that you want to test. The test prints a summary of the results to stdout and an exit code of of 0 indicates that all subtests passed.