pub struct CulvertInletBatch<R: Runtime<DType = DType>> { /* private fields */ }Expand description
HDS-5 inlet-control rows, one barrel and inlet each, with a certified headwater query.
The headwater is an enclosure: the exact HW_i(Q) at each represented discharge lies inside
its [lower, upper] pair. Admission certifies that each row’s headwater strictly rises with
discharge, across the transition too.
Implementations§
Source§impl<R: Runtime<DType = DType>> CulvertInletBatch<R>
impl<R: Runtime<DType = DType>> CulvertInletBatch<R>
Sourcepub fn new(
client: R::Client,
rows: Vec<CulvertInletRow>,
) -> Result<Self, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R>,
pub fn new(
client: R::Client,
rows: Vec<CulvertInletRow>,
) -> Result<Self, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R>,
Uploads the rows, encloses each transition anchor and admits each row.
Rejects an empty row list, a nonfinite slope, a nonfinite or nonpositive gravity, and a
coded inlet on a barrel of another shape. Rejects a row whose submerged headwater at
X = 4 does not certifiably exceed its unsubmerged headwater at X = 3.5, a form-1 row
whose critical depth at X = 3.5 is not below the crown, and a row whose discharge at
X = 3.5 lies below the normal F64 range. Each rejection names the row and its inlet.
Rejects a runtime without the barrel batch’s F64 contracts.
Sourcepub fn rows(&self) -> &[CulvertInletRow]
pub fn rows(&self) -> &[CulvertInletRow]
Rows in order.
Sourcepub fn headwater(
&self,
discharge_m3_per_s: &Tensor<R>,
) -> Result<CulvertInletHeadwater<R>, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R>,
pub fn headwater(
&self,
discharge_m3_per_s: &Tensor<R>,
) -> Result<CulvertInletHeadwater<R>, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R>,
Encloses the inlet-control headwater per row at one discharge per barrel.
discharge_m3_per_s is an F64 [m] tensor of per-barrel discharge magnitudes on the
batch device. Rejects a negative or nonfinite discharge, naming its row.
Returns Numerical when a headwater bound overflows F64.
Trait Implementations§
Auto Trait Implementations§
impl<R> Forget for CulvertInletBatch<R>
impl<R> Freeze for CulvertInletBatch<R>
impl<R> Move for CulvertInletBatch<R>
impl<R> RefUnwindSafe for CulvertInletBatch<R>
impl<R> Send for CulvertInletBatch<R>
impl<R> Sync for CulvertInletBatch<R>
impl<R> Unpin for CulvertInletBatch<R>
impl<R> UnsafeUnpin for CulvertInletBatch<R>
impl<R> UnwindSafe for CulvertInletBatch<R>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> ⓘ
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> ⓘ
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>
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
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.