Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
PLMD::mapping::TrigonometricPathVessel Class Reference

#include <TrigonometricPathVessel.h>

Inheritance diagram for PLMD::mapping::TrigonometricPathVessel:
Inheritance graph
[legend]

Public Member Functions

 TrigonometricPathVessel (const vesselbase::VesselOptions &da)
 
virtual void activateIndices (ActionWithVessel *)
 Activate indexes (this is used at end of chain rule) More...
 
void addActionThatUses (ActionWithVessel *actionThatUses)
 Add an action that uses this data. More...
 
bool applyForce (std::vector< double > &) override
 Retrieve the forces on the quantities in the vessel. More...
 
void calculate (const unsigned &current, MultiValue &myvals, std::vector< double > &buffer, std::vector< unsigned > &der_index) const override
 This stores the data when not using lowmem. More...
 
void checkRead ()
 Check that readin was fine. More...
 
std::string description () override
 Return a description of the vessel contents. More...
 
void finish (const std::vector< double > &buffer) override
 Complete the calculation once the loop is finished. More...
 
ActionWithVesselgetDataUser (const unsigned &)
 Get one of the ith data user. More...
 
std::string getLabel () const
 Return the label. More...
 
std::string getName () const
 Return the name. More...
 
unsigned getNumberOfComponents () const
 Return the number of components in the vector. More...
 
unsigned getNumberOfDataUsers () const
 Get the number of data users. More...
 
unsigned getNumberOfDerivatives (const unsigned &)
 Get the number of derivatives for the ith value. More...
 
virtual unsigned getNumberOfStoredValues () const
 Get the number of values that have been stored. More...
 
unsigned getSizeOfDerivativeList () const
 Get the size of the derivative list. More...
 
unsigned getStoreIndex (const unsigned &) const
 Get the index to store a particular index inside. More...
 
MultiValuegetTemporyMultiValue (const unsigned &ind)
 Return a tempory multi value - we do this so as to avoid vector resizing. More...
 
unsigned getTrueIndex (const unsigned &) const
 Get the true index of a quantity from the index it is stored in. More...
 
virtual void prepare ()
 Do something before the loop. More...
 
void recalculateStoredQuantity (const unsigned &myelm, MultiValue &myvals)
 Recalculate one of the base quantities. More...
 
void resize () override
 Reset the size of the buffers. More...
 
void resizeTemporyMultiValues (const unsigned &nvals)
 Set the number of tempory multivalues we need. More...
 
void retrieveDerivatives (const unsigned &myelem, const bool &normed, MultiValue &myvals)
 Get the derivatives for one of the components in the vector. More...
 
void retrieveSequentialValue (const unsigned &myelem, const bool &normed, std::vector< double > &values) const
 Get the values of all the components in the vector. More...
 
void retrieveValueWithIndex (const unsigned &myelem, const bool &normed, std::vector< double > &values) const
 
double retrieveWeightWithIndex (const unsigned &myelem) const
 
void setActiveValsAndDerivatives (const std::vector< unsigned > &der_index)
 Set the active values. More...
 
virtual void setBufferStart (unsigned &start)
 Set the start of the buffer. More...
 
void setHardCutoffOnWeight (const double &mytol)
 Set a hard cutoff on the weight of an element. More...
 
bool storedValueIsActive (const unsigned &iatom) const
 Is a particular stored value active at the present time. More...
 
virtual MultiValuetransformDerivatives (const unsigned &current, MultiValue &myvals, MultiValue &bvals)
 This is replaced in bridges so we can transform the derivatives. More...
 

Static Public Member Functions

static void registerKeywords (Keywords &keys)
 
static void reserveKeyword (Keywords &keys)
 
static std::string transformName (const std::string &name)
 Convert the name to the label of the component. More...
 

Protected Member Functions

void completeSetup (const unsigned &, const unsigned &)
 Finish the setup of the storage object by setting how much data has to be stored. More...
 
void error (const std::string &errmsg)
 Report an error. More...
 
ActionWithVesselgetAction () const
 Return a pointer to the action we are working in. More...
 
std::string getAllInput ()
 This returns the whole input line (it is used for less_than/more_than/between) More...
 
double getLocalDerivative (const unsigned &ibuf)
 Get the ibuf'th local derivative value. More...
 
double getNLTolerance () const
 Return the value of the neighbor list tolerance. More...
 
unsigned getNumberOfDerivativeSpacesPerComponent () const
 Return value of nspace. More...
 
int getNumericalLabel () const
 Return the numerical label. More...
 
