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

Private Attributes

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Add derivative.

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

Add value numbered.

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.

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

Clear a value.

void PLMD::MultiValue::clearAll ( )

Clear all values.

void PLMD::MultiValue::completeUpdate ( )
inline
void PLMD::MultiValue::copyDerivatives ( MultiValue outvals)
void PLMD::MultiValue::copyValues ( MultiValue outvals) const
void PLMD::MultiValue::emptyActiveMembers ( )
inline
double PLMD::MultiValue::get ( const unsigned &  ival) const
inline

Return the ith value.

unsigned PLMD::MultiValue::getActiveIndex ( const unsigned &  ind) const
inline
std::vector< Vector > & PLMD::MultiValue::getAtomVector ( )
inline
double PLMD::MultiValue::getDerivative ( const unsigned &  ival,
const unsigned &  jder 
) const
inline

Return a derivative value.

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

Get the number of derivatives in the stash.

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

Get the number of values in the stash.

std::vector< unsigned > & PLMD::MultiValue::getSortIndices ( )
inline
bool PLMD::MultiValue::isActive ( const unsigned &  ind) const
inline
void PLMD::MultiValue::putIndexInActiveArray ( const unsigned &  ind)
inline
void PLMD::MultiValue::quotientRule ( const unsigned &  nder,
const unsigned &  dder,
const unsigned &  oder 
)
void PLMD::MultiValue::resize ( const unsigned &  nvals,
const unsigned &  nder 
)
void PLMD::MultiValue::setDerivative ( const unsigned &  ival,
const unsigned &  jder,
const double &  der 
)
inline

Set the value of the derivative.

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

Set value numbered.

void PLMD::MultiValue::sortActiveList ( )
inline
bool PLMD::MultiValue::updateComplete ( )
inline

Functions for accessing active list.

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

Member Data Documentation

bool PLMD::MultiValue::atLeastOneSet
private

Logical to check if any derivatives were set.

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

Derivatives.

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

Used to ensure rapid accumulation of derivatives.

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

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

unsigned PLMD::MultiValue::nderivatives
private

Number of derivatives per value.

std::vector<unsigned> PLMD::MultiValue::sort_indices
private
std::vector<Vector> PLMD::MultiValue::tmp_atoms
private
std::vector<double> PLMD::MultiValue::values
private

Values of quantities.


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