Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
PLMD::vesselbase::BridgeVessel Class Reference


This class allows you to calculate the vessel in one ActionWithVessel. More...

#include <BridgeVessel.h>

Inheritance diagram for PLMD::vesselbase::BridgeVessel:
Inheritance graph
[legend]

Public Member Functions

 BridgeVessel (const VesselOptions &)
 
bool applyForce (std::vector< double > &forces)
 Apply some force. More...
 
void calculate (const unsigned &current, MultiValue &myvals, std::vector< double > &buffer, std::vector< unsigned > &der_index) const
 Actually do the calculation. More...
 
void checkRead ()
 Check that readin was fine. More...
 
void completeNumericalDerivatives ()
 Calculate numerical derivatives. More...
 
void copyTaskFlags ()
 Set the task flags in the bridged class the same as in the original class. More...
 
std::string description ()
 Should not be called. More...
 
void finish (const std::vector< double > &buffer)
 Finish the calculation. More...
 
std::string getLabel () const
 Return the label. More...
 
std::string getName () const
 Return the name. More...
 
ActionWithVesselgetOutputAction ()
 Get the action that reads the command in. More...
 
MultiValuegetTemporyMultiValue ()
 Return a tempory multi value - we do this so as to avoid vector resizing. More...
 
bool hasDerivatives ()
 Does this have derivatives. More...
 
void prepare ()
 Jobs to do before the task list starts. More...
 
void resize ()
 Resize the quantities in the vessel. More...
 
void setBufferStart (unsigned &start)
 Set the start of the buffer. More...
 
void setOutputAction (ActionWithVessel *myOutputAction)
 Setup the action we are outputting to. More...
 
MultiValuetransformDerivatives (const unsigned &current, MultiValue &invals, MultiValue &outvals)
 This transforms the derivatives using the output value. More...
 

Static Public Member Functions

static void registerKeywords (Keywords &keys)
 Reserve any keywords for this particular vessel. More...
 
static std::string transformName (const std::string &name)
 Convert the name to the label of the component. More...
 

Protected Member Functions

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 getNLTolerance () const
 Return the value of the neighbor list tolerance. 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...
 

Protected Attributes

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

Private Attributes

unsigned inum
 
MultiValue my_tmp_val
 
std::vector< double > mynumerical_values
 
ActionWithVesselmyOutputAction
 
ActionWithValuemyOutputValues
 

Detailed Description


This class allows you to calculate the vessel in one ActionWithVessel.

The user thinks it is created in a different Action however. At the moment this is used for region

Constructor & Destructor Documentation

◆ BridgeVessel()

PLMD::vesselbase::BridgeVessel::BridgeVessel ( const VesselOptions da)
explicit

Member Function Documentation

◆ applyForce()

bool PLMD::vesselbase::BridgeVessel::applyForce ( std::vector< double > &  forces)
virtual

Apply some force.

Implements PLMD::vesselbase::Vessel.

◆ calculate()

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

Actually do the calculation.

Implements PLMD::vesselbase::Vessel.

◆ checkRead()

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

Check that readin was fine.

◆ completeNumericalDerivatives()

void PLMD::vesselbase::BridgeVessel::completeNumericalDerivatives ( )

Calculate numerical derivatives.

◆ copyTaskFlags()

void PLMD::vesselbase::BridgeVessel::copyTaskFlags ( )

Set the task flags in the bridged class the same as in the original class.

◆ description()

std::string PLMD::vesselbase::BridgeVessel::description ( )
virtual

Should not be called.

Implements PLMD::vesselbase::Vessel.

◆ error()

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

Report an error.

◆ finish()

void PLMD::vesselbase::BridgeVessel::finish ( const std::vector< double > &  buffer)
virtual

Finish the calculation.

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)

◆ getLabel()

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

Return the label.

◆ 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.

◆ getNumericalLabel()

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

Return the numerical label.

◆ getOutputAction()

ActionWithVessel * PLMD::vesselbase::BridgeVessel::getOutputAction ( )
inline

Get the action that reads the command in.

◆ getSizeOfBuffer()

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

Return the size of the buffer.

◆ getTemporyMultiValue()

MultiValue & PLMD::vesselbase::BridgeVessel::getTemporyMultiValue ( )

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.

◆ hasDerivatives()

bool PLMD::vesselbase::BridgeVessel::hasDerivatives ( )

Does this have derivatives.

◆ 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()

void PLMD::vesselbase::BridgeVessel::prepare ( )
virtual

Jobs to do before the task list starts.

Reimplemented from PLMD::vesselbase::Vessel.

◆ registerKeywords()

void PLMD::vesselbase::Vessel::registerKeywords ( Keywords keys)
staticinherited

Reserve any keywords for this particular vessel.

◆ resize()

void PLMD::vesselbase::BridgeVessel::resize ( )
virtual

Resize the quantities in the vessel.

Implements PLMD::vesselbase::Vessel.

◆ resizeBuffer()

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

Set the size of the data buffer.

◆ setBufferStart()

void PLMD::vesselbase::BridgeVessel::setBufferStart ( unsigned &  start)
virtual

Set the start of the buffer.

Reimplemented from PLMD::vesselbase::Vessel.

◆ setOutputAction()

void PLMD::vesselbase::BridgeVessel::setOutputAction ( ActionWithVessel myOutputAction)

Setup the action we are outputting to.

◆ transformDerivatives()

MultiValue & PLMD::vesselbase::BridgeVessel::transformDerivatives ( const unsigned &  current,
MultiValue invals,
MultiValue outvals 
)
virtual

This transforms the derivatives using the output value.

Reimplemented from PLMD::vesselbase::Vessel.

◆ transformName()

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

Convert the name to the label of the component.

Member Data Documentation

◆ bufstart

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

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

◆ inum

unsigned PLMD::vesselbase::BridgeVessel::inum
private

◆ my_tmp_val

MultiValue PLMD::vesselbase::BridgeVessel::my_tmp_val
private

◆ mynumerical_values

std::vector<double> PLMD::vesselbase::BridgeVessel::mynumerical_values
private

◆ myOutputAction

ActionWithVessel* PLMD::vesselbase::BridgeVessel::myOutputAction
private

◆ myOutputValues

ActionWithValue* PLMD::vesselbase::BridgeVessel::myOutputValues
private

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