#include <MultiValue.h>
Public Member Functions | |
MultiValue (const std::size_t &nvals, const std::size_t &nder, const std::size_t &nmat=0, const std::size_t &maxcol=0, const std::size_t &nbook=0) | |
void | addDerivative (const std::size_t &, const std::size_t &, const double &) |
Add derivative. More... | |
void | addMatrixForce (const unsigned &imat, const unsigned &jind, const double &f) |
Stash the forces on the matrix. More... | |
void | addValue (const std::size_t &, const double &) |
Add value numbered. More... | |
void | clear (const unsigned &) |
Clear a value. More... | |
void | clearActiveMembers (const std::size_t &ival) |
void | clearAll () |
Clear all values. More... | |
void | clearDerivatives (const unsigned &) |
Clear the derivatives. More... | |
void | emptyActiveMembers () |
double | get (const std::size_t &) const |
Return the ith value. More... | |
unsigned | getActiveIndex (const std::size_t &, const std::size_t &) const |
unsigned | getActiveIndex (const unsigned &) const |
std::vector< Vector > & | getAtomVector () |
const std::vector< std::vector< Vector > > & | getConstFirstAtomDerivativeVector () const |
double | getDerivative (const std::size_t &, const std::size_t &) const |
Return a derivative value. More... | |
std::vector< std::vector< Vector > > & | getFirstAtomDerivativeVector () |
std::vector< Vector > & | getFirstAtomVector () |
Get references to some memory. More... | |
std::vector< Tensor > & | getFirstAtomVirialVector () |
std::vector< unsigned > & | getIndices () |
const std::vector< unsigned > & | getMatrixBookeeping () const |
Get the matrix bookeeping array. More... | |
std::vector< unsigned > & | getMatrixRowDerivativeIndices (const unsigned &nmat) |
unsigned | getNumberActive (const std::size_t &ival) const |
unsigned | getNumberOfDerivatives () const |
Get the number of derivatives in the stash. More... | |
std::size_t | getNumberOfIndices () const |
unsigned | getNumberOfMatrixRowDerivatives (const unsigned &nmat) const |
unsigned | getNumberOfValues () const |
Get the number of values in the stash. More... | |
std::size_t | getSecondTaskIndex () const |
Get the task index. More... | |
std::size_t | getSplitIndex () const |
double | getStashedMatrixElement (const unsigned &nmat, const unsigned &jcol) const |
double | getStashedMatrixForce (const unsigned &imat, const unsigned &jind) const |
std::size_t | getTaskIndex () const |
std::vector< double > & | getTemporyVector (const unsigned &ind) |
bool | inVectorCall () const |
void | putIndexInActiveArray (const unsigned &) |
void | resize (const std::size_t &nvals, const std::size_t &nder, const std::size_t &nmat=0, const std::size_t &maxcol=0, const std::size_t &nbook=0) |
void | resizeTemporyVector (const unsigned &n) |
void | setDerivative (const std::size_t &ival, const std::size_t &jder, const double &der) |
Set the value of the derivative. More... | |
void | setNumberOfIndices (const std::size_t &nat) |
void | setNumberOfMatrixRowDerivatives (const unsigned &nmat, const unsigned &nind) |
Get the bookeeping stuff for the derivatives wrt to rows of matrix. More... | |
void | setSecondTaskIndex (const std::size_t &tindex) |
void | setSplitIndex (const std::size_t &nat) |
void | setTaskIndex (const std::size_t &tindex) |
Set the task index prior to the loop. More... | |
void | setValue (const std::size_t &, const double &) |
Set value numbered. More... | |
void | stashMatrixElement (const unsigned &nmat, const unsigned &rowstart, const unsigned &jcol, const double &val) |
bool | updateComplete () |
Functions for accessing active list. More... | |
void | updateIndex (const std::size_t &, const std::size_t &) |
void | updateIndex (const unsigned &) |
Private Attributes | |
std::vector< unsigned > | active_list |
bool | atLeastOneSet |
Logical to check if any derivatives were set. More... | |
std::vector< double > | derivatives |
Derivatives. More... | |
std::vector< bool > | hasderiv |
Matrix asserting which values have derivatives. More... | |
std::vector< unsigned > | indices |
This is a fudge to save on vector resizing in MultiColvar. More... | |
std::vector< unsigned > | matrix_bookeeping |
std::vector< double > | matrix_force_stash |
std::vector< std::vector< unsigned > > | matrix_row_derivative_indices |
std::vector< unsigned > | matrix_row_nderivatives |
These are used to store the indices that have derivatives wrt to at least one of the elements in a matrix. More... | |
std::vector< double > | matrix_row_stash |
std::vector< unsigned > | nactive |
Lists of active variables. More... | |
unsigned | nderivatives |
Number of derivatives per value. More... | |
unsigned | nindices |
unsigned | nmatrix_cols |
This allows us to store matrix elements. More... | |
unsigned | nsplit |
std::size_t | task2_index |
std::size_t | task_index |
The index of the task we are currently performing. More... | |
std::vector< std::vector< Vector > > | tmp_atom_der |
std::vector< Tensor > | tmp_atom_virial |
std::vector< Vector > | tmp_atoms |
std::vector< std::vector< double > > | tmp_vectors |
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... | |
bool | vector_call |
Are we in this for a call on vectors. More... | |
Friends | |
class | ActionWithVector |
PLMD::MultiValue::MultiValue | ( | const std::size_t & | nvals, |
const std::size_t & | nder, | ||
const std::size_t & | nmat = 0 , |
||
const std::size_t & | maxcol = 0 , |
||
const std::size_t & | nbook = 0 |
||
) |
|
inline |
Add derivative.
|
inline |
Stash the forces on the matrix.
|
inline |
Add value numbered.
void PLMD::MultiValue::clear | ( | const unsigned & | ) |
Clear a value.
|
inline |
void PLMD::MultiValue::clearAll | ( | ) |
Clear all values.
void PLMD::MultiValue::clearDerivatives | ( | const unsigned & | ival | ) |
Clear the derivatives.
void PLMD::MultiValue::emptyActiveMembers | ( | ) |
|
inline |
Return the ith value.
|
inline |
unsigned PLMD::MultiValue::getActiveIndex | ( | const unsigned & | ) | const |
|
inline |
|
inline |
|
inline |
Return a derivative value.
|
inline |
|
inline |
Get references to some memory.
These vectors allow us to avoid doing lots of resizing of vectors in MultiColvarTemplate
|
inline |
|
inline |
|
inline |
Get the matrix bookeeping array.
|
inline |
|
inline |
|
inline |
Get the number of derivatives in the stash.
|
inline |
|
inline |
|
inline |
Get the number of values in the stash.
|
inline |
Get the task index.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void PLMD::MultiValue::putIndexInActiveArray | ( | const unsigned & | ) |
void PLMD::MultiValue::resize | ( | const std::size_t & | nvals, |
const std::size_t & | nder, | ||
const std::size_t & | nmat = 0 , |
||
const std::size_t & | maxcol = 0 , |
||
const std::size_t & | nbook = 0 |
||
) |
|
inline |
|
inline |
Set the value of the derivative.
|
inline |
|
inline |
Get the bookeeping stuff for the derivatives wrt to rows of matrix.
|
inline |
|
inline |
|
inline |
Set the task index prior to the loop.
|
inline |
Set value numbered.
|
inline |
bool PLMD::MultiValue::updateComplete | ( | ) |
Functions for accessing active list.
|
inline |
void PLMD::MultiValue::updateIndex | ( | const unsigned & | ) |
|
friend |
|
private |
|
private |
Logical to check if any derivatives were set.
|
private |
Derivatives.
|
private |
Matrix asserting which values have derivatives.
|
private |
This is a fudge to save on vector resizing in MultiColvar.
|
private |
|
private |
|
private |
|
private |
These are used to store the indices that have derivatives wrt to at least one of the elements in a matrix.
|
private |
|
private |
Lists of active variables.
|
private |
Number of derivatives per value.
|
private |
|
private |
This allows us to store matrix elements.
|
private |
|
private |
|
private |
The index of the task we are currently performing.
|
private |
|
private |
|
private |
|
private |
|
private |
Tempory vector of derivatives (used for calculating quotients.
|
private |
Tempory value.
|
private |
Values of quantities.
|
private |
Are we in this for a call on vectors.
Hosted by GitHub | 1.8.17 |