CubicBarrier

class CubicBarrier : public ipc::Barrier;

Inheritance diagram for ipc::CubicBarrier:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="ipc::Barrier" tooltip="ipc::Barrier"] "1" [label="ipc::CubicBarrier" tooltip="ipc::CubicBarrier" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::CubicBarrier:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="ipc::Barrier" tooltip="ipc::Barrier"] "1" [label="ipc::CubicBarrier" tooltip="ipc::CubicBarrier" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Cubic barrier function from [Ando 2024].

Public Functions

CubicBarrier() = default;
virtual double operator()(
    
const double dconst double dhat) const override;

Weak barrier function.

\[ b(d) = -\frac{2}{3\hat{d}} (d - \hat{d})^3 \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The value of the barrier function at d.

virtual double first_derivative(
    
const double dconst double dhat) const override;

Derivative of the barrier function.

\[ b'(d) = -2 (d - \hat{d})^2 \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The derivative of the barrier wrt d.

virtual double second_derivative(
    
const double dconst double dhat) const override;

Second derivative of the barrier function.

\[ b''(d) = -4 (d - \hat{d}) \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The second derivative of the barrier wrt d.

inline virtual double units(const double dhat) const override;

Get the units of the barrier function.

Parameters:
const double dhat

The activation distance of the barrier.

Returns:

The units of the barrier function.