pub type Tet4Mesh<T> = Mesh3d<T, Tet4Connectivity>;
Aliased Type§
struct Tet4Mesh<T> { /* private fields */ }
Implementations§
source§impl<T, D, Connectivity> Mesh<T, D, Connectivity>where
T: Scalar,
D: DimName,
DefaultAllocator: Allocator<T, D>,
impl<T, D, Connectivity> Mesh<T, D, Connectivity>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D>,
pub fn vertices_mut(&mut self) -> &mut [OPoint<T, D>]
pub fn vertices(&self) -> &[OPoint<T, D>]
pub fn connectivity(&self) -> &[Connectivity]
sourcepub fn from_vertices_and_connectivity(
vertices: Vec<OPoint<T, D>>,
connectivity: Vec<Connectivity>
) -> Self
pub fn from_vertices_and_connectivity( vertices: Vec<OPoint<T, D>>, connectivity: Vec<Connectivity> ) -> Self
Construct a mesh from vertices and connectivity.
The provided connectivity is expected only to return valid (i.e. in-bounds) indices, but this can not be trusted. Users of the mesh are permitted to panic if they encounter invalid indices, but unchecked indexing may easily lead to undefined behavior.
In other words, if the connectivity references indices out of bounds, then the code is incorrect. However, since this can be done exclusively with safe code, unchecked or unsafe indexing in which the user is trusted to provide valid indices may produce undefined behavior.Therefore, the connectivity must always be checked.
source§impl<T, D, Connectivity> Mesh<T, D, Connectivity>where
T: Scalar,
D: DimName,
DefaultAllocator: Allocator<T, D>,
Connectivity: CellConnectivity<T, D>,
impl<T, D, Connectivity> Mesh<T, D, Connectivity>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D>, Connectivity: CellConnectivity<T, D>,
source§impl<T, D, C> Mesh<T, D, C>where
T: Scalar,
D: DimName,
C: Connectivity,
C::FaceConnectivity: Connectivity,
DefaultAllocator: Allocator<T, D>,
impl<T, D, C> Mesh<T, D, C>where T: Scalar, D: DimName, C: Connectivity, C::FaceConnectivity: Connectivity, DefaultAllocator: Allocator<T, D>,
sourcepub fn find_boundary_cells(&self) -> Vec<usize>
pub fn find_boundary_cells(&self) -> Vec<usize>
Finds cells that have at least one boundary face.
sourcepub fn find_boundary_faces(&self) -> Vec<(C::FaceConnectivity, usize, usize)>
pub fn find_boundary_faces(&self) -> Vec<(C::FaceConnectivity, usize, usize)>
Finds faces which are only connected to exactly one cell, along with the connected cell index and the local index of the face within that cell.
sourcepub fn find_boundary_vertices(&self) -> Vec<usize>
pub fn find_boundary_vertices(&self) -> Vec<usize>
Returns a sorted list of vertices that are determined to be on the boundary.
A vertex is considered to be a part of the boundary if it belongs to a boundary face.
source§impl<T, D, C> Mesh<T, D, C>where
T: Real,
D: DimName,
DefaultAllocator: Allocator<T, D>,
impl<T, D, C> Mesh<T, D, C>where T: Real, D: DimName, DefaultAllocator: Allocator<T, D>,
sourcepub fn translate(&mut self, translation: &OVector<T, D>)
pub fn translate(&mut self, translation: &OVector<T, D>)
Translates all vertices of the mesh by the given translation vector.
sourcepub fn translated(self, translation: &OVector<T, D>) -> Self
pub fn translated(self, translation: &OVector<T, D>) -> Self
Consumes the mesh and returns it translated by the given translation vector.
sourcepub fn transform_vertices<F>(&mut self, transformation: F)where
F: FnMut(&mut OPoint<T, D>),
pub fn transform_vertices<F>(&mut self, transformation: F)where F: FnMut(&mut OPoint<T, D>),
Transform all vertices of the mesh by the given transformation function.
pub fn transform_all_vertices<F>(&mut self, transformation: F)where F: FnMut(&mut [OPoint<T, D>]),
source§impl<T, D, C> Mesh<T, D, C>where
T: Scalar,
D: DimName,
C: ConnectivityMut,
DefaultAllocator: Allocator<T, D>,
impl<T, D, C> Mesh<T, D, C>where T: Scalar, D: DimName, C: ConnectivityMut, DefaultAllocator: Allocator<T, D>,
sourcepub fn keep_cells(&self, cell_indices: &[usize]) -> Self
pub fn keep_cells(&self, cell_indices: &[usize]) -> Self
Returns a new mesh in which only the desired cells are kept. The vertices are removed or relabeled as necessary.
source§impl<T, D, C> Mesh<T, D, C>where
T: Scalar,
D: DimName,
C: Connectivity,
C::FaceConnectivity: ConnectivityMut,
DefaultAllocator: Allocator<T, D>,
impl<T, D, C> Mesh<T, D, C>where T: Scalar, D: DimName, C: Connectivity, C::FaceConnectivity: ConnectivityMut, DefaultAllocator: Allocator<T, D>,
sourcepub fn extract_surface_mesh(&self) -> Mesh<T, D, C::FaceConnectivity>
pub fn extract_surface_mesh(&self) -> Mesh<T, D, C::FaceConnectivity>
Constructs a new mesh from the surface cells of the mesh.
The orientation of the faces are preserved.