NormalizedBarrier

template <typename BarrierT>
class NormalizedBarrier : public BarrierT;

Inheritance diagram for ipc::NormalizedBarrier:

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

Collaboration diagram for ipc::NormalizedBarrier:

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

Normalized barrier function from [Li et al. 2023].

Public Functions

NormalizedBarrier() = default;
inline double operator()(
    
const double dconst double dhat) const override;

Function that grows to infinity as d approaches 0 from the right.

\[ b(d) = -\left(\frac{d}{\hat{d}}-1\right)^2\ln\left(\frac{d}{\hat{d}}\right) \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The value of the barrier function at d.

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

Derivative of the barrier function.

\[ b'(d) = 2\frac{1}{\hat{d}}\left(1-\frac{d}{\hat{d}}\right)\ln\left(\frac{d}{\hat{d}}\right) + \left(1-\frac{d}{\hat{d}}\right)^2 \frac{1}{d} \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The derivative of the barrier wrt d.

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

Second derivative of the barrier function.

\[ b''(d) = \frac{\hat{d}^2-2 d^2 \ln \left(\frac{d}{\hat{d}}\right)+2 \hat{d} d-3 d^2}{\hat{d}^2 d^2} \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The second derivative of the barrier wrt d.

inline 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.