flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
mac_cheb_momentum.hpp File Reference

flow — Chebyshev semi-iteration as a standalone momentum (implicit-diffusion) solver, an alternative to the red-black Gauss-Seidel smoother on the same sharp cut-cell stencil. More...

#include <Kokkos_Core.hpp>
#include "mac_cutcell_mg.hpp"
#include "mac_ibm.hpp"
#include "policy.hpp"

Go to the source code of this file.

Classes

struct  peclet::flow::ChebCoeffs
 The Chebyshev coefficient recurrence (Golub-Varga; the form multigrid Chebyshev smoothers use). More...
 

Namespaces

namespace  peclet
 
namespace  peclet::flow
 

Functions

template<class MC >
void peclet::flow::ibmStencilJacobiBounds (MC AC, MC AW, MC AE, MC AS, MC AN, MC AB, MC AT, CCConst solidmask, C3 e, int g, double &lo, double &hi)
 Gershgorin bounds [lo, hi] on the spectrum of the Jacobi-preconditioned cut-cell Helmholtz diag(AC)^-1 A, over the UNPINNED rows of the inner block.
 
void peclet::flow::ibmChebUpdate (CCField x, CCField d, CCConst r, FPC AC, CCConst solidmask, C3 e, int g, double alpha, double beta)
 One Chebyshev update on the Jacobi-preconditioned system: d <- beta*d + alpha*r/AC ; x += d.
 

Detailed Description

flow — Chebyshev semi-iteration as a standalone momentum (implicit-diffusion) solver, an alternative to the red-black Gauss-Seidel smoother on the same sharp cut-cell stencil.

WHY. The momentum solve is a screened Helmholtz, A = rho/dt + mu*(-Lap), whose condition number is a property of the DIFFUSION NUMBER D = mu*dt/(rho*h^2) and not of the mesh: kappa = 1 + 12 D on a uniform isotropic grid. Red-black Gauss-Seidel removes error at a rate set by kappa, so it needs O(kappa) sweeps; Chebyshev semi-iteration needs O(sqrt(kappa)). The second, larger, gain is per iteration: a Chebyshev step is ONE residual (one halo exchange) against a red-black sweep's TWO colour passes and two exchanges, and every lane is active in every pass instead of half of them. Where the momentum solve is halo-latency-bound – the small per-rank blocks that made setSolidVelocityMgAuto reach for the V-cycle – that halving is the whole story.

THE INTERVAL IS NOT ESTIMATED. Chebyshev needs an interval that CONTAINS the spectrum; it does not need a tight one. ibmStencilJacobiBounds takes Gershgorin bounds on the Jacobi- preconditioned operator directly from the stored stencil, which is exact arithmetic on the coefficients (one reduction, once per solve) rather than a power iteration that costs sweeps and can under-estimate lambda_max – the one error that makes Chebyshev DIVERGE. Pinned (solid) rows carry the identity and contribute (1, 1), so they cannot drag the interval.

SIGN CONVENTION. The stencil stores signed coefficients: A x = AC*x + sum(A_nb * x_nb), with A_nb <= 0 for the diffusion operator. So the Gershgorin row sum is AC + sum(A_nb) (the lower bound) and AC - sum(A_nb) (the upper bound) – see residualVarPin, which uses the same form.

Definition in file mac_cheb_momentum.hpp.