Struct PressureVelocityRecord
pub struct PressureVelocityRecord {
pub position_m: [f32; 3],
pub pressure_pa: f32,
pub particle_velocity_m_s: [f32; 3],
pub energy_density_j_m3: f32,
pub intensity_w_m2: [f32; 3],
pub material_ref: u32,
pub validity_bits: u32,
}Expand description
Mode 0x0000 (pressure_velocity_continuum) 64-byte wire record.
Fields§
§position_m: [f32; 3]Local Cartesian position in metres (0..12).
pressure_pa: f32Acoustic pressure perturbation in Pascals (12..16).
particle_velocity_m_s: [f32; 3]Particle velocity vector in $\text{m}\cdot\text{s}^{-1}$ (16..28).
energy_density_j_m3: f32Collocated acoustic energy density in $\text{J}\cdot\text{m}^{-3}$ (28..32).
intensity_w_m2: [f32; 3]Collocated instantaneous intensity in $\text{W}\cdot\text{m}^{-2}$ (32..44).
material_ref: u32Material reference ID (44..48).
validity_bits: u32Bitmask of valid fields (48..52).
Implementations§
§impl PressureVelocityRecord
impl PressureVelocityRecord
pub fn from_collocated_state(
position_m: [f32; 3],
pressure_pa: f32,
particle_velocity_m_s: [f32; 3],
medium: &FluidMedium,
) -> Result<PressureVelocityRecord, NumericalError>
pub fn from_collocated_state( position_m: [f32; 3], pressure_pa: f32, particle_velocity_m_s: [f32; 3], medium: &FluidMedium, ) -> Result<PressureVelocityRecord, NumericalError>
Construct a valid collocated record from physical state and medium.
pub fn validate(&self) -> Result<(), NumericalError>
pub fn validate(&self) -> Result<(), NumericalError>
Validate C02-C01 finiteness, validity-mask rules, and absent-placeholder zeroing.
pub fn to_wire_bytes(&self) -> Result<[u8; 64], NumericalError>
pub fn to_wire_bytes(&self) -> Result<[u8; 64], NumericalError>
Encode into exact 64-byte little-endian wire layout.
pub fn from_wire_bytes(
bytes: &[u8],
) -> Result<PressureVelocityRecord, NumericalError>
pub fn from_wire_bytes( bytes: &[u8], ) -> Result<PressureVelocityRecord, NumericalError>
Decode from exact 64-byte little-endian wire layout.
Trait Implementations§
§impl Clone for PressureVelocityRecord
impl Clone for PressureVelocityRecord
§fn clone(&self) -> PressureVelocityRecord
fn clone(&self) -> PressureVelocityRecord
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 moreimpl Copy for PressureVelocityRecord
§impl Debug for PressureVelocityRecord
impl Debug for PressureVelocityRecord
Source§impl From<&PressureVelocityRecord> for PressureVelocityRecord
impl From<&PressureVelocityRecord> for PressureVelocityRecord
Source§fn from(r: &PressureVelocityRecord) -> Self
fn from(r: &PressureVelocityRecord) -> Self
Converts to this type from the input type.
Source§impl From<&PressureVelocityRecord> for PressureVelocityRecord
impl From<&PressureVelocityRecord> for PressureVelocityRecord
Source§fn from(r: &NumericalPvRecord) -> Self
fn from(r: &NumericalPvRecord) -> Self
Converts to this type from the input type.
§impl PartialEq for PressureVelocityRecord
impl PartialEq for PressureVelocityRecord
impl StructuralPartialEq for PressureVelocityRecord
Auto Trait Implementations§
impl Freeze for PressureVelocityRecord
impl RefUnwindSafe for PressureVelocityRecord
impl Send for PressureVelocityRecord
impl Sync for PressureVelocityRecord
impl Unpin for PressureVelocityRecord
impl UnsafeUnpin for PressureVelocityRecord
impl UnwindSafe for PressureVelocityRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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