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

#include <Constraint.hpp>

+ Inheritance diagram for Constraints::Constraint:

Public Member Functions

virtual void add_energy (const Particle &p, const Utils::Vector3d &folded_pos, double time, Observable_stat &energy) const =0
 Add constraint energy for particle to the energy observable.
 
virtual ParticleForce force (const Particle &p, const Utils::Vector3d &folded_pos, double time)=0
 Calculate the force of the constraint on a particle.
 
virtual bool fits_in_box (Utils::Vector3d const &box) const =0
 Check if constraints if compatible with box size.
 
virtual void reset_force ()
 
virtual ~Constraint ()=default
 

Detailed Description

Definition at line 30 of file core/constraints/Constraint.hpp.

Constructor & Destructor Documentation

◆ ~Constraint()

virtual Constraints::Constraint::~Constraint ( )
virtualdefault

Member Function Documentation

◆ add_energy()

virtual void Constraints::Constraint::add_energy ( const Particle p,
const Utils::Vector3d folded_pos,
double  time,
Observable_stat energy 
) const
pure virtual

Add constraint energy for particle to the energy observable.

Parameters
[in]pThe particle to add the energy for.
[in]folded_posFolded position of the particle.
[in]timeThe time at which the energy should be calculated.
[out]energyEnergy observable to add this constraint's energy to.

Implemented in Constraints::ExternalField< Coupling, Field >, Constraints::HomogeneousMagneticField, Constraints::ShapeBasedConstraint, and Constraints::ExternalPotential< Coupling, Field >.

◆ fits_in_box()

virtual bool Constraints::Constraint::fits_in_box ( Utils::Vector3d const &  box) const
pure virtual

◆ force()

virtual ParticleForce Constraints::Constraint::force ( const Particle p,
const Utils::Vector3d folded_pos,
double  time 
)
pure virtual

Calculate the force of the constraint on a particle.

Parameters
[in]pThe particle to calculate the force for.
[in]folded_posFolded position of the particle.
[in]timeThe time at which the force should be calculated.
Returns
The force on the particle.

Implemented in Constraints::HomogeneousMagneticField, Constraints::ExternalField< Coupling, Field >, Constraints::ExternalPotential< Coupling, Field >, and Constraints::ShapeBasedConstraint.

◆ reset_force()

virtual void Constraints::Constraint::reset_force ( )
inlinevirtual

Reimplemented in Constraints::ShapeBasedConstraint.

Definition at line 59 of file core/constraints/Constraint.hpp.


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