Class Penalty1DPower

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::Penalty1DPower : public Mechatronix::PenaltyBarrier1D

Penalty Power.

Public Functions

inline explicit Penalty1DPower(string const &name)

Construct the penalty.

void setup(integer n)

Set parameter for the penalty \( x^n\).

Parameters

n[in] the power

virtual void setup(GenericContainer const &gc) override

Set parameter for the penalty \( x^n\). The generic container gc must contain

  • ”n” the power

virtual real_type operator()(real_type x) const override

Evaluate: \( x^n\).

virtual real_type D(real_type x) const override

Evaluate: \( n x^{n-1}\).

virtual real_type DD(real_type x) const override

Evaluate: \( n(n-1) x^{n-2}\).

virtual string info() const override

print information about penalty