Class Power1Regular

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::Power1Regular : public Mechatronix::RegularizedBase

\( (x)_+ \) value smoothed

Inizialization

build regularized 1-power class

inline explicit Power1Regular()
virtual void setup(GenericContainer const &gc) override

Initialize regularization parameters with a GenericContainer. Expect to find gc("h") and gc("epsilon") containing real scalars

void setup(real_type h, real_type epsilon)

Initialize h and epsilon, notice that \( h \geq 0 \) and \( \epsilon \in [0,0.25] \)

inline void update_h(real_type h)

Update \( h \geq 0 \)

inline void update_epsilon(real_type epsilon)

Update \( \epsilon \in [0,0.25] \)

Evaluate

virtual real_type operator()(real_type x) const override

Evaluate \( x_+ \) regularized

\[\begin{split} x^+_h = \begin{cases} \displaystyle\frac{3\epsilon}{3-2X} & x<0 \\[1em] \displaystyle\frac{a_0+X(a_1+X(a_2+X(a_3+a_4X)))}{1+X^3} & \mathrm{otherwise} \end{cases}, \qquad X = \frac{x}{h} \end{split}\]

and

\[ x^+_h(0) = 0, \qquad x^+_h(h)=1 \]

\[ a_0 = \epsilon, \quad a_1 = \displaystyle\frac{2}{3}\epsilon, \quad a_2 = \displaystyle\frac{4}{9}\epsilon, \quad a_3 = \displaystyle\frac{35}{27}\epsilon, \quad a_4 = 2-\displaystyle\frac{92}{27}\epsilon \]

../_images/POWER1_REGULARIZED_0.jpeg

virtual real_type D(real_type x) const override

compute \( (x_+)' \) regularized

../_images/POWER1_REGULARIZED_1.jpeg

virtual real_type DD(real_type x) const override

compute \( (x_+)'' \) regularized ../_images/POWER1_REGULARIZED_2.jpeg

Info

virtual string info() const override