pub struct NonLocalRegularization {
pub lc: f64,
}Expand description
Non-local integral averaging for damage regularization.
Computes a weighted average of a local field (e.g., equivalent strain) over a neighborhood defined by a characteristic length l_c.
ε̄(x) = Σ w(|x - xᵢ|) * ε(xᵢ) / Σ w(|x - xᵢ|)
where w(r) = exp(-r² / (2*l_c²)) is the Gaussian weight.
Fields§
§lc: f64Characteristic (internal) length l_c (m).
Implementations§
Source§impl NonLocalRegularization
impl NonLocalRegularization
Sourcepub fn new(lc: f64) -> Self
pub fn new(lc: f64) -> Self
Create a new non-local regularization with characteristic length l_c.
Sourcepub fn weight(&self, distance: f64) -> f64
pub fn weight(&self, distance: f64) -> f64
Gaussian weight function: w(r) = exp(-r² / (2*l_c²)).
Sourcepub fn weight_bell(&self, distance: f64) -> f64
pub fn weight_bell(&self, distance: f64) -> f64
Bell-shaped (polynomial) weight function (compact support at r = l_c).
w(r) = (1 - (r/l_c)²)² for r < l_c, 0 otherwise
Sourcepub fn nonlocal_average(
&self,
point: &[f64; 3],
positions: &[[f64; 3]],
values: &[f64],
) -> f64
pub fn nonlocal_average( &self, point: &[f64; 3], positions: &[[f64; 3]], values: &[f64], ) -> f64
Compute non-local average of a field at a given point.
§Arguments
point- Position at which to evaluate the non-local averagepositions- Positions of all integration pointsvalues- Local field values at each integration point
Trait Implementations§
Source§impl Clone for NonLocalRegularization
impl Clone for NonLocalRegularization
Source§fn clone(&self) -> NonLocalRegularization
fn clone(&self) -> NonLocalRegularization
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NonLocalRegularization
impl RefUnwindSafe for NonLocalRegularization
impl Send for NonLocalRegularization
impl Sync for NonLocalRegularization
impl Unpin for NonLocalRegularization
impl UnsafeUnpin for NonLocalRegularization
impl UnwindSafe for NonLocalRegularization
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