pub struct CflCondition {
pub cfl_number: f64,
pub velocity_field: Option<Vec<f64>>,
pub sound_speed: Option<f64>,
pub diffusion_coefficient: Option<f64>,
}Expand description
CFL conditions
Fields§
§cfl_number: f64§velocity_field: Option<Vec<f64>>§sound_speed: Option<f64>§diffusion_coefficient: Option<f64>Implementations§
Source§impl CflCondition
impl CflCondition
pub fn new() -> Self
Sourcepub fn set_velocity_field(&mut self, velocities: Vec<f64>)
pub fn set_velocity_field(&mut self, velocities: Vec<f64>)
Set the velocity field used for CFL advective time-step estimation.
Sourcepub fn set_sound_speed(&mut self, speed: f64)
pub fn set_sound_speed(&mut self, speed: f64)
Set the sound speed used as a fallback wave speed when no velocity field is populated.
Sourcepub fn set_diffusion_coefficient(&mut self, coeff: f64)
pub fn set_diffusion_coefficient(&mut self, coeff: f64)
Set the diffusion coefficient used for the diffusive CFL limit.
Sourcepub fn max_velocity(&self) -> f64
pub fn max_velocity(&self) -> f64
Return the maximum absolute velocity from the velocity field.
Falls back to sound_speed when no velocity field is present, and to
0.0 when neither is set. Non-finite entries in the velocity field are
ignored.
Sourcepub fn get_velocity_field(&self) -> Option<&Vec<f64>>
pub fn get_velocity_field(&self) -> Option<&Vec<f64>>
Accessor for the velocity field, if populated.
Trait Implementations§
Source§impl Clone for CflCondition
impl Clone for CflCondition
Source§fn clone(&self) -> CflCondition
fn clone(&self) -> CflCondition
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 moreAuto Trait Implementations§
impl Freeze for CflCondition
impl RefUnwindSafe for CflCondition
impl Send for CflCondition
impl Sync for CflCondition
impl Unpin for CflCondition
impl UnsafeUnpin for CflCondition
impl UnwindSafe for CflCondition
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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