pub struct EulerState {
pub rho: f64,
pub rho_u: f64,
pub rho_v: f64,
pub rho_w: f64,
pub e: f64,
}Expand description
Conservative variable vector for the Euler equations: [rho, rhou, rhov, rho*w, E].
Fields§
§rho: f64Density.
rho_u: f64x-momentum.
rho_v: f64y-momentum.
rho_w: f64z-momentum.
e: f64Total energy density.
Implementations§
Source§impl EulerState
impl EulerState
Sourcepub fn from_primitives(
rho: f64,
u: f64,
v: f64,
w: f64,
p: f64,
gamma: f64,
) -> Self
pub fn from_primitives( rho: f64, u: f64, v: f64, w: f64, p: f64, gamma: f64, ) -> Self
Create from primitives (rho, u, v, w, p) with ratio of specific heats gamma.
Sourcepub fn sound_speed(&self, gamma: f64) -> f64
pub fn sound_speed(&self, gamma: f64) -> f64
Sound speed.
Sourcepub fn lerp(&self, other: &EulerState, t: f64) -> EulerState
pub fn lerp(&self, other: &EulerState, t: f64) -> EulerState
Linear interpolation between two states.
Trait Implementations§
Source§impl Clone for EulerState
impl Clone for EulerState
Source§fn clone(&self) -> EulerState
fn clone(&self) -> EulerState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EulerState
impl Debug for EulerState
impl Copy for EulerState
Auto Trait Implementations§
impl Freeze for EulerState
impl RefUnwindSafe for EulerState
impl Send for EulerState
impl Sync for EulerState
impl Unpin for EulerState
impl UnsafeUnpin for EulerState
impl UnwindSafe for EulerState
Blanket Implementations§
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 more