Struct CartesianMesh
pub struct CartesianMesh { /* private fields */ }Description
Runtime-dimensional conforming mesh of an axis-aligned Cartesian box.
Every entity is represented by the axes along which it is free and one anchor index on every axis. The same construction therefore generates vertices, edges, facets, and cells without dimension-specific tables. Geometry is kept separate from topology through affine entity maps.
Implementations§
§impl CartesianMesh
impl CartesianMesh
pub fn from_axes(axes: Vec<Vec<f64>>) -> Result<CartesianMesh, Diagnostic>
pub fn from_axes(axes: Vec<Vec<f64>>) -> Result<CartesianMesh, Diagnostic>
Construct a conforming mesh from the vertex coordinates of each axis.
Axis coordinates must be finite and strictly increasing. At least one axis and two vertices per axis are required.
§Errors
Returns EQ0803 for invalid coordinates, shape/count overflow, or a
mesh exceeding the inspectable in-memory artifact limits.
pub fn uniform(
bounds: &[[f64; 2]],
cells_per_axis: &[usize],
) -> Result<CartesianMesh, Diagnostic>
pub fn uniform( bounds: &[[f64; 2]], cells_per_axis: &[usize], ) -> Result<CartesianMesh, Diagnostic>
Construct an axis-aligned uniform Cartesian mesh.
bounds[axis] and cells_per_axis[axis] describe the same physical
axis. Cell counts may differ by axis.
§Errors
Returns EQ0803 for incompatible shapes, invalid bounds/counts,
unrepresentable spacing, or artifact resource overflow.
pub fn axis_coordinates(&self, axis: usize) -> Option<&[f64]>
pub fn axis_coordinates(&self, axis: usize) -> Option<&[f64]>
Vertex coordinates for one physical axis.
pub fn axis_cell_count(&self, axis: usize) -> Option<usize>
pub fn axis_cell_count(&self, axis: usize) -> Option<usize>
Cell count on one physical axis.
pub fn entity_vertices(&self, entity: MeshEntity) -> Option<Vec<MeshEntity>>
pub fn entity_vertices(&self, entity: MeshEntity) -> Option<Vec<MeshEntity>>
Mesh vertex entities in the canonical local order of entity.
pub fn vertex_coordinates(&self, vertex: MeshEntity) -> Option<Vec<f64>>
pub fn vertex_coordinates(&self, vertex: MeshEntity) -> Option<Vec<f64>>
Physical coordinates of a valid vertex entity.
pub fn vertex_multi_index(&self, vertex: MeshEntity) -> Option<&[usize]>
pub fn vertex_multi_index(&self, vertex: MeshEntity) -> Option<&[usize]>
Axis-local vertex indices of a valid vertex entity.
pub fn cell_at(&self, cell_indices: &[usize]) -> Option<MeshEntity>
pub fn cell_at(&self, cell_indices: &[usize]) -> Option<MeshEntity>
Top-dimensional cell at one axis-local cell multi-index.
pub fn cell_multi_index(&self, cell: MeshEntity) -> Option<&[usize]>
pub fn cell_multi_index(&self, cell: MeshEntity) -> Option<&[usize]>
Axis-local cell indices of one valid top-dimensional cell entity.
pub fn is_boundary_entity(&self, entity: MeshEntity) -> Option<bool>
pub fn is_boundary_entity(&self, entity: MeshEntity) -> Option<bool>
Whether an entity lies in the boundary closure of the Cartesian box.
pub fn entity_center(&self, entity: MeshEntity) -> Option<Vec<f64>>
pub fn entity_center(&self, entity: MeshEntity) -> Option<Vec<f64>>
Physical coordinate of an entity center (xi = 0).
pub fn entity_free_axes(&self, entity: MeshEntity) -> Option<&[usize]>
pub fn entity_free_axes(&self, entity: MeshEntity) -> Option<&[usize]>
Cartesian axes free within an entity, in physical-axis order.
pub fn maximum_cell_width(&self) -> f64
pub fn maximum_cell_width(&self) -> f64
Largest physical side length among all cells and axes.
pub fn axis_bounds(&self, axis: usize) -> Option<[f64; 2]>
pub fn axis_bounds(&self, axis: usize) -> Option<[f64; 2]>
Current lower/upper coordinate of one physical axis.
pub fn linearize_axis_endpoints(
&self,
entity: MeshEntity,
axis: usize,
endpoint_tangents: [f64; 2],
) -> Result<AffineGeometryLinearization, Diagnostic>
pub fn linearize_axis_endpoints( &self, entity: MeshEntity, axis: usize, endpoint_tangents: [f64; 2], ) -> Result<AffineGeometryLinearization, Diagnostic>
Linearize one entity map with respect to its axis endpoints.
endpoint_tangents gives the lower and upper coordinate tangent for
axis. Every intermediate axis vertex retains its normalized position
between those endpoints. The resulting motion is therefore a global
affine pullback that preserves topology and axis alignment without
importing Semantic Model boundary vocabulary into the mesh layer.
§Errors
Returns EQ0803 for an invalid entity or axis.
Trait Implementations§
§impl Clone for CartesianMesh
impl Clone for CartesianMesh
§impl Debug for CartesianMesh
impl Debug for CartesianMesh
§impl MeshGeometry for CartesianMesh
impl MeshGeometry for CartesianMesh
§type Map<'a> = AffineGeometryMap
type Map<'a> = AffineGeometryMap
§fn geometric_dimension(&self) -> usize
fn geometric_dimension(&self) -> usize
§fn geometry_map(
&self,
entity: MeshEntity,
) -> Option<<CartesianMesh as MeshGeometry>::Map<'_>>
fn geometry_map( &self, entity: MeshEntity, ) -> Option<<CartesianMesh as MeshGeometry>::Map<'_>>
§impl MeshTopology for CartesianMesh
impl MeshTopology for CartesianMesh
§fn topological_dimension(&self) -> usize
fn topological_dimension(&self) -> usize
§fn entity_count(&self, dimension: usize) -> Option<usize>
fn entity_count(&self, dimension: usize) -> Option<usize>
§fn incidence(
&self,
entity: MeshEntity,
target_dimension: usize,
) -> Option<Vec<EntityIncidence>>
fn incidence( &self, entity: MeshEntity, target_dimension: usize, ) -> Option<Vec<EntityIncidence>>
target_dimension incident to entity in
deterministic reference-cell order. Invalid IDs or dimensions return
None.§impl PartialEq for CartesianMesh
impl PartialEq for CartesianMesh
§fn eq(&self, other: &CartesianMesh) -> bool
fn eq(&self, other: &CartesianMesh) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CartesianMesh
Auto Trait Implementations§
impl Freeze for CartesianMesh
impl RefUnwindSafe for CartesianMesh
impl Send for CartesianMesh
impl Sync for CartesianMesh
impl Unpin for CartesianMesh
impl UnsafeUnpin for CartesianMesh
impl UnwindSafe for CartesianMesh
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.