pub struct PyFemSolveResult {
pub displacements: Vec<f64>,
pub von_mises_stress: Vec<f64>,
pub solver_iterations: usize,
pub residual_norm: f64,
pub converged: bool,
}Expand description
Result of a FEM linear static solve.
Fields§
§displacements: Vec<f64>Nodal displacement vector (flat: [ux0, uy0, ux1, uy1, …]).
von_mises_stress: Vec<f64>Von Mises stress per element.
solver_iterations: usizeNumber of CG solver iterations used.
residual_norm: f64Residual norm at convergence.
converged: boolWhether the solver converged.
Implementations§
Source§impl PyFemSolveResult
impl PyFemSolveResult
Sourcepub fn node_displacement(&self, i: usize) -> Option<[f64; 2]>
pub fn node_displacement(&self, i: usize) -> Option<[f64; 2]>
Displacement of node i as [ux, uy].
Sourcepub fn max_von_mises(&self) -> f64
pub fn max_von_mises(&self) -> f64
Maximum von Mises stress over all elements.
Sourcepub fn mean_von_mises(&self) -> f64
pub fn mean_von_mises(&self) -> f64
Mean von Mises stress.
Source§impl PyFemSolveResult
impl PyFemSolveResult
Sourcepub fn displacement_pairs(&self) -> Vec<[f64; 2]>
pub fn displacement_pairs(&self) -> Vec<[f64; 2]>
Return the displacement field as a list of [ux, uy] pairs.
Sourcepub fn max_displacement_magnitude(&self) -> f64
pub fn max_displacement_magnitude(&self) -> f64
Maximum absolute displacement component.
Sourcepub fn sorted_von_mises(&self) -> Vec<f64>
pub fn sorted_von_mises(&self) -> Vec<f64>
Return all von Mises stresses as a sorted (ascending) copy.
Sourcepub fn von_mises_quantile(&self, q: f64) -> f64
pub fn von_mises_quantile(&self, q: f64) -> f64
Return the q-th quantile of the von Mises stress distribution (q in [0,1]).
Trait Implementations§
Source§impl Clone for PyFemSolveResult
impl Clone for PyFemSolveResult
Source§fn clone(&self) -> PyFemSolveResult
fn clone(&self) -> PyFemSolveResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PyFemSolveResult
impl Debug for PyFemSolveResult
Source§impl<'de> Deserialize<'de> for PyFemSolveResult
impl<'de> Deserialize<'de> for PyFemSolveResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PyFemSolveResult
impl RefUnwindSafe for PyFemSolveResult
impl Send for PyFemSolveResult
impl Sync for PyFemSolveResult
impl Unpin for PyFemSolveResult
impl UnsafeUnpin for PyFemSolveResult
impl UnwindSafe for PyFemSolveResult
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.