Skip to content

Coordinates, Grids, and Domain Mappings

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.

Coordinates locate geometric fields; grids sample their coordinate representation; domain maps move, stretch, or compactify those samples. Confusing these layers creates subtle errors: a correct tensor can be differentiated with a wrong map Jacobian, a moving grid can violate conservation, and a coordinate singularity can be mistaken for physical under-resolution. A reliable mapping implementation supplies forward and inverse maps, Jacobians and time derivatives, regularity domains, and tests that constant or analytic fields remain correct under motion.

Helpful background. Formulations of General Relativity supplies geometric variables and gauge, Ordinary Differential Equations supplies evolution and interpolation concepts, Computational Relativity supplies common evidence standards, and Probability and Statistical Inference supplies uncertainty and sampling concepts used in mesh studies.

Let grid coordinates ξ\boldsymbol\xi map to computational-frame coordinates x\mathbf x and then to inertial coordinates xˉ\bar{\mathbf x},

xˉi=Fi(xj(ξk),t).\bar x^i=F^i\bigl(x^j(\xi^k),t\bigr).

The code needs FF, its inverse, the Jacobian Jij=∂xˉi/∂xjJ^i{}_j=\partial\bar x^i/\partial x^j, inverse Jacobian, determinant, and mesh velocity vgi=∂tFi∣xv_g^i=\partial_tF^i|_{x}. Chain rules must specify which coordinates are held fixed. Tensor components may live in one frame while points are advanced in another; metadata should name both.

Simple maps include logarithmic radial stretching, compactification, cubed spheres, fisheye maps, and surface-fitted shells. A valid map has nonzero Jacobian determinant throughout its declared domain and enough differentiability for the discretization order. Coordinate axes and block corners need specialized regularity or overlapping domains, not merely smaller cells.

For binaries, a comoving grid can keep compact objects centered while an inertial frame describes asymptotic radiation. Rotation, scaling, translation, and shape maps are composed and controlled from measured horizon positions. Scheel et al. 2006, §§II–V and Figures 1–13 develops this dual-frame strategy and follows several binary orbits with a feedback controller; the paper does not evolve through merger.

Every composition must be tested in forward and inverse directions. Sample points throughout each domain, verify F−1(F(x))=xF^{-1}(F(x))=x to the precision expected from the nonlinear inverse, and compare analytic with finite-difference Jacobians. Track the minimum determinant and the distance of each object from its grid center. A controller that lags can stretch cells or invert a map before field variables visibly fail.

For conservation laws on a moving mesh, include the grid velocity in numerical fluxes and satisfy the geometric conservation law. A uniform state should remain uniform under arbitrary prescribed mesh motion—the free-stream preservation test. Failure indicates inconsistent metric factors or time integration, not physical dynamics.

In one dimension, the required correction follows directly from the chain rule. Let xˉ=F(ξ,t)\bar x=F(\xi,t), J=∂ξF>0J=\partial_\xi F\gt 0, vg=∂tFv_g=\partial_tF, and u^(ξ,t)=u(F(ξ,t),t)\widehat u(\xi,t)=u(F(\xi,t),t). Physical advection ut+auxˉ=0u_t+a u_{\bar x}=0 becomes

∂tu^+a−vgJ∂ξu^=0,∂t(Ju^)+∂ξ[(a−vg)u^]=0.\partial_t\widehat u+\frac{a-v_g}{J}\partial_\xi\widehat u=0, \qquad \partial_t(J\widehat u)+\partial_\xi[(a-v_g)\widehat u]=0.

The conservative form uses ∂tJ=∂ξvg\partial_tJ=\partial_\xi v_g, the one-dimensional geometric conservation law. Insert u^=u0\widehat u=u_0 constant: its residual is exactly u0(∂tJ−∂ξvg)u_0(\partial_tJ-\partial_\xi v_g). This calculation gives a test independent of the evolved wave and shows why grid velocity has a minus sign in the transport speed. Discretizing the map and flux separately must preserve the same cancellation to the intended accuracy.

Use the following mapped-wave record as a minimum reproducible test. Evolve

∂tu+∂xˉu=0,uex(t,xˉ)=sin⁡ ⁣[2π(xˉ−t)]\partial_tu+\partial_{\bar x}u=0, \qquad u_{\rm ex}(t,\bar x)=\sin\!\bigl[2\pi(\bar x-t)\bigr]

on the inertial cube (xˉ,yˉ,zˉ)∈[0,1]3(\bar x,\bar y,\bar z)\in[0,1]^3 with periodic boundaries and initial data u(0,xˉ)=sin⁡(2πxˉ)u(0,\bar x)=\sin(2\pi\bar x). Use the time-dependent grid map

xˉ=ξ+0.05sin⁡(2πξ)sin⁡(2πt),yˉ=η,zˉ=ζ,\bar x=\xi+0.05\sin(2\pi\xi)\sin(2\pi t), \qquad \bar y=\eta, \qquad \bar z=\zeta,

