ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
Observables::Observable Class Referenceabstract

Base class for observables. More...

#include <Observable.hpp>

Inheritance diagram for Observables::Observable:

Public Member Functions

 Observable ()=default
virtual ~Observable ()=default
virtual std::vector< double > operator() (boost::mpi::communicator const &comm) const =0
 Calculate the set of values measured by the observable.
std::size_t n_values () const
 Size of the flat array returned by the observable.
virtual std::vector< std::size_t > shape () const =0
 Dimensions needed to reshape the flat array returned by the observable.

Detailed Description

Base class for observables.

An observable extracts raw data from a system or compute a statistic based on the state of a system, and returns an array of doubles.

Observables typically don't have setters or getters to access and modify their member variables, and usually only have a default constructor with no argument. Each observable class has a corresponding interface in ScriptInterface::Observables, where setters and getters are defined.

Definition at line 42 of file core/observables/Observable.hpp.

Constructor & Destructor Documentation

◆ Observable()

Observables::Observable::Observable ( )
default

◆ ~Observable()

virtual Observables::Observable::~Observable ( )
virtualdefault

Member Function Documentation

◆ n_values()

std::size_t Observables::Observable::n_values ( ) const
inline

◆ operator()()

virtual std::vector< double > Observables::Observable::operator() ( boost::mpi::communicator const & comm) const
pure virtual

◆ shape()

virtual std::vector< std::size_t > Observables::Observable::shape ( ) const
pure virtual

Dimensions needed to reshape the flat array returned by the observable.

Implemented in Observables::BondAngles, Observables::BondDihedrals, Observables::CosPersistenceAngles, Observables::CylindricalFluxDensityProfile, Observables::CylindricalLBFluxDensityProfileAtParticlePositions, Observables::CylindricalLBVelocityProfile, Observables::CylindricalLBVelocityProfileAtParticlePositions, Observables::CylindricalVelocityProfile, Observables::DPDPressure, Observables::Energy, Observables::FluxDensityProfile, Observables::ForceDensityProfile, Observables::LBFluidPressureTensor, Observables::LBVelocityProfile, Observables::PairwiseDistances, Observables::ParticleDistances, Observables::ParticleObservable< ObsType >, Observables::ParticleObservable< ParticleObservables::AngularVelocities >, Observables::ParticleObservable< ParticleObservables::BodyAngularVelocities >, Observables::ParticleObservable< ParticleObservables::BodyVelocities >, Observables::ParticleObservable< ParticleObservables::CenterOfMassPosition >, Observables::ParticleObservable< ParticleObservables::CenterOfMassVelocity >, Observables::ParticleObservable< ParticleObservables::DipoleFields >, Observables::ParticleObservable< ParticleObservables::Directors >, Observables::ParticleObservable< ParticleObservables::Forces >, Observables::ParticleObservable< ParticleObservables::Positions >, Observables::ParticleObservable< ParticleObservables::Sum< ParticleObservables::DipoleMoment > >, Observables::ParticleObservable< ParticleObservables::Sum< ParticleObservables::Product< ParticleObservables::Charge, ParticleObservables::Position > > >, Observables::ParticleObservable< ParticleObservables::Velocities >, Observables::Pressure, Observables::PressureTensor, Observables::ProfileObservable, Observables::RDF, and Observables::TotalForce.

Referenced by n_values().


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