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 singlekappa = 0solve. A faithfully-saved solution is already below tolerance, so the stage’s convergence check returns at iteration0before 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.Solutionwith 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, andresidual_normis reported asNaN(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.