automesh/
lib.rs

1//! [![book](https://img.shields.io/badge/automesh-Book-blue?logo=mdbook&logoColor=000000)](https://autotwin.github.io/automesh)
2//! [![crates](https://img.shields.io/crates/v/automesh?logo=rust&logoColor=000000&label=Crates&color=32592f)](https://crates.io/crates/automesh)
3//! [![docs](https://img.shields.io/badge/Docs-API-e57300?logo=docsdotrs&logoColor=000000)](https://docs.rs/automesh)
4//! [![pypi](https://img.shields.io/pypi/v/automesh?logo=pypi&logoColor=FBE072&label=PyPI&color=4B8BBE)](https://pypi.org/project/automesh)
5//! [![docs](https://img.shields.io/badge/Docs-API-8CA1AF?logo=readthedocs)](https://automesh.readthedocs.io)
6//! [![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.13845433-blue)](https://doi.org/10.5281/zenodo.13845433)
7//!
8//! Automatic mesh generation.
9
10#![doc(html_logo_url = "https://github.com/autotwin/automesh/blob/main/docs/logo.png?raw=true")]
11
12#[cfg(feature = "python")]
13mod py;
14
15mod fem;
16mod tessellation;
17mod tree;
18mod voxel;
19
20pub use fem::{
21    Blocks, Connectivity, FiniteElementMethods, FiniteElementSpecifics, FiniteElements, HEX,
22    HexahedralFiniteElements, Size, Smoothing, TET, TRI, TetrahedralFiniteElements,
23    TriangularFiniteElements,
24};
25pub use tessellation::Tessellation;
26pub use tree::Octree;
27pub use voxel::{Extraction, Nel, Remove, Scale, Translate, VoxelData, Voxels};
28
29use conspire::math::{TensorRank1, TensorRank1Vec};
30
31/// The number of spatial dimensions.
32pub const NSD: usize = 3;
33
34/// A three-dimensional coordinate.
35pub type Coordinate = TensorRank1<NSD, 1>;
36
37/// A vector of three-dimensional coordinates.
38pub type Coordinates = TensorRank1Vec<NSD, 1>;
39
40/// A three-dimensional vector.
41pub type Vector = Coordinate;