NLMech  0.1.0
material::pd::LinearInfluenceFn Class Reference

A class to implement linear influence function. More...

#include <influenceFn.h>

Inheritance diagram for material::pd::LinearInfluenceFn:
Inheritance graph
Collaboration diagram for material::pd::LinearInfluenceFn:
Collaboration graph

Public Member Functions

double getInfFn (const double &r) const override
 Returns the value of influence function. More...
 
double getMoment (const size_t &i) const override
 Returns the moment of influence function. More...
 
 LinearInfluenceFn (const std::vector< double > &params, const size_t &dim)
 Constructor. More...
 
void print () const override
 Prints the information about the instance of the object.
 
void print (int nt, int lvl) const override
 Prints the information about the instance of the object. More...
 
std::string printStr (int nt, int lvl) const override
 Returns the string containing information about the instance of the object. More...
 
- Public Member Functions inherited from material::pd::BaseInfluenceFn
 BaseInfluenceFn ()=default
 Constructor.
 

Private Attributes

double d_a0
 Constants such that J(r) = d_a0 + d_a1 * r.
 
double d_a1
 Constants such that J(r) = d_a0 + d_a1 * r.
 

Detailed Description

A class to implement linear influence function.

$ J(r) = a0 + a1 r $

Constructor & Destructor Documentation

◆ LinearInfluenceFn()

material::pd::LinearInfluenceFn::LinearInfluenceFn ( const std::vector< double > &  params,
const size_t &  dim 
)
inline

Constructor.

Parameters
paramsList of parameters
dimDimension

Member Function Documentation

◆ getInfFn()

double material::pd::LinearInfluenceFn::getInfFn ( const double &  r) const
inlineoverridevirtual

Returns the value of influence function.

Parameters
rReference (initial) bond length
Returns
value Influence function at r

Implements material::pd::BaseInfluenceFn.

◆ getMoment()

double material::pd::LinearInfluenceFn::getMoment ( const size_t &  i) const
inlineoverridevirtual

Returns the moment of influence function.

If $ J(r) $ is the influence function for $ r\in [0,1)$ then $ i^{th}$ moment is given by

\[ M_i = \int_0^1 J(r) r^i dr. \]

Parameters
iith moment
Returns
moment Moment

Implements material::pd::BaseInfluenceFn.

Referenced by printStr().

Here is the caller graph for this function:

◆ print()

void material::pd::LinearInfluenceFn::print ( int  nt,
int  lvl 
) const
inlineoverridevirtual

Prints the information about the instance of the object.

Parameters
ntNumber of tabs to append before each line of string
lvlLevel of information sought (higher level means more information)

Reimplemented from material::pd::BaseInfluenceFn.

Here is the call graph for this function:

◆ printStr()

std::string material::pd::LinearInfluenceFn::printStr ( int  nt,
int  lvl 
) const
inlineoverridevirtual

Returns the string containing information about the instance of the object.

Parameters
ntNumber of tabs to append before each line of string
lvlLevel of information sought (higher level means more information)
Returns
string String containing information about this object

Reimplemented from material::pd::BaseInfluenceFn.

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

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