Class PenaltyBarrierU_parabola

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::PenaltyBarrierU_parabola : public Mechatronix::PenaltyBarrierU_base

Parabolic penalty.

Public Functions

inline PenaltyBarrierU_parabola(string const &name)

Construct the penalty.

inline virtual void setup(real_type epsilon, real_type tolerance) override

Initialize the penalty internal parameters based on the values of \( h \) and \( \epsilon \)

for \( h \) and vars[name()+"Epsi"] for \( \epsilon \)

Set the internal parameter

\[ C = \frac{\epsilon}{(1-h)^2} \]

based on the values of \( h \) and \( \epsilon \)

Parameters
  • epsilon[in] value \( \epsilon \)

  • tolerance[in] value \( h \)

inline virtual real_type eval(real_type x) const override

Compute the penalty \( p(x) = C\,x^2 \)

where the parameter \( C = \frac{\epsilon}{(1-h)^2} \) is precomputed after a call of method setup.

inline virtual real_type eval_D(real_type x) const override

First derivative of the penalty

inline virtual real_type eval_DD(real_type) const override

Second derivative of the penalty

inline virtual real_type solve(real_type RHS) const override

solve \( p'(z) = r \)