Class FluidRefineMeanfield
The mean-field fixed point x* is the leading term of an expansion of the true stationary mean in powers of the system size. The next term is obtained by carrying the second moment through the drift: writing A for the Jacobian at x* and B for its Hessian tensor, the correction V solves the linear system
A*V + (1/2) * sum_{j,k} Sigma_{jk} * d2F/dx_j dx_k = 0
with Sigma the stationary covariance from FluidLyapunov. Because Sigma
scales with the population, V is the O(1/N) term of the expansion written
directly in job counts, so no explicit density rescaling is needed. The Hessian
contraction is evaluated WITHOUT EVER FORMING THE TENSOR: writing
Sigma = sum_m lam_m*v_m*v_m' by eigendecomposition,
sum_{jk} Sigma_{jk} d2F/dx_j dx_k = sum_m lam_m * d2F/dv_m^2
and each directional second derivative is one central second difference, so the
cost is O(rank(Sigma)) drift evaluations rather than O(n^2).
The drift must be TWICE DIFFERENTIABLE for this to mean anything. The
first-order closure is only piecewise linear -- its second derivative is zero
away from the kink and a delta at it -- so this must be called on the
Gaussian-closed drift, i.e. with the sigma2 that the moment closure converged to
under options.method='refined'. Passing sigma2 = 0 is rejected rather
than silently returning zero.
Port of matlab/src/solvers/FLD/fluid_refine_meanfield.m.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe correction, plus what it took to compute it. -
Method Summary
Modifier and TypeMethodDescriptionstatic FluidRefineMeanfield.Resultrefine(double[] x, double[] sigma2, Matrix sigma, FluidMomentTerms terms, Matrix[] covblk) The O(1/N) correction of a fluid fixed point.
-
Method Details
-
refine
public static FluidRefineMeanfield.Result refine(double[] x, double[] sigma2, Matrix sigma, FluidMomentTerms terms, Matrix[] covblk) The O(1/N) correction of a fluid fixed point.- Parameters:
x- fluid fixed pointsigma2- per-station population variances defining the smooth driftsigma- (n x n) stationary covarianceterms- representation fromFluidMomentTermscovblk- per-station covariance blocks closing the DPS share ratio- Returns:
- the correction and its diagnostics
-