OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::CubicSpline Class Reference

#include <CubicSpline.hpp>

Public Member Functions

 CubicSpline ()
 
virtual ~CubicSpline ()
 
void addPoint (const RealType xp, const RealType yp)
 
void addPoints (const vector< RealType > &xps, const vector< RealType > &yps)
 
RealType getValueAt (const RealType &t)
 
pair< RealType, RealType > getLimits ()
 
void getValueAt (const RealType &t, RealType &v)
 
void getValueAndDerivativeAt (const RealType &t, RealType &v, RealType &d)
 
RealType getSpacing ()
 

Private Member Functions

void generate ()
 
std::vector< int > sort_permutation (std::vector< RealType > &v)
 
std::vector< RealType > apply_permutation (std::vector< RealType > const &v, std::vector< int > const &p)
 

Private Attributes

bool isUniform
 
bool generated
 
RealType dx
 
RealType dt
 
RealType yval
 
RealType dydx
 
int n
 
int j
 
vector< RealType > x_
 
vector< RealType > y_
 
vector< RealType > b
 
vector< RealType > c
 
vector< RealType > d
 

Detailed Description

Definition at line 52 of file CubicSpline.hpp.

Constructor & Destructor Documentation

◆ CubicSpline()

CubicSpline::CubicSpline ( )

Definition at line 53 of file CubicSpline.cpp.

References x_, and y_.

◆ ~CubicSpline()

virtual OpenMD::CubicSpline::~CubicSpline ( )
inlinevirtual

Definition at line 56 of file CubicSpline.hpp.

Member Function Documentation

◆ addPoint()

void CubicSpline::addPoint ( const RealType  xp,
const RealType  yp 
)

Definition at line 58 of file CubicSpline.cpp.

References x_, and y_.

Referenced by OpenMD::Sticky::addType(), and OpenMD::SwitchingFunction::setSwitch().

◆ addPoints()

◆ apply_permutation()

std::vector< RealType > CubicSpline::apply_permutation ( std::vector< RealType > const &  v,
std::vector< int > const &  p 
)
private

Definition at line 343 of file CubicSpline.cpp.

References n.

Referenced by generate().

◆ generate()

void CubicSpline::generate ( )
private

◆ getLimits()

pair< RealType, RealType > CubicSpline::getLimits ( )

Definition at line 277 of file CubicSpline.cpp.

References generate(), generated, and x_.

Referenced by OpenMD::EAM::addExplicitInteraction(), and OpenMD::EAM::addType().

◆ getSpacing()

RealType CubicSpline::getSpacing ( )

Definition at line 282 of file CubicSpline.cpp.

References dx, generate(), generated, and isUniform.

Referenced by OpenMD::EAM::getPhi().

◆ getValueAndDerivativeAt()

void CubicSpline::getValueAndDerivativeAt ( const RealType &  t,
RealType &  v,
RealType &  d 
)

◆ getValueAt() [1/2]

RealType CubicSpline::getValueAt ( const RealType &  t)

◆ getValueAt() [2/2]

void CubicSpline::getValueAt ( const RealType &  t,
RealType &  v 
)

Definition at line 239 of file CubicSpline.cpp.

References b, c, d, dt, dx, generate(), generated, isUniform, j, n, x_, and y_.

◆ sort_permutation()

std::vector< int > CubicSpline::sort_permutation ( std::vector< RealType > &  v)
private

Definition at line 328 of file CubicSpline.cpp.

Referenced by generate().

Member Data Documentation

◆ b

vector<RealType> OpenMD::CubicSpline::b
private

Definition at line 77 of file CubicSpline.hpp.

Referenced by generate(), getValueAndDerivativeAt(), and getValueAt().

◆ c

vector<RealType> OpenMD::CubicSpline::c
private

Definition at line 78 of file CubicSpline.hpp.

Referenced by generate(), getValueAndDerivativeAt(), and getValueAt().

◆ d

vector<RealType> OpenMD::CubicSpline::d
private

Definition at line 79 of file CubicSpline.hpp.

Referenced by generate(), getValueAndDerivativeAt(), and getValueAt().

◆ dt

RealType OpenMD::CubicSpline::dt
private

Definition at line 73 of file CubicSpline.hpp.

Referenced by getValueAndDerivativeAt(), and getValueAt().

◆ dx

RealType OpenMD::CubicSpline::dx
private

Definition at line 73 of file CubicSpline.hpp.

Referenced by generate(), getSpacing(), getValueAndDerivativeAt(), and getValueAt().

◆ dydx

RealType OpenMD::CubicSpline::dydx
private

Definition at line 73 of file CubicSpline.hpp.

◆ generated

bool OpenMD::CubicSpline::generated
private

Definition at line 72 of file CubicSpline.hpp.

Referenced by generate(), getLimits(), getSpacing(), getValueAndDerivativeAt(), and getValueAt().

◆ isUniform

bool OpenMD::CubicSpline::isUniform
private

Definition at line 71 of file CubicSpline.hpp.

Referenced by generate(), getSpacing(), getValueAndDerivativeAt(), and getValueAt().

◆ j

int OpenMD::CubicSpline::j
private

Definition at line 74 of file CubicSpline.hpp.

Referenced by getValueAndDerivativeAt(), and getValueAt().

◆ n

int OpenMD::CubicSpline::n
private

Definition at line 74 of file CubicSpline.hpp.

Referenced by apply_permutation(), generate(), getValueAndDerivativeAt(), and getValueAt().

◆ x_

vector<RealType> OpenMD::CubicSpline::x_
private

◆ y_

vector<RealType> OpenMD::CubicSpline::y_
private

◆ yval

RealType OpenMD::CubicSpline::yval
private

Definition at line 73 of file CubicSpline.hpp.


The documentation for this class was generated from the following files: