perturbation.find_terminals
perturbation.find_terminals(prob, x_bar=None)All 1-port boundary terminals of the network (edges at a boundary node).
When x_bar is given, inflowing is set from the mean flow direction so the incoming entropy excitation can be placed at genuine inlets.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| prob | CompiledProblem or Solution | The compiled network. Pass a solved :class:nefes.Solution to have its problem and mean state supplied for you (then omit x_bar). |
required |
| x_bar | ndarray | Converged mean-flow state, shape (n_solve, E). When given, each terminal’s inflowing flag is set from the local mean-flow direction. Supplied automatically when prob is a Solution. |
None |
Returns
| Name | Type | Description |
|---|---|---|
| list of Terminal | One :class:Terminal per single-port boundary edge, in node order. |