Green-Gauss gradient contracts
Upstream of the slope limiter on the residual path. Face values, normals,
volume scaling, and boundary ghost copies are pure; only the face/cell
iteration still touches mesh globals (ug).
Pipeline
zero cell gradients
|
v
for each face:
q_f <- ArithmeticFaceAverage OR InverseDistance + WeightedFaceAverage
S <- AreaWeightedFaceNormal (n * A)
left AccumulateFaceGradient(+S * q_f)
if interior:
right AccumulateFaceGradient(-S * q_f)
|
v
for each physical cell:
ScaleGradientByVolume (grad /= V)
|
v
for each boundary face:
CopyGradient(owner -> ghost)
Formulas
Arithmetic face value:
Inverse-distance weights:
Green-Gauss accumulation and volume scale:
Boundary ghosts copy the owner (left) gradient; they are not independent unknowns in this scheme.
Pure entry points (UGradPolicy.h)
ArithmeticFaceAverageInverseDistanceFaceWeights/WeightedFaceAverageAreaWeightedFaceNormalAccumulateFaceGradientScaleGradientByVolumeCopyGradient
Tags: @doc-algorithm green-gauss-gradient with @doc-stage /
@doc-formula on each pure API so an extractor can rebuild this page from
headers without a second algorithm write-up. Narrative, diagrams, and math
remain in doc/source (not only in // comments).
Tests: grad_policy_test.