MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::datastructures::Molecule< dim > Class Template Reference

molecule representation for coupling component. Dericed from the class coupling::interface::Molecule More...

#include <Molecule.h>

Inheritance diagram for coupling::datastructures::Molecule< dim >:
Collaboration diagram for coupling::datastructures::Molecule< dim >:

Public Member Functions

 Molecule (const tarch::la::Vector< dim, double > &position, const tarch::la::Vector< dim, double > &velocity, const tarch::la::Vector< dim, double > &force, const double &potentialEnergy)
 
virtual ~Molecule ()
 
tarch::la::Vector< dim, double > getVelocity () const
 
void setVelocity (const tarch::la::Vector< dim, double > &velocity)
 
tarch::la::Vector< dim, double > getPosition () const
 
void setPosition (const tarch::la::Vector< dim, double > &position)
 
void setForce (const tarch::la::Vector< dim, double > &force)
 
tarch::la::Vector< dim, double > getForce () const
 
double getPotentialEnergy () const
 
void setPotentialEnergy (const double &potentialEnergy)
 

Private Attributes

tarch::la::Vector< dim, double > _position
 
tarch::la::Vector< dim, double > _velocity
 
tarch::la::Vector< dim, double > _force
 
double _potentialEnergy
 

Detailed Description

template<unsigned int dim>
class coupling::datastructures::Molecule< dim >

molecule representation for coupling component. Dericed from the class coupling::interface::Molecule

Template Parameters
dimNumber of dimensions; it can be 1, 2 or 3
Author
Philipp Neumann

Constructor & Destructor Documentation

◆ Molecule()

template<unsigned int dim>
coupling::datastructures::Molecule< dim >::Molecule ( const tarch::la::Vector< dim, double > & position,
const tarch::la::Vector< dim, double > & velocity,
const tarch::la::Vector< dim, double > & force,
const double & potentialEnergy )
inline

Constructor: initialises the molecule;

Parameters
position
velocity
force
potentialEnergy

◆ ~Molecule()

template<unsigned int dim>
virtual coupling::datastructures::Molecule< dim >::~Molecule ( )
inlinevirtual

Destructor

Reimplemented from coupling::interface::Molecule< dim >.

Member Function Documentation

◆ getForce()

template<unsigned int dim>
tarch::la::Vector< dim, double > coupling::datastructures::Molecule< dim >::getForce ( ) const
inlinevirtual

returns the force of the molecule

Returns
_force Force

Implements coupling::interface::Molecule< dim >.

◆ getPosition()

template<unsigned int dim>
tarch::la::Vector< dim, double > coupling::datastructures::Molecule< dim >::getPosition ( ) const
inlinevirtual

returns the velocity of the molecule

Returns
_position Position

Implements coupling::interface::Molecule< dim >.

◆ getPotentialEnergy()

template<unsigned int dim>
double coupling::datastructures::Molecule< dim >::getPotentialEnergy ( ) const
inlinevirtual

returns potential energy of the molecule

Returns
_potentialEnergy Potential energy of the molecule

Implements coupling::interface::Molecule< dim >.

◆ getVelocity()

template<unsigned int dim>
tarch::la::Vector< dim, double > coupling::datastructures::Molecule< dim >::getVelocity ( ) const
inlinevirtual

returns the velocity of the molecule

Returns
_velocity Velocity

Implements coupling::interface::Molecule< dim >.

◆ setForce()

template<unsigned int dim>
void coupling::datastructures::Molecule< dim >::setForce ( const tarch::la::Vector< dim, double > & force)
inlinevirtual

sets the force acting on this molecule. This function is called in the USHER scheme so far only if the force of a newly created molecule should be set

Parameters
forceForce
Todo
Philipp When the force should be set? when not? you need to implement this function.

Implements coupling::interface::Molecule< dim >.

◆ setPosition()

template<unsigned int dim>
void coupling::datastructures::Molecule< dim >::setPosition ( const tarch::la::Vector< dim, double > & position)
inlinevirtual

sets the velocity of the molecule

Parameters
positionPosition

Implements coupling::interface::Molecule< dim >.

◆ setPotentialEnergy()

template<unsigned int dim>
void coupling::datastructures::Molecule< dim >::setPotentialEnergy ( const double & potentialEnergy)
inlinevirtual

sets potential energy of the molecule

Parameters
_potentialEnergyPotential energy of the molecule

Implements coupling::interface::Molecule< dim >.

◆ setVelocity()

template<unsigned int dim>
void coupling::datastructures::Molecule< dim >::setVelocity ( const tarch::la::Vector< dim, double > & velocity)
inlinevirtual

sets the velocity of the molecule

Parameters
velocityVelocity

Implements coupling::interface::Molecule< dim >.

Member Data Documentation

◆ _force

template<unsigned int dim>
tarch::la::Vector<dim, double> coupling::datastructures::Molecule< dim >::_force
private

Force vector of the molecule

◆ _position

template<unsigned int dim>
tarch::la::Vector<dim, double> coupling::datastructures::Molecule< dim >::_position
private

Position of the molecule

◆ _potentialEnergy

template<unsigned int dim>
double coupling::datastructures::Molecule< dim >::_potentialEnergy
private

Potential energy of the molecule

◆ _velocity

template<unsigned int dim>
tarch::la::Vector<dim, double> coupling::datastructures::Molecule< dim >::_velocity
private

Velocity vector of the molecule


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