unsigned getSizeOfBuffer () const
 Return the size of the buffer. More...
 
double getTolerance () const
 Return the value of the tolerance. More...
 
template<class T >
void parse (const std::string &key, T &t)
 Parse something from the input. More...
 
void parseFlag (const std::string &key, bool &t)
 Parse one keyword as boolean flag. More...
 
template<class T >
void parseVector (const std::string &key, std::vector< T > &t)
 Parse one keyword as std::vector. More...
 
void resizeBuffer (const unsigned &n)
 Set the size of the data buffer. More...
 
void setLocalDerivative (const unsigned &ibuf, const double &val)
 Set the ibuf'th local derivative value. More...
 
void storeDerivatives (const unsigned &, MultiValue &myvals, std::vector< double > &, std::vector< unsigned > &) const
 This stores the data we get from the calculation. More...
 
void storeValues (const unsigned &, MultiValue &, std::vector< double > &) const
 Retrieve the values from the underlying ActionWithVessel. More...
 
bool usingLowMem ()
 Are we using low mem option. More...
 
bool weightHasDerivatives ()
 Is the weight differentiable. More...
 

Protected Attributes

unsigned bufstart
 The start of this Vessel's buffer in buffer in the underlying ActionWithVessel. More...
 

Private Attributes

ActionWithVesselaction
 The action that this vessel is created within. More...
 
std::vector< unsigned > active_der
 The currently active values. More...
 
unsigned bufsize
 The number of elements in this vessel's buffered data. More...
 
std::vector< double > cargs
 
double dx
 
bool finished_read
 This just checks we have done checkRead. More...
 
bool hasderiv
 Do the quantities being stored in here need derivatives. More...
 
unsigned iclose1
 
unsigned iclose2
 
const PLMD::Keywordskeywords
 The keywords. More...
 
std::vector< std::string > line
 Directive line. More...
 
std::vector< double > local_buffer
 The buffer. More...
 
unsigned max_lowmem_stash
 What is the maximum number of vectors we are going to have to store when using lowmem option. More...
 
std::vector< MultiValuemy_tmp_vals
 
MultiValue mydpack1
 
MultiValue mydpack2
 
MultiValue mydpack3
 
std::string mylabel
 The label for the vessel for referencing. More...
 
Mappingmymap
 
std::string myname
 The keyword for the vessel in the input file. More...
 
ReferenceValuePack mypack1
 
std::vector< double > mypack1_stashd_args
 
std::vector< Vectormypack1_stashd_atoms
 
ReferenceValuePack mypack2
 
ReferenceValuePack mypack3
 
std::size_t nspace
 The amount of data per vector element. More...
 
const int numlab
 The numerical label for this object. More...
 
Direction projdir
 
Valuesp
 
unsigned tmp_index
 We create a vector of tempory MultiValues here so as to avoid lots of vector resizing. More...
 
std::vector< ActionWithVessel * > userActions
 The actions that are going to use the stored data. More...
 
std::size_t vecsize
 The size of the vector we are computing. More...
 
Valuezp
 

Friends

class AdaptivePath
 

Constructor & Destructor Documentation

◆ TrigonometricPathVessel()

PLMD::mapping::TrigonometricPathVessel::TrigonometricPathVessel ( const vesselbase::VesselOptions da)
explicit

Member Function Documentation

◆ activateIndices()

virtual void PLMD::vesselbase::StoreDataVessel::activateIndices ( ActionWithVessel )
inlinevirtualinherited

Activate indexes (this is used at end of chain rule)

◆ addActionThatUses()

void PLMD::vesselbase::StoreDataVessel::addActionThatUses ( ActionWithVessel actionThatUses)
inherited

Add an action that uses this data.

◆ applyForce()

bool PLMD::mapping::TrigonometricPathVessel::applyForce ( std::vector< double > &  forces)
overridevirtual

Retrieve the forces on the quantities in the vessel.

Implements PLMD::vesselbase::Vessel.

◆ calculate()

void PLMD::vesselbase::StoreDataVessel::calculate ( const unsigned &  current,
MultiValue myvals,
std::vector< double > &  buffer,
std::vector< unsigned > &  der_index 
) const
overridevirtualinherited

This stores the data when not using lowmem.

Implements PLMD::vesselbase::Vessel.

◆ checkRead()

void PLMD::vesselbase::Vessel::checkRead ( )
inherited

Check that readin was fine.

◆ completeSetup()

void PLMD::vesselbase::StoreDataVessel::completeSetup ( const unsigned &  ,
const unsigned &   
)
protectedinherited

