io.load_solution

io.load_solution(path, method='warm', dataset='Mean flow', **solve_kw)

Load a network and a saved solution from a UI/YAML case, without a cold re-solve.

Reads the network topology (as :func:load_case) and rebuilds the solver state from the solution datasets :func:nefes.io.save_case embeds. The method toggle picks how much the loaded state is trusted:

  • "warm" (default) – feed the stored state as the initial guess to a single kappa = 0 solve. A faithfully-saved solution is already below tolerance, so the stage’s convergence check returns at iteration 0 before assembling any Jacobian (the cost is one residual evaluation, not the full solve); a stale state simply keeps solving from the excellent start. The returned solution is therefore guaranteed consistent with the current network.
  • "deserialize" – wrap the stored state verbatim in a :class:~nefes.shell.network.Solution with no solve at all (zero cost). This trusts the file blindly: if the network was edited after saving, the state may not satisfy its residual, and residual_norm is reported as NaN (not evaluated).

Parameters

Name Type Description Default
path str Path to a .yaml case carrying an embedded solution. required
method (warm, deserialize) Restore strategy (default "warm"). "warm"
dataset str Name of the mean-flow dataset to restore (default "Mean flow"); its chemistry sibling "<dataset> chemistry" supplies the transported scalars. 'Mean flow'
**solve_kw Forwarded to :meth:Network.solve for method="warm" (e.g. tol, verbose, or an explicit kappa_stages to override the single kappa = 0 stage). Rejected for method="deserialize", which does not solve. {}

Returns

Name Type Description
Solution The restored mean-flow solution.

See Also

load_case : Load only the network topology (no solution). nefes.io.save_solution : Write a network and solution to a case file.

Back to top