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, FremondImpactFrictionNSL, MixedComplementarityConditionNSL, MultipleImpactNSL, NewtonImpactFrictionNSL, NewtonImpactNSL, NewtonImpactRollingFrictionNSL, NormalConeNSL, RelayNSL

Public Functions

inline NonSmoothLaw(unsigned int size)

basic constructor

Parameters:

size – the nonsmooth law size

virtual ~NonSmoothLaw() noexcept = default

destructor

inline virtual bool isVerified() const
Returns:

a boolean value which determines if the NS Law is verified. Not implemented for the moment.

inline unsigned int size() const
Returns:

the size of the NS law

virtual void display() const = 0

display the data of the NonSmoothLaw on the standard output

VIRTUAL_ACCEPT_VISITORS(NonSmoothLaw)#

Protected Functions

ACCEPT_SERIALIZATION(NonSmoothLaw)#
NonSmoothLaw() = default#
NonSmoothLaw(const NonSmoothLaw&) = delete#
NonSmoothLaw(NonSmoothLaw&&) = delete#
NonSmoothLaw &operator=(const NonSmoothLaw&) = delete#
NonSmoothLaw &operator=(const NonSmoothLaw&&) = delete#

Protected Attributes

unsigned int _size = {0}#

“size” of the NonSmoothLaw