Skip to main content

Module primitives

Module primitives 

Source
Expand description

Layer 1a — dimensionless scalar constants and the tensor-algebra primitives (Vector3, Tensor, SymmTensor, SphericalTensor). Layer 1a — the primitive numeric types OpenFOAM builds everything on.

This module holds the dimensionless scalar type and small-/large-number constants (scalar) together with the fixed-size 3-D tensor-algebra primitives: a 3-vector (Vector3), a full 3×3 tensor (Tensor), a symmetric 3×3 tensor (SymmTensor), and an isotropic diagonal tensor (SphericalTensor). All components are plain f64 (dimensionless SI); uom-dimensioned quantities are layered on top elsewhere in the crate. Each type mirrors its Foam:: counterpart, including component storage order and the OpenFOAM operator conventions (&, &&, ^, *).

Re-exports§

pub use eigen::eigen_values;
pub use eigen::eigen_values_checked;
pub use eigen::eigen_values_symm;
pub use eigen::eigen_vectors;
pub use eigen::eigen_vectors_symm;
pub use eigen::eigen_vectors_symm_with;
pub use eigen::eigen_vectors_with;
pub use scalar::Label;
pub use scalar::Scalar;
pub use scalar::GREAT;
pub use scalar::ROOT_GREAT;
pub use scalar::ROOT_SMALL;
pub use scalar::ROOT_VSMALL;
pub use scalar::SMALL;
pub use scalar::VGREAT;
pub use scalar::VSMALL;
pub use spherical_tensor::SphericalTensor;
pub use symm_tensor::SymmTensor;
pub use tensor::Tensor;
pub use vector::Vector3;

Modules§

eigen
The scalar floating-point type and the small/large numeric constants. Spectral decomposition of 3x3 tensors – eigenvalues, eigenvectors, and the basis every isotropic tensor function (logarithm, exponential, square root) is built on. Eigenvalues and eigenvectors of 3x3 tensors.
scalar
The scalar floating-point type and OpenFOAM’s small/large numeric guard constants.
spherical_tensor
Isotropic diagonal tensor ii * I (SphericalTensor). Isotropic diagonal tensor (SphericalTensor) — an OpenFOAM primitive that stores only the single scalar ii of ii * I.
symm_tensor
Symmetric 3×3 tensor (SymmTensor). Symmetric 3×3 tensor (SymmTensor) and its OpenFOAM-style operators.
tensor
Full (non-symmetric) 3×3 tensor (Tensor). Full (non-symmetric) 3×3 tensor (Tensor) and its OpenFOAM-style operators, invariants, and decompositions.
vector
3-component vector (Vector3). 3-component vector (Vector3) and its OpenFOAM-style operators.