pub struct CulvertOutletBatch<R: Runtime<DType = DType>> { /* private fields */ }Expand description
Outlet-control rows, one barrel each, with certified headwater and jump queries.
Every bound is an enclosure: the exact value of the outlet-control model at each represented
input lies inside its [lower, upper] pair. CPU and CUDA give bit-identical bounds.
Implementations§
Source§impl<R: Runtime<DType = DType>> CulvertOutletBatch<R>
impl<R: Runtime<DType = DType>> CulvertOutletBatch<R>
Sourcepub fn new(
client: R::Client,
rows: Vec<CulvertOutletRow>,
) -> Result<Self, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R>,
pub fn new(
client: R::Client,
rows: Vec<CulvertOutletRow>,
) -> Result<Self, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R>,
Uploads and admits the rows.
Rejects an empty row list, a nonfinite or nonpositive length, Manning n or gravity, a
nonfinite or negative entrance loss, a nonfinite slope, and an adverse barrel whose
outlet invert sits more than D/2 above its inlet invert. Each rejection names the row.
Rejects a runtime without the barrel batch’s F64 contracts.
Sourcepub fn rows(&self) -> &[CulvertOutletRow]
pub fn rows(&self) -> &[CulvertOutletRow]
Rows in order.
Sourcepub fn headwater(
&self,
discharge_m3_per_s: &Tensor<R>,
tailwater_m: &Tensor<R>,
) -> Result<CulvertOutletHeadwater<R>, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R> + CertifiedSimpsonAlgorithms<R>,
pub fn headwater(
&self,
discharge_m3_per_s: &Tensor<R>,
tailwater_m: &Tensor<R>,
) -> Result<CulvertOutletHeadwater<R>, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R> + CertifiedSimpsonAlgorithms<R>,
Encloses the outlet-control headwater per row at one discharge and tailwater per barrel.
discharge_m3_per_s holds per-barrel discharge magnitudes and tailwater_m the
tailwater depth above the outlet invert. Both are F64 [m] tensors on the batch device.
Rejects a negative or nonfinite value, naming its row. Rows whose march does not resolve
report Unresolved with NaN bounds.
Sourcepub fn jump(
&self,
discharge_m3_per_s: &Tensor<R>,
tailwater_m: &Tensor<R>,
) -> Result<CulvertOutletJump<R>, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R> + CertifiedSimpsonAlgorithms<R>,
pub fn jump(
&self,
discharge_m3_per_s: &Tensor<R>,
tailwater_m: &Tensor<R>,
) -> Result<CulvertOutletJump<R>, StructureError>where
R::Client: TensorOps<R> + CompareOps<R> + NextRepresentableOps<R> + ScalarOps<R> + TwoSumOps<R> + CorrectlyRoundedOps<R> + RuntimeClient<R> + CertifiedBisectionAlgorithms<R> + CertifiedSimpsonAlgorithms<R>,
Classifies the hydraulic jump of every inlet-critical row and encloses its position.
Takes the inputs of CulvertOutletBatch::headwater and runs the same march first. The
result carries that march’s headwater too.
Trait Implementations§
Auto Trait Implementations§
impl<R> Forget for CulvertOutletBatch<R>
impl<R> Freeze for CulvertOutletBatch<R>
impl<R> Move for CulvertOutletBatch<R>
impl<R> RefUnwindSafe for CulvertOutletBatch<R>
impl<R> Send for CulvertOutletBatch<R>
impl<R> Sync for CulvertOutletBatch<R>
impl<R> Unpin for CulvertOutletBatch<R>
impl<R> UnsafeUnpin for CulvertOutletBatch<R>
impl<R> UnwindSafe for CulvertOutletBatch<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.