Adaptive mesh refinement in spacetime evolution
Count refinement costs and connect time synchronization, interpolation and characteristic resolution.
On this page
The question for today
What you’ll understand
- Count cell-update work for a declared nested-grid model.
- Calculate local timestep limits including the fastest modeled characteristic.
- Explain why refinement interfaces and regridding belong in an accuracy study.
A strong-field spacetime contains several spatial scales: near-horizon structure, orbit-scale dynamics, and radiation traveling toward distant extraction surfaces. Uniformly resolving the smallest scale across the entire domain can be expensive. Mesh refinement concentrates points where they are needed, but introduces interfaces and multiple clocks. The numerical question is therefore not merely how many points were added. It is whether information moves between resolutions with compatible accuracy, stability and constraint behavior.
Declare the grid hierarchy and its work model
For a Cartesian three-dimensional hierarchy, halving the spacing increases the number of cells in a fixed physical region by eight. An explicit hyperbolic method often also halves the stable timestep there, adding another factor of two in work per fixed physical time. A uniform fine-grid evolution can therefore cost roughly sixteen times a coarse one under a simple equal-work-per-cell-update model. Memory growth and communication introduce different scaling factors.
A small refined patch can reduce that ideal cost, especially when subcycling lets fine levels take more steps than coarse levels. State whether covered coarse cells are still evolved, which ghost zones are counted, and whether a patch volume is a fraction of the physical domain or of an array's point count. Without those definitions, two apparently inconsistent cost estimates may simply be counting different work. Real performance also depends on parallel balance, interpolation and memory traffic.
Synchronize levels and resolve all relevant speeds
A Courant-type restriction compares timestep with spacing divided by the largest characteristic speed that matters to the discretization. Gauge and constraint speeds can be larger than the physical light speeds in coordinates. A refinement ratio two naturally suggests two fine substeps per coarse step when the speed bounds are comparable. If those bounds vary strongly, the hierarchy needs a consistent scheduling rule rather than a purely geometric assumption.
Fine-grid boundary values typically require interpolation from coarser data at intermediate times. Restriction transfers fine information back to a coarse level, while regridding changes which points belong to each level. Each operation can introduce errors. High-order interior finite differences cannot by themselves repair a lower-order interface treatment that dominates the global solution. Conservation, constraint preservation and interpolation accuracy are related goals but are not interchangeable properties.
Audit interfaces with propagating and geometric tests
A wave crossing a refinement boundary can acquire phase error or spurious reflection, even when each uniform-grid scheme behaves well in isolation. Useful verification therefore includes waves at different incidence angles, moving refinement patches, and smooth gauge or exact-solution tests. Constraint norms should be examined near interfaces as well as over the full domain. An average norm can hide localized spikes that later propagate into a wave-extraction region.
Refinement criteria based on a particular variable are coordinate dependent and may miss another physically relevant scale. A coordinate horizon can be small while outgoing radiation still needs adequate resolution farther out. Error indicators, patch motion and extraction surfaces should therefore be included in a convergence study. The tiny cell-count example below isolates scheduling arithmetic; it supplies neither an error estimate nor evidence that a particular binary spacetime has been resolved.
Work it through
A finite nested-grid work count
Evolve a coarse cube with cells for four coarse steps. Retain and evolve every coarse cell. Add one ratio-two fine patch covering one eighth of the physical domain, taking two fine substeps per coarse step. Ignore ghost zones, communication and interpolation. Compare total cell updates with a uniform ratio-two fine grid over the same physical duration.
The coarse grid has 512 cells and contributes updates. The patch covers 64 coarse-cell volumes; eight fine cells per such volume give 512 fine cells.
The fine patch takes eight steps and contributes updates. Total nested-grid work is 6144 updates, three times the coarse-only count under the stipulated accounting.
A uniform fine grid has cells and takes eight steps, giving 32768 updates. The nested total is 0.1875 of that count, or an ideal work reduction by about 5.33. No accuracy or real-runtime conclusion follows from these counts alone.
The declared hierarchy requires 6,144 cell updates versus 32,768 for uniform refinement, before the explicitly excluded overheads.
The living notebook
Explore the model
Interactive lab · roofline
An ideal work count leaves hardware limits open
Reset and set operational intensity one and bandwidth 100; predict synthetic ceiling 100 GFLOP per second. Compare a fresh Reset run at intensity ten and bandwidth 100; predict the fixed compute ceiling 1000 GFLOP per second. This hypothetical roofline does not measure an AMR code, account for communication, or predict a binary simulation runtime.
- Attainable ceiling
- 640 GFLOP/s
- Ridge intensity
- 12.5 FLOP/byte
- Ceiling regime
- Memory-bound ceiling
Synthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forCell counts and attainable hardware ceilings are distinct ingredients; neither alone establishes actual performance or numerical accuracy.
Pause & reason
Check your understanding
Your turn
Try it yourself
For a toy explicit method use spacing , fastest coordinate characteristic speed two, and allowed Courant factor 0.4. Find the coarse timestep limit and the ratio-two fine limit. How many fine steps synchronize with one coarse step under equal speed bounds?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use the fastest stated characteristic, not an assumed light speed of one. Both levels use the same Courant factor.
Compare with the solution
The coarse estimate is . The fine spacing is , giving timestep . Two fine steps synchronize with one coarse step. These values are conditional on the stipulated speed bounds and integrator allowance. If a gauge mode becomes faster or an interface scheme imposes a tighter restriction, this arithmetic must be revisited before calling the schedule stable.
Keep the idea
Take it with you
- Refinement reduces ideal work only for a specified hierarchy and schedule.
- Every relevant characteristic speed belongs in timestep planning.
- Interfaces and regridding require their own convergence and constraint checks.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.