pub struct VtkWriter;Expand description
Stateless collection of higher-level VTK writing helpers.
Implementations§
Source§impl VtkWriter
impl VtkWriter
Sourcepub fn write_unstructured_vector_field(
path: &str,
points: &[[f64; 3]],
cells: &[Vec<usize>],
cell_types: &[VtkCellTypeW],
field_name: &str,
vectors: &[[f64; 3]],
) -> Result<()>
pub fn write_unstructured_vector_field( path: &str, points: &[[f64; 3]], cells: &[Vec<usize>], cell_types: &[VtkCellTypeW], field_name: &str, vectors: &[[f64; 3]], ) -> Result<()>
Write an unstructured mesh with an attached vector field to a VTU file.
§Arguments
path– output file path (.vtu)points– node coordinatescells– connectivity (each element is a list of 0-based point indices)cell_types– VTK cell type for each cell (parallel tocells)field_name– name of the vector field (e.g."velocity")vectors– one[vx, vy, vz]per node (point data)
Sourcepub fn write_streamlines(
path: &str,
streamlines: &[Vec<[f64; 3]>],
) -> Result<()>
pub fn write_streamlines( path: &str, streamlines: &[Vec<[f64; 3]>], ) -> Result<()>
Write a set of streamlines as VTK PolyData in legacy ASCII format.
Each streamline is a polyline: a sequence of 3-D points. The output
is a valid legacy VTK file containing one POLYDATA dataset.
§Arguments
path– output file path (.vtk)streamlines– each innerVecis one polyline (≥ 2 points each)
Sourcepub fn write_rectilinear_grid(
path: &str,
x_coords: &[f64],
y_coords: &[f64],
z_coords: &[f64],
field_name: Option<&str>,
scalars: &[f64],
) -> Result<()>
pub fn write_rectilinear_grid( path: &str, x_coords: &[f64], y_coords: &[f64], z_coords: &[f64], field_name: Option<&str>, scalars: &[f64], ) -> Result<()>
Write a rectilinear grid to a legacy VTK ASCII file.
A rectilinear grid is defined by three 1-D coordinate arrays
x_coords, y_coords, z_coords. The grid dimensions are
nx × ny × nz where nx = x_coords.len() etc.
Optionally attach a scalar point-data field scalars of length
nx * ny * nz (pass an empty slice to omit).
Auto Trait Implementations§
impl Freeze for VtkWriter
impl RefUnwindSafe for VtkWriter
impl Send for VtkWriter
impl Sync for VtkWriter
impl Unpin for VtkWriter
impl UnsafeUnpin for VtkWriter
impl UnwindSafe for VtkWriter
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<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.