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

This class sets kinetic energy over several linked cells. More...

#include <SetKineticEnergyMapping.h>

Collaboration diagram for coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >:

Public Member Functions

 SetKineticEnergyMapping (const double &oldKineticEnergy, const double &newKineticEnergy, const unsigned int &numberParticles, const tarch::la::Vector< dim, double > &meanVelocity, coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 
 ~SetKineticEnergyMapping ()
 
void beginCellIteration ()
 
void endCellIteration ()
 
void handleCell (LinkedCell &cell)
 

Private Member Functions

double getCorrectionFactor (const double &oldKineticEnergy, const double &newKineticEnergy, const unsigned int &numberParticles, const tarch::la::Vector< dim, double > &meanVelocity) const
 

Private Attributes

coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 
const tarch::la::Vector< dim, double > _meanVelocity
 
const double _correctionFactor
 

Detailed Description

template<class LinkedCell, unsigned int dim>
class coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >

This class sets kinetic energy over several linked cells.

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

Constructor & Destructor Documentation

◆ SetKineticEnergyMapping()

template<class LinkedCell, unsigned int dim>
coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >::SetKineticEnergyMapping ( const double & oldKineticEnergy,
const double & newKineticEnergy,
const unsigned int & numberParticles,
const tarch::la::Vector< dim, double > & meanVelocity,
coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface )
inline

obtains the old momentum over the region of interest. Besides, obtains the new momentum that shall be set.

Parameters
oldKineticEnergy
newKineticEnergy
numberParticles
meanVelocity
mdSolverInterface

◆ ~SetKineticEnergyMapping()

template<class LinkedCell, unsigned int dim>
coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >::~SetKineticEnergyMapping ( )
inline

Destructor

Member Function Documentation

◆ beginCellIteration()

template<class LinkedCell, unsigned int dim>
void coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >::beginCellIteration ( )
inline

empty function

◆ endCellIteration()

template<class LinkedCell, unsigned int dim>
void coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >::endCellIteration ( )
inline

empty function

◆ getCorrectionFactor()

template<class LinkedCell, unsigned int dim>
double coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >::getCorrectionFactor ( const double & oldKineticEnergy,
const double & newKineticEnergy,
const unsigned int & numberParticles,
const tarch::la::Vector< dim, double > & meanVelocity ) const
inlineprivate

returns the correction factor between the old and new kinetic energy

Parameters
numberParticles
momentum
Returns
correctionFactor
Remarks
no correction possible if the correction factor would tend to infinity; I just hard-coded 1e-7 for this case

◆ handleCell()

template<class LinkedCell, unsigned int dim>
void coupling::cellmappings::SetKineticEnergyMapping< LinkedCell, dim >::handleCell ( LinkedCell & cell)
inline

sets new velocity: still with same mean, but re-scale the deviation for correct thermal energy

Parameters
cell

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