Public Member Functions | Private Attributes | List of all members
PLMD::MultiValue Class Reference

#include <MultiValue.h>

Public Member Functions

 MultiValue (const unsigned &, const unsigned &)
 
void addDerivative (const unsigned &, const unsigned &, const double &)
 Add derivative. More...
 
void addTemporyDerivative (const unsigned &jder, const double &der)
 Add tempory derivatives - this is used for calculating quotients. More...
 
void addTemporyValue (const double &val)
 Add to the tempory value. More...
 
void addValue (const unsigned &, const double &)
 Add value numbered. More...
 
void chainRule (const unsigned &, const unsigned &, const unsigned &, const unsigned &, const double &, const unsigned &, std::vector< double > &buffer)
 Transfer derivatives to buffer. More...
 
void clear (const unsigned &)
 Clear a value. More...
 
void clearAll ()
 Clear all values. More...
 
void clearTemporyDerivatives ()
 Clear the tempory derivatives. More...
 
void completeUpdate ()
 
void copyDerivatives (MultiValue &)
 
void copyValues (MultiValue &) const
 
void emptyActiveMembers ()
 
double get (const unsigned &) const
 Return the ith value. More...
 
unsigned getActiveIndex (const unsigned &) const
 
std::vector< Vector > & getAtomVector ()
 
double getDerivative (const unsigned &, const unsigned &) const
 Return a derivative value. More...
 
std::vector< unsigned > & getIndices ()
 
unsigned getNumberActive () const
 
unsigned getNumberOfDerivatives () const
 Get the number of derivatives in the stash. More...
 
unsigned getNumberOfValues () const
 Get the number of values in the stash. More...
 
std::vector< unsigned > & getSortIndices ()
 
double getTemporyDerivative (const unsigned &jder) const
 Get one of the tempory derivatives. More...
 
bool isActive (const unsigned &ind) const
 
void putIndexInActiveArray (const unsigned &)
 
void quotientRule (const unsigned &nder, const unsigned &oder)
 
void resize (const unsigned &, const unsigned &)
 
void setDerivative (const unsigned &ival, const unsigned &jder, const double &der)
 Set the value of the derivative. More...
 
void setValue (const unsigned &, const double &)
 Set value numbered. More...
 
void sortActiveList ()
 
bool updateComplete ()
 Functions for accessing active list. More...
 
void updateDynamicList ()
 
void updateIndex (const unsigned &)
 

Private Attributes

bool atLeastOneSet
 Logical to check if any derivatives were set. More...
 
std::vector< double > derivatives
 Derivatives. More...
 
DynamicList< unsigned > hasDerivatives
 Used to ensure rapid accumulation of derivatives. More...
 
std::vector< unsigned > indices
 This is a fudge to save on vector resizing in MultiColvar. More...
 
unsigned nderivatives
 Number of derivatives per value. More...
 
std::vector< unsigned > sort_indices
 
std::vector< Vectortmp_atoms
 