Finish the setup of the storage object by setting how much data has to be stored.

◆ description()

std::string PLMD::mapping::TrigonometricPathVessel::description ( )
overridevirtual

Return a description of the vessel contents.

Implements PLMD::vesselbase::Vessel.

◆ error()

void PLMD::vesselbase::Vessel::error ( const std::string &  errmsg)
protectedinherited

Report an error.

◆ finish()

void PLMD::mapping::TrigonometricPathVessel::finish ( const std::vector< double > &  )
overridevirtual

Complete the calculation once the loop is finished.

Implements PLMD::vesselbase::Vessel.

◆ getAction()

ActionWithVessel * PLMD::vesselbase::Vessel::getAction ( ) const
inlineprotectedinherited

Return a pointer to the action we are working in.

◆ getAllInput()

std::string PLMD::vesselbase::Vessel::getAllInput ( )
protectedinherited

This returns the whole input line (it is used for less_than/more_than/between)

◆ getDataUser()

ActionWithVessel * PLMD::vesselbase::StoreDataVessel::getDataUser ( const unsigned &  idata)
inlineinherited

Get one of the ith data user.

◆ getLabel()

std::string PLMD::vesselbase::Vessel::getLabel ( ) const
inherited

Return the label.

◆ getLocalDerivative()

double PLMD::vesselbase::StoreDataVessel::getLocalDerivative ( const unsigned &  ibuf)
protectedinherited

Get the ibuf'th local derivative value.

◆ getName()

std::string PLMD::vesselbase::Vessel::getName ( ) const
inherited

Return the name.

◆ getNLTolerance()

double PLMD::vesselbase::Vessel::getNLTolerance ( ) const
inlineprotectedinherited

Return the value of the neighbor list tolerance.

◆ getNumberOfComponents()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfComponents ( ) const
inlineinherited

Return the number of components in the vector.

◆ getNumberOfDataUsers()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfDataUsers ( ) const
inlineinherited

Get the number of data users.

◆ getNumberOfDerivatives()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfDerivatives ( const unsigned &  )
inherited

Get the number of derivatives for the ith value.

◆ getNumberOfDerivativeSpacesPerComponent()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfDerivativeSpacesPerComponent ( ) const
inlineprotectedinherited

Return value of nspace.

◆ getNumberOfStoredValues()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfStoredValues ( ) const
inlinevirtualinherited

Get the number of values that have been stored.

◆ getNumericalLabel()

int PLMD::vesselbase::Vessel::getNumericalLabel ( ) const
inlineprotectedinherited

Return the numerical label.

◆ getSizeOfBuffer()

unsigned PLMD::vesselbase::Vessel::getSizeOfBuffer ( ) const
inlineprotectedinherited

Return the size of the buffer.

◆ getSizeOfDerivativeList()

unsigned PLMD::vesselbase::StoreDataVessel::getSizeOfDerivativeList ( ) const
inlineinherited

Get the size of the derivative list.

◆ getStoreIndex()

unsigned PLMD::vesselbase::StoreDataVessel::getStoreIndex ( const unsigned &  ind) const
inlineinherited

Get the index to store a particular index inside.

◆ getTemporyMultiValue()

MultiValue & PLMD::vesselbase::StoreDataVessel::getTemporyMultiValue ( const unsigned &  ind)
inherited

Return a tempory multi value - we do this so as to avoid vector resizing.

◆ getTolerance()

double PLMD::vesselbase::Vessel::getTolerance ( ) const
inlineprotectedinherited

Return the value of the tolerance.

◆ getTrueIndex()

unsigned PLMD::vesselbase::StoreDataVessel::getTrueIndex ( const unsigned &  ind) const
inlineinherited

Get the true index of a quantity from the index it is stored in.

◆ parse()

template<class T >
void PLMD::vesselbase::Vessel::parse ( const std::string &  key,
T &  t 
)
protectedinherited

Parse something from the input.

◆ parseFlag()

void PLMD::vesselbase::Vessel::parseFlag ( const std::string &  key,
bool &  t 
)
protectedinherited

Parse one keyword as boolean flag.

◆ parseVector()

template<class T >
void PLMD::vesselbase::Vessel::parseVector ( const std::string &  key,
std::vector< T > &  t 
)
protectedinherited

Parse one keyword as std::vector.

◆ prepare()

virtual void PLMD::vesselbase::Vessel::prepare ( )
inlinevirtualinherited

Do something before the loop.

