MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::AdditiveMomentumInsertion< LinkedCell, dim > Class Template Reference

used to manipulate the momentum/velocity of the molecules contained in a coupling cell. More...

#include <AdditiveMomentumInsertion.h>

Inheritance diagram for coupling::AdditiveMomentumInsertion< LinkedCell, dim >:
Collaboration diagram for coupling::AdditiveMomentumInsertion< LinkedCell, dim >:

Public Member Functions

 AdditiveMomentumInsertion (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface, unsigned int numberMDTimestepsPerCouplingCycle)
 A simple constructor.
 
 ~AdditiveMomentumInsertion ()
 A simple destructor.
 
unsigned int getTimeIntervalPerMomentumInsertion () const override
 returns the interval of time steps for momentum insertion
 
void insertMomentum (coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > &cell, I02 idx) const override
 inserts momentum to the cell
 
- Public Member Functions inherited from coupling::MomentumInsertion< LinkedCell, dim >
 MomentumInsertion (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 a simple constructor
 
virtual ~MomentumInsertion ()
 a simple destructor
 

Private Attributes

const unsigned int _numberMDTimestepsPerCouplingCycle
 

Additional Inherited Members

- Protected Attributes inherited from coupling::MomentumInsertion< LinkedCell, dim >
coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::AdditiveMomentumInsertion< LinkedCell, dim >

used to manipulate the momentum/velocity of the molecules contained in a coupling cell.

This class allows to add momentum to molecules. In each MD timestep, it takes a respective fraction from the momentum buffer of a coupling cell and adds this momentum to the molecules of the coupling cell.

Template Parameters
LinkedCellthe LinkedCell class is given by the implementation of linked cells in the molecular dynamics simulation
dimthe integer dim refers to the spacial dimension of the simulation, can be 1, 2, or 3
Author
Philipp Neumann

Constructor & Destructor Documentation

◆ AdditiveMomentumInsertion()

template<class LinkedCell, unsigned int dim>
coupling::AdditiveMomentumInsertion< LinkedCell, dim >::AdditiveMomentumInsertion ( coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface,
unsigned int numberMDTimestepsPerCouplingCycle )
inline

A simple constructor.

Parameters
mdSolverInterfaceThe interface of the molecular dynamics solver in application
numberMDTimestepsPerCouplingCycleThe number of molecular dynamics timesteps within one coupling cycle

Member Function Documentation

◆ getTimeIntervalPerMomentumInsertion()

template<class LinkedCell, unsigned int dim>
unsigned int coupling::AdditiveMomentumInsertion< LinkedCell, dim >::getTimeIntervalPerMomentumInsertion ( ) const
inlineoverridevirtual

returns the interval of time steps for momentum insertion

returns 1 since momentum shall be inserted in every time step

Returns
1

Implements coupling::MomentumInsertion< LinkedCell, dim >.

◆ insertMomentum()

template<class LinkedCell, unsigned int dim>
void coupling::AdditiveMomentumInsertion< LinkedCell, dim >::insertMomentum ( coupling::datastructures::CouplingCellWithLinkedCells< LinkedCell, dim > & cell,
I02 idx ) const
inlineoverridevirtual

inserts momentum to the cell

inserts the momentum of the coupling cell and distributes it over all molecules. This method does not conserve the kinetic energy of the respective coupling cell. To conserve the energy as well, see the description of MomentumController on details how to do that.

Parameters
cellcoupling cell to insert momentum to
idxcoupling cell index of the cell

Implements coupling::MomentumInsertion< LinkedCell, dim >.

Member Data Documentation

◆ _numberMDTimestepsPerCouplingCycle

template<class LinkedCell, unsigned int dim>
const unsigned int coupling::AdditiveMomentumInsertion< LinkedCell, dim >::_numberMDTimestepsPerCouplingCycle
private

The number of molecular dynamics timesteps within one coupling cycle *‍/


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