Skip to main content

TemperatureOrPressure

Trait TemperatureOrPressure 

Source
pub trait TemperatureOrPressure<D: DualNum<f64> + Copy = f64>: Copy {
    type Other: Copy;

    const IDENTIFIER: &'static str;

    // Required methods
    fn temperature(&self) -> Option<Temperature<D>>;
    fn pressure(&self) -> Option<Pressure<D>>;
    fn temperature_pressure(
        &self,
        tp_init: Option<Self::Other>,
    ) -> (Option<Temperature<D>>, Option<Pressure<D>>, bool);
    fn from_state<E: Residual<N, D>, N: Gradients>(
        state: &State<E, N, D>,
    ) -> Self::Other
       where DefaultAllocator: Allocator<N>;
    fn linspace(
        &self,
        start: Self::Other,
        end: Self::Other,
        n: usize,
    ) -> (Temperature<Array1<f64>>, Pressure<Array1<f64>>);
}
Expand description

Trait that enables functions to be generic over their input unit.

Required Associated Constants§

Source

const IDENTIFIER: &'static str

Required Associated Types§

Required Methods§

Source

fn temperature(&self) -> Option<Temperature<D>>

Source

fn pressure(&self) -> Option<Pressure<D>>

Source

fn temperature_pressure( &self, tp_init: Option<Self::Other>, ) -> (Option<Temperature<D>>, Option<Pressure<D>>, bool)

Source

fn from_state<E: Residual<N, D>, N: Gradients>( state: &State<E, N, D>, ) -> Self::Other

Source

fn linspace( &self, start: Self::Other, end: Self::Other, n: usize, ) -> (Temperature<Array1<f64>>, Pressure<Array1<f64>>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<D: DualNum<f64> + Copy> TemperatureOrPressure<D> for Quantity<D, SIUnit<N2, N1, P1, Z0, Z0, Z0, Z0>>

Source§

const IDENTIFIER: &'static str = "pressure"

Source§

type Other = Quantity<D, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, ATerm>>>>>>>>

Source§

fn temperature(&self) -> Option<Temperature<D>>

Source§

fn pressure(&self) -> Option<Pressure<D>>

Source§

fn temperature_pressure( &self, tp_init: Option<Self::Other>, ) -> (Option<Temperature<D>>, Option<Pressure<D>>, bool)

Source§

fn from_state<E: Residual<N, D>, N: Dim>(state: &State<E, N, D>) -> Self::Other

Source§

fn linspace( &self, start: Temperature<D>, end: Temperature<D>, n: usize, ) -> (Temperature<Array1<f64>>, Pressure<Array1<f64>>)

Source§

impl<D: DualNum<f64> + Copy> TemperatureOrPressure<D> for Temperature<D>

Source§

const IDENTIFIER: &'static str = "temperature"

Source§

type Other = Quantity<D, <<<TArr<Z0, TArr<Z0, TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>> as Add<<<TArr<Z0, TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>> as Sub<TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>>>>::Output as Sub<TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>>>>::Output>>::Output as Add<TArr<Z0, TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>>>>::Output as Sub<<<TArr<Z0, TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>> as Add>::Output as Add<TArr<Z0, TArr<PInt<UInt<UTerm, B1>>, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, TArr<Z0, ATerm>>>>>>>>>::Output>>::Output>

Source§

fn temperature(&self) -> Option<Temperature<D>>

Source§

fn pressure(&self) -> Option<Pressure<D>>

Source§

fn temperature_pressure( &self, tp_init: Option<Self::Other>, ) -> (Option<Temperature<D>>, Option<Pressure<D>>, bool)

Source§

fn from_state<E: Residual<N, D>, N: Gradients>( state: &State<E, N, D>, ) -> Self::Other

Source§

fn linspace( &self, start: Pressure<D>, end: Pressure<D>, n: usize, ) -> (Temperature<Array1<f64>>, Pressure<Array1<f64>>)

Implementors§