Reimplemented in PLMD::vesselbase::BridgeVessel, and PLMD::mapping::SpathVessel.

◆ recalculateStoredQuantity()

void PLMD::vesselbase::StoreDataVessel::recalculateStoredQuantity ( const unsigned &  myelm,
MultiValue myvals 
)
inlineinherited

Recalculate one of the base quantities.

◆ registerKeywords()

void PLMD::mapping::TrigonometricPathVessel::registerKeywords ( Keywords keys)
static

◆ reserveKeyword()

void PLMD::mapping::TrigonometricPathVessel::reserveKeyword ( Keywords keys)
static

◆ resize()

void PLMD::mapping::TrigonometricPathVessel::resize ( )
overridevirtual

Reset the size of the buffers.

Implements PLMD::vesselbase::Vessel.

◆ resizeBuffer()

void PLMD::vesselbase::Vessel::resizeBuffer ( const unsigned &  n)
inlineprotectedinherited

Set the size of the data buffer.

◆ resizeTemporyMultiValues()

void PLMD::vesselbase::StoreDataVessel::resizeTemporyMultiValues ( const unsigned &  nvals)
inherited

Set the number of tempory multivalues we need.

◆ retrieveDerivatives()

void PLMD::vesselbase::StoreDataVessel::retrieveDerivatives ( const unsigned &  myelem,
const bool &  normed,
MultiValue myvals 
)
inherited

Get the derivatives for one of the components in the vector.

◆ retrieveSequentialValue()

void PLMD::vesselbase::StoreDataVessel::retrieveSequentialValue ( const unsigned &  myelem,
const bool &  normed,
std::vector< double > &  values 
) const
inherited

Get the values of all the components in the vector.

◆ retrieveValueWithIndex()

void PLMD::vesselbase::StoreDataVessel::retrieveValueWithIndex ( const unsigned &  myelem,
const bool &  normed,
std::vector< double > &  values 
) const
inherited

◆ retrieveWeightWithIndex()

double PLMD::vesselbase::StoreDataVessel::retrieveWeightWithIndex ( const unsigned &  myelem) const
inherited

◆ setActiveValsAndDerivatives()

void PLMD::vesselbase::StoreDataVessel::setActiveValsAndDerivatives ( const std::vector< unsigned > &  der_index)
inherited

Set the active values.

◆ setBufferStart()

void PLMD::vesselbase::Vessel::setBufferStart ( unsigned &  start)
inlinevirtualinherited

Set the start of the buffer.

Reimplemented in PLMD::vesselbase::BridgeVessel.

◆ setHardCutoffOnWeight()

void PLMD::vesselbase::StoreDataVessel::setHardCutoffOnWeight ( const double &  mytol)
inherited

Set a hard cutoff on the weight of an element.

◆ setLocalDerivative()

void PLMD::vesselbase::StoreDataVessel::setLocalDerivative ( const unsigned &  ibuf,
const double &  val 
)
protectedinherited

Set the ibuf'th local derivative value.

◆ storeDerivatives()

void PLMD::vesselbase::StoreDataVessel::storeDerivatives ( const unsigned &  myelem,
MultiValue myvals,
std::vector< double > &  buffer,
std::vector< unsigned > &  der_list 
) const
protectedinherited

This stores the data we get from the calculation.

◆ storedValueIsActive()

bool PLMD::vesselbase::StoreDataVessel::storedValueIsActive ( const unsigned &  iatom) const
inlineinherited

Is a particular stored value active at the present time.

◆ storeValues()

void PLMD::vesselbase::StoreDataVessel::storeValues ( const unsigned &  myelem,
MultiValue myvals,
std::vector< double > &  buffer 
) const
protectedinherited

Retrieve the values from the underlying ActionWithVessel.

◆ transformDerivatives()

MultiValue & PLMD::vesselbase::Vessel::transformDerivatives ( const unsigned &  current,
MultiValue myvals,
MultiValue bvals 
)
inlinevirtualinherited

This is replaced in bridges so we can transform the derivatives.

Reimplemented in PLMD::vesselbase::BridgeVessel.

◆ transformName()

std::string PLMD::vesselbase::Vessel::transformName ( const std::string &  name)
staticinherited

Convert the name to the label of the component.

◆ usingLowMem()

bool PLMD::vesselbase::StoreDataVessel::usingLowMem ( )
inlineprotectedinherited

Are we using low mem option.

◆ weightHasDerivatives()

bool PLMD::vesselbase::StoreDataVessel::weightHasDerivatives ( )
inlineprotectedinherited

Is the weight differentiable.

