pub struct PyStreamlineTracer {
pub velocity_field: Vec<f64>,
pub dims: [u32; 3],
pub bounds: [f64; 6],
pub step_size: f64,
pub max_steps: u32,
pub tube_radius: f64,
}Expand description
Streamline tracer using RK4 integration through a 3D velocity field.
Fields§
§velocity_field: Vec<f64>Flat velocity field [vx0, vy0, vz0, vx1, …] on a uniform grid.
dims: [u32; 3]Grid dimensions [nx, ny, nz].
bounds: [f64; 6]World-space bounds [min_x, min_y, min_z, max_x, max_y, max_z].
step_size: f64Integration step size.
max_steps: u32Maximum integration steps per streamline.
tube_radius: f64Tube radius for 3D tube rendering.
Implementations§
Source§impl PyStreamlineTracer
impl PyStreamlineTracer
Sourcepub fn new(velocity_field: Vec<f64>, dims: [u32; 3], bounds: [f64; 6]) -> Self
pub fn new(velocity_field: Vec<f64>, dims: [u32; 3], bounds: [f64; 6]) -> Self
Create a new streamline tracer.
Sourcepub fn trace(&self, seed: [f64; 3]) -> Streamline
pub fn trace(&self, seed: [f64; 3]) -> Streamline
Trace a streamline from a seed point.
Sourcepub fn trace_multiple(&self, seeds: &[[f64; 3]]) -> Vec<Streamline>
pub fn trace_multiple(&self, seeds: &[[f64; 3]]) -> Vec<Streamline>
Trace streamlines from multiple seed points.
Trait Implementations§
Source§impl Clone for PyStreamlineTracer
impl Clone for PyStreamlineTracer
Source§fn clone(&self) -> PyStreamlineTracer
fn clone(&self) -> PyStreamlineTracer
Returns a duplicate of the value. Read more
1.0.0 · 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 PyStreamlineTracer
impl Debug for PyStreamlineTracer
Source§impl<'de> Deserialize<'de> for PyStreamlineTracer
impl<'de> Deserialize<'de> for PyStreamlineTracer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PyStreamlineTracer
impl RefUnwindSafe for PyStreamlineTracer
impl Send for PyStreamlineTracer
impl Sync for PyStreamlineTracer
impl Unpin for PyStreamlineTracer
impl UnsafeUnpin for PyStreamlineTracer
impl UnwindSafe for PyStreamlineTracer
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.