pub struct UnstructuredGrid {
pub points: Points<f64>,
/* private fields */
}Expand description
Arbitrary mixed-cell mesh with explicit point coordinates and cell connectivity.
Analogous to VTK’s vtkUnstructuredGrid. Each cell has a type (from CellType)
and point connectivity stored in a shared CellArray. Cell types are stored in
a parallel array.
Fields§
§points: Points<f64>Implementations§
Source§impl UnstructuredGrid
impl UnstructuredGrid
pub fn new() -> Self
Sourcepub fn push_cell(&mut self, cell_type: CellType, point_ids: &[i64])
pub fn push_cell(&mut self, cell_type: CellType, point_ids: &[i64])
Add a cell with the given type and point indices.
Sourcepub fn cell_points(&self, idx: usize) -> &[i64]
pub fn cell_points(&self, idx: usize) -> &[i64]
Get the point indices for cell at the given index.
Sourcepub fn cell_types(&self) -> &[CellType]
pub fn cell_types(&self) -> &[CellType]
Get all cell types.
pub fn point_data(&self) -> &DataSetAttributes
pub fn point_data_mut(&mut self) -> &mut DataSetAttributes
pub fn cell_data(&self) -> &DataSetAttributes
pub fn cell_data_mut(&mut self) -> &mut DataSetAttributes
Sourcepub fn from_tetrahedra(points: Vec<[f64; 3]>, tets: Vec<[i64; 4]>) -> Self
pub fn from_tetrahedra(points: Vec<[f64; 3]>, tets: Vec<[i64; 4]>) -> Self
Create from points and tetrahedra.
Sourcepub fn from_hexahedra(points: Vec<[f64; 3]>, hexes: Vec<[i64; 8]>) -> Self
pub fn from_hexahedra(points: Vec<[f64; 3]>, hexes: Vec<[i64; 8]>) -> Self
Create from points and hexahedra.
Sourcepub fn with_point_array(self, array: AnyDataArray) -> Self
pub fn with_point_array(self, array: AnyDataArray) -> Self
Builder: add a point data array.
Sourcepub fn with_cell_array(self, array: AnyDataArray) -> Self
pub fn with_cell_array(self, array: AnyDataArray) -> Self
Builder: add a cell data array.
Trait Implementations§
Source§impl Clone for UnstructuredGrid
impl Clone for UnstructuredGrid
Source§fn clone(&self) -> UnstructuredGrid
fn clone(&self) -> UnstructuredGrid
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 DataObject for UnstructuredGrid
impl DataObject for UnstructuredGrid
fn field_data(&self) -> &FieldData
fn field_data_mut(&mut self) -> &mut FieldData
Source§impl DataSet for UnstructuredGrid
impl DataSet for UnstructuredGrid
fn num_points(&self) -> usize
fn num_cells(&self) -> usize
fn point(&self, idx: usize) -> [f64; 3]
fn bounds(&self) -> BoundingBox
fn point_data(&self) -> &DataSetAttributes
fn point_data_mut(&mut self) -> &mut DataSetAttributes
fn cell_data(&self) -> &DataSetAttributes
fn cell_data_mut(&mut self) -> &mut DataSetAttributes
Source§fn num_point_arrays(&self) -> usize
fn num_point_arrays(&self) -> usize
Number of point data arrays.
Source§fn num_cell_arrays(&self) -> usize
fn num_cell_arrays(&self) -> usize
Number of cell data arrays.
Source§impl Debug for UnstructuredGrid
impl Debug for UnstructuredGrid
Source§impl Default for UnstructuredGrid
impl Default for UnstructuredGrid
Source§fn default() -> UnstructuredGrid
fn default() -> UnstructuredGrid
Returns the “default value” for a type. Read more
Source§impl Display for UnstructuredGrid
impl Display for UnstructuredGrid
Source§impl From<UnstructuredGrid> for AnyDataSet
impl From<UnstructuredGrid> for AnyDataSet
Source§fn from(d: UnstructuredGrid) -> Self
fn from(d: UnstructuredGrid) -> Self
Converts to this type from the input type.
Source§impl From<UnstructuredGrid> for Block
impl From<UnstructuredGrid> for Block
Source§fn from(ug: UnstructuredGrid) -> Self
fn from(ug: UnstructuredGrid) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnstructuredGrid
impl RefUnwindSafe for UnstructuredGrid
impl Send for UnstructuredGrid
impl Sync for UnstructuredGrid
impl Unpin for UnstructuredGrid
impl UnsafeUnpin for UnstructuredGrid
impl UnwindSafe for UnstructuredGrid
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