Friends And Related Function Documentation

◆ AdaptivePath

friend class AdaptivePath
friend

Member Data Documentation

◆ action

ActionWithVessel* PLMD::vesselbase::Vessel::action
privateinherited

The action that this vessel is created within.

◆ active_der

std::vector<unsigned> PLMD::vesselbase::StoreDataVessel::active_der
privateinherited

The currently active values.

The active derivative elements

◆ bufsize

unsigned PLMD::vesselbase::Vessel::bufsize
privateinherited

The number of elements in this vessel's buffered data.

◆ bufstart

unsigned PLMD::vesselbase::Vessel::bufstart
protectedinherited

The start of this Vessel's buffer in buffer in the underlying ActionWithVessel.

◆ cargs

std::vector<double> PLMD::mapping::TrigonometricPathVessel::cargs
private

◆ dx

double PLMD::mapping::TrigonometricPathVessel::dx
private

◆ finished_read

bool PLMD::vesselbase::Vessel::finished_read
privateinherited

This just checks we have done checkRead.

◆ hasderiv

bool PLMD::vesselbase::StoreDataVessel::hasderiv
privateinherited

Do the quantities being stored in here need derivatives.

◆ iclose1

unsigned PLMD::mapping::TrigonometricPathVessel::iclose1
private

◆ iclose2

unsigned PLMD::mapping::TrigonometricPathVessel::iclose2
private

◆ keywords

const PLMD::Keywords& PLMD::vesselbase::Vessel::keywords
privateinherited

The keywords.

◆ line

std::vector<std::string> PLMD::vesselbase::Vessel::line
privateinherited

Directive line.

This line is progressively erased during vessel construction so as to check if all the present keywords are correct.

◆ local_buffer

std::vector<double> PLMD::vesselbase::StoreDataVessel::local_buffer
privateinherited

The buffer.

◆ max_lowmem_stash

unsigned PLMD::vesselbase::StoreDataVessel::max_lowmem_stash
privateinherited

What is the maximum number of vectors we are going to have to store when using lowmem option.

◆ my_tmp_vals

std::vector<MultiValue> PLMD::vesselbase::StoreDataVessel::my_tmp_vals
privateinherited

◆ mydpack1

MultiValue PLMD::mapping::TrigonometricPathVessel::mydpack1
private

◆ mydpack2

MultiValue PLMD::mapping::TrigonometricPathVessel::mydpack2
private

◆ mydpack3

MultiValue PLMD::mapping::TrigonometricPathVessel::mydpack3
private

◆ mylabel

std::string PLMD::vesselbase::Vessel::mylabel
privateinherited

The label for the vessel for referencing.

◆ mymap

Mapping* PLMD::mapping::TrigonometricPathVessel::mymap
private

◆ myname

std::string PLMD::vesselbase::Vessel::myname
privateinherited

The keyword for the vessel in the input file.

◆ mypack1

ReferenceValuePack PLMD::mapping::TrigonometricPathVessel::mypack1
private

◆ mypack1_stashd_args

std::vector<double> PLMD::mapping::TrigonometricPathVessel::mypack1_stashd_args
private

◆ mypack1_stashd_atoms

std::vector<Vector> PLMD::mapping::TrigonometricPathVessel::mypack1_stashd_atoms
private

◆ mypack2

ReferenceValuePack PLMD::mapping::TrigonometricPathVessel::mypack2
private

◆ mypack3

ReferenceValuePack PLMD::mapping::TrigonometricPathVessel::mypack3
private

◆ nspace

std::size_t PLMD::vesselbase::StoreDataVessel::nspace
privateinherited

The amount of data per vector element.

◆ numlab

const int PLMD::vesselbase::Vessel::numlab
privateinherited

The numerical label for this object.

◆ projdir

Direction PLMD::mapping::TrigonometricPathVessel::projdir
private

◆ sp

Value* PLMD::mapping::TrigonometricPathVessel::sp
private

◆ tmp_index

unsigned PLMD::vesselbase::StoreDataVessel::tmp_index
privateinherited

We create a vector of tempory MultiValues here so as to avoid lots of vector resizing.

◆ userActions

std::vector<ActionWithVessel*> PLMD::vesselbase::StoreDataVessel::userActions
privateinherited

The actions that are going to use the stored data.

◆ vecsize

std::size_t PLMD::vesselbase::StoreDataVessel::vecsize
privateinherited

The size of the vector we are computing.

◆ zp

Value* PLMD::mapping::TrigonometricPathVessel::zp
private

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