PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 85 in Math Visualization.

View category →
NewUniversity / research

PCA / SVD Geometry

Launch Simulator

Covariance ellipse and SVD view of dimensionality reduction: principal components, explained variance, and rank-1 reconstruction error.

NewUniversity / research

Keller–Segel Chemotaxis

Launch Simulator

∂ₜn = Dₙ∇²n − χ∇·(n∇c), ∂ₜc = D_c∇²c + αn − βc; bacteria follow attractant; collapse at high χ; 96² grid.

NewUniversity / research

Advection Schemes: Upwind / LW / MacCormack

Launch Simulator

Linear advection u_t + cu_x = 0 on a periodic grid: compare upwind diffusion, Lax-Wendroff and MacCormack dispersive ringing, exact pulse translation, L2 error, and CFL ν.

NewUniversity / research

Runge–Kutta Stability Regions

Launch Simulator

Absolute-stability regions in the z = hλ plane for explicit Euler, RK2, and RK4; move λ and h, compare |R(z)|, and see why stiff modes constrain explicit time steps.

NewUniversity / research

Three-Species Food Chain (Hastings–Powell)

Launch Simulator

Plants x → herbivores y → predators z; Holling II fᵢ(u)=aᵢu/(1+bᵢu); logistic x; chaotic attractors when b₁ is varied (1991).

NewUniversity / research

Newton Fractal

Launch Simulator

Basins of attraction for Newton iteration on zⁿ−1 with adjustable relaxation ω.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Multigrid Relaxation

Multigrid Relaxation

1D Poisson error dynamics: Jacobi and Gauss-Seidel smooth high-frequency error, while a V-cycle uses residual restriction and coarse-grid correction to remove low-frequency modes.

Relaxation

0.35
1

Jacobi and Gauss-Seidel quickly smooth oscillatory error but leave low-frequency error. A V-cycle restricts residuals to coarse grids, solves the smooth error cheaply, then prolongs the correction.

Shortcuts

  • •Space / Enter — run / pause
  • •P — pause / resume
  • •R — reset

Measured values

iterations / V-cycles0
Jacobi L2 err0
GS L2 err0
MG L2 err0
MG low mode k=10
MG high mode k=160

About this model

This visualization isolates the core multigrid idea on a one-dimensional Poisson problem −u″=f, with u(0)=u(1)=0 and a known exact solution made from low- and high-frequency sine modes. Starting from zero, ordinary Jacobi and Gauss–Seidel relaxation quickly damp the high-frequency error, which is why they are called smoothers. The remaining smooth, low-frequency error decays very slowly on the fine grid. A V-cycle fixes that by computing the residual r=f−Au, restricting it to coarser grids where the smooth fine-grid error becomes more oscillatory and cheaper to solve, then prolonging the correction back to the fine grid. The top panel plots the current error u−u* for Jacobi, Gauss–Seidel, and multigrid; the lower panel shows logarithmic L2-error histories.

Who it's for: Students in numerical PDEs and scientific computing learning relaxation, smoothers, residual correction, restriction/prolongation, and why multigrid can be grid-size independent.

Key terms

  • Multigrid
  • Jacobi relaxation
  • Gauss-Seidel
  • V-cycle
  • Coarse-grid correction
  • Residual
  • Restriction
  • Prolongation

How it works

A 1D Poisson multigrid visualization: Jacobi and Gauss-Seidel relaxations smooth high-frequency error, while a V-cycle uses residual restriction and coarse-grid correction to remove low-frequency error rapidly.

Key equations

Solve −u″=f, u(0)=u(1)=0. Relaxation damps oscillatory error; multigrid computes residual r=f−Au, restricts it to coarse grids, solves Ae=r, and prolongs the correction u←u+e.

Frequently asked questions

Why do Jacobi and Gauss-Seidel remove high-frequency error first?
Local relaxation updates each point from nearby values. Oscillatory error creates large local mismatches, so it is damped rapidly. Smooth low-frequency error looks locally almost consistent, so fine-grid relaxation barely changes it.
What does the coarse grid do?
A smooth error on the fine grid appears less smooth relative to a coarser grid. Solving the residual equation there captures a global correction cheaply, then interpolation brings that correction back to the fine grid.
Is this a full production multigrid solver?
No. It is a compact geometric V-cycle for a 1D Poisson operator. Real solvers add better transfer operators, boundary-condition handling, adaptive stopping, pre/post-smoother choices, and extensions to complex 2D/3D meshes.