[][src]Trait finiteelement::FiniteElement

pub trait FiniteElement<F: Float> {
    fn forces(&self, positions: &[Point<F>], forces: &mut [F]);
fn jacobian(&self, positions: &[Point<F>], jacobian: &mut Sparse<F>); }

A trait for updating the forces vector and its jacobian in a finite element system.

The piece of code that implements that trait can be generated by procedurals macros.

Required methods

fn forces(&self, positions: &[Point<F>], forces: &mut [F])

Updates the force vector.

For each points on which &self applies a force, the corresponding values in forces are incremented.

fn jacobian(&self, positions: &[Point<F>], jacobian: &mut Sparse<F>)

Updates the jacobian.

For each pairs of points involved in the system, the value at the corresponding coordinates in jacobian is incremented.

Loading content...

Implementors

impl<'a, F: Float + 'a, B: Borrow<dyn FiniteElement<F>>> FiniteElement<F> for B[src]

Loading content...