Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
PLMD::DataPassingObjectTyped< T > Class Template Reference
Inheritance diagram for PLMD::DataPassingObjectTyped< T >:
Inheritance graph
[legend]

Public Member Functions

void add_force (const std::vector< AtomNumber > &index, const std::vector< unsigned > &i, Value *value) override
 
void add_force (const std::vector< int > &index, Value *value) override
 
void add_force (Value *vv) override
 Pass the force from the value to the output value. More...
 
double MD2double (const TypesafePtr &) const override
 This convers a number from the MD code into a double. More...
 
void rescale_force (const unsigned &n, const double &factor, Value *value) override
 Rescale the force on the output value. More...
 
void saveValueAsDouble (const TypesafePtr &val) override
 This is used when you want to save the passed object to a double variable in PLUMED rather than the pointer this can be used even when you don't pass a pointer from the MD code. More...
 
void setData (Value *value) override
 This transfers everything to the output. More...
 
void setForcePointer (const TypesafePtr &p, const std::vector< unsigned > &shape) override
 Set the pointer to the force. More...
 
void setForceUnit (const double &u)
 Set the unit for the force. More...
 
void setStart (const unsigned &s)
 
void setStride (const unsigned &s)
 Set the stride to use when getting data from the input array. More...
 
void setUnit (const double &u)
 Set the unit for the value. More...
 
void setValuePointer (const TypesafePtr &p, const std::vector< unsigned > &shape, const bool &isconst) override
 Set the pointer to the value. More...
 
void share_data (const std::vector< AtomNumber > &index, const std::vector< unsigned > &i, Value *value) override
 Share the data and put it in the value from a scattered data. More...
 
void share_data (const unsigned &j, const unsigned &k, Value *value) override
 Share the data and put it in the value from sequential data. More...
 
void share_data (std::vector< double > &values) const override
 This gets the data in the pointer and passes it to the output value. More...
 

Static Public Member Functions

static std::unique_ptr< DataPassingObjectcreate (unsigned n)
 

Protected Attributes

double bvalue
 
double funit
 The units of the force on this quantity. More...
 
bool hasbackup
 The backup value of the quantity (used if the value is passed directly) More...
 
unsigned start
 The start of the data in the input pointer. More...
 
unsigned stride
 The spacing between values in the input arrays. More...
 
double unit
 The units of the quantity. More...
 

Private Attributes

TypesafePtr f
 A pointer to the force. More...
 
TypesafePtr v
 A pointer to the value. More...
 

Member Function Documentation

◆ add_force() [1/3]

template<class T >
void PLMD::DataPassingObjectTyped< T >::add_force ( const std::vector< AtomNumber > &  index,
const std::vector< unsigned > &  i,
Value value 
)
overridevirtual

◆ add_force() [2/3]

template<class T >
void PLMD::DataPassingObjectTyped< T >::add_force ( const std::vector< int > &  index,
Value value 
)
overridevirtual

◆ add_force() [3/3]

template<class T >
void PLMD::DataPassingObjectTyped< T >::add_force ( Value vv)
overridevirtual

Pass the force from the value to the output value.

Implements PLMD::DataPassingObject.

◆ create()

std::unique_ptr< DataPassingObject > PLMD::DataPassingObject::create ( unsigned  n)
staticinherited

◆ MD2double()

template<class T >
double PLMD::DataPassingObjectTyped< T >::MD2double ( const TypesafePtr m) const
overridevirtual

This convers a number from the MD code into a double.

Implements PLMD::DataPassingObject.

◆ rescale_force()

template<class T >
void PLMD::DataPassingObjectTyped< T >::rescale_force ( const unsigned &  n,
const double &  factor,
Value value 
)
overridevirtual

Rescale the force on the output value.

Implements PLMD::DataPassingObject.

◆ saveValueAsDouble()

template<class T >
void PLMD::DataPassingObjectTyped< T >::saveValueAsDouble ( const TypesafePtr val)
overridevirtual

This is used when you want to save the passed object to a double variable in PLUMED rather than the pointer this can be used even when you don't pass a pointer from the MD code.

Implements PLMD::DataPassingObject.

◆ setData()

template<class T >
void PLMD::DataPassingObjectTyped< T >::setData ( Value value)
overridevirtual

This transfers everything to the output.

Implements PLMD::DataPassingObject.

◆ setForcePointer()

template<class T >
void PLMD::DataPassingObjectTyped< T >::setForcePointer ( const TypesafePtr p,
const std::vector< unsigned > &  shape 
)
overridevirtual

Set the pointer to the force.

Implements PLMD::DataPassingObject.

◆ setForceUnit()

void PLMD::DataPassingObject::setForceUnit ( const double &  u)
inlineinherited

Set the unit for the force.

◆ setStart()

void PLMD::DataPassingObject::setStart ( const unsigned &  s)
inlineinherited

◆ setStride()

void PLMD::DataPassingObject::setStride ( const unsigned &  s)
inlineinherited

Set the stride to use when getting data from the input array.

◆ setUnit()

void PLMD::DataPassingObject::setUnit ( const double &  u)
inlineinherited

Set the unit for the value.

◆ setValuePointer()

template<class T >
void PLMD::DataPassingObjectTyped< T >::setValuePointer ( const TypesafePtr p,
const std::vector< unsigned > &  shape,
const bool &  isconst 
)
overridevirtual

Set the pointer to the value.

Implements PLMD::DataPassingObject.

◆ share_data() [1/3]

template<class T >
void PLMD::DataPassingObjectTyped< T >::share_data ( const std::vector< AtomNumber > &  index,
const std::vector< unsigned > &  i,
Value value 
)
overridevirtual

Share the data and put it in the value from a scattered data.

Implements PLMD::DataPassingObject.

◆ share_data() [2/3]

template<class T >
void PLMD::DataPassingObjectTyped< T >::share_data ( const unsigned &  j,
const unsigned &  k,
Value value 
)
overridevirtual

Share the data and put it in the value from sequential data.

Implements PLMD::DataPassingObject.

◆ share_data() [3/3]

template<class T >
void PLMD::DataPassingObjectTyped< T >::share_data ( std::vector< double > &  values) const
overridevirtual

This gets the data in the pointer and passes it to the output value.

Implements PLMD::DataPassingObject.

Member Data Documentation

◆ bvalue

double PLMD::DataPassingObject::bvalue
protectedinherited

◆ f

template<class T >
TypesafePtr PLMD::DataPassingObjectTyped< T >::f
private

A pointer to the force.

◆ funit

double PLMD::DataPassingObject::funit
protectedinherited

The units of the force on this quantity.

◆ hasbackup

bool PLMD::DataPassingObject::hasbackup
protectedinherited

The backup value of the quantity (used if the value is passed directly)

◆ start

unsigned PLMD::DataPassingObject::start
protectedinherited

The start of the data in the input pointer.

◆ stride

unsigned PLMD::DataPassingObject::stride
protectedinherited

The spacing between values in the input arrays.

◆ unit

double PLMD::DataPassingObject::unit
protectedinherited

The units of the quantity.

◆ v

template<class T >
TypesafePtr PLMD::DataPassingObjectTyped< T >::v
private

A pointer to the value.


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