Papers
Topics
Authors
Recent
Search
2000 character limit reached

Yin-Yang Grid Decomposition

Updated 2 June 2026
  • Yin-Yang grid decomposition is a structured overset grid method that discretizes the sphere without polar singularities or severe metric distortions.
  • It employs two overlapping low‐latitude patches that yield quasi-uniform cell shapes, reduce grid redundancy, and enable strong parallel scalability.
  • The technique enhances numerical simulation efficiency in fields such as magnetohydrodynamics, atmospheric flows, self-gravity modeling, and omnidirectional imaging.

The Yin-Yang grid decomposition is a structured overset grid methodology designed to discretize the surface and interior of the sphere without encountering coordinate singularities or severe metric distortions. It has become an essential paradigm in numerical simulations involving spherical geometries, with proven advantages for applications in computational magnetohydrodynamics, self-gravitating hydrodynamics, large-scale atmospheric/oceanic flows, and computer vision tasks involving omnidirectional imagery. The decomposition achieves quasi-uniform cell shapes, facilitates parallelization, and eliminates polar pathologies that afflict conventional spherical-polar meshes (Wongwathanarat et al., 2010, Wongwathanarat, 2019, Lee et al., 2024, Luo et al., 11 Aug 2025).

1. Geometric Construction and Coordinate Transformations

The standard Yin-Yang grid comprises two identical, overlapping “low-latitude” patches—Yin and Yang—each covering a broad swath of the sphere while excluding the polar singularities. On each patch, the mesh is a segment of a conventional spherical-polar grid, parameterized by radius rr, colatitude θ\theta, and longitude ϕ\phi: θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right] where δ\delta defines the overlap width in both angular directions. This coverage results in an overlap zone encompassing approximately 6% of the sphere’s surface for typical grid spacings.

The coordinate mapping between the Yin and Yang patches is achieved by a composition of a 180180^\circ rotation about the zz-axis followed by a 9090^\circ rotation about the xx-axis, yielding the transformation matrix: M=(100 001 010)M = \begin{pmatrix} -1 & 0 & 0 \ 0 & 0 & 1 \ 0 & 1 & 0 \end{pmatrix} Cartesian positions on the two patches are thus related as follows: θ\theta0 with analogous expressions for the angular variables via explicit forward and inverse spherical coordinate transforms (Wongwathanarat et al., 2010, Luo et al., 11 Aug 2025).

2. Overlap Handling, Ghost Zones, and Interpolation

The domain union of the Yin and Yang patches ensures every physical point (except near the minimal double overlap) is represented on at least one patch. Numerical solvers use “ghost zones” at the overlap boundaries, whose values are updated by interpolation of primitive variables from the other patch.

For each ghost cell centered at θ\theta1 in patch A, one computes the corresponding position in patch B, identifies the four nearest angular neighbors θ\theta2, and applies bilinear weights: θ\theta3 Vector quantities are transformed to a common, typically Cartesian, basis during interpolation and subsequently rotated back (Wongwathanarat et al., 2010, Luo et al., 11 Aug 2025).

To ensure mass and energy are not double-counted in overlap regions, grid cells are assigned precomputed weights: θ\theta4 Cells fully within the overlap contribute half; non-overlapping cells contribute unity in global reductions.

3. Advantages Over Standard Spherical-Polar Grids

The Yin-Yang decomposition possesses several notable numerical and algorithmic advantages:

  • Elimination of coordinate singularities: Each patch avoids the poles (θ\theta5), precluding vanishingly small azimuthal spacings and the associated time-step constraints (e.g., CFL-limited θ\theta6).
  • Uniform cell aspect ratios: Near-equatorial coverage and absence of polar clustering result in quasi-square surface cells across the sphere.
  • Reduced grid redundancy: The full sphere can be covered using up to 25% fewer grid cells compared to a full-sphere spherical-polar grid at comparable angular resolution.
  • Simple implementation: Existing directionally split Eulerian schemes in θ\theta7 can be adapted by doubling angular loops and adding interpolation, plus the standard matrix transformations.
  • Strong parallel scalability: Identical block structures on each patch and explicit handling of inter-patch communication allow easy MPI domain decomposition. For multi-physics solvers (e.g., hydrodynamics or MHD), coupling requires only consistent boundary updates and structure-preserving interpolation (Wongwathanarat et al., 2010, Luo et al., 11 Aug 2025, Wongwathanarat, 2019).

4. Extension to Multi-Patch Poisson Solvers

