Skip to main content

SolverCallback

Trait SolverCallback 

Source
pub trait SolverCallback<const N: usize> {
    type Error;

    // Provided method
    fn callback(
        &mut self,
        _mesh: &Mesh<N>,
        _input: ImageRef<'_>,
        _output: ImageRef<'_>,
        _iteration: usize,
    ) -> Result<(), Self::Error> { ... }
}
Expand description

Trait for implementing solver callbacks (most often used to output visualization data).

Required Associated Types§

Provided Methods§

Source

fn callback( &mut self, _mesh: &Mesh<N>, _input: ImageRef<'_>, _output: ImageRef<'_>, _iteration: usize, ) -> Result<(), Self::Error>

Called once for every iteration in a iterative solver.

Implementations on Foreign Types§

Source§

impl<const N: usize> SolverCallback<N> for ()

Implementors§

Source§

impl<const N: usize, F: Fn(&Mesh<N>, ImageRef<'_>, ImageRef<'_>, usize)> SolverCallback<N> for F