Class NewtonImpactNSL

Defined in Program listing for file kernel/src/modelingTools/NewtonImpactNSL.hpp

class NewtonImpactNSL : public NonSmoothLaw

Newton impact Non Smooth Law.

This class formalizes the Newton Impact law together with a complementarity condition. i.e.

\left\{\begin{array}{l} y \geq 0, \lambda \geq 0, y^{T} \lambda=0\\ if y \leq 0 \quad \mbox{then} \quad \dot y(t^{+}) - e \dot y(t^{-}) \geq 0, \quad \lambda \geq 0, (\dot y(t^{+}) - e \dot y(t^{-}))^{T} \lambda=0 \end{array}\right.

nsLawSize is equal to 1.

Public Functions


default constructor

NewtonImpactNSL(double e)

constructor with the value of the NewtonImpactNSL attributes

  • e: the value of the coefficient of restitution

NewtonImpactNSL(unsigned int size, double e)

Apply multiple-axis impact.




Visitors hook.

void display() const

print the data to the screen

double e() const

getter of e


the value of e

bool isVerified() const

check the ns law to see if it is verified


a boolean value whioch determines if the NS Law is verified

void setE(double newVal)

setter of e

  • newVal: a double to set e