pub enum RefinementCriteria<F: IntegrateFloat> {
GradientBased {
threshold: F,
coarsen_threshold: F,
},
CurvatureBased {
threshold: F,
coarsen_threshold: F,
},
ErrorBased {
threshold: F,
coarsen_threshold: F,
},
}Expand description
Refinement criteria for deciding when to refine/coarsen
Variants§
GradientBased
Refine based on solution gradient magnitude
CurvatureBased
Refine based on second derivative (curvature)
ErrorBased
Refine based on estimated truncation error
Implementations§
Source§impl<F: IntegrateFloat> RefinementCriteria<F>
impl<F: IntegrateFloat> RefinementCriteria<F>
Sourcepub fn gradient_based(threshold: F) -> Self
pub fn gradient_based(threshold: F) -> Self
Create gradient-based refinement criteria
Sourcepub fn curvature_based(threshold: F) -> Self
pub fn curvature_based(threshold: F) -> Self
Create curvature-based refinement criteria
Sourcepub fn error_based(threshold: F) -> Self
pub fn error_based(threshold: F) -> Self
Create error-based refinement criteria
Sourcepub fn should_refine(
&self,
solution: ArrayView2<'_, F>,
i: usize,
j: usize,
) -> bool
pub fn should_refine( &self, solution: ArrayView2<'_, F>, i: usize, j: usize, ) -> bool
Check if cell should be refined
Sourcepub fn should_coarsen(
&self,
solution: ArrayView2<'_, F>,
i: usize,
j: usize,
) -> bool
pub fn should_coarsen( &self, solution: ArrayView2<'_, F>, i: usize, j: usize, ) -> bool
Check if cell should be coarsened
Trait Implementations§
Source§impl<F: Clone + IntegrateFloat> Clone for RefinementCriteria<F>
impl<F: Clone + IntegrateFloat> Clone for RefinementCriteria<F>
Source§fn clone(&self) -> RefinementCriteria<F>
fn clone(&self) -> RefinementCriteria<F>
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 moreAuto Trait Implementations§
impl<F> Freeze for RefinementCriteria<F>where
F: Freeze,
impl<F> RefUnwindSafe for RefinementCriteria<F>where
F: RefUnwindSafe,
impl<F> Send for RefinementCriteria<F>where
F: Send,
impl<F> Sync for RefinementCriteria<F>where
F: Sync,
impl<F> Unpin for RefinementCriteria<F>where
F: Unpin,
impl<F> UnwindSafe for RefinementCriteria<F>where
F: UnwindSafe,
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more