split into four blocks at ξ=1/4,1/2,3/4\xi=1/4,1/2,3/4. Its exact inverse may be found by a bracketed scalar solve, and its Jacobian satisfies ∂xˉ/∂ξ≥1−0.1π>0.68\partial\bar x/\partial\xi\geq1-0.1\pi\gt 0.68. Discretize with fourth-order centered differences and RK4 at CFL 0.20.2, run N3N^3 grids with N=32,64,128N=32,64,128 to t=1t=1, and compare with the analytic inertial solution. The comparison norm and phase error are

E2=[∑cVc(uc−uex,c)2∑cVcuex,c2]1/2,Δϕ=∣arg⁡u^1u^1,ex∣,E_2=\left[ \frac{\sum_c V_c(u_c-u_{{\rm ex},c})^2} {\sum_c V_cu_{{\rm ex},c}^2} \right]^{1/2}, \qquad \Delta\phi=\left|\arg\frac{\hat u_1}{\hat u_{1,{\rm ex}}}\right|,

where VcV_c is the inertial cell volume and u^1\hat u_1 is the independently evaluated fundamental Fourier coefficient. Accept the finest run only if E2≤10−5E_2\leq10^{-5}, Δϕ≤10−5 rad\Delta\phi\leq10^{-5}\,\mathrm{rad}, the maximum drift of an additional u=1u=1 free stream is at most 10−1210^{-12}, the sampled inverse error is at most 10−1210^{-12}, and the sampled Jacobian stays above 0.680.68. These thresholds and the expected fourth-order error ratio are acceptance criteria, not reported measurements.

Tie performance to the same accuracy test. For strong scaling, hold the 1283128^3 mapped cube fixed and use P/P0=1,2,4,8P/P_0=1,2,4,8 resources. For weak scaling, tile 1,2,4,81,2,4,8 identical unit-periodic mapped cubes along xˉ\bar x, assign one 1283128^3 tile per P0P_0 resources, and retain the same local wavelength and CFL factor. Record median wall time over seven measured repetitions after one warm-up, but count a layout only if its own E2E_2 and Δϕ\Delta\phi meet the thresholds above. First qualify one tile; if its mapped-wave error exceeds the target, refine the tile consistently in the entire scaling study.

Observed discrepancy: not available—specification only.

For spectral subdomains, smooth analytic fields should show exponential coefficient decay until roundoff; align non-smooth surfaces with interfaces. Grandclément and Novak 2009, §2.4.4, §§2.6.1–2.6.6 and §§3.1.1–3.1.3 explains domain maps, multidomain approximation, and numerical-relativity applications. For finite-volume meshes, verify conserved integrals and interface flux cancellation under motion.

A later strong-field benchmark tracks two black-hole centers in a rotating dual frame while measuring horizon invariants and an inertial waveform. Repeat with altered controller gains and map update cadence. Coordinate centering can improve resolution, but it is not physical evidence; mass, spin, constraints, and radiation must converge independently.

Pin map formulas and composition order, frame definitions, inverse tolerance, controller, interpolation, grid topology, derivative operators, time integrator, precision, and code revision. A clean interface could be map-test --config rotating-shells.toml --output run/, emitting pointwise inverse errors, Jacobians, determinant minima, free-stream errors, refinement data, and environment metadata. This specifies the rerun without claiming that an executable is supplied.

Reject a map with determinant approaching zero, inverse errors lacking a tolerance plateau, free-stream drift, loss of convergence at an unhandled block edge, or horizon centers leaving their safe domains. Other failure modes include composing maps in the wrong order, treating tensor components as scalars during interpolation, compactifying oscillatory waves without adequate resolution, and reporting improved coordinate centering while invariant errors worsen.

Map diagnostics must be sampled between evolution nodes as well as at them. A high-order polynomial map can have a positive determinant at every collocation point yet fold between points; denser independent sampling or an analytic bound is needed to exclude that breakdown.

A moving-grid evolution keeps both punctures exactly centered, but a uniform-density test develops a spatial pattern that converges only first order although the finite-volume scheme is nominally fifth order. Is the map successful?

Solution

No. Centering tests the controller, whereas the uniform-state drift exposes a failure of free-stream preservation, likely in grid-velocity fluxes or Jacobian time updates. Fix the geometric conservation law, verify forward and inverse maps and metric identities, then repeat the manufactured wave and strong-field invariants across resolution.

  • Grandclément, P., and Novak, J. (2009). “Spectral methods for numerical relativity.” Living Reviews in Relativity 12, 1. arXiv.
  • Scheel, M. A., Pfeiffer, H. P., Lindblom, L., et al. (2006). “Solving Einstein’s equations with dual coordinate frames.” Physical Review D 74, 104006. arXiv.