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

This class computes the momentum over certain linked cells. More...

#include <ComputeMomentumMapping.h>

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

Public Member Functions

 ComputeMomentumMapping (coupling::interface::MDSolverInterface< LinkedCell, dim > *const mdSolverInterface)
 
 ~ComputeMomentumMapping ()
 
void beginCellIteration ()
 
void endCellIteration ()
 
void handleCell (LinkedCell &cell)
 
tarch::la::Vector< dim, double > getMomentum () const
 
tarch::la::Vector< dim, double > getMeanVelocity () const
 

Private Attributes

coupling::interface::MDSolverInterface< LinkedCell, dim > *const _mdSolverInterface
 
tarch::la::Vector< dim, double > _momentum
 
tarch::la::Vector< dim, double > _meanVelocity
 
unsigned int _particleCounter
 

Detailed Description

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

This class computes the momentum over certain linked cells.

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

Constructor & Destructor Documentation

◆ ComputeMomentumMapping()

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

Constructor

Parameters
mdSolverInterface

◆ ~ComputeMomentumMapping()

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

Destructor

Member Function Documentation

◆ beginCellIteration()

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

sets the mean velocity, momentum and the particle counter to zero, before the iteration process begins.

◆ endCellIteration()

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

computes the mean velocity, momentum in a linked cell, by dividing and multiplying the summation of the velocities computed in handleCell(...) over the number if particle and in particle mass respectively.

◆ getMeanVelocity()

template<class LinkedCell, unsigned int dim>
tarch::la::Vector< dim, double > coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim >::getMeanVelocity ( ) const
inline

returns the mean velocity inside a linked cell

Returns
_meanVelocity

◆ getMomentum()

template<class LinkedCell, unsigned int dim>
tarch::la::Vector< dim, double > coupling::cellmappings::ComputeMomentumMapping< LinkedCell, dim >::getMomentum ( ) const
inline

returns the momentum inside a linked cell

Returns
_momentum

◆ handleCell()

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

counts the molecules inside a linked cell and sums up the of the velocity of all particles inside the cell and saves it as momentum.

Parameters
cell

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