pub enum ElementRole {
Conveyance,
Boundary,
Control,
}Expand description
What an element kind does in the network, as distinct from what it is geometrically (spec §4.3).
This exists because it is the distinction an application must draw to
present an unsimulated model at all: before any results exist there is
nothing to colour by, and a network drawn in one uniform tone tells a
reader nothing. ElementClass cannot answer it — a pump and a pipe are
both Polyline, a reservoir and a junction both Point — and kind
cannot either without the application naming kinds it should not know.
Carries no presentation. An application decides what a boundary looks like; this layer decides only which kinds are boundaries.
Optional on ElementKind: some kinds have no role in the flow network,
and the absence is information rather than a gap to be defaulted away.
Variants§
Conveyance
Carries flow without imposing a boundary or a control on it — a junction, a pipe, a conduit. The bulk of any model.
Boundary
Where the model meets what it does not simulate: a fixed head or stage, a storage volume, an outfall. Flow enters or leaves here.
Control
Acts on the flow rather than merely passing it — a pump, a valve, a weir, an orifice, a flow divider.
Trait Implementations§
Source§impl Clone for ElementRole
impl Clone for ElementRole
Source§fn clone(&self) -> ElementRole
fn clone(&self) -> ElementRole
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more