pub struct StructuredMeshSurface { /* private fields */ }Expand description
A logically regular surface with explicit per-node coordinates.
Implementations§
Source§impl StructuredMeshSurface
impl StructuredMeshSurface
Sourcepub fn new(
x: Array2<f64>,
y: Array2<f64>,
values: Array2<f64>,
nominal_geometry: Option<GridGeometry>,
edge: PolygonSet,
) -> Result<Self>
pub fn new( x: Array2<f64>, y: Array2<f64>, values: Array2<f64>, nominal_geometry: Option<GridGeometry>, edge: PolygonSet, ) -> Result<Self>
Build a structured mesh surface from explicit node coordinate/value
arrays. Arrays must all be shaped (ncol, nrow).
pub fn ncol(&self) -> usize
pub fn nrow(&self) -> usize
pub fn x(&self) -> &Array2<f64>
pub fn y(&self) -> &Array2<f64>
pub fn values(&self) -> &Array2<f64>
Sourcepub fn nominal_geometry(&self) -> Option<&GridGeometry>
pub fn nominal_geometry(&self) -> Option<&GridGeometry>
Optional approximate regular geometry. This is metadata only; consumers must not treat it as the canonical node coordinate model.
Sourcepub fn edge(&self) -> &PolygonSet
pub fn edge(&self) -> &PolygonSet
Edge polygon in modelling coordinates.
Sourcepub fn node_xy(&self, i: usize, j: usize) -> Result<(f64, f64)>
pub fn node_xy(&self, i: usize, j: usize) -> Result<(f64, f64)>
World (x, y) of logical node (i, j).
Sourcepub fn to_points(&self) -> PointSet
pub fn to_points(&self) -> PointSet
Explode the mesh back into a PointSet — one point per populated node,
carrying its column/row topology.
Exact by construction: node XY/Z are copied, never resampled, so this is
the inverse of PointSet::to_structured_surface.
Node order is row-major (column varies fastest) and the emitted indices are
renumbered 1-based, so a round trip preserves every coordinate and the
topology, though not an arbitrary input ordering or index origin.
Trait Implementations§
Source§impl Clone for StructuredMeshSurface
impl Clone for StructuredMeshSurface
Source§fn clone(&self) -> StructuredMeshSurface
fn clone(&self) -> StructuredMeshSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for StructuredMeshSurface
impl<'de> Deserialize<'de> for StructuredMeshSurface
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>,
Source§impl HasHistory for StructuredMeshSurface
impl HasHistory for StructuredMeshSurface
Source§fn operation_history(&self) -> &OperationHistory
fn operation_history(&self) -> &OperationHistory
Source§fn operation_history_mut(&mut self) -> &mut OperationHistory
fn operation_history_mut(&mut self) -> &mut OperationHistory
Source§fn record_history(&mut self, entry: impl Into<String>)
fn record_history(&mut self, entry: impl Into<String>)
Auto Trait Implementations§
impl Freeze for StructuredMeshSurface
impl RefUnwindSafe for StructuredMeshSurface
impl Send for StructuredMeshSurface
impl Sync for StructuredMeshSurface
impl Unpin for StructuredMeshSurface
impl UnsafeUnpin for StructuredMeshSurface
impl UnwindSafe for StructuredMeshSurface
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.