pub struct PyFemSolver {
pub max_iterations: usize,
pub tolerance: f64,
}Expand description
Linear static FEM solver for 2-D plane-stress problems.
Assembles the global stiffness matrix K from CST elements, applies Dirichlet boundary conditions, builds the load vector f, and solves K u = f with a Conjugate Gradient (CG) iterative solver.
Fields§
§max_iterations: usizeMaximum CG iterations.
tolerance: f64CG convergence tolerance.
Implementations§
Source§impl PyFemSolver
impl PyFemSolver
Sourcepub fn with_settings(max_iterations: usize, tolerance: f64) -> Self
pub fn with_settings(max_iterations: usize, tolerance: f64) -> Self
Create a solver with custom settings.
Sourcepub fn solve(&self, mesh: &PyFemMesh) -> Option<PyFemSolveResult>
pub fn solve(&self, mesh: &PyFemMesh) -> Option<PyFemSolveResult>
Solve the linear static problem K u = f.
Returns None if the mesh has no nodes or no elements.
Trait Implementations§
Source§impl Clone for PyFemSolver
impl Clone for PyFemSolver
Source§fn clone(&self) -> PyFemSolver
fn clone(&self) -> PyFemSolver
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 PyFemSolver
impl Debug for PyFemSolver
Auto Trait Implementations§
impl Freeze for PyFemSolver
impl RefUnwindSafe for PyFemSolver
impl Send for PyFemSolver
impl Sync for PyFemSolver
impl Unpin for PyFemSolver
impl UnsafeUnpin for PyFemSolver
impl UnwindSafe for PyFemSolver
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.