Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
PLMD::DataPassingObject Class Referenceabstract

#include <DataPassingObject.h>

Inheritance diagram for PLMD::DataPassingObject:
Inheritance graph
[legend]

Public Member Functions

 DataPassingObject ()
 
virtual ~DataPassingObject ()
 Virtual destructor, just to allow inheritance. More...
 
virtual void add_force (const std::vector< AtomNumber > &index, const std::vector< unsigned > &i, Value *value)=0
 
virtual void add_force (const std::vector< int > &index, Value *value)=0
 
virtual void add_force (Value *vv)=0
 Pass the force from the value to the output value. More...
 
virtual double MD2double (const TypesafePtr &m) const =0
 Convert what comes from the MD code to a double. More...
 
virtual void rescale_force (const unsigned &n, const double &factor, Value *value)=0
 Rescale the forces that were passed. More...
 
virtual void saveValueAsDouble (const TypesafePtr &val)=0
 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...
 
virtual void setData (Value *value)=0
 This transfers everything to the output. More...
 
virtual void setForcePointer (const TypesafePtr &val, const std::vector< unsigned > &shape)=0
 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...
 
virtual void setValuePointer (const TypesafePtr &val, const std::vector< unsigned > &shape, const bool &isconst)=0
 Set the pointer to the value. More...
 
virtual void share_data (const std::vector< AtomNumber > &index, const std::vector< unsigned > &i, Value *value)=0
 Share the data and put it in the value from a scattered data. More...
 
virtual void share_data (const unsigned &j, const unsigned &k, Value *value)=0
 Share the data and put it in the value from sequential data. More...
 
virtual void share_data (std::vector< double > &values) const =0
 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...
 

Constructor & Destructor Documentation

◆ DataPassingObject()

PLMD::DataPassingObject::DataPassingObject ( )
inlineexplicit

◆ ~DataPassingObject()

virtual PLMD::DataPassingObject::~DataPassingObject ( )
inlinevirtual

Virtual destructor, just to allow inheritance.

Member Function Documentation

◆ add_force() [1/3]

virtual void PLMD::DataPassingObject::add_force ( const std::vector< AtomNumber > &  index,
const std::vector< unsigned > &  i,
Value value 
)
pure virtual

◆ add_force() [2/3]

virtual void PLMD::DataPassingObject::add_force ( const std::vector< int > &  index,
Value value 
)
pure virtual

◆ add_force() [3/3]

virtual void PLMD::DataPassingObject::add_force ( Value vv)
pure virtual

Pass the force from the value to the output value.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ create()

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

◆ MD2double()

virtual double PLMD::DataPassingObject::MD2double ( const TypesafePtr m) const
pure virtual

Convert what comes from the MD code to a double.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ rescale_force()

virtual void PLMD::DataPassingObject::rescale_force ( const unsigned &  n,
const double &  factor,
Value value 
)
pure virtual

Rescale the forces that were passed.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ saveValueAsDouble()

virtual void PLMD::DataPassingObject::saveValueAsDouble ( const TypesafePtr val)
pure virtual

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.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ setData()

virtual void PLMD::DataPassingObject::setData ( Value value)
pure virtual

This transfers everything to the output.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ setForcePointer()

virtual void PLMD::DataPassingObject::setForcePointer ( const TypesafePtr val,
const std::vector< unsigned > &  shape 
)
pure virtual

Set the pointer to the force.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ setForceUnit()

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

Set the unit for the force.

◆ setStart()

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

◆ setStride()

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

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

◆ setUnit()

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

Set the unit for the value.

◆ setValuePointer()

virtual void PLMD::DataPassingObject::setValuePointer ( const TypesafePtr val,
const std::vector< unsigned > &  shape,
const bool &  isconst 
)
pure virtual

Set the pointer to the value.

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ share_data() [1/3]

virtual void PLMD::DataPassingObject::share_data ( const std::vector< AtomNumber > &  index,
const std::vector< unsigned > &  i,
Value value 
)
pure virtual

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

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ share_data() [2/3]

virtual void PLMD::DataPassingObject::share_data ( const unsigned &  j,
const unsigned &  k,
Value value 
)
pure virtual

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

Implemented in PLMD::DataPassingObjectTyped< T >.

◆ share_data() [3/3]

virtual void PLMD::DataPassingObject::share_data ( std::vector< double > &  values) const
pure virtual

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

Implemented in PLMD::DataPassingObjectTyped< T >.

Member Data Documentation

◆ bvalue

double PLMD::DataPassingObject::bvalue
protected

◆ funit

double PLMD::DataPassingObject::funit
protected

The units of the force on this quantity.

◆ hasbackup

bool PLMD::DataPassingObject::hasbackup
protected

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

◆ start

unsigned PLMD::DataPassingObject::start
protected

The start of the data in the input pointer.

◆ stride

unsigned PLMD::DataPassingObject::stride
protected

The spacing between values in the input arrays.

◆ unit

double PLMD::DataPassingObject::unit
protected

The units of the quantity.


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