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

#include <AverageVessel.h>

Inheritance diagram for PLMD::analysis::AverageVessel:
Inheritance graph
[legend]

Public Member Functions

 AverageVessel (const vesselbase::VesselOptions &)
 Constructor. More...
 
void resize ()
 Set the size of the data vessel. More...
 
void calculate (const unsigned &current, MultiValue &myvals, std::vector< double > &buffer, std::vector< unsigned > &der_list) const
 This does nothing. More...
 
std::string description ()
 Return a description of the vessel contents. More...
 
void accumulate (const double &weight, const double &val)
 Accumulate the average. More...
 
double getAverage () const
 Get the average value. More...
 
virtual void finish (const std::vector< double > &)
 Copy data from an accumulated buffer into the grid. More...
 
bool wasreset () const
 Was the grid cleared on the last step. More...
 
virtual void clear ()
 Clear all the data stored on the grid. More...
 
virtual void reset ()
 Reset the grid so that it is cleared at start of next time it is calculated. More...
 
void setNorm (const double &snorm)
 Functions for dealing with normalisation constant. More...
 
double getNorm () const
 
virtual bool applyForce (std::vector< double > &forces)
 Retrieve the forces on the quantities in the vessel. More...
 
std::string getName () const
 Return the name. More...
 
std::string getLabel () const
 Return the label. More...
 
void checkRead ()
 Check that readin was fine. More...
 
virtual void setBufferStart (unsigned &start)
 Set the start of the buffer. More...
 
virtual void prepare ()
 Do something before the loop. 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)
 keywords More...
 
static std::string transformName (const std::string &name)
 Convert the name to the label of the component. More...
 

Public Attributes

Loglog
 Reference to the log on which to output details. More...
 

Protected Member Functions

void setDataSize (const unsigned &size)
 Set the size of the data vector. More...
 
void setDataElement (const unsigned &myelem, const double &value)
 Set an element of the data array. More...
 
void addDataElement (const unsigned &myelem, const double &value)
 Add some value to an element of the data array. More...
 
double getDataElement (const unsigned &myelem) const
 Get the value of one of the data element. More...
 
bool noAverage () const
 Are we averaging the data. More...
 
int getNumericalLabel () const
 Return the numerical label. More...
 
void error (const std::string &errmsg)
 Report an error. More...
 
template<class T >
void parse (const std::string &key, T &t)
 Parse something from the input. More...
 
template<class T >
void parseVector (const std::string &key, std::vector< T > &t)
 Parse one keyword as std::vector. More...
 
void parseFlag (const std::string &key, bool &t)
 Parse one keyword as boolean flag. More...
 
std::string getAllInput ()
 This returns the whole input line (it is used for less_than/more_than/between) More...
 
ActionWithVesselgetAction () const
 Return a pointer to the action we are working in. More...
 
double getTolerance () const
 Return the value of the tolerance. More...
 
double getNLTolerance () const
 Return the value of the neighbor list tolerance. More...
 
unsigned getSizeOfBuffer () const
 Return the size of the buffer. 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...
 
Communicatorcomm
 A copy of the communicator. More...
 

Private Attributes

std::vector< double > domain
 

Constructor & Destructor Documentation

◆ AverageVessel()

PLMD::analysis::AverageVessel::AverageVessel ( const vesselbase::VesselOptions da)
explicit

Constructor.

Member Function Documentation

◆ accumulate()

void PLMD::analysis::AverageVessel::accumulate ( const double &  weight,
const double &  val 
)

Accumulate the average.

◆ addDataElement()

void PLMD::vesselbase::AveragingVessel::addDataElement ( const unsigned &  myelem,
const double &  value 
)
inlineprotectedinherited

Add some value to an element of the data array.

◆ applyForce()

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

Retrieve the forces on the quantities in the vessel.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::gridtools::GridVessel.

◆ calculate()

void PLMD::analysis::AverageVessel::calculate ( const unsigned &  current,
MultiValue myvals,
std::vector< double > &  buffer,
std::vector< unsigned > &  der_list 
) const
virtual

This does nothing.

Implements PLMD::vesselbase::Vessel.

◆ checkRead()

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

Check that readin was fine.

◆ clear()

void PLMD::vesselbase::AveragingVessel::clear ( )
virtualinherited

Clear all the data stored on the grid.

◆ description()

std::string PLMD::analysis::AverageVessel::description ( )
inlinevirtual

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::vesselbase::AveragingVessel::finish ( const std::vector< double > &  buffer)
virtualinherited

Copy data from an accumulated buffer into the grid.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::gridtools::GridVessel, and PLMD::gridtools::HistogramOnGrid.

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

◆ getAverage()

double PLMD::analysis::AverageVessel::getAverage ( ) const

Get the average value.

◆ getDataElement()

double PLMD::vesselbase::AveragingVessel::getDataElement ( const unsigned &  myelem) const
inlineprotectedinherited

Get the value of one of the data element.

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

◆ getNorm()

double PLMD::vesselbase::AveragingVessel::getNorm ( ) const
inlineinherited

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

◆ getTolerance()

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

Return the value of the tolerance.

◆ noAverage()

bool PLMD::vesselbase::AveragingVessel::noAverage ( ) const
inlineprotectedinherited

Are we averaging the data.

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

◆ registerKeywords()

void PLMD::analysis::AverageVessel::registerKeywords ( Keywords keys)
static

keywords

◆ reset()

void PLMD::vesselbase::AveragingVessel::reset ( )
virtualinherited

Reset the grid so that it is cleared at start of next time it is calculated.

◆ resize()

void PLMD::analysis::AverageVessel::resize ( )
virtual

Set the size of the data 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::Vessel::setBufferStart ( unsigned &  start)
inlinevirtualinherited

Set the start of the buffer.

Reimplemented in PLMD::vesselbase::BridgeVessel.

◆ setDataElement()

void PLMD::vesselbase::AveragingVessel::setDataElement ( const unsigned &  myelem,
const double &  value 
)
inlineprotectedinherited

Set an element of the data array.

◆ setDataSize()

void PLMD::vesselbase::AveragingVessel::setDataSize ( const unsigned &  size)
protectedinherited

Set the size of the data vector.

◆ setNorm()

void PLMD::vesselbase::AveragingVessel::setNorm ( const double &  snorm)
inlineinherited

Functions for dealing with normalisation constant.

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

◆ wasreset()

bool PLMD::vesselbase::AveragingVessel::wasreset ( ) const
inherited

Was the grid cleared on the last step.

Member Data Documentation

◆ bufstart

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

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

◆ comm

Communicator& PLMD::vesselbase::Vessel::comm
protectedinherited

A copy of the communicator.

◆ domain

std::vector<double> PLMD::analysis::AverageVessel::domain
private

◆ log

Log& PLMD::vesselbase::Vessel::log
inherited

Reference to the log on which to output details.


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