A critical innovation is the generalization of Poisson solvers for self-gravity, as presented by Wongwathanarat et al. The approach replaces the conventional superposition of per-patch solutions by computing gravitational potentials from the combined density distribution in a single, global spherical harmonics frame. This relies on “angular weights” derived from Wigner θ\theta8-matrices to rotate spherical harmonics between local and global coordinate systems: θ\theta9 For each patch, one precomputes the local mesh integrals of the basis functions (angular weights), rotation coefficients, and combines these to define global weights per angular cell.

At run time, local multipole moments are computed, reduced globally, and radial recurrences build the expansion coefficients for the Green’s function solution: ϕ\phi0

ϕ\phi1

This obviates per-patch multipole summations and reduces MPI all-reduce operations to ϕ\phi2 doubles, independent of patch count. For a cubed-sphere, the reduction volume is six times smaller than naïve patch superposition, with strong scaling demonstrated up to nearly ϕ\phi3 MPI ranks (Wongwathanarat, 2019).

5. Applications in Physical and Computer Vision Simulations

The Yin-Yang grid has been successfully adapted in diverse domains:

  • Astrophysical hydrodynamic and MHD simulations: Used in explicit codes for core-collapse supernovae, polytropes, Rayleigh-Taylor, and blast wave tests, yielding no boundary anomalies in the overlap and maintaining global accuracy and conservation within interpolation error (Wongwathanarat et al., 2010, Luo et al., 11 Aug 2025).
  • Solar/stellar corona modeling: The Yin-Yang–MFE code implements the decomposition for fully global MHD, leveraging the grid’s strong scaling and uniformity to ensure divergence-free ϕ\phi4 fields with standard constrained-transport discretizations (Luo et al., 11 Aug 2025).
  • Omnidirectional imaging and 3D vision: In the OmniSplat framework, images on the sphere are decomposed into two overlapping patches by the Yin-Yang grid. Each patch, covering ϕ\phi5, yields a quasi-perspective rectangular image with distortion bounded by a factor of ϕ\phi6, facilitating the direct application of mature CNN/Transformer encoders. The area stretch within the Yin patch, ϕ\phi7, parallels the distortion bounds of perspective camera models, yielding order-of-magnitude improvements in PSNR and runtime relative to naive equirectangular or cubemap decompositions (Lee et al., 2024).

6. Implementation Constraints and Limitations

While the Yin-Yang decomposition confers significant advantages, several numerical considerations must be addressed:

  • Overlap interpolation introduces non-exact conservation: While mass, momentum, and energy are conserved to within the interpolation error (typically ϕ\phi8 or lower for standard tests), exact conservation can be restored for scalars with post hoc flux corrections, though momentum conservation is more challenging, especially in rotating frames (Wongwathanarat et al., 2010).
  • Interpolation overhead: The additional cost of interpolating across the overlap and computing auxiliary spherical transforms is marginal, typically ϕ\phi9 of total runtime, and is greatly outweighed by gains from increasing the allowable time step and reduced cell counts.
  • Vector transform singularities: Although the spherical-to-Cartesian transform matrix θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]0 is singular at θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]1, the patch geometry is specifically designed to exclude the poles, thus sidestepping this issue in practice (Wongwathanarat et al., 2010, Luo et al., 11 Aug 2025).
  • Boundary seam handling in vision applications: No explicit seam loss or blending is necessary; the quasi-uniformity and sufficient overlap smooth out artifacts within the receptive field of the encoder network (Lee et al., 2024).

7. Comparative Performance and Empirical Results

Empirical studies demonstrate the efficacy of the Yin-Yang scheme:

  • Hydrodynamic test problems: Maximum relative errors in 3D self-gravity simulations converge to θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]2–θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]3, matching the accuracy of analytic or prior multipatch methods; further refinement is limited by underlying spatial discretization for θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]4 (Wongwathanarat, 2019).
  • Strong scaling: For large MPI deployments, wall-clock times and parallel efficiency for Poisson/MHD solvers are measurably superior—up to a factor of 2 reduction in runtime compared to naïve patch superposition (Wongwathanarat, 2019, Luo et al., 11 Aug 2025).
  • Vision benchmarks: In 3D Gaussian Splatting with Yin-Yang decomposition, average PSNR increases by θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]5–θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]6 dB over equirectangular input with a substantial reduction in runtime (from θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]7 s to θ[π4δ,3π4+δ],ϕ[3π4δ,3π4+δ]\theta \in \left[\frac{\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right], \quad \phi \in \left[-\frac{3\pi}{4}-\delta,\frac{3\pi}{4}+\delta\right]8 s per scene), confirming that bounded distortion directly improves the applicability of PINN and transformer architectures (Lee et al., 2024).

References:

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Yin-Yang Grid Decomposition.