File kernel/src/modelingTools/NonSmoothLaw.hpp

Go to the source code of this file

Base (abstract) class for a nonsmooth law.

class NonSmoothLaw
#include <NonSmoothLaw.hpp>

Non Smooth Laws (NSL) Base Class.

This class is the base class for all nonsmooth laws in Siconos. A nonsmooth law characterize the (nonsmooth) relationship between 2 variables, usually designated by \(y\) and \(\lambda\). \(y\) is most of time seen as the “input” from DynamicalSystems and is given by a Relation linked to this nonsmoothlaw. \(\lambda\) is then the “output” and through the same Relation is fed back to one or more DynamicalSystem.

classical examples of nonsmooth law include:

The computation of both \(y\) and \(\lambda\) is carried on by a solver in Numerics through a OneStepNSProblem object.

Subclassed by ComplementarityConditionNSL, EqualityConditionNSL, MixedComplementarityConditionNSL, MultipleImpactNSL, NewtonImpactFrictionNSL, NewtonImpactNSL, NormalConeNSL, RelayNSL

Public Functions

NonSmoothLaw(unsigned int size)

basic constructor

Parameters
  • size: the nonsmooth law size

virtual ~NonSmoothLaw()

destructor

virtual void display() const = 0

display the data of the NonSmoothLaw on the standard output

virtual bool isVerified() const

check if the NS law is verified

Return
a boolean value which determines if the NS Law is verified

unsigned int size() const

to get the size

Return
the size of the NS law

VIRTUAL_ACCEPT_VISITORS(NonSmoothLaw)

visitors hook

Protected Functions

NonSmoothLaw()

default constructor

NonSmoothLaw(const NonSmoothLaw &notUsed)

copy constructor (private=> no copy nor pass-by value allowed)

Parameters
  • notUsed: notused

ACCEPT_SERIALIZATION(NonSmoothLaw)

serialization hooks

Protected Attributes

unsigned int _size

“size” of the NonSmoothLaw