pub struct CulvertInlet { /* private fields */ }Expand description
Admitted HDS-5 inlet: form, coefficients K, M, c, Y and the mitered flag.
The submerged equation is HW/D = c X^2 + Y + Ks S. Ks is -0.5, or +0.7 for an inlet
mitered to the slope.
Implementations§
Source§impl CulvertInlet
impl CulvertInlet
Sourcepub fn hds5(code: u8) -> Result<Self, StructureError>
pub fn hds5(code: u8) -> Result<Self, StructureError>
Admits the HDS-5 Table A.1 or A.2 inlet code, numbered as in SWMM culvert.c.
| Codes | Barrel shape |
|---|---|
| 1 to 8 | circular, code 5 mitered |
| 9 to 26 | concrete box |
| 30 to 32 | horizontal ellipse |
| 33 to 35 | vertical ellipse |
| 36 to 44 | pipe-arch, code 37 mitered |
| 45 to 47 | flat-floor arch, code 46 mitered |
Rejects codes 27 to 29 (corrugated metal box, which no barrel shape models), codes 48 to 57 (tapered inlets, which need throat and face geometry) and every other code.
Sourcepub fn explicit(
form: CulvertInletForm,
[k, m, c, y]: [f64; 4],
mitered: bool,
) -> Result<Self, StructureError>
pub fn explicit( form: CulvertInletForm, [k, m, c, y]: [f64; 4], mitered: bool, ) -> Result<Self, StructureError>
Admits explicit coefficients for any barrel shape.
Rejects a nonfinite or nonpositive K, M or c, and a nonfinite Y. Each of these
keeps the headwater rising within its band.
Sourcepub fn barrel_shape(&self) -> Option<CulvertBarrelShape>
pub fn barrel_shape(&self) -> Option<CulvertBarrelShape>
Barrel shape a coded inlet requires, or None for explicit coefficients.
Sourcepub fn form(&self) -> CulvertInletForm
pub fn form(&self) -> CulvertInletForm
Unsubmerged equation form.
Sourcepub fn coefficients(&self) -> [f64; 4]
pub fn coefficients(&self) -> [f64; 4]
Coefficients [K, M, c, Y].
Trait Implementations§
Source§impl Clone for CulvertInlet
impl Clone for CulvertInlet
impl Copy for CulvertInlet
Source§impl Debug for CulvertInlet
impl Debug for CulvertInlet
Source§impl PartialEq for CulvertInlet
impl PartialEq for CulvertInlet
impl StructuralPartialEq for CulvertInlet
Auto Trait Implementations§
impl Forget for CulvertInlet
impl Freeze for CulvertInlet
impl Move for CulvertInlet
impl RefUnwindSafe for CulvertInlet
impl Send for CulvertInlet
impl Sync for CulvertInlet
impl Unpin for CulvertInlet
impl UnsafeUnpin for CulvertInlet
impl UnwindSafe for CulvertInlet
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.