| n2p2 - A neural network potential package
    | 
A general function with compact support. More...
#include <CompactFunction.h>

| Public Member Functions | |
| CompactFunction () | |
| Constructor, initializes to CoreFunction::Type::POLY2. | |
| void | setCoreFunction (CoreFunction::Type const type) | 
| Set type. | |
| void | setCenterWidth (double center, double width) | 
| Set center and width. | |
| void | setLeftRight (double left, double right) | 
| Set left and right boundary. | |
| CoreFunction::Type | getCoreFunctionType () const | 
| Getter for #type. | |
| void | setAsymmetric (bool asymmetric) | 
| Set asymmetric property in core function. | |
| bool | getAsymmetric () const | 
| Check if asymmetry is enabled in core function. | |
| double | getCenter () const | 
| Getter for center. | |
| double | getWidth () const | 
| Getter for width. | |
| double | getLeft () const | 
| Getter for left. | |
| double | getRight () const | 
| Getter for right. | |
| double | f (double a) const | 
| Compact function \(f_c\). | |
| double | df (double a) const | 
| Derivative of compact function \(\frac{d f_c}{d a}\). | |
| void | fdf (double a, double &fa, double &dfa) const | 
| Calculate compact function and derivative at once. | |
| Private Attributes | |
| double | center | 
| Center of compact function. | |
| double | width | 
| Width of compact function. | |
| double | left | 
| Left boundary of compact function. | |
| double | right | 
| Right boundary of compact function. | |
| double | scale | 
| Inverse width. | |
| CoreFunction | core | 
| Core function to be used on either side of compact function. | |
A general function with compact support.
Definition at line 27 of file CompactFunction.h.
| CompactFunction::CompactFunction | ( | ) | 
Constructor, initializes to CoreFunction::Type::POLY2.
Definition at line 24 of file CompactFunction.cpp.
References center, core, left, nnp::CoreFunction::POLY2, right, scale, and width.
| 
 | inline | 
Set type.
| [in] | type | Type of core function to use. | 
Definition at line 131 of file CompactFunction.h.
References core.
| void CompactFunction::setCenterWidth | ( | double | center, | 
| double | width ) | 
Set center and width.
| [in] | center | Center of compact function. | 
| [in] | width | Width of compact function. | 
Definition at line 47 of file CompactFunction.cpp.
| void CompactFunction::setLeftRight | ( | double | left, | 
| double | right ) | 
Set left and right boundary.
| [in] | left | Left boundary of compact function. | 
| [in] | right | Right boundary of compact function. | 
Definition at line 63 of file CompactFunction.cpp.
| 
 | inline | 
Getter for #type.
Definition at line 138 of file CompactFunction.h.
References core.
| void CompactFunction::setAsymmetric | ( | bool | asymmetric | ) | 
Set asymmetric property in core function.
| [in] | asymmetric | Whether asymmetry should be activated. | 
Definition at line 39 of file CompactFunction.cpp.
References core.
| bool CompactFunction::getAsymmetric | ( | ) | const | 
Check if asymmetry is enabled in core function.
Definition at line 34 of file CompactFunction.cpp.
References core.
| 
 | inline | 
Getter for center.
Definition at line 143 of file CompactFunction.h.
References center.
| 
 | inline | 
Getter for width.
Definition at line 144 of file CompactFunction.h.
References width.
| 
 | inline | 
Getter for left.
Definition at line 145 of file CompactFunction.h.
References left.
| 
 | inline | 
Getter for right.
Definition at line 146 of file CompactFunction.h.
References right.
| 
 | inline | 
| 
 | inline | 
Derivative of compact function \(\frac{d f_c}{d a}\).
| [in] | a | Function argument. | 
Definition at line 154 of file CompactFunction.h.
| 
 | inline | 
Calculate compact function and derivative at once.
| [in] | a | Function argument. | 
| [out] | fa | Cutoff function value. | 
| [out] | dfa | Value of cutoff function derivative. | 
Definition at line 160 of file CompactFunction.h.
| 
 | private | 
Center of compact function.
Definition at line 113 of file CompactFunction.h.
Referenced by CompactFunction(), df(), f(), fdf(), getCenter(), setCenterWidth(), and setLeftRight().
| 
 | private | 
Width of compact function.
Definition at line 115 of file CompactFunction.h.
Referenced by CompactFunction(), getWidth(), setCenterWidth(), and setLeftRight().
| 
 | private | 
Left boundary of compact function.
Definition at line 117 of file CompactFunction.h.
Referenced by CompactFunction(), getLeft(), setCenterWidth(), and setLeftRight().
| 
 | private | 
Right boundary of compact function.
Definition at line 119 of file CompactFunction.h.
Referenced by CompactFunction(), getRight(), setCenterWidth(), and setLeftRight().
| 
 | private | 
Inverse width.
Definition at line 121 of file CompactFunction.h.
Referenced by CompactFunction(), df(), f(), fdf(), setCenterWidth(), and setLeftRight().
| 
 | private | 
Core function to be used on either side of compact function.
Definition at line 123 of file CompactFunction.h.
Referenced by CompactFunction(), df(), f(), fdf(), getAsymmetric(), getCoreFunctionType(), setAsymmetric(), and setCoreFunction().