Skip to content

Meshes, Adaptivity, and High-Performance Computing

Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

Scrollable table. Use Left and Right arrow keys to reveal additional columns.

Scrollable figure. Use Left and Right arrow keys to inspect hidden content.

Meshes and machines become scientifically useful only when they reduce error or resources for a declared relativistic observable. Coordinate maps, refinement interfaces, element boundaries, partitions, and precision choices all enter the numerical method and can change the answer. This chapter builds those layers in order, ending with a performance comparison at equal target error rather than equal cell count or nominal hardware. No speed figure is detached from its workload, environment, and validation checks.

Helpful background. Formulations of General Relativity supplies evolved systems and gauge, Ordinary Differential Equations supplies time integration, Computational Relativity supplies shared evidence practices, and Probability and Statistical Inference supplies uncertainty treatment for timings and refinement comparisons.

The common requirement is to preserve the physical problem under infrastructure changes. A mapping must preserve free streams and tensor transformations; AMR must preserve conservation and convergence across interfaces; spectral elements must respect regularity; parallel layouts and precision changes must remain within the physical error budget. The environment record pins maps, mesh, transfer operators, process or device layout, arithmetic, software stack, and code revision.

Two benchmark families recur. Smooth analytic waves expose phase, interface reflection, and convergence. Stationary or binary black holes add horizons, constraints, dual frames, and production-like load. The physical diagnostics are run alongside timing and memory measures, never after performance settings have been selected.

Coordinates, Grids, and Domain Mappings distinguishes grid, computational, and inertial frames and tests forward maps, inverses, Jacobians, and free-stream preservation. Adaptive Mesh Refinement adds prolongation, restriction, subcycling, refluxing, buffers, and tag sweeps around a pulse-crossing benchmark.

Multi-Domain and Spectral Element Decomposition chooses hh- or pp-refinement according to regularity and contrasts aligned with unresolved non-smooth features. Parallel Decomposition and Load Balance measures strong and weak scaling with real baselines, named machines, and compute–communication–idle breakdowns.

Accelerators and Mixed Precision compares all-high and mixed arithmetic at the same physics tolerance, with an evidence cutoff of 2026-08-18 and explicit counterexamples. Computational Cost and Numerical Accuracy closes the chain with resources required for a validated result rather than raw throughput.

Checking the numerical and parallel algorithms together

Section titled “Checking the numerical and parallel algorithms together”

Map, mesh, parallel, and precision studies must be crossed rather than performed in isolation. A smaller block can improve load balance but increase interface error; a lower precision can accelerate a kernel but change a nonlinear fallback; aggressive AMR can reduce cell count but amplify synchronization noise. Record a Pareto set of error, wall time, allocation, memory, and energy where measured.

Grandclément and Novak 2009, §§2.4–3.1 connects coordinate maps, multidomain approximation, and relativity applications. Kidder et al. 2017, §§4–6 connects elements, task parallelism, and measured performance. Neither source makes a particular infrastructure choice universally optimal; application-specific benchmark evidence decides.

Independent checks include analytic maps, a uniform fine grid against AMR, finite-volume versus spectral approximation at matched error, process-count invariance, and an all-high-precision control. Preserve failed and saturation cases because they delimit validity. Commands on the child pages describe reproducibility interfaces only; they do not imply that absent code was executed.

Scaling is tied to a machine and workload. Exponential convergence assumes smooth mapped fields. AMR cannot restore information aliased on its base grid. Mixed precision is safe only for tested operations and observables. Performance portability means one code can execute effectively across architectures; it does not promise equal speed or identical reductions everywhere.

Diagnostic. A mixed-precision AMR run is six times faster than a uniform high-precision baseline. It uses a different error tolerance, and its refinement-interface reflection is larger than the waveform uncertainty target. What comparison is still valid?

Solution

Only the literal wall-time comparison between two different numerical tasks is established; it is not a speedup to the same scientific result. Match tolerances and observables, refine or repair the interface treatment, include an all-high-precision AMR control, and compare resources at the shared waveform-error target. Then attribute gains separately to adaptivity, arithmetic, and hardware.

A two-level Cartesian AMR hierarchy evolves a full coarse grid containing NN cells. A fraction 1/81/8 of its volume is additionally covered by a ratio-two fine grid in three dimensions. The fine level takes two steps per coarse step. Ignoring ghost cells, transfers, and communication, compare stored cells and cell updates with a uniform grid at the fine spacing.

Solution

The fine patch contains (1/8)23N=N(1/8)2^3N=N cells, so the hierarchy stores 2N2N cells, including the covered coarse cells. In one coarse time interval it performs N+2N=3NN+2N=3N cell updates. A uniform fine grid stores 8N8N cells and performs 16N16N updates over that interval. The idealized reductions are factors four in storage and 16/316/3 in work. Real savings are smaller or differently distributed because synchronization, ghost zones, imbalance, and I/O cost time. This counting establishes no accuracy claim: the coarse exterior and interfaces must still meet the observable’s error target.

  • Grandclément, P., and Novak, J. (2009). “Spectral methods for numerical relativity.” Living Reviews in Relativity 12, 1. arXiv.
  • Kidder, L. E., Field, S. E., Foucart, F., et al. (2017). “SpECTRE: A task-based discontinuous Galerkin code for relativistic astrophysics.” Journal of Computational Physics 335, 84–114. arXiv.