[][src]Function finiteelement::fes_one_step

pub fn fes_one_step<'a, F: Float + 'a, B: FiniteElement<F>>(
    system: &[B],
    positions: &mut [Point<F>],
    epsilon: F,
    gradient_switch: F,
    ws: &mut FesWorkspace<F>
) -> bool

Perform one iteration of Newton's method.

Argument:

  • system: A system of finite element
  • posistions: The positions of the points of the system. It is updated using either newton's method (if ws.gradient == false) or gradient descent (if ws.gradient == true)
  • epsilon: If on all points of the system the acceleration that is applied has a norm less that epsilon the finite element system is considered to be solved.
  • gradient_switch: threshold that determines wether the next optimization step should be a gradient descent or a newton's method step
  • ws: The workspace of the function, it will be updated.