std::vector< double > tmpder
 Tempory vector of derivatives (used for calculating quotients. More...
 
double tmpval
 Tempory value. More...
 
std::vector< double > values
 Values of quantities. More...
 

Constructor & Destructor Documentation

◆ MultiValue()

PLMD::MultiValue::MultiValue ( const unsigned &  nvals,
const unsigned &  nder 
)

Member Function Documentation

◆ addDerivative()

void PLMD::MultiValue::addDerivative ( const unsigned &  ival,
const unsigned &  jder,
const double &  der 
)
inline

Add derivative.

◆ addTemporyDerivative()

void PLMD::MultiValue::addTemporyDerivative ( const unsigned &  jder,
const double &  der 
)
inline

Add tempory derivatives - this is used for calculating quotients.

◆ addTemporyValue()

void PLMD::MultiValue::addTemporyValue ( const double &  val)
inline

Add to the tempory value.

◆ addValue()

void PLMD::MultiValue::addValue ( const unsigned &  ival,
const double &  val 
)
inline

Add value numbered.

◆ chainRule()

void PLMD::MultiValue::chainRule ( const unsigned &  ival,
const unsigned &  iout,
const unsigned &  stride,
const unsigned &  off,
const double &  df,
const unsigned &  bufstart,
std::vector< double > &  buffer 
)

Transfer derivatives to buffer.

◆ clear()

void PLMD::MultiValue::clear ( const unsigned &  ival)

Clear a value.

◆ clearAll()

void PLMD::MultiValue::clearAll ( )

Clear all values.

◆ clearTemporyDerivatives()

void PLMD::MultiValue::clearTemporyDerivatives ( )

Clear the tempory derivatives.

◆ completeUpdate()

void PLMD::MultiValue::completeUpdate ( )
inline

◆ copyDerivatives()

void PLMD::MultiValue::copyDerivatives ( MultiValue outvals)

◆ copyValues()

void PLMD::MultiValue::copyValues ( MultiValue outvals) const

◆ emptyActiveMembers()

void PLMD::MultiValue::emptyActiveMembers ( )
inline

◆ get()

double PLMD::MultiValue::get ( const unsigned &  ival) const
inline

Return the ith value.

◆ getActiveIndex()

unsigned PLMD::MultiValue::getActiveIndex ( const unsigned &  ind) const
inline

◆ getAtomVector()

std::vector< Vector > & PLMD::MultiValue::getAtomVector ( )
inline

◆ getDerivative()

double PLMD::MultiValue::getDerivative ( const unsigned &  ival,
const unsigned &  jder 
) const
inline

Return a derivative value.

◆ getIndices()

std::vector< unsigned > & PLMD::MultiValue::getIndices ( )
inline

◆ getNumberActive()

unsigned PLMD::MultiValue::getNumberActive ( ) const
inline

◆ getNumberOfDerivatives()

unsigned PLMD::MultiValue::getNumberOfDerivatives ( ) const
inline

Get the number of derivatives in the stash.

◆ getNumberOfValues()

unsigned PLMD::MultiValue::getNumberOfValues ( ) const
inline

Get the number of values in the stash.

◆ getSortIndices()

std::vector< unsigned > & PLMD::MultiValue::getSortIndices ( )
inline

◆ getTemporyDerivative()

double PLMD::MultiValue::getTemporyDerivative ( const unsigned &  jder) const
inline

Get one of the tempory derivatives.

◆ isActive()

bool PLMD::MultiValue::isActive ( const unsigned &  ind) const
inline

◆ putIndexInActiveArray()

void PLMD::MultiValue::putIndexInActiveArray ( const unsigned &  ind)
inline

◆ quotientRule()

void PLMD::MultiValue::quotientRule ( const unsigned &  nder,
const unsigned &  oder 
)

◆ resize()

void PLMD::MultiValue::resize ( const unsigned &  nvals,
const unsigned &  nder 
)

◆ setDerivative()

void PLMD::MultiValue::setDerivative ( const unsigned &  ival,
const unsigned &  jder,
const double &  der 
)
inline

Set the value of the derivative.

◆ setValue()

void PLMD::MultiValue::setValue ( const unsigned &  ival,
const double &  val 
)
inline

Set value numbered.

◆ sortActiveList()

void PLMD::MultiValue::sortActiveList ( )
inline

◆ updateComplete()

bool PLMD::MultiValue::updateComplete ( )
inline

Functions for accessing active list.

◆ updateDynamicList()

void PLMD::MultiValue::updateDynamicList ( )
inline

◆ updateIndex()

void PLMD::MultiValue::updateIndex ( const unsigned &  ind)
inline

Member Data Documentation

◆ atLeastOneSet

bool PLMD::MultiValue::atLeastOneSet
private

Logical to check if any derivatives were set.

◆ derivatives

std::vector<double> PLMD::MultiValue::derivatives
private

Derivatives.

◆ hasDerivatives

DynamicList<unsigned> PLMD::MultiValue::hasDerivatives
private

Used to ensure rapid accumulation of derivatives.

◆ indices

std::vector<unsigned> PLMD::MultiValue::indices
private

This is a fudge to save on vector resizing in MultiColvar.

◆ nderivatives

unsigned PLMD::MultiValue::nderivatives
private

Number of derivatives per value.

◆ sort_indices

std::vector<unsigned> PLMD::MultiValue::sort_indices
private

◆ tmp_atoms

std::vector<Vector> PLMD::MultiValue::tmp_atoms
private

◆ tmpder

std::vector<double> PLMD::MultiValue::tmpder
private

Tempory vector of derivatives (used for calculating quotients.

◆ tmpval

double PLMD::MultiValue::tmpval
private

Tempory value.

◆ values

std::vector<double> PLMD::MultiValue::values
private

Values of